From 737130ce6faa8a021c29fa39cbc27277164e61c7 Mon Sep 17 00:00:00 2001 From: Andreas Rheinhardt Date: Sat, 16 Apr 2022 21:20:34 +0200 Subject: [PATCH] fate/image: Fix requirements of tests Also reduce the amount of repetitions a bit. Signed-off-by: Andreas Rheinhardt --- tests/fate/image.mak | 131 +++++++++++++++++++------------------------ 1 file changed, 58 insertions(+), 73 deletions(-) diff --git a/tests/fate/image.mak b/tests/fate/image.mak index 63076f8ded..c8e0d321ef 100644 --- a/tests/fate/image.mak +++ b/tests/fate/image.mak @@ -1,13 +1,12 @@ +ADD_SCALE_IF = $(if $(findstring -vf scale,$(1)), SCALE_FILTER) + FATE_ALIASPIX += fate-aliaspix-bgr fate-aliaspix-bgr: CMD = transcode alias_pix $(TARGET_SAMPLES)/aliaspix/first.pix image2 "-c alias_pix" "-map 0 -map 0 -pix_fmt:0 bgr24 -c:v:1 copy" FATE_ALIASPIX += fate-aliaspix-gray fate-aliaspix-gray: CMD = transcode alias_pix $(TARGET_SAMPLES)/aliaspix/firstgray.pix image2 "-c alias_pix" "-map 0 -map 0 -pix_fmt:0 gray -c:v:1 copy" -FATE_ALIASPIX-$(call ALLYES, FILE_PROTOCOL IMAGE2_ALIAS_PIX_DEMUXER \ - ALIAS_PIX_DECODER ALIAS_PIX_ENCODER \ - IMAGE2_MUXER RAWVIDEO_ENCODER \ - FRAMECRC_MUXER PIPE_PROTOCOL) += $(FATE_ALIASPIX) +FATE_ALIASPIX-$(call TRANSCODE, ALIAS_PIX, IMAGE2 IMAGE2_ALIAS_PIX) += $(FATE_ALIASPIX) FATE_IMAGE += $(FATE_ALIASPIX-yes) fate-aliaspix: $(FATE_ALIASPIX-yes) @@ -17,29 +16,29 @@ fate-brenderpix-24: CMD = framecrc -c:v brender_pix -i $(TARGET_SAMPLES)/brender FATE_BRENDERPIX += fate-brenderpix-565 fate-brenderpix-565: CMD = framecrc -c:v brender_pix -i $(TARGET_SAMPLES)/brenderpix/maximafront.pix -FATE_BRENDERPIX += fate-brenderpix-defpal +FATE_BRENDERPIX-$(call DEMDEC, IMAGE2, BRENDER_PIX, SCALE_FILTER) += fate-brenderpix-defpal fate-brenderpix-defpal: CMD = framecrc -c:v brender_pix -i $(TARGET_SAMPLES)/brenderpix/rivrock1.pix -pix_fmt rgb24 -vf scale -FATE_BRENDERPIX += fate-brenderpix-intpal +FATE_BRENDERPIX-$(call DEMDEC, IMAGE2, BRENDER_PIX, SCALE_FILTER) += fate-brenderpix-intpal fate-brenderpix-intpal: CMD = framecrc -c:v brender_pix -i $(TARGET_SAMPLES)/brenderpix/testtex.pix -pix_fmt rgb24 -vf scale FATE_BRENDERPIX += fate-brenderpix-y400a fate-brenderpix-y400a: CMD = framecrc -c:v brender_pix -i $(TARGET_SAMPLES)/brenderpix/gears.pix FATE_BRENDERPIX-$(call DEMDEC, IMAGE2, BRENDER_PIX) += $(FATE_BRENDERPIX) -FATE_IMAGE += $(FATE_BRENDERPIX-yes) +FATE_IMAGE_FRAMECRC += $(FATE_BRENDERPIX-yes) fate-brenderpix: $(FATE_BRENDERPIX-yes) -FATE_IMAGE-$(call PARSERDEMDEC, BMP, IMAGE2PIPE, BMP) += fate-bmpparser +FATE_IMAGE_FRAMECRC-$(call PARSERDEMDEC, BMP, IMAGE2PIPE, BMP, SCALE_FILTER) += fate-bmpparser fate-bmpparser: CMD = framecrc -f image2pipe -i $(TARGET_SAMPLES)/bmp/numbers.bmp -pix_fmt rgb24 -vf scale define FATE_IMGSUITE_DDS -FATE_DDS += fate-dds-$(1) -fate-dds-$(1): CMD = framecrc -i $(TARGET_SAMPLES)/dds/fate_$(1).dds $(DDS_OPTS_$(1)) -vf scale +FATE_DDS-$(call DEMDEC, IMAGE2, DDS, $(call ADD_SCALE_IF, $(DDS_OPTS_$(1)))) += fate-dds-$(1) +fate-dds-$(1): CMD = framecrc -i $(TARGET_SAMPLES)/dds/fate_$(1).dds $(DDS_OPTS_$(1)) endef -DDS_OPTS_pal = -sws_flags +accurate_rnd+bitexact -pix_fmt rgba -DDS_OPTS_pal-ati = -sws_flags +accurate_rnd+bitexact -pix_fmt rgba +DDS_OPTS_pal := -sws_flags +accurate_rnd+bitexact -pix_fmt rgba -vf scale +DDS_OPTS_pal-ati:= -sws_flags +accurate_rnd+bitexact -pix_fmt rgba -vf scale DDS_FMT = alpha8 \ argb \ argb-aexp \ @@ -90,14 +89,15 @@ DDS_FMT = alpha8 \ yuyv $(foreach FMT,$(DDS_FMT),$(eval $(call FATE_IMGSUITE_DDS,$(FMT)))) -FATE_DDS-$(call DEMDEC, IMAGE2, DDS) += $(FATE_DDS) -FATE_IMAGE += $(FATE_DDS-yes) +FATE_IMAGE_FRAMECRC += $(FATE_DDS-yes) fate-dds: $(FATE_DDS-yes) -FATE_IMAGE-$(call DEMDEC, IMAGE2, DPX) += fate-dpx +FATE_IMAGE_FRAMECRC-$(call DEMDEC, IMAGE2, DPX) += fate-dpx fate-dpx: CMD = framecrc -i $(TARGET_SAMPLES)/dpx/lighthouse_rgb48.dpx -FATE_SAMPLES_AVCONV-$(call PARSERDEMDEC, DPX, IMAGE2PIPE, DPX) += fate-dpxparser +# The following sample has frames whose dimensions differ on a per-frame basis +# and therefore needs the scale filter. +FATE_IMAGE_FRAMECRC-$(call PARSERDEMDEC, DPX, IMAGE2PIPE, DPX, SCALE_FILTER) += fate-dpxparser fate-dpxparser: CMD = framecrc -f image2pipe -i $(TARGET_SAMPLES)/dpx/lena_4x_concat.dpx -sws_flags +accurate_rnd+bitexact FATE_IMAGE_PROBE-$(call DEMDEC, IMAGE2, DPX) += fate-dpx-probe @@ -226,7 +226,7 @@ fate-exr-rgb-scanline-pxr24-float-half-l1: CMD = framecrc -i $(TARGET_SAMPLES)/e FATE_EXR += fate-exr-rgb-scanline-pxr24-float-half-l2 fate-exr-rgb-scanline-pxr24-float-half-l2: CMD = framecrc -layer "VRaySamplerInfo" -i $(TARGET_SAMPLES)/exr/rgb_scanline_pxr24_float_half.exr -pix_fmt gbrapf32le -FATE_EXR += fate-exr-rgb-scanline-pxr24-half-uint32-13x9 +FATE_EXR-$(call DEMDEC, IMAGE2, EXR, SCALE_FILTER) += fate-exr-rgb-scanline-pxr24-half-uint32-13x9 fate-exr-rgb-scanline-pxr24-half-uint32-13x9: CMD = framecrc -layer "VRaySamplerInfo" -i $(TARGET_SAMPLES)/exr/rgb_scanline_pxr24_half_uint32_13x9.exr -pix_fmt rgb48le -vf scale FATE_EXR += fate-exr-rgb-scanline-zip-half-float-l1 @@ -328,10 +328,10 @@ fate-exr-rgb-scanline-zip-half-0x0-0xFFFF: CMD = framecrc -i $(TARGET_SAMPLES)/e FATE_EXR-$(call DEMDEC, IMAGE2, EXR) += $(FATE_EXR) -FATE_IMAGE += $(FATE_EXR-yes) +FATE_IMAGE_FRAMECRC += $(FATE_EXR-yes) fate-exr: $(FATE_EXR-yes) -FATE_JPG += fate-jpg-12bpp +FATE_JPG-$(call DEMDEC, IMAGE2, MJPEG, SCALE_FILTER) += fate-jpg-12bpp fate-jpg-12bpp: CMD = framecrc -idct simple -i $(TARGET_SAMPLES)/jpg/12bpp.jpg -f rawvideo -pix_fmt gray16le -vf setsar=sar=sar,scale FATE_JPG += fate-jpg-jfif @@ -341,7 +341,7 @@ FATE_JPG_TRANSCODE-$(call TRANSCODE, MJPEG, MJPEG IMAGE_JPEG_PIPE, IMAGE_PNG_PIP fate-jpg-icc: CMD = transcode png_pipe $(TARGET_SAMPLES)/png1/lena-int_rgb24.png mjpeg "-vf scale" "" "" "-show_frames" FATE_JPG-$(call DEMDEC, IMAGE2, MJPEG) += $(FATE_JPG) -FATE_IMAGE += $(FATE_JPG-yes) +FATE_IMAGE_FRAMECRC += $(FATE_JPG-yes) FATE_IMAGE_TRANSCODE += $(FATE_JPG_TRANSCODE-yes) fate-jpg: $(FATE_JPG-yes) $(FATE_JPG_TRANSCODE-yes) @@ -358,20 +358,20 @@ FATE_JPEGLS += fate-jpegls-7bpc fate-jpegls-7bpc: CMD = framecrc -idct simple -i $(TARGET_SAMPLES)/jpegls/128.jls FATE_JPEGLS-$(call DEMDEC, IMAGE2, JPEGLS) += $(FATE_JPEGLS) -FATE_IMAGE += $(FATE_JPEGLS-yes) +FATE_IMAGE_FRAMECRC += $(FATE_JPEGLS-yes) fate-jpegls: $(FATE_JPEGLS-yes) -FATE_IMAGE-$(call DEMDEC, IMAGE2, QDRAW) += fate-pict +FATE_IMAGE_FRAMECRC-$(call DEMDEC, IMAGE2, QDRAW) += fate-pict fate-pict: CMD = framecrc -i $(TARGET_SAMPLES)/quickdraw/TRU256.PCT -pix_fmt rgb24 -FATE_IMAGE-$(call DEMDEC, IMAGE2, PICTOR) += fate-pictor +FATE_IMAGE_FRAMECRC-$(call DEMDEC, IMAGE2, PICTOR, SCALE_FILTER) += fate-pictor fate-pictor: CMD = framecrc -i $(TARGET_SAMPLES)/pictor/MFISH.PIC -pix_fmt rgb24 -vf scale -FATE_IMAGE-$(call PARSERDEMDEC, PNG, IMAGE2PIPE, PNG) += fate-pngparser +FATE_IMAGE_FRAMECRC-$(call PARSERDEMDEC, PNG, IMAGE2PIPE, PNG) += fate-pngparser fate-pngparser: CMD = framecrc -f image2pipe -i $(TARGET_SAMPLES)/png1/feed_4x_concat.png -pix_fmt rgba define FATE_IMGSUITE_PNG -FATE_PNG += fate-png-$(1) +FATE_PNG-$(call DEMDEC, IMAGE2, PNG, SCALE_FILTER) += fate-png-$(1) fate-png-$(1): CMD = framecrc -auto_conversion_filters -i $(TARGET_SAMPLES)/png1/lena-$(1).png -sws_flags +accurate_rnd+bitexact -pix_fmt rgb24 endef @@ -394,16 +394,16 @@ fate-png-icc: CMD = transcode png_pipe $(TARGET_SAMPLES)/png1/lena-int_rgb24.png FATE_PNG-$(call DEMDEC, IMAGE2, PNG) += $(FATE_PNG) FATE_PNG_PROBE-$(call DEMDEC, IMAGE2, PNG) += $(FATE_PNG_PROBE) -FATE_IMAGE += $(FATE_PNG-yes) +FATE_IMAGE_FRAMECRC += $(FATE_PNG-yes) FATE_IMAGE_PROBE += $(FATE_PNG_PROBE-yes) FATE_IMAGE_TRANSCODE += $(FATE_PNG_TRANSCODE-yes) fate-png: $(FATE_PNG-yes) $(FATE_PNG_PROBE-yes) $(FATE_PNG_TRANSCODE-yes) -FATE_IMAGE-$(call DEMDEC, IMAGE2, PTX) += fate-ptx +FATE_IMAGE_FRAMECRC-$(call DEMDEC, IMAGE2, PTX, SCALE_FILTER) += fate-ptx fate-ptx: CMD = framecrc -i $(TARGET_SAMPLES)/ptx/_113kw_pic.ptx -pix_fmt rgb24 -vf scale define FATE_IMGSUITE_PSD -FATE_PSD += fate-psd-$(1) +FATE_PSD-$(call DEMDEC, IMAGE2, PSD, SCALE_FILTER) += fate-psd-$(1) fate-psd-$(1): CMD = framecrc -i $(TARGET_SAMPLES)/psd/lena-$(1).psd -sws_flags +accurate_rnd+bitexact -pix_fmt rgb24 -vf scale endef @@ -433,7 +433,7 @@ fate-psd-duo-tone-color: CMD = framecrc -i $(TARGET_SAMPLES)/psd/duotone-color.p FATE_PSD-$(call DEMDEC, IMAGE2, PSD) += $(FATE_PSD) -FATE_IMAGE += $(FATE_PSD-yes) +FATE_IMAGE_FRAMECRC += $(FATE_PSD-yes) fate-psd: $(FATE_PSD-yes) define FATE_IMGSUITE_SGI @@ -446,36 +446,31 @@ SGI_COLORSPACES = gray8 gray16 rgb24 rgb48 rgba rgba64 $(foreach CLSP,$(SGI_COLORSPACES),$(eval $(call FATE_IMGSUITE_SGI,$(CLSP)))) FATE_SGI-$(call DEMDEC, IMAGE2, SGI) += $(FATE_SGI) -FATE_IMAGE += $(FATE_SGI-yes) +FATE_IMAGE_FRAMECRC += $(FATE_SGI-yes) fate-sgi: $(FATE_SGI-yes) -FATE_SUNRASTER += fate-sunraster-1bit-raw -fate-sunraster-1bit-raw: CMD = framecrc -i $(TARGET_SAMPLES)/sunraster/lena-1bit-raw.sun - -FATE_SUNRASTER += fate-sunraster-1bit-rle -fate-sunraster-1bit-rle: CMD = framecrc -i $(TARGET_SAMPLES)/sunraster/lena-1bit-rle.sun - -FATE_SUNRASTER += fate-sunraster-8bit-raw -fate-sunraster-8bit-raw: CMD = framecrc -i $(TARGET_SAMPLES)/sunraster/lena-8bit-raw.sun -pix_fmt rgb24 -vf scale +define FATE_IMGSUITE_SUNRASTER +FATE_SUNRASTER-$(call DEMDEC, IMAGE2, SUNRAST, $(call ADD_SCALE_IF, $(SUNRASTER_OPTS_$(1)))) += fate-sunraster-$(1) +fate-sunraster-$(1): CMD = framecrc -i $(TARGET_SAMPLES)/sunraster/lena-$(1).sun $(SUNRASTER_OPTS_$(1)) +endef +SUNRASTER_OPTS_8bit-raw := -pix_fmt rgb24 -vf scale +SUNRASTER_OPTS_8bit-rle := -pix_fmt rgb24 -vf scale +SUNRASTER_TESTS := 1bit-raw 1bit-rle 8bit-raw 8bit-rle 24bit-raw 24bit-rle +$(foreach TEST,$(SUNRASTER_TESTS),$(eval $(call FATE_IMGSUITE_SUNRASTER,$(TEST)))) FATE_SUNRASTER += fate-sunraster-8bit_gray-raw fate-sunraster-8bit_gray-raw: CMD = framecrc -i $(TARGET_SAMPLES)/sunraster/gray.ras -FATE_SUNRASTER += fate-sunraster-8bit-rle -fate-sunraster-8bit-rle: CMD = framecrc -i $(TARGET_SAMPLES)/sunraster/lena-8bit-rle.sun -pix_fmt rgb24 -vf scale - -FATE_SUNRASTER += fate-sunraster-24bit-raw -fate-sunraster-24bit-raw: CMD = framecrc -i $(TARGET_SAMPLES)/sunraster/lena-24bit-raw.sun - -FATE_SUNRASTER += fate-sunraster-24bit-rle -fate-sunraster-24bit-rle: CMD = framecrc -i $(TARGET_SAMPLES)/sunraster/lena-24bit-rle.sun - FATE_SUNRASTER-$(call DEMDEC, IMAGE2, SUNRAST) += $(FATE_SUNRASTER) -FATE_IMAGE += $(FATE_SUNRASTER-yes) +FATE_IMAGE_FRAMECRC += $(FATE_SUNRASTER-yes) fate-sunraster: $(FATE_SUNRASTER-yes) -FATE_TARGA = CBW8 \ +define FATE_IMGSUITE_TARGA +FATE_TARGA-$(call DEMDEC, IMAGE2, TARGA, $(call ADD_SCALE_IF, $(TARGA_OPTS_$(1)))) += fate-targa-conformance-$(1) +fate-targa-conformance-$(1): CMD = framecrc -i $(TARGET_SAMPLES)/targa-conformance/$(1).TGA $(TARGA_OPTS_$(1)) +endef +TARGA_FMT := CBW8 \ CCM8 \ CTC16 \ CTC24 \ @@ -485,28 +480,17 @@ FATE_TARGA = CBW8 \ UTC16 \ UTC24 \ UTC32 +TARGA_OPTS_CCM8 := -pix_fmt rgba -vf scale +TARGA_OPTS_UCM8 := -pix_fmt rgba -vf scale +TARGA_OPTS_UTC16 := -pix_fmt rgb555le +$(foreach FMT,$(TARGA_FMT),$(eval $(call FATE_IMGSUITE_TARGA,$(FMT)))) -FATE_TARGA := $(FATE_TARGA:%=fate-targa-conformance-%) \ - fate-targa-top-to-bottom - -FATE_TARGA-$(call DEMDEC, IMAGE2, TARGA) += $(FATE_TARGA) - -FATE_IMAGE += $(FATE_TARGA-yes) -fate-targa: $(FATE_TARGA-yes) - -fate-targa-conformance-CBW8: CMD = framecrc -i $(TARGET_SAMPLES)/targa-conformance/CBW8.TGA -fate-targa-conformance-CCM8: CMD = framecrc -i $(TARGET_SAMPLES)/targa-conformance/CCM8.TGA -pix_fmt rgba -vf scale -fate-targa-conformance-CTC16: CMD = framecrc -i $(TARGET_SAMPLES)/targa-conformance/CTC16.TGA -pix_fmt rgb555le -fate-targa-conformance-CTC24: CMD = framecrc -i $(TARGET_SAMPLES)/targa-conformance/CTC24.TGA -fate-targa-conformance-CTC32: CMD = framecrc -i $(TARGET_SAMPLES)/targa-conformance/CTC32.TGA -pix_fmt bgra -fate-targa-conformance-UBW8: CMD = framecrc -i $(TARGET_SAMPLES)/targa-conformance/UBW8.TGA -fate-targa-conformance-UCM8: CMD = framecrc -i $(TARGET_SAMPLES)/targa-conformance/UCM8.TGA -pix_fmt rgba -vf scale -fate-targa-conformance-UTC16: CMD = framecrc -i $(TARGET_SAMPLES)/targa-conformance/UTC16.TGA -pix_fmt rgb555le -fate-targa-conformance-UTC24: CMD = framecrc -i $(TARGET_SAMPLES)/targa-conformance/UTC24.TGA -fate-targa-conformance-UTC32: CMD = framecrc -i $(TARGET_SAMPLES)/targa-conformance/UTC32.TGA -pix_fmt bgra - +FATE_TARGA-$(call DEMDEC, IMAGE2, TARGA) += fate-targa-top-to-bottom fate-targa-top-to-bottom: CMD = framecrc -i $(TARGET_SAMPLES)/targa/lena-top-to-bottom.tga +FATE_IMAGE_FRAMECRC += $(FATE_TARGA-yes) +fate-targa: $(FATE_TARGA-yes) + FATE_TIFF += fate-tiff-fax-g3 fate-tiff-fax-g3: CMD = framecrc -i $(TARGET_SAMPLES)/CCITT_fax/G31D.TIF @@ -515,7 +499,7 @@ fate-tiff-fax-g3s: CMD = framecrc -i $(TARGET_SAMPLES)/CCITT_fax/G31DS.TIF FATE_TIFF-$(call DEMDEC, IMAGE2, TIFF) += $(FATE_TIFF) -FATE_IMAGE += $(FATE_TIFF-yes) +FATE_IMAGE_FRAMECRC += $(FATE_TIFF-yes) fate-tiff: $(FATE_TIFF-yes) FATE_WEBP += fate-webp-rgb-lossless @@ -524,7 +508,7 @@ fate-webp-rgb-lossless: CMD = framecrc -i $(TARGET_SAMPLES)/webp/rgb_lossless.we FATE_WEBP += fate-webp-rgb-lena-lossless fate-webp-rgb-lena-lossless: CMD = framecrc -i $(TARGET_SAMPLES)/webp/rgb_lena_lossless.webp -FATE_WEBP += fate-webp-rgb-lena-lossless-rgb24 +FATE_WEBP-$(call DEMDEC, IMAGE2, WEBP, SCALE_FILTER) += fate-webp-rgb-lena-lossless-rgb24 fate-webp-rgb-lena-lossless-rgb24: CMD = framecrc -i $(TARGET_SAMPLES)/webp/rgb_lena_lossless.webp -pix_fmt rgb24 -vf scale FATE_WEBP += fate-webp-rgba-lossless @@ -541,10 +525,10 @@ FATE_WEBP += fate-webp-rgba-lossy-q80 fate-webp-rgba-lossy-q80: CMD = framecrc -i $(TARGET_SAMPLES)/webp/rgba_q80.webp FATE_WEBP-$(call DEMDEC, IMAGE2, WEBP) += $(FATE_WEBP) -FATE_IMAGE += $(FATE_WEBP-yes) +FATE_IMAGE_FRAMECRC += $(FATE_WEBP-yes) fate-webp: $(FATE_WEBP-yes) -FATE_IMAGE-$(call DEMDEC, IMAGE2, XFACE) += fate-xface +FATE_IMAGE_FRAMECRC-$(call DEMDEC, IMAGE2, XFACE) += fate-xface fate-xface: CMD = framecrc -i $(TARGET_SAMPLES)/xface/lena.xface FATE_XBM += fate-xbm10 @@ -554,9 +538,10 @@ FATE_XBM += fate-xbm11 fate-xbm11: CMD = framecrc -i $(TARGET_SAMPLES)/xbm/lbw.xbm FATE_XBM-$(call DEMDEC, IMAGE2, XBM) += $(FATE_XBM) -FATE_IMAGE += $(FATE_XBM-yes) +FATE_IMAGE_FRAMECRC += $(FATE_XBM-yes) fate-xbm: $(FATE_XBM-yes) +FATE_IMAGE-$(call ALLYES, FILE_PROTOCOL FRAMECRC_MUXER PIPE_PROTOCOL) += $(FATE_IMAGE_FRAMECRC) $(FATE_IMAGE_FRAMECRC-yes) FATE_IMAGE += $(FATE_IMAGE-yes) FATE_IMAGE_PROBE += $(FATE_IMAGE_PROBE-yes) FATE_IMAGE_TRANSCODE += $(FATE_IMAGE_TRANSCODE-yes)