[FFmpeg-cvslog] fate/fits: Use transcode for transcode-like test

Andreas Rheinhardt git at videolan.org
Thu Apr 28 04:24:29 EEST 2022


ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Fri Apr 22 20:06:01 2022 +0200| [9d767b8a988de512279cf0f8c3a14ce637ef862d] | committer: Andreas Rheinhardt

fate/fits: Use transcode for transcode-like test

Each of the intermediately generated lena-*.fits files is only used
for exactly one test; so it could be deleted right after the test.
Switching to a transcode test (which is also more natural) achieves
this. It also adds checksums of the intermediate files to the ref-file.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>

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

 tests/fate/fits.mak              | 19 +++++--------------
 tests/ref/fate/fitsdec-gbrap16le |  2 ++
 tests/ref/fate/fitsdec-gbrp      |  2 ++
 tests/ref/fate/fitsdec-gbrp16    |  2 ++
 tests/ref/fate/fitsdec-gray      |  2 ++
 5 files changed, 13 insertions(+), 14 deletions(-)

diff --git a/tests/fate/fits.mak b/tests/fate/fits.mak
index ea471d6654..b9e99d97ee 100644
--- a/tests/fate/fits.mak
+++ b/tests/fate/fits.mak
@@ -6,17 +6,10 @@ tests/data/fits-multi.fits: ffmpeg$(PROGSSUF)$(EXESUF) | tests/data
 
 #mapping of fits file formats to png filenames
 # TODO: Use an actual 64bit input file and fix the gbrp16 test on big-endian
-map.tests/data/lena-gray.fits    := gray8
-map.tests/data/lena-gbrp.fits    := rgb24
-map.tests/data/lena-gbrp16.fits  := rgb48
-map.tests/data/lena-gbrap16le.fits := rgba64
-
-tests/data/lena%.fits: TAG = GEN
-tests/data/lena%.fits: NAME = $(map.$(@))
-tests/data/lena%.fits: ffmpeg$(PROGSSUF)$(EXESUF) | tests/data
-	$(M)$(TARGET_EXEC) $(TARGET_PATH)/$< -nostdin \
-        -i $(TARGET_SAMPLES)/png1/lena-$(map.$(@)).png \
-        -y $(TARGET_PATH)/$(@) 2>/dev/null
+fits-png-map-gray      := gray8
+fits-png-map-gbrp      := rgb24
+fits-png-map-gbrp16    := rgb48
+fits-png-map-gbrap16le := rgba64
 
 FATE_FITS_DEC-$(call FRAMECRC, FITS, FITS, SCALE_FILTER) += fate-fitsdec-ext_data_min_max
 fate-fitsdec-ext_data_min_max: CMD = framecrc -i $(TARGET_SAMPLES)/fits/x0cj010ct_d0h.fit -pix_fmt gray16le -vf scale
@@ -35,11 +28,9 @@ fate-fitsdec-multi: tests/data/fits-multi.fits
 fate-fitsdec-multi: CMD = framecrc -i $(TARGET_PATH)/tests/data/fits-multi.fits -pix_fmt gbrap
 
 fate-fitsdec%: PIXFMT = $(word 3, $(subst -, ,$(@)))
-fate-fitsdec%: SRC = $(TARGET_PATH)/tests/data/lena-$(PIXFMT).fits
-fate-fitsdec%: CMD = framecrc -i $(SRC) -pix_fmt $(PIXFMT)
+fate-fitsdec%: CMD = transcode image2 $(TARGET_SAMPLES)/png1/lena-$(fits-png-map-$(PIXFMT)).png fits "-vf scale -pix_fmt $(PIXFMT)"
 
 FATE_FITS_DEC_PIXFMT = gray gbrp gbrp16 gbrap16le
-$(FATE_FITS_DEC_PIXFMT:%=fate-fitsdec-%): fate-fitsdec-%: tests/data/lena-%.fits
 FATE_FITS_DEC-$(call TRANSCODE, FITS, FITS, IMAGE2_DEMUXER PNG_DECODER SCALE_FILTER) += $(FATE_FITS_DEC_PIXFMT:%=fate-fitsdec-%)
 
 FATE_FITS += $(FATE_FITS_DEC-yes)
diff --git a/tests/ref/fate/fitsdec-gbrap16le b/tests/ref/fate/fitsdec-gbrap16le
index 78abb5cde7..53ef980b13 100644
--- a/tests/ref/fate/fitsdec-gbrap16le
+++ b/tests/ref/fate/fitsdec-gbrap16le
@@ -1,3 +1,5 @@
+64526d8da12d1fa07ceea5725647076f *tests/data/fate/fitsdec-gbrap16le.fits
+135360 tests/data/fate/fitsdec-gbrap16le.fits
 #tb 0: 1/1
 #media_type 0: video
 #codec_id 0: rawvideo
diff --git a/tests/ref/fate/fitsdec-gbrp b/tests/ref/fate/fitsdec-gbrp
index 8767b6715f..23249f492b 100644
--- a/tests/ref/fate/fitsdec-gbrp
+++ b/tests/ref/fate/fitsdec-gbrp
@@ -1,3 +1,5 @@
+38e232e4c1ca57b5866efa01da70359c *tests/data/fate/fitsdec-gbrp.fits
+54720 tests/data/fate/fitsdec-gbrp.fits
 #tb 0: 1/1
 #media_type 0: video
 #codec_id 0: rawvideo
diff --git a/tests/ref/fate/fitsdec-gbrp16 b/tests/ref/fate/fitsdec-gbrp16
index f6368f2c02..9250690e9b 100644
--- a/tests/ref/fate/fitsdec-gbrp16
+++ b/tests/ref/fate/fitsdec-gbrp16
@@ -1,3 +1,5 @@
+2078208c93ba417d3fe150ba42bf5a30 *tests/data/fate/fitsdec-gbrp16.fits
+103680 tests/data/fate/fitsdec-gbrp16.fits
 #tb 0: 1/1
 #media_type 0: video
 #codec_id 0: rawvideo
diff --git a/tests/ref/fate/fitsdec-gray b/tests/ref/fate/fitsdec-gray
index 488ee71022..b7992bfda3 100644
--- a/tests/ref/fate/fitsdec-gray
+++ b/tests/ref/fate/fitsdec-gray
@@ -1,3 +1,5 @@
+c02ac3e0a9f2ceeb1e6e66c085a63671 *tests/data/fate/fitsdec-gray.fits
+20160 tests/data/fate/fitsdec-gray.fits
 #tb 0: 1/1
 #media_type 0: video
 #codec_id 0: rawvideo



More information about the ffmpeg-cvslog mailing list