diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-10-30 18:22:16 +0100 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-11-06 17:41:26 +0100 |
commit | cbe6ef10314e570b7fa28572f0de57ae5eaebf1e (patch) | |
tree | 87f64fe4a544466517d2c9b392fc1ea055e12f87 /libavcodec/msmpeg4.c | |
parent | d1d30edf42da29fe4ab33c529112381cfea0a254 (diff) | |
download | ffmpeg-cbe6ef10314e570b7fa28572f0de57ae5eaebf1e.tar.gz |
avcodec/vc1dec: Split VC-1 decoders from msmpeg4
The only msmpeg4 code that is ever executed by the VC-1 based
decoders is ff_msmpeg4_decode_init() and what is directly
reachable from it. This is:
a) A call to av_image_check_size(), then ff_h263_decode_init(),
b) followed by setting [yc]_dc_scale_table and initializing
scantable/permutations.
c) Afterwards, some static tables are initialized.
d) Finally, slice_height is set.
The replacement for ff_msmpeg4_decode_init() performs a)
just like now; it also sets [yc]_dc_scale_table,
but it only initializes inter_scantable and intra_scantable
and not permutated_intra_[hv]_scantable: The latter are only
used inside decode_mb callbacks which are only called
in ff_h263_decode_frame() which is unused for VC-1.*
The static tables initialized in c) are not used at all by
VC-1 (the ones that are used have been factored out in
previous commits); this avoids touching 327KiB of .bss.
slice_height is also not used by the VC-1 decoder (setting
it in ff_msmpeg4_decode_init() is probably redundant after
b34397b4cd780b5692548e7d021ec884c7217dba).
*: It follows from this that the VC-1 decoder is not really
based upon the H.263 decoder either; changing this will
be done in a future commit.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/msmpeg4.c')
-rw-r--r-- | libavcodec/msmpeg4.c | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/libavcodec/msmpeg4.c b/libavcodec/msmpeg4.c index 4daf1666cc..a2c4c57728 100644 --- a/libavcodec/msmpeg4.c +++ b/libavcodec/msmpeg4.c @@ -27,8 +27,6 @@ * MSMPEG4 backend for encoder and decoder */ -#include "config_components.h" - #include "libavutil/thread.h" #include "avcodec.h" @@ -40,8 +38,6 @@ #include "msmpeg4data.h" #include "msmpeg4_vc1_data.h" #include "mpegvideodata.h" -#include "vc1data.h" -#include "libavutil/imgutils.h" /* * You can also call this codec: MPEG-4 with a twist! @@ -139,16 +135,8 @@ av_cold void ff_msmpeg4_common_init(MpegEncContext *s) s->y_dc_scale_table= ff_wmv1_y_dc_scale_table; s->c_dc_scale_table= ff_wmv1_c_dc_scale_table; break; -#if CONFIG_VC1_DECODER - case 6: - s->y_dc_scale_table= ff_wmv3_dc_scale_table; - s->c_dc_scale_table= ff_wmv3_dc_scale_table; - break; -#endif - } - if(s->msmpeg4_version>=4){ ff_init_scantable(s->idsp.idct_permutation, &s->intra_scantable, ff_wmv1_scantable[1]); ff_init_scantable(s->idsp.idct_permutation, &s->inter_scantable, ff_wmv1_scantable[0]); |