[FFmpeg-cvslog] avcodec/ituh263enc: Don't use h263_plus field

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


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

avcodec/ituh263enc: Don't use h263_plus field

It is equal to codec_id == AV_CODEC_ID_H263P, check for that instead.

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

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

 libavcodec/ituh263enc.c    | 4 ++--
 libavcodec/mpegvideo_enc.c | 1 -
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/libavcodec/ituh263enc.c b/libavcodec/ituh263enc.c
index 9a6d5dc201..4fdf9cf402 100644
--- a/libavcodec/ituh263enc.c
+++ b/libavcodec/ituh263enc.c
@@ -233,7 +233,7 @@ static int h263_encode_picture_header(MPVMainEncContext *const m)
 
     put_bits_assume_flushed(&s->pb);
 
-    if(s->c.h263_plus){
+    if (s->c.codec_id == AV_CODEC_ID_H263P) {
         for(i=0; i<2; i++){
             int div, error;
             div= (s->c.avctx->time_base.num*1800000LL + 500LL*s->c.avctx->time_base.den) / ((1000LL+i)*s->c.avctx->time_base.den);
@@ -262,7 +262,7 @@ static int h263_encode_picture_header(MPVMainEncContext *const m)
     put_bits(&s->pb, 1, 0);     /* freeze picture release off */
 
     format = ff_match_2uint16(ff_h263_format, FF_ARRAY_ELEMS(ff_h263_format), s->c.width, s->c.height);
-    if (!s->c.h263_plus) {
+    if (s->c.codec_id != AV_CODEC_ID_H263P) {
         /* H.263v1 */
         put_bits(&s->pb, 3, format);
         put_bits(&s->pb, 1, (s->c.pict_type == AV_PICTURE_TYPE_P));
diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c
index 241e0a148f..233d729008 100644
--- a/libavcodec/mpegvideo_enc.c
+++ b/libavcodec/mpegvideo_enc.c
@@ -908,7 +908,6 @@ av_cold int ff_mpv_encode_init(AVCodecContext *avctx)
         break;
     case AV_CODEC_ID_H263P:
         s->c.out_format = FMT_H263;
-        s->c.h263_plus  = 1;
         /* Fx */
         s->c.h263_aic        = (avctx->flags & AV_CODEC_FLAG_AC_PRED) ? 1 : 0;
         s->c.modified_quant  = s->c.h263_aic;



More information about the ffmpeg-cvslog mailing list