[FFmpeg-cvslog] avcodec/mpegvideo: Remove h263_plus

Andreas Rheinhardt git at videolan.org
Mon May 26 06:25:24 EEST 2025


ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Wed May 21 02:21:45 2025 +0200| [ac1e6d21718edee6c54e3f6fb409d6d09921423c] | committer: Andreas Rheinhardt

avcodec/mpegvideo: Remove h263_plus

It is only used to indicate to ff_h263_show_pict_info()
that we are decoding H.263+; pass this information
via a function parameter instead.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>

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

 libavcodec/flvdec.c       |  2 --
 libavcodec/h263dec.h      |  2 +-
 libavcodec/intelh263dec.c |  3 +--
 libavcodec/ituh263dec.c   | 13 ++++++++-----
 libavcodec/mpegvideo.h    |  1 -
 5 files changed, 10 insertions(+), 11 deletions(-)

diff --git a/libavcodec/flvdec.c b/libavcodec/flvdec.c
index 627538ef83..e8c1595639 100644
--- a/libavcodec/flvdec.c
+++ b/libavcodec/flvdec.c
@@ -89,8 +89,6 @@ int ff_flv_decode_picture_header(MpegEncContext *s)
     skip_bits1(&s->gb); /* deblocking flag */
     s->chroma_qscale = s->qscale = get_bits(&s->gb, 5);
 
-    s->h263_plus = 0;
-
     s->h263_long_vectors = 0;
 
     /* PEI */
diff --git a/libavcodec/h263dec.h b/libavcodec/h263dec.h
index 633d4aa577..c1306c7ec5 100644
--- a/libavcodec/h263dec.h
+++ b/libavcodec/h263dec.h
@@ -55,7 +55,7 @@ int ff_h263_decode_mba(MpegEncContext *s);
 /**
  * Print picture info if FF_DEBUG_PICT_INFO is set.
  */
-void ff_h263_show_pict_info(MpegEncContext *s);
+void ff_h263_show_pict_info(MpegEncContext *s, int h263_plus);
 
 int ff_intel_h263_decode_picture_header(MpegEncContext *s);
 int ff_h263_decode_mb(MpegEncContext *s,
diff --git a/libavcodec/intelh263dec.c b/libavcodec/intelh263dec.c
index b2e7fa6c54..02016e93bf 100644
--- a/libavcodec/intelh263dec.c
+++ b/libavcodec/intelh263dec.c
@@ -57,7 +57,6 @@ int ff_intel_h263_decode_picture_header(MpegEncContext *s)
         av_log(s->avctx, AV_LOG_ERROR, "Intel H.263 free format not supported\n");
         return -1;
     }
-    s->h263_plus = 0;
 
     s->pict_type = AV_PICTURE_TYPE_I + get_bits1(&s->gb);
 
@@ -122,7 +121,7 @@ int ff_intel_h263_decode_picture_header(MpegEncContext *s)
 
     s->gob_index = H263_GOB_HEIGHT(s->height);
 
-    ff_h263_show_pict_info(s);
+    ff_h263_show_pict_info(s, 0);
 
     return 0;
 }
diff --git a/libavcodec/ituh263dec.c b/libavcodec/ituh263dec.c
index 7965b77ff3..21c78f3cb5 100644
--- a/libavcodec/ituh263dec.c
+++ b/libavcodec/ituh263dec.c
@@ -77,7 +77,8 @@ static const int16_t h263_mb_type_b_map[15]= {
     MB_TYPE_INTRA4x4                | MB_TYPE_CBP | MB_TYPE_QUANT,
 };
 
-void ff_h263_show_pict_info(MpegEncContext *s){
+void ff_h263_show_pict_info(MpegEncContext *s, int h263_plus)
+{
     if(s->avctx->debug&FF_DEBUG_PICT_INFO){
     av_log(s->avctx, AV_LOG_DEBUG, "qp:%d %c size:%d rnd:%d%s%s%s%s%s%s%s%s%s %d/%d\n",
          s->qscale, av_get_picture_type_char(s->pict_type),
@@ -85,7 +86,7 @@ void ff_h263_show_pict_info(MpegEncContext *s){
          s->obmc ? " AP" : "",
          s->umvplus ? " UMV" : "",
          s->h263_long_vectors ? " LONG" : "",
-         s->h263_plus ? " +" : "",
+         h263_plus ? " +" : "",
          s->h263_aic ? " AIC" : "",
          s->alt_inter_vlc ? " AIV" : "",
          s->modified_quant ? " MQ" : "",
@@ -1089,6 +1090,7 @@ int ff_h263_decode_picture_header(MpegEncContext *s)
 {
     int format, width, height, i, ret;
     uint32_t startcode;
+    int h263_plus;
 
     align_get_bits(&s->gb);
 
@@ -1137,7 +1139,7 @@ int ff_h263_decode_picture_header(MpegEncContext *s)
     */
 
     if (format != 7 && format != 6) {
-        s->h263_plus = 0;
+        h263_plus = 0;
         /* H.263v1 */
         width = ff_h263_format[format][0];
         height = ff_h263_format[format][1];
@@ -1166,7 +1168,7 @@ int ff_h263_decode_picture_header(MpegEncContext *s)
         int ufep;
 
         /* H.263v2 */
-        s->h263_plus = 1;
+        h263_plus = 1;
         ufep = get_bits(&s->gb, 3); /* Update Full Extended PTYPE */
 
         /* ufep other than 0 and 1 are reserved */
@@ -1366,7 +1368,8 @@ int ff_h263_decode_picture_header(MpegEncContext *s)
         s->c_dc_scale_table= ff_mpeg1_dc_scale_table;
     }
 
-        ff_h263_show_pict_info(s);
+    ff_h263_show_pict_info(s, h263_plus);
+
     if (s->pict_type == AV_PICTURE_TYPE_I && s->codec_tag == AV_RL32("ZYGO") && get_bits_left(&s->gb) >= 85 + 13*3*16 + 50){
         int i,j;
         for(i=0; i<85; i++) av_log(s->avctx, AV_LOG_DEBUG, "%d", get_bits1(&s->gb));
diff --git a/libavcodec/mpegvideo.h b/libavcodec/mpegvideo.h
index 239d026960..68d70cc0e3 100644
--- a/libavcodec/mpegvideo.h
+++ b/libavcodec/mpegvideo.h
@@ -90,7 +90,6 @@ typedef struct MpegEncContext {
     int pb_frame;     ///< PB-frame mode (0 = none, 1 = base, 2 = improved)
 
 /* the following codec id fields are deprecated in favor of codec_id */
-    int h263_plus;    ///< H.263+ headers
     int h263_flv;     ///< use flv H.263 header
 
     enum AVCodecID codec_id;     /* see AV_CODEC_ID_xxx */



More information about the ffmpeg-cvslog mailing list