[FFmpeg-cvslog] fate/fits: Fix tests on BE

Andreas Rheinhardt git at videolan.org
Tue Apr 2 01:46:37 EEST 2024


ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Sat Mar 30 02:20:40 2024 +0100| [098f5e2634e113f8dd31dd0f5e9935132d719da6] | committer: Andreas Rheinhardt

fate/fits: Fix tests on BE

The fits decoder decodes to native pixel formats; so
the fitsdec-gbrap16be fate test failed on BE despite
its name because the reference file is LE.
This patch fixes this by forcing a pixel format;
the forced pixel format is BE, causing a change
in the reference file.
The fitsdec-gbrp16be test was not affected, because
its source file (lena-rgb48.png from tne FATE suite)
is actually biendian (as if someone had multiplied
8bit content by 257...).

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

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

 tests/fate/fits.mak              | 2 +-
 tests/ref/fate/fitsdec-gbrap16be | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/fate/fits.mak b/tests/fate/fits.mak
index d85946bc1a..b83900aaee 100644
--- a/tests/fate/fits.mak
+++ b/tests/fate/fits.mak
@@ -28,7 +28,7 @@ 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%: CMD = transcode image2 $(TARGET_SAMPLES)/png1/lena-$(fits-png-map-$(PIXFMT)).png fits "-vf scale -pix_fmt $(PIXFMT)"
+fate-fitsdec%: CMD = transcode image2 $(TARGET_SAMPLES)/png1/lena-$(fits-png-map-$(PIXFMT)).png fits "-vf scale -pix_fmt $(PIXFMT)" "-vf scale -pix_fmt $(PIXFMT)"
 
 FATE_FITS_DEC_PIXFMT = gray gbrp gbrp16be gbrap16be
 FATE_FITS_DEC-$(call TRANSCODE, FITS, FITS, IMAGE2_DEMUXER PNG_DECODER SCALE_FILTER) += $(FATE_FITS_DEC_PIXFMT:%=fate-fitsdec-%)
diff --git a/tests/ref/fate/fitsdec-gbrap16be b/tests/ref/fate/fitsdec-gbrap16be
index 1174a0f1d8..e57a878845 100644
--- a/tests/ref/fate/fitsdec-gbrap16be
+++ b/tests/ref/fate/fitsdec-gbrap16be
@@ -5,4 +5,4 @@
 #codec_id 0: rawvideo
 #dimensions 0: 128x128
 #sar 0: 0/1
-0,          0,          0,        1,   131072, 0x487894b2
+0,          0,          0,        1,   131072, 0xebb194b2



More information about the ffmpeg-cvslog mailing list