ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinha...@outlook.com> | Sun Jun 22 11:00:19 2025 +0200| [532ae5dc7da4699fb42aa52a358fc20bfcf0cd50] | committer: Andreas Rheinhardt
avcodec/ituh263enc: Inline value of h263_flv It is always two when we encode FLV1. Signed-off-by: Andreas Rheinhardt <andreas.rheinha...@outlook.com> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=532ae5dc7da4699fb42aa52a358fc20bfcf0cd50 --- libavcodec/flvenc.c | 2 +- libavcodec/ituh263enc.c | 12 ++++-------- libavcodec/mpegvideo_enc.c | 1 - 3 files changed, 5 insertions(+), 10 deletions(-) diff --git a/libavcodec/flvenc.c b/libavcodec/flvenc.c index 4143e7eecf..91e1f07365 100644 --- a/libavcodec/flvenc.c +++ b/libavcodec/flvenc.c @@ -33,7 +33,7 @@ int ff_flv_encode_picture_header(MPVMainEncContext *const m) put_bits(&s->pb, 17, 1); /* 0: H.263 escape codes 1: 11-bit escape codes */ - put_bits(&s->pb, 5, (s->c.h263_flv - 1)); + put_bits(&s->pb, 5, 1); put_bits(&s->pb, 8, (((int64_t) s->c.picture_number * 30 * s->c.avctx->time_base.num) / // FIXME use timestamp s->c.avctx->time_base.den) & 0xff); /* TemporalReference */ diff --git a/libavcodec/ituh263enc.c b/libavcodec/ituh263enc.c index 4ec851cab9..682d4bd24e 100644 --- a/libavcodec/ituh263enc.c +++ b/libavcodec/ituh263enc.c @@ -536,7 +536,7 @@ static void h263_encode_block(MPVEncContext *const s, int16_t block[], int n) code = get_rl_index(rl, last, run, level); put_bits(&s->pb, rl->table_vlc[code][1], rl->table_vlc[code][0]); if (code == rl->n) { - if (!CONFIG_FLV_ENCODER || s->c.h263_flv <= 1) { + if (!CONFIG_FLV_ENCODER || s->c.codec_id != AV_CODEC_ID_FLV1) { put_bits(&s->pb, 1, last); put_bits(&s->pb, 6, run); @@ -861,13 +861,9 @@ av_cold void ff_h263_encode_init(MPVMainEncContext *const m) #if CONFIG_FLV_ENCODER case AV_CODEC_ID_FLV1: m->encode_picture_header = ff_flv_encode_picture_header; - if (s->c.h263_flv > 1) { - s->min_qcoeff= -1023; - s->max_qcoeff= 1023; - } else { - s->min_qcoeff= -127; - s->max_qcoeff= 127; - } + /* format = 1; 11-bit codes */ + s->min_qcoeff = -1023; + s->max_qcoeff = 1023; break; #endif default: //nothing needed - default table already set in mpegvideo.c diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c index a16cb6bd19..f54f458ab8 100644 --- a/libavcodec/mpegvideo_enc.c +++ b/libavcodec/mpegvideo_enc.c @@ -936,7 +936,6 @@ av_cold int ff_mpv_encode_init(AVCodecContext *avctx) break; case AV_CODEC_ID_FLV1: s->c.out_format = FMT_H263; - s->c.h263_flv = 2; /* format = 1; 11-bit codes */ s->me.unrestricted_mv = 1; s->rtp_mode = 0; /* don't allow GOB */ avctx->delay = 0; _______________________________________________ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".