[FFmpeg-cvslog] j2kenc: Allow encoding with the 9/7 wavelet

Michael Niedermayer git at videolan.org
Mon May 27 19:04:17 CEST 2013


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Mon May 27 18:50:18 2013 +0200| [ee189701a6f7fec56570ee3728d5d80378cbadd3] | committer: Michael Niedermayer

j2kenc: Allow encoding with the 9/7 wavelet

Also add a fate test that tests 9/7

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

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

 libavcodec/j2kenc.c             |    2 +-
 tests/fate/vcodec.mak           |    6 ++++--
 tests/ref/vsynth/vsynth1-j2k-97 |    4 ++++
 tests/ref/vsynth/vsynth2-j2k-97 |    4 ++++
 4 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/libavcodec/j2kenc.c b/libavcodec/j2kenc.c
index 7807552..bd90d4e 100644
--- a/libavcodec/j2kenc.c
+++ b/libavcodec/j2kenc.c
@@ -985,7 +985,7 @@ static av_cold int j2kenc_init(AVCodecContext *avctx)
     codsty->nreslevels       = 7;
     codsty->log2_cblk_width  = 4;
     codsty->log2_cblk_height = 4;
-    codsty->transform        = 1;
+    codsty->transform        = avctx->prediction_method;
 
     qntsty->nguardbits       = 1;
 
diff --git a/tests/fate/vcodec.mak b/tests/fate/vcodec.mak
index cc2ad28..167d97c 100644
--- a/tests/fate/vcodec.mak
+++ b/tests/fate/vcodec.mak
@@ -89,9 +89,11 @@ FATE_VCODEC-$(call ENCDEC, JPEGLS, AVI) += jpegls
 fate-vsynth%-jpegls:             ENCOPTS = -sws_flags neighbor+full_chroma_int
 fate-vsynth%-jpegls:             DECOPTS = -sws_flags area
 
-FATE_VCODEC-$(call ENCDEC, J2K, AVI) += j2k
-fate-vsynth%-j2k:                ENCOPTS = -qscale 7 -strict experimental -pix_fmt rgb24
+FATE_VCODEC-$(call ENCDEC, J2K, AVI) += j2k j2k-97
+fate-vsynth%-j2k:                ENCOPTS = -qscale 7 -strict experimental -pred 1 -pix_fmt rgb24
 fate-vsynth%-j2k:                DECINOPTS = -vcodec j2k -strict experimental
+fate-vsynth%-j2k-97:             ENCOPTS = -qscale 7 -strict experimental -pix_fmt rgb24
+fate-vsynth%-j2k-97:             DECINOPTS = -vcodec j2k -strict experimental
 
 FATE_VCODEC-$(call ENCDEC, LJPEG MJPEG, AVI) += ljpeg
 fate-vsynth%-ljpeg:              ENCOPTS = -strict -1
diff --git a/tests/ref/vsynth/vsynth1-j2k-97 b/tests/ref/vsynth/vsynth1-j2k-97
new file mode 100644
index 0000000..fb1ad8b
--- /dev/null
+++ b/tests/ref/vsynth/vsynth1-j2k-97
@@ -0,0 +1,4 @@
+a8e2db2dc6fcd4c9ea3150dc8d6d7619 *tests/data/fate/vsynth1-j2k-97.avi
+2963264 tests/data/fate/vsynth1-j2k-97.avi
+68f26a8d366fce47cbd003cadc861cd8 *tests/data/fate/vsynth1-j2k-97.out.rawvideo
+stddev:    7.66 PSNR: 30.44 MAXDIFF:   58 bytes:  7603200/  7603200
diff --git a/tests/ref/vsynth/vsynth2-j2k-97 b/tests/ref/vsynth/vsynth2-j2k-97
new file mode 100644
index 0000000..b799d18
--- /dev/null
+++ b/tests/ref/vsynth/vsynth2-j2k-97
@@ -0,0 +1,4 @@
+245c0ab429b553b39cac5989bb23c0ce *tests/data/fate/vsynth2-j2k-97.avi
+1444170 tests/data/fate/vsynth2-j2k-97.avi
+61c52045d566b70886113e2aeb8ddde4 *tests/data/fate/vsynth2-j2k-97.out.rawvideo
+stddev:    7.13 PSNR: 31.06 MAXDIFF:   53 bytes:  7603200/  7603200



More information about the ffmpeg-cvslog mailing list