[FFmpeg-cvslog] avcodec/ituh263dec: Don't process unnecessarily many coefficients

Andreas Rheinhardt git at videolan.org
Sat Jun 21 23:20:09 EEST 2025


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

avcodec/ituh263dec: Don't process unnecessarily many coefficients

Overriding the number of coefficients is only necessary if
ac_pred is in used, not for h263_aic alone (for which only
the DC coefficient is predicted) as it is done here.

And since d50635cd247e17fe16c63219b9ae80d45a8185b1
the H.263 unquantize-intra functions override the number of
coefficients in case of ac_pred, so we don't have to do this here.

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

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

 libavcodec/ituh263dec.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/libavcodec/ituh263dec.c b/libavcodec/ituh263dec.c
index 21c78f3cb5..5e1d15e557 100644
--- a/libavcodec/ituh263dec.c
+++ b/libavcodec/ituh263dec.c
@@ -542,10 +542,10 @@ static int h263_decode_block(MpegEncContext * s, int16_t * block,
 
     scan_table = s->intra_scantable.permutated;
     if (s->h263_aic && s->mb_intra) {
+        i = 0;
         if (!coded)
             goto not_coded;
         rl = &ff_rl_intra_aic;
-        i = 0;
         if (s->ac_pred) {
             if (s->h263_aic_dir)
                 scan_table = s->permutated_intra_v_scantable; /* left */
@@ -672,7 +672,6 @@ retry:
     if (s->mb_intra && s->h263_aic) {
 not_coded:
         h263_pred_acdc(s, block, n);
-        i = 63;
     }
     s->block_last_index[n] = i;
     return 0;



More information about the ffmpeg-cvslog mailing list