[FFmpeg-devel] [RFC PATCH 2/2] fate/video.mak: fate test for jpeg2000 parser
gautamramk at gmail.com
gautamramk at gmail.com
Thu Jun 4 10:54:43 EEST 2020
From: Gautam Ramakrishnan <gautamramk at gmail.com>
This test generates a rawvideo video of jpeg2000 frames
using lavfi testsrc2 as input. The reference file as 25 frames.
---
tests/fate-run.sh | 4 +++-
tests/fate/video.mak | 3 +++
tests/ref/fate/jpeg2000-parser | 32 ++++++++++++++++++++++++++++++++
3 files changed, 38 insertions(+), 1 deletion(-)
create mode 100644 tests/ref/fate/jpeg2000-parser
diff --git a/tests/fate-run.sh b/tests/fate-run.sh
index 002944b010..28c74ecbc5 100755
--- a/tests/fate-run.sh
+++ b/tests/fate-run.sh
@@ -221,7 +221,9 @@ transcode(){
ffprobe_opts=$7
encfile="${outdir}/${test}.${enc_fmt}"
test "$6" = -keep || cleanfiles="$cleanfiles $encfile"
- tsrcfile=$(target_path $srcfile)
+ test $src_fmt = "lavfi" ||\
+ tsrcfile=$(target_path $srcfile) &&\
+ tsrcfile=$srcfile
tencfile=$(target_path $encfile)
ffmpeg -f $src_fmt $DEC_OPTS -i $tsrcfile $ENC_OPTS $enc_opt $FLAGS \
-f $enc_fmt -y $tencfile || return
diff --git a/tests/fate/video.mak b/tests/fate/video.mak
index d2d43e518d..c8d2e66b4a 100644
--- a/tests/fate/video.mak
+++ b/tests/fate/video.mak
@@ -192,6 +192,9 @@ fate-interplay-mve-16bit: CMD = framecrc -i $(TARGET_SAMPLES)/interplay-mve/desc
FATE_VIDEO-$(call DEMDEC, MXF, JPEG2000) += fate-jpeg2000-dcinema
fate-jpeg2000-dcinema: CMD = framecrc -flags +bitexact -c:v jpeg2000 -i $(TARGET_SAMPLES)/jpeg2000/chiens_dcinema2K.mxf -pix_fmt xyz12le
+FATE_VIDEO-$(call DEMDEC, MXF, JPEG2000) += fate-jpeg2000-parser
+fate-jpeg2000-parser: CMD = transcode lavfi "testsrc2=s=640x480" rawvideo "-t 1 -c:v jpeg2000"
+
FATE_VIDEO-$(call DEMDEC, JV, JV) += fate-jv
fate-jv: CMD = framecrc -i $(TARGET_SAMPLES)/jv/intro.jv -an -pix_fmt rgb24
diff --git a/tests/ref/fate/jpeg2000-parser b/tests/ref/fate/jpeg2000-parser
new file mode 100644
index 0000000000..f30e27a24e
--- /dev/null
+++ b/tests/ref/fate/jpeg2000-parser
@@ -0,0 +1,32 @@
+d2ea224b9c7319e5240af18260e82c4d *tests/data/fate/jpeg2000-parser.rawvideo
+1511061 tests/data/fate/jpeg2000-parser.rawvideo
+#tb 0: 1/25
+#media_type 0: video
+#codec_id 0: rawvideo
+#dimensions 0: 640x480
+#sar 0: 0/1
+0, 0, 0, 1, 460800, 0x82d0c5fe
+0, 1, 1, 1, 460800, 0x1bf42314
+0, 2, 2, 1, 460800, 0x2d5598d4
+0, 3, 3, 1, 460800, 0x159e4c0b
+0, 4, 4, 1, 460800, 0x0652826a
+0, 5, 5, 1, 460800, 0x23f718f4
+0, 6, 6, 1, 460800, 0xc56cb13c
+0, 7, 7, 1, 460800, 0x2ba79edd
+0, 8, 8, 1, 460800, 0x8b2f8adb
+0, 9, 9, 1, 460800, 0x5e9d58e9
+0, 10, 10, 1, 460800, 0xf655492b
+0, 11, 11, 1, 460800, 0xa590743b
+0, 12, 12, 1, 460800, 0xbaa67b19
+0, 13, 13, 1, 460800, 0x4ca64768
+0, 14, 14, 1, 460800, 0x43978755
+0, 15, 15, 1, 460800, 0x173a7c5c
+0, 16, 16, 1, 460800, 0x3135a88e
+0, 17, 17, 1, 460800, 0x17cbea25
+0, 18, 18, 1, 460800, 0x21c222ab
+0, 19, 19, 1, 460800, 0x7444efcf
+0, 20, 20, 1, 460800, 0x860921d2
+0, 21, 21, 1, 460800, 0x9ea5a718
+0, 22, 22, 1, 460800, 0xb8c1a9d7
+0, 23, 23, 1, 460800, 0xe4214b2c
+0, 24, 24, 1, 460800, 0x3f00181d
--
2.17.1
More information about the ffmpeg-devel
mailing list