diff mbox series

[FFmpeg-devel,76/80] avcodec/mpegvideo: Move ehc_mode to H263DecContext

Message ID AM7PR03MB666092695CD29B9768EDC5E28F289@AM7PR03MB6660.eurprd03.prod.outlook.com
State New
Headers show
Series [FFmpeg-devel,v2,01/69] avcodec/avcodec: Avoid MpegEncContext in AVHWAccel.decode_mb | expand

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished
andriy/make_ppc success Make finished
andriy/make_fate_ppc success Make fate finished

Commit Message

Andreas Rheinhardt Feb. 3, 2022, 1:06 a.m. UTC
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavcodec/flvdec.c     | 2 +-
 libavcodec/h263dec.c    | 2 +-
 libavcodec/h263dec.h    | 1 +
 libavcodec/ituh263dec.c | 2 +-
 libavcodec/mpegvideo.h  | 1 -
 5 files changed, 4 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/libavcodec/flvdec.c b/libavcodec/flvdec.c
index 8ff4c03100..d33cc11b27 100644
--- a/libavcodec/flvdec.c
+++ b/libavcodec/flvdec.c
@@ -100,7 +100,7 @@  int ff_flv_decode_picture_header(H263DecContext *h)
 
     s->f_code = 1;
 
-    if (s->ehc_mode)
+    if (h->ehc_mode)
         s->avctx->sample_aspect_ratio= (AVRational){1,2};
 
     if (s->avctx->debug & FF_DEBUG_PICT_INFO) {
diff --git a/libavcodec/h263dec.c b/libavcodec/h263dec.c
index 91e95b910e..db03e04143 100644
--- a/libavcodec/h263dec.c
+++ b/libavcodec/h263dec.c
@@ -139,7 +139,7 @@  av_cold int ff_h263_decode_init(AVCodecContext *avctx)
 
     if (avctx->codec_tag == AV_RL32("L263") || avctx->codec_tag == AV_RL32("S263"))
         if (avctx->extradata_size == 56 && avctx->extradata[0] == 1)
-            s->ehc_mode = 1;
+            h->ehc_mode = 1;
 
     /* for H.263, we allocate the images after having read the header */
     if (avctx->codec->id != AV_CODEC_ID_H263 &&
diff --git a/libavcodec/h263dec.h b/libavcodec/h263dec.h
index 9c4c26242c..e090f4b39b 100644
--- a/libavcodec/h263dec.h
+++ b/libavcodec/h263dec.h
@@ -45,6 +45,7 @@  typedef struct H263DecContext {
 
     int (*decode_mb)(MPVDecContext *s, int16_t block[12][64]); // used to avoid a switch
     int long_vectors;      ///< use horrible H.263v1 long vector mode
+    int ehc_mode;
 } H263DecContext;
 
 int ff_h263_decode_motion(MPVDecContext *s, int pred, int f_code);
diff --git a/libavcodec/ituh263dec.c b/libavcodec/ituh263dec.c
index 299a668290..8467746a0e 100644
--- a/libavcodec/ituh263dec.c
+++ b/libavcodec/ituh263dec.c
@@ -1258,7 +1258,7 @@  int ff_h263_decode_picture_header(H263DecContext *h)
                 height = ff_h263_format[format][1];
                 s->avctx->sample_aspect_ratio= (AVRational){12,11};
             }
-            s->avctx->sample_aspect_ratio.den <<= s->ehc_mode;
+            s->avctx->sample_aspect_ratio.den <<= h->ehc_mode;
             if ((width == 0) || (height == 0))
                 return -1;
             s->width = width;
diff --git a/libavcodec/mpegvideo.h b/libavcodec/mpegvideo.h
index 0e26bed7fd..7be9b889ea 100644
--- a/libavcodec/mpegvideo.h
+++ b/libavcodec/mpegvideo.h
@@ -302,7 +302,6 @@  typedef struct MPVContext {
     int prev_mb_info, last_mb_info;
     uint8_t *mb_info_ptr;
     int mb_info_size;
-    int ehc_mode;
 
     /* H.263+ specific */
     int umvplus;                    ///< == H.263+ && unrestricted_mv