Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
6300c80a
Commit
6300c80a
authored
Jul 11, 2002
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dont trash table in GET_VLC
Originally committed as revision 741 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
5ea6f10f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
6 deletions
+3
-6
common.c
libavcodec/common.c
+1
-1
common.h
libavcodec/common.h
+2
-5
No files found.
libavcodec/common.c
View file @
6300c80a
...
...
@@ -286,7 +286,7 @@ static int build_table(VLC *vlc, int table_nb_bits,
return
-
1
;
/* note: realloc has been done, so reload tables */
table
=
&
vlc
->
table
[
table_index
];
table
[
i
][
0
]
=
index
-
table_index
;
//code
table
[
i
][
0
]
=
index
;
//code
}
}
return
table_index
;
...
...
libavcodec/common.h
View file @
6300c80a
...
...
@@ -724,7 +724,6 @@ int init_vlc(VLC *vlc, int nb_bits, int nb_codes,
const
void
*
codes
,
int
codes_wrap
,
int
codes_size
);
void
free_vlc
(
VLC
*
vlc
);
//note table will be trashed (pointer increased)
#define GET_VLC(code, name, gb, table, bits, max_depth)\
{\
int n, index, nb_bits;\
...
...
@@ -738,9 +737,8 @@ void free_vlc(VLC *vlc);
UPDATE_CACHE(name, gb)\
\
nb_bits = -n;\
table += code;\
\
index= SHOW_UBITS(name, gb, nb_bits);\
index= SHOW_UBITS(name, gb, nb_bits)
+ code
;\
code = table[index][0];\
n = table[index][1];\
if(max_depth > 2 && n < 0){\
...
...
@@ -748,9 +746,8 @@ void free_vlc(VLC *vlc);
UPDATE_CACHE(name, gb)\
\
nb_bits = -n;\
table += code;\
\
index= SHOW_UBITS(name, gb, nb_bits);\
index= SHOW_UBITS(name, gb, nb_bits)
+ code
;\
code = table[index][0];\
n = table[index][1];\
}\
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment