ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinha...@outlook.com> | Sat Mar 1 21:32:51 2025 +0100| [7abc9c5e3d120ffa48d7312e0351cf7627bea9c8] | committer: Andreas Rheinhardt
avcodec/h261dec: Don't call ff_set_qscale() Most of what it does is unneeded for H.261. Signed-off-by: Andreas Rheinhardt <andreas.rheinha...@outlook.com> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7abc9c5e3d120ffa48d7312e0351cf7627bea9c8 --- libavcodec/h261dec.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/libavcodec/h261dec.c b/libavcodec/h261dec.c index 8a2c4d35b4..c32ddd2ddf 100644 --- a/libavcodec/h261dec.c +++ b/libavcodec/h261dec.c @@ -155,6 +155,7 @@ static int h261_decode_gob_header(H261DecContext *h) av_log(s->avctx, AV_LOG_ERROR, "qscale has forbidden 0 value\n"); if (s->avctx->err_recognition & (AV_EF_BITSTREAM | AV_EF_COMPLIANT)) return -1; + s->qscale = 1; } /* For the first transmitted macroblock in a GOB, MBA is the absolute @@ -380,8 +381,11 @@ static int h261_decode_mb(H261DecContext *h) } // Read mquant - if (IS_QUANT(com->mtype)) - ff_set_qscale(s, get_bits(&s->gb, 5)); + if (IS_QUANT(com->mtype)) { + s->qscale = get_bits(&s->gb, 5); + if (!s->qscale) + s->qscale = 1; + } s->mb_intra = IS_INTRA4x4(com->mtype); @@ -511,8 +515,6 @@ static int h261_decode_gob(H261DecContext *h) { MpegEncContext *const s = &h->s; - ff_set_qscale(s, s->qscale); - /* decode mb's */ while (h->current_mba <= MBA_STUFFING) { int ret; _______________________________________________ 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".