diff mbox series

[FFmpeg-devel,22/24] avcodec/h263dec: Move initializing qpel DSP context to mpeg4videodec.c

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

Commit Message

Andreas Rheinhardt Nov. 3, 2022, 2:57 a.m. UTC
The MPEG-4 decoder is the only decoder based upon H.263 that
supports quarterpel motion vectors.

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

Patch

diff --git a/libavcodec/h263dec.c b/libavcodec/h263dec.c
index da3c9899e3..71b846ba74 100644
--- a/libavcodec/h263dec.c
+++ b/libavcodec/h263dec.c
@@ -51,7 +51,6 @@ 
 #include "mpegvideo.h"
 #include "mpegvideodec.h"
 #include "msmpeg4dec.h"
-#include "qpeldsp.h"
 #include "thread.h"
 #include "wmv2dec.h"
 
@@ -140,7 +139,6 @@  av_cold int ff_h263_decode_init(AVCodecContext *avctx)
     }
 
     ff_h263dsp_init(&s->h263dsp);
-    ff_qpeldsp_init(&s->qdsp);
     ff_h263_decode_init_vlc();
 
     return 0;
diff --git a/libavcodec/mpeg4videodec.c b/libavcodec/mpeg4videodec.c
index 4ab558b46f..f91d2753f9 100644
--- a/libavcodec/mpeg4videodec.c
+++ b/libavcodec/mpeg4videodec.c
@@ -43,6 +43,7 @@ 
 #include "h263data.h"
 #include "h263dec.h"
 #include "profiles.h"
+#include "qpeldsp.h"
 #include "threadframe.h"
 #include "xvididct.h"
 #include "unary.h"
@@ -3824,6 +3825,7 @@  static av_cold int decode_init(AVCodecContext *avctx)
 
     avctx->chroma_sample_location = AVCHROMA_LOC_LEFT;
 
+    ff_qpeldsp_init(&s->qdsp);
     ff_mpeg4videodsp_init(&ctx->mdsp);
 
     ff_thread_once(&init_static_once, mpeg4_init_static);