[FFmpeg-cvslog] avcodec/ppc/mpegvideo_altivec: Don't process unnecessarily many coeffs

Andreas Rheinhardt git at videolan.org
Wed Mar 26 06:11:19 EET 2025


ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Sat Mar 22 07:31:30 2025 +0100| [46c5466dd8e987888077b83abcfbb60a6abc43e7] | committer: Andreas Rheinhardt

avcodec/ppc/mpegvideo_altivec: Don't process unnecessarily many coeffs

Use the same number as the C version.

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

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

 libavcodec/ppc/mpegvideo_altivec.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/libavcodec/ppc/mpegvideo_altivec.c b/libavcodec/ppc/mpegvideo_altivec.c
index 23b7701fd6..7e3db6f76a 100644
--- a/libavcodec/ppc/mpegvideo_altivec.c
+++ b/libavcodec/ppc/mpegvideo_altivec.c
@@ -57,7 +57,10 @@ static void dct_unquantize_h263_altivec(MpegEncContext *s,
         }else
             qadd = 0;
         i = 1;
-        nCoeffs= 63; //does not always use zigzag table
+        if (s->ac_pred)
+            nCoeffs = 63;
+        else
+            nCoeffs = s->intra_scantable.raster_end[s->block_last_index[n]];
     } else {
         i = 0;
         av_assert2(s->block_last_index[n]>=0);



More information about the ffmpeg-cvslog mailing list