j2kenc: Allow encoding with the 9/7 wavelet
authorMichael Niedermayer <michaelni@gmx.at>
Mon, 27 May 2013 16:50:18 +0000 (18:50 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Mon, 27 May 2013 16:50:18 +0000 (18:50 +0200)
Also add a fate test that tests 9/7

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/j2kenc.c
tests/fate/vcodec.mak
tests/ref/vsynth/vsynth1-j2k-97 [new file with mode: 0644]
tests/ref/vsynth/vsynth2-j2k-97 [new file with mode: 0644]

index 7807552..bd90d4e 100644 (file)
@@ -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;
 
index cc2ad28..167d97c 100644 (file)
@@ -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 (file)
index 0000000..fb1ad8b
--- /dev/null
@@ -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 (file)
index 0000000..b799d18
--- /dev/null
@@ -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