[FFmpeg-devel] [PATCH] vc1: fix ff_msmp4_mb_i_table[0][0] initialization
Reimar Döffinger
Reimar.Doeffinger
Thu Sep 24 11:35:14 CEST 2009
Hello,
static vlc tables can't really be properly initialized from two places
(besides it being code duplication).
I suggest to just call ff_msmpeg4_decode_init instead, but if that
really is considered too heavy-weight just extraction the
ff_msmp4_mb_i_vlc initialization into a separate function would be
possible, too.
Patch:
Index: vc1dec.c
===================================================================
--- vc1dec.c (revision 20001)
+++ vc1dec.c (working copy)
@@ -124,10 +124,6 @@
&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 @@
if(ff_h263_decode_init(avctx) < 0)
return -1;
if (vc1_init_common(v) < 0) return -1;
+ // only for ff_msmp4_mb_i_table[0][0]
+ if (ff_msmpeg4_decode_init(s) < 0) return -1;
avctx->coded_width = avctx->width;
avctx->coded_height = avctx->height;
More information about the ffmpeg-devel
mailing list