[FFmpeg-cvslog] avcodec/jpeg2000dwt: More special cases to handle singularities in 9/ 7 decode

Michael Niedermayer git at videolan.org
Wed Jun 17 15:15:38 CEST 2015


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed Jun 17 14:45:15 2015 +0200| [9841024402e83e0d239edf4f356d97e0519aaf4d] | committer: Michael Niedermayer

avcodec/jpeg2000dwt: More special cases to handle singularities in 9/7 decode

Fixes Ticket4634

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

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

 libavcodec/jpeg2000dwt.c                 |    4 ++++
 tests/ref/vsynth/vsynth1-jpeg2000-97     |    4 ++--
 tests/ref/vsynth/vsynth2-jpeg2000-97     |    4 ++--
 tests/ref/vsynth/vsynth_lena-jpeg2000-97 |    4 ++--
 4 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/libavcodec/jpeg2000dwt.c b/libavcodec/jpeg2000dwt.c
index 225b08f..511f223 100644
--- a/libavcodec/jpeg2000dwt.c
+++ b/libavcodec/jpeg2000dwt.c
@@ -365,6 +365,8 @@ static void sr_1d97_float(float *p, int i0, int i1)
     if (i1 <= i0 + 1) {
         if (i0 == 1)
             p[1] *= F_LFTG_K/2;
+        else
+            p[0] *= F_LFTG_X/2;
         return;
     }
 
@@ -440,6 +442,8 @@ static void sr_1d97_int(int32_t *p, int i0, int i1)
     if (i1 <= i0 + 1) {
         if (i0 == 1)
             p[1] = (p[1] * I_LFTG_K + (1<<16)) >> 17;
+        else
+            p[0] = (p[0] * I_LFTG_X + (1<<16)) >> 17;
         return;
     }
 
diff --git a/tests/ref/vsynth/vsynth1-jpeg2000-97 b/tests/ref/vsynth/vsynth1-jpeg2000-97
index a8e9bf8..2d3e16c 100644
--- a/tests/ref/vsynth/vsynth1-jpeg2000-97
+++ b/tests/ref/vsynth/vsynth1-jpeg2000-97
@@ -1,4 +1,4 @@
 dfb35e733795195c6519ecc37e953931 *tests/data/fate/vsynth1-jpeg2000-97.avi
 2243136 tests/data/fate/vsynth1-jpeg2000-97.avi
-e1a095b40d7f6440f6c46f2995c4759c *tests/data/fate/vsynth1-jpeg2000-97.out.rawvideo
-stddev:    6.23 PSNR: 32.23 MAXDIFF:   75 bytes:  7603200/  7603200
+30a9c13e18fe4acaf28062b5003bb671 *tests/data/fate/vsynth1-jpeg2000-97.out.rawvideo
+stddev:    6.41 PSNR: 31.99 MAXDIFF:   75 bytes:  7603200/  7603200
diff --git a/tests/ref/vsynth/vsynth2-jpeg2000-97 b/tests/ref/vsynth/vsynth2-jpeg2000-97
index 21ab8ad..e59811d 100644
--- a/tests/ref/vsynth/vsynth2-jpeg2000-97
+++ b/tests/ref/vsynth/vsynth2-jpeg2000-97
@@ -1,4 +1,4 @@
 f8880f48a46ad43623d00de15ecba2cd *tests/data/fate/vsynth2-jpeg2000-97.avi
 1467472 tests/data/fate/vsynth2-jpeg2000-97.avi
-e523db4385f586d73aa0ee2688a75d2e *tests/data/fate/vsynth2-jpeg2000-97.out.rawvideo
-stddev:    5.44 PSNR: 33.41 MAXDIFF:   57 bytes:  7603200/  7603200
+9ec4f90641d5d0e6424184b654923676 *tests/data/fate/vsynth2-jpeg2000-97.out.rawvideo
+stddev:    6.32 PSNR: 32.11 MAXDIFF:   57 bytes:  7603200/  7603200
diff --git a/tests/ref/vsynth/vsynth_lena-jpeg2000-97 b/tests/ref/vsynth/vsynth_lena-jpeg2000-97
index 5945ac7..cb839c3 100644
--- a/tests/ref/vsynth/vsynth_lena-jpeg2000-97
+++ b/tests/ref/vsynth/vsynth_lena-jpeg2000-97
@@ -1,4 +1,4 @@
 ba27504dcabe43d6608798c9cadc5cca *tests/data/fate/vsynth_lena-jpeg2000-97.avi
 1118956 tests/data/fate/vsynth_lena-jpeg2000-97.avi
-8ac8b9ee81fa73c873668e9f6b78764d *tests/data/fate/vsynth_lena-jpeg2000-97.out.rawvideo
-stddev:    4.95 PSNR: 34.23 MAXDIFF:   60 bytes:  7603200/  7603200
+9d69ac6d46152ed2d6dd6a90d5793c80 *tests/data/fate/vsynth_lena-jpeg2000-97.out.rawvideo
+stddev:    5.32 PSNR: 33.61 MAXDIFF:   60 bytes:  7603200/  7603200



More information about the ffmpeg-cvslog mailing list