summaryrefslogtreecommitdiff
path: root/libavcodec/vc1dec.c
diff options
context:
space:
mode:
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>2009-09-24 10:49:47 +0000
committerReimar Döffinger <Reimar.Doeffinger@gmx.de>2009-09-24 10:49:47 +0000
commitc05df6895f36a171cf9a100000afa61ed75c8271 (patch)
tree2207773456354a84a8a5f93b16a3a0bdebcd330f /libavcodec/vc1dec.c
parent9c3068c80eef5c6585a012ddc88438ad44faa422 (diff)
Use ff_msmpeg4_decode_init to initialize ff_msmp4_mb_i_vlc since static
VLC tables should only be initialized from one place. This initializes/calculates more VLC tables than necessary for VC1 decoding, but this is only done once and only a small overhead in time and space (maybe 30 kB) it seems not worth adding a separate function. Originally committed as revision 20010 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/vc1dec.c')
-rw-r--r--libavcodec/vc1dec.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c
index 0a59bd2fd7..73816018ff 100644
--- a/libavcodec/vc1dec.c
+++ b/libavcodec/vc1dec.c
@@ -124,10 +124,6 @@ static int vc1_init_common(VC1Context *v)
&vc1_ac_tables[i][0][1], 8, 4,
&vc1_ac_tables[i][0][0], 8, 4, INIT_VLC_USE_NEW_STATIC);
}
- //FIXME: switching to INIT_VLC_STATIC() results in incorrect decoding
- init_vlc(&ff_msmp4_mb_i_vlc, MB_INTRA_VLC_BITS, 64,
- &ff_msmp4_mb_i_table[0][1], 4, 2,
- &ff_msmp4_mb_i_table[0][0], 4, 2, INIT_VLC_USE_STATIC);
done = 1;
}
@@ -3000,6 +2996,8 @@ static av_cold int vc1_decode_init(AVCodecContext *avctx)
if(ff_h263_decode_init(avctx) < 0)
return -1;
if (vc1_init_common(v) < 0) return -1;
+ // only for ff_msmp4_mb_i_table
+ if (ff_msmpeg4_decode_init(s) < 0) return -1;
avctx->coded_width = avctx->width;
avctx->coded_height = avctx->height;