[FFmpeg-cvslog] avcodec/jpeg2000dwt: add special cases for handling length 1 in 5/3 decode

Michael Niedermayer git at videolan.org
Tue Jun 16 20:49:50 CEST 2015


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Tue Jun 16 20:00:39 2015 +0200| [8294ec67b5b18c44d2406c77b6f6cd09201055c7] | committer: Michael Niedermayer

avcodec/jpeg2000dwt: add special cases for handling length 1 in 5/3 decode

Fixes Ticket4630

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

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

diff --git a/libavcodec/jpeg2000dwt.c b/libavcodec/jpeg2000dwt.c
index ceceda3..a5eb0b7 100644
--- a/libavcodec/jpeg2000dwt.c
+++ b/libavcodec/jpeg2000dwt.c
@@ -290,8 +290,11 @@ static void sr_1d53(int *p, int i0, int i1)
 {
     int i;
 
-    if (i1 == i0 + 1)
+    if (i1 <= i0 + 1) {
+        if (i0 == 1)
+            p[1] >>= 1;
         return;
+    }
 
     extend53(p, i0, i1);
 



More information about the ffmpeg-cvslog mailing list