diff mbox series

[FFmpeg-devel,06/19] avcodec/vc1_parser: Don't call ff_vc1_init_common()

Message ID GV1P250MB07372C21195A4E6E0708B45B8F349@GV1P250MB0737.EURP250.PROD.OUTLOOK.COM
State Accepted
Commit e4df54851ae36ea2c93928c0ca237b393668254d
Headers show
Series [FFmpeg-devel,01/19] avcodec/vc1: Don't check for AVCodecContext.codec | expand


Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Andreas Rheinhardt Oct. 30, 2022, 11:56 p.m. UTC
It is unnecessary to initialize the VLCs: The only VLC
that was only ever used by the code reachable from the parser
was ff_vc1_bfraction_vlc; and this VLC has been removed.

Yet vc1dsp is still needed for startcode_find_candidate.
Maybe this should be factored out of vc1dsp in a later

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
 libavcodec/vc1_parser.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox series


diff --git a/libavcodec/vc1_parser.c b/libavcodec/vc1_parser.c
index d57fcdf1e1..a459a2aa7d 100644
--- a/libavcodec/vc1_parser.c
+++ b/libavcodec/vc1_parser.c
@@ -29,6 +29,7 @@ 
 #include "parser.h"
 #include "vc1.h"
 #include "get_bits.h"
+#include "vc1dsp.h"
 /** The maximum number of bytes of a sequence, entry point or
  *  frame header whose values we pay any attention to */
@@ -264,7 +265,7 @@  static av_cold int vc1_parse_init(AVCodecParserContext *s)
     vpc->bytes_to_skip = 0;
     vpc->unesc_index = 0;
     vpc->search_state = NO_MATCH;
-    ff_vc1_init_common(&vpc->v);
+    ff_vc1dsp_init(&vpc->v.vc1dsp); /* startcode_find_candidate */
     return 0;