Function av_metrics::video::psnr::calculate_frame_psnr
source · pub fn calculate_frame_psnr<T: Pixel>(
frame1: &Frame<T>,
frame2: &Frame<T>,
bit_depth: usize,
chroma_sampling: ChromaSampling
) -> Result<PlanarMetrics, Box<dyn Error>>
Expand description
Calculates the PSNR for two video frames. Higher is better.
PSNR is capped at 100 in order to avoid skewed statistics from e.g. all black frames, which would otherwise show a PSNR of infinity.