[FFmpeg-devel] [PATCH v3] fate: add tests for psnr and ssim filter
Tobias Rapp
t.rapp at noa-archive.com
Wed Sep 20 10:29:34 EEST 2017
On 20.09.2017 01:38, Michael Niedermayer wrote:
> On Tue, Sep 19, 2017 at 09:48:45AM +0200, Tobias Rapp wrote:
>> Metadata filter output is passed through an Awk script comparing floats
>> against reference values with specified "fuzz" tolerance to account for
>> architectural differences (e.g. x86-32 vs. x86-64).
>>
>> Signed-off-by: Tobias Rapp <t.rapp at noa-archive.com>
>> ---
>> tested on Linux x86-32/64 and Mips (Qemu)
>>
>> v3:
>> - avoid precision loss due to rounding of float values
>>
>> v2:
>> - removed CPUFLAGS work-around for ssim filter issue
>> - added metadata float value post-processing script
>>
>> tests/fate-run.sh | 9 ++++++
>> tests/fate/filter-video.mak | 14 ++++++++
>> 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 +++++++++++++++++
>> tests/refcmp-metadata.awk | 61 +++++++++++++++++++++++++++++++++++
>> 7 files changed, 234 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
>> create mode 100644 tests/refcmp-metadata.awk
>
> This seems not to work (normal x86-64 linux) but maybe ive done something silly
>
> --- ./tests/ref/fate/filter-refcmp-psnr-rgb 2017-09-20 00:58:04.063337500 +0200
> +++ tests/data/fate/filter-refcmp-psnr-rgb 2017-09-20 00:59:26.399339234 +0200
> @@ -1,12 +1,3 @@
> -frame:0 pts:0 pts_time:0
> -lavfi.psnr.mse.r=1381.80
> -lavfi.psnr.psnr.r=16.73
> -lavfi.psnr.mse.g=896.00
> -lavfi.psnr.psnr.g=18.61
> -lavfi.psnr.mse.b=277.38
> -lavfi.psnr.psnr.b=23.70
> -lavfi.psnr.mse_avg=851.73
> -lavfi.psnr.psnr_avg=18.83
> frame:1 pts:1 pts_time:1
> lavfi.psnr.mse.r=1380.37
> lavfi.psnr.psnr.r=16.73
> [...]
It seems that my assumption that iterating a for-in loop with numerical
indexes would walk the array in linear order does not apply to all
versions of Awk. I'm testing with GNU Awk 4.1.3, what version of Awk is
installed on your computer?
Will rework the loop and post a patch update.
Regards,
Tobias
More information about the ffmpeg-devel
mailing list