[FFmpeg-cvslog] diracdec: fix idwt_stride calculation in bytes

Andreas Cadhalpun git at videolan.org
Tue Jan 12 00:13:54 CET 2016


ffmpeg | branch: master | Andreas Cadhalpun <Andreas.Cadhalpun at googlemail.com> | Mon Jan 11 23:19:40 2016 +0100| [d637a58750ef456e4254736add04b5c7d0b6dc40] | committer: Andreas Cadhalpun

diracdec: fix idwt_stride calculation in bytes

The transformation to bytes must happen after alignment to get the same
resulting pointers as before.

This fixes segmentation faults in the assembler code.

The regression was introduced in commit 9553689.

Reviewed-by: Kieran Kunhya <kierank at obe.tv>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun at googlemail.com>

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

 libavcodec/diracdec.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/diracdec.c b/libavcodec/diracdec.c
index 486c1b3..9d985351 100644
--- a/libavcodec/diracdec.c
+++ b/libavcodec/diracdec.c
@@ -941,7 +941,7 @@ static void init_planes(DiracContext *s)
         p->height      = s->seq.height >> (i ? s->chroma_y_shift : 0);
         p->idwt_width  = w = CALC_PADDING(p->width , s->wavelet_depth);
         p->idwt_height = h = CALC_PADDING(p->height, s->wavelet_depth);
-        p->idwt_stride = FFALIGN(p->idwt_width << (1 + s->pshift), 8);
+        p->idwt_stride = FFALIGN(p->idwt_width, 8) << (1 + s->pshift);
 
         for (level = s->wavelet_depth-1; level >= 0; level--) {
             w = w>>1;



More information about the ffmpeg-cvslog mailing list