diff options
author | Christian Helmrich <christian.helmrich@hhi.fraunhofer.de> | 2024-08-28 11:28:49 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2024-09-08 17:51:37 +0200 |
commit | 865cd3c0560a965fe096524ed2d8d2962057e6ac (patch) | |
tree | bbef2133b3e4693b6814423c52b950230d7ed5ab /doc | |
parent | e6983ed525b56b4a4a4acfd4e3b77a5efc8c0047 (diff) | |
download | ffmpeg-865cd3c0560a965fe096524ed2d8d2962057e6ac.tar.gz |
avfilter: add XPSNR filter
Add XPSNR video filter
Register new filter xpsnr.
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'doc')
-rw-r--r-- | doc/filters.texi | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/doc/filters.texi b/doc/filters.texi index b1ca9ad2f3..db2f4b7ea7 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -19944,6 +19944,7 @@ pseudocolor="'if(between(val,ymax,amax),lerp(ymin,ymax,(val-ymax)/(amax-ymax)),- @end example @end itemize +@anchor{psnr} @section psnr Obtain the average, maximum and minimum PSNR (Peak Signal to Noise @@ -26064,6 +26065,73 @@ minimum values, and @code{1} maximum values. This filter supports all above options as @ref{commands}, excluding option @code{inputs}. +@anchor{xpsnr} +@section xpsnr + +Obtain the average (across all input frames) and minimum (across all color plane averages) +eXtended Perceptually weighted peak Signal-to-Noise Ratio (XPSNR) between two input videos. + +The XPSNR is a low-complexity psychovisually motivated distortion measurement algorithm for +assessing the difference between two video streams or images. This is especially useful for +objectively quantifying the distortions caused by video and image codecs, as an alternative +to a formal subjective test. The logarithmic XPSNR output values are in a similar range as +those of traditional @ref{psnr} assessments but better reflect human impressions of visual +coding quality. More details on the XPSNR measure, which essentially represents a blockwise +weighted variant of the PSNR measure, can be found in the following freely available papers: + +@itemize +@item +C. R. Helmrich, M. Siekmann, S. Becker, S. Bosse, D. Marpe, and T. Wiegand, "XPSNR: A +Low-Complexity Extension of the Perceptually Weighted Peak Signal-to-Noise Ratio for +High-Resolution Video Quality Assessment," in Proc. IEEE Int. Conf. Acoustics, Speech, +Sig. Process. (ICASSP), virt./online, May 2020. @url{www.ecodis.de/xpsnr.htm} + +@item +C. R. Helmrich, S. Bosse, H. Schwarz, D. Marpe, and T. Wiegand, "A Study of the +Extended Perceptually Weighted Peak Signal-to-Noise Ratio (XPSNR) for Video Compression +with Different Resolutions and Bit Depths," ITU Journal: ICT Discoveries, vol. 3, no. +1, pp. 65 - 72, May 2020. @url{http://handle.itu.int/11.1002/pub/8153d78b-en} +@end itemize + +When publishing the results of XPSNR assessments obtained using, e.g., this FFmpeg filter, a +reference to the above papers as a means of documentation is strongly encouraged. The filter +requires two input videos. The first input is considered a (usually not distorted) reference +source and is passed unchanged to the output, whereas the second input is a (distorted) test +signal. Except for the bit depth, these two video inputs must have the same pixel format. In +addition, for best performance, both compared input videos should be in YCbCr color format. + +The obtained overall XPSNR values mentioned above are printed through the logging system. In +case of input with multiple color planes, we suggest reporting of the minimum XPSNR average. + +The following parameter, which behaves like the one for the @ref{psnr} filter, is accepted: + +@table @option +@item stats_file, f +If specified, the filter will use the named file to save the XPSNR value of each individual +frame and color plane. When the file name equals "-", that data is sent to standard output. +@end table + +This filter also supports the @ref{framesync} options. + +@subsection Examples +@itemize +@item +XPSNR analysis of two 1080p HD videos, ref_source.yuv and test_video.yuv, both at 24 frames +per second, with color format 4:2:0, bit depth 8, and output of a logfile named "xpsnr.log": +@example +ffmpeg -s 1920x1080 -framerate 24 -pix_fmt yuv420p -i ref_source.yuv -s 1920x1080 -framerate +24 -pix_fmt yuv420p -i test_video.yuv -lavfi xpsnr="stats_file=xpsnr.log" -f null - +@end example + +@item +XPSNR analysis of two 2160p UHD videos, ref_source.yuv with bit depth 8 and test_video.yuv +with bit depth 10, both at 60 frames per second with color format 4:2:0, no logfile output: +@example +ffmpeg -s 3840x2160 -framerate 60 -pix_fmt yuv420p -i ref_source.yuv -s 3840x2160 -framerate +60 -pix_fmt yuv420p10le -i test_video.yuv -lavfi xpsnr="stats_file=-" -f null - +@end example +@end itemize + @anchor{xstack} @section xstack Stack video inputs into custom layout. |