[FFmpeg-devel] [PATCH] fate: add tests for psnr and ssim filter

Tobias Rapp t.rapp at noa-archive.com
Wed Jul 19 17:37:51 EEST 2017


On 19.07.2017 14:24, Nicolas George wrote:
> Hi. Thanks for the patch. Here are comments unrelated to the issues of
> asm failure.
>
> Le primidi 1er thermidor, an CCXXV, Tobias Rapp a écrit :
>> Signed-off-by: Tobias Rapp <t.rapp at noa-archive.com>
>> ---
>>  tests/fate/filter-video.mak           | 17 +++++++++++++
>>  tests/ref/fate/filter-refcmp-psnr-rgb | 45 +++++++++++++++++++++++++++++++++++
>>  tests/ref/fate/filter-refcmp-psnr-yuv | 45 +++++++++++++++++++++++++++++++++++
>>  tests/ref/fate/filter-refcmp-ssim-rgb | 30 +++++++++++++++++++++++
>>  tests/ref/fate/filter-refcmp-ssim-yuv | 30 +++++++++++++++++++++++
>>  5 files changed, 167 insertions(+)
>>  create mode 100644 tests/ref/fate/filter-refcmp-psnr-rgb
>>  create mode 100644 tests/ref/fate/filter-refcmp-psnr-yuv
>>  create mode 100644 tests/ref/fate/filter-refcmp-ssim-rgb
>>  create mode 100644 tests/ref/fate/filter-refcmp-ssim-yuv
>>
>> diff --git a/tests/fate/filter-video.mak b/tests/fate/filter-video.mak
>> index 53fc7a6..581297f 100644
>> --- a/tests/fate/filter-video.mak
>> +++ b/tests/fate/filter-video.mak
>> @@ -698,6 +698,23 @@ FATE_FILTER_SAMPLES-$(call ALLYES, MOV_DEMUXER H264_DECODER AAC_FIXED_DECODER PC
>>  fate-filter-meta-4560-rotate0: tests/data/file4560-override2rotate0.mov
>>  fate-filter-meta-4560-rotate0: CMD = framecrc -flags +bitexact -c:a aac_fixed -i $(TARGET_PATH)/tests/data/file4560-override2rotate0.mov
>>
>> +fate-filter-refcmp%: CMD = ffmpeg -flags +bitexact -sws_flags +accurate_rnd+bitexact -fflags +bitexact \
>
>> +	-f lavfi -i "testsrc=size=300x200:rate=1:duration=5" \
>> +	-filter:v "format=$(PIXFMT),split[ref][tmp]\;[tmp]avgblur=4[enc]\;[enc][ref]$(REFCMP),metadata=print:file=-" \
>
> -lavfi "testsrc=...,format=,...", with "-lavfi" instead of "-f lavfi -i"
> and a single graph.
>
> Also, better use testsrc2, it is faster and with testrc, the yuv422p
> test will invoke scale.

Changed locally.

> Last, I think the backslashes before the semicolons are suspicious.

Indeed they are remainders from previous edits. It seems that stripping 
any whitespace within the filter string is enough to ensure that it is 
passed as one argument token to ffmpeg. So fixed locally.

>> +	-f null /dev/null

BTW: Is it OK to redirect output to "/dev/null" here or does this 
introduce an unwanted platform dependency (i.e. blocks FATE from running 
on MSYS/Windows)?

>> +
>> +FATE_FILTER_SAMPLES-$(call ALLYES, FFMPEG LAVFI_INDEV AVGBLUR_FILTER PSNR_FILTER METADATA_FILTER) += fate-filter-refcmp-psnr-rgb fate-filter-refcmp-psnr-yuv
>> +fate-filter-refcmp-psnr%: REFCMP = psnr
>> +fate-filter-refcmp-psnr-rgb: PIXFMT = rgb24
>> +fate-filter-refcmp-psnr-yuv: PIXFMT = yuv422p
>> +
>> +FATE_FILTER_SAMPLES-$(call ALLYES, FFMPEG LAVFI_INDEV AVGBLUR_FILTER SSIM_FILTER METADATA_FILTER) += fate-filter-refcmp-ssim-rgb fate-filter-refcmp-ssim-yuv
>> +fate-filter-refcmp-ssim%: REFCMP = ssim
>> +# FIXME: override CPUFLAGS to avoid failure on x86 (issue #6519)
>> +fate-filter-refcmp-ssim%: CPUFLAGS = 0
>> +fate-filter-refcmp-ssim-rgb: PIXFMT = rgb24
>> +fate-filter-refcmp-ssim-yuv: PIXFMT = yuv422p
>> +
>>  FATE_SAMPLES_FFPROBE += $(FATE_METADATA_FILTER-yes)
>>  FATE_SAMPLES_FFMPEG += $(FATE_FILTER_SAMPLES-yes)
>>  FATE_FFMPEG += $(FATE_FILTER-yes)
>

Thanks for review,
Tobias



More information about the ffmpeg-devel mailing list