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

Andreas Rheinhardt git at videolan.org
Thu Jun 20 20:01:30 EEST 2024


ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Fri Jun 14 18:07:15 2024 +0200| [48cdb7d579a55ab0d7dac25409ad838e0e82fa74] | committer: Andreas Rheinhardt

avcodec/mpegvideo_dec: Move setting dct_unquant funcs to h263dec.c

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 at outlook.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=48cdb7d579a55ab0d7dac25409ad838e0e82fa74
---

 libavcodec/h263dec.c       | 5 +++++
 libavcodec/mpegvideo_dec.c | 6 ------
 2 files changed, 5 insertions(+), 6 deletions(-)

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



More information about the ffmpeg-cvslog mailing list