Main Page | Class Hierarchy | Class List | Directories | Class Members

MntPSNRCalculator Class Reference

This component receives a YUV frame, calcuate its PSNR values, and logged the output to disk. More...

#include <mnt_psnr_calculator.h>

Inheritance diagram for MntPSNRCalculator:

MntComponent List of all members.

Public Member Functions

 MntPSNRCalculator (char *input_yuv, int css, int width, int height, char *output_log)
 Constructor.
void recv (MntData *f)
 Given an input YUV frame, this method seeks to the right position in the input YUV file, and read the original Y plane of the frame.
float calc_psnr (MntYUVFrame *frame, unsigned char *buf)
 This method computes the PSNR values between the Y plane of a MntYUVFrame object and the image stored in a buffer.

Private Attributes

FILE * output_file_
FILE * original_yuv_
int css_
int width_
int height_
float ratio_

Detailed Description

This component receives a YUV frame, calcuate its PSNR values, and logged the output to disk.

The PSNR is computed against a raw YUV video file which is specified through the constructor.

The output file contains two numbers on each line, the first, an integer, is the frame number (in display order) and the second, a floating point number, is the PNSR value.


Constructor & Destructor Documentation

MntPSNRCalculator::MntPSNRCalculator char *  input_yuv,
int  css,
int  width,
int  height,
char *  output_log
 

Constructor.

Parameters:
input_yuv filename of the input YUV file
css color sub-sampling ratios of the input YUV file
width width of each frame in the input YUV file
height height of each frame in the input YUV file
output_log filename of the output text file to write psnr values to.


Member Function Documentation

float MntPSNRCalculator::calc_psnr MntYUVFrame frame,
unsigned char *  buf
 

This method computes the PSNR values between the Y plane of a MntYUVFrame object and the image stored in a buffer.

Parameters:
frame Input MntYUVFrame
buf A buffer containing the image to compare object frame against.
Returns:
The PSNR value.

void MntPSNRCalculator::recv MntData data  )  [virtual]
 

Given an input YUV frame, this method seeks to the right position in the input YUV file, and read the original Y plane of the frame.

This original Y image is the compared with the Y plane of the input YUV. PSNR is computed and is logged to disk.

Reimplemented from MntComponent.


The documentation for this class was generated from the following files:
Generated on Wed Sep 14 12:37:13 2005 for mnt by  doxygen 1.4.4