projects
/
libav.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a1684cf
)
mpeg12enc: Don't set up run-level info for level 0.
author
Alex Converse
<alex.converse@gmail.com>
Thu, 3 Nov 2011 22:56:37 +0000
(15:56 -0700)
committer
Alex Converse
<alex.converse@gmail.com>
Mon, 7 Nov 2011 18:50:48 +0000
(10:50 -0800)
run: The number of zero coefficients preceding a non-zero coefficient,
in the scan order. The absolute value of the non-zero coefficient is
called "level".
The run-level code makes illegal reads when trying to set up tables for
nonsense level 0.
libavcodec/mpeg12enc.c
patch
|
blob
|
blame
|
history
diff --git
a/libavcodec/mpeg12enc.c
b/libavcodec/mpeg12enc.c
index
5dedabd
..
26d26c7
100644
(file)
--- a/
libavcodec/mpeg12enc.c
+++ b/
libavcodec/mpeg12enc.c
@@
-74,6
+74,8
@@
static void init_uni_ac_vlc(RLTable *rl, uint8_t *uni_ac_vlc_len){
for(i=0; i<128; i++){
int level= i-64;
int run;
+ if (!level)
+ continue;
for(run=0; run<64; run++){
int len, bits, code;