diff mbox series

[FFmpeg-devel,67/67] avcodec/mpegvideo_dec: Move setting dct_unquant funcs to h263dec.c

Message ID GV1P250MB0737D93E057F7A528CB2EE938FC22@GV1P250MB0737.EURP250.PROD.OUTLOOK.COM
State New
Headers show
Series [FFmpeg-devel,01/57] avcodec/vc1: Combine identical checks | expand

Commit Message

Andreas Rheinhardt June 14, 2024, 6:25 p.m. UTC
It is a better place for it; no non-h263-based decoder needs
these functions any more (both H.261 and the error resilience
code recently stopped doing so).

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavcodec/h263dec.c       | 5 +++++
 libavcodec/mpegvideo_dec.c | 6 ------
 2 files changed, 5 insertions(+), 6 deletions(-)
diff mbox series

Patch

diff --git a/libavcodec/h263dec.c b/libavcodec/h263dec.c
index a81786479d..0c23012584 100644
--- a/libavcodec/h263dec.c
+++ b/libavcodec/h263dec.c
@@ -102,6 +102,11 @@  av_cold int ff_h263_decode_init(AVCodecContext *avctx)
     s->decode_mb       = ff_h263_decode_mb;
     s->low_delay       = 1;
 
+    // dct_unquantize defaults for H.263;
+    // they might change on a per-frame basis for MPEG-4.
+    s->dct_unquantize_intra = s->dct_unquantize_h263_intra;
+    s->dct_unquantize_inter = s->dct_unquantize_h263_inter;
+
     /* select sub codec */
     switch (avctx->codec->id) {
     case AV_CODEC_ID_H263:
diff --git a/libavcodec/mpegvideo_dec.c b/libavcodec/mpegvideo_dec.c
index da88a35120..1cab108935 100644
--- a/libavcodec/mpegvideo_dec.c
+++ b/libavcodec/mpegvideo_dec.c
@@ -60,12 +60,6 @@  int ff_mpv_decode_init(MpegEncContext *s, AVCodecContext *avctx)
 
     ff_mpv_idct_init(s);
 
-    // dct_unquantize defaults for H.261 and H.263;
-    // they might change on a per-frame basis for MPEG-4.
-    // Unused by the MPEG-1/2 decoders.
-    s->dct_unquantize_intra = s->dct_unquantize_h263_intra;
-    s->dct_unquantize_inter = s->dct_unquantize_h263_inter;
-
     ff_h264chroma_init(&s->h264chroma, 8); //for lowres
 
     if (s->picture_pool)  // VC-1 can call this multiple times