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

MntYUVFrame Class Reference

MntYUVFrame is an abstraction for a uncompressed image in YUV color space. More...

#include <mnt_yuv_frame.h>

Inheritance diagram for MntYUVFrame:

MntData List of all members.

Public Member Functions

int get_width ()
int get_height ()
int get_csss ()
 MntYUVFrame ()
 An empty constructor that do nothing.
 MntYUVFrame (int w, int h, uint32_t ssrc, int csss, unsigned char *buf)
 Constructor for MntYUVFrame object.
void copy_to (MntYUVFrame *target)
 Copy this YUV frame to another YUV frame.
void set_buffer (unsigned char *buf)
 Change the buffer that contains the YUV image.

Public Attributes

char frame_type_
int frame_no_
int width_
int height_
int csss_
uint32_t ssrc_
MntByteImage y_
MntByteImage u_
MntByteImage v_

Detailed Description

MntYUVFrame is an abstraction for a uncompressed image in YUV color space.

An MntYUVFrame object contains three MntByteImage objects, one of each of Y, U, and V color plane. It also contains members that indicates the color sub-sampling scheme, the width and the height of the frame. Additional information regarding the origin of this frame such as the SSRC, the frame number (in display order) and the frame type ('i', 'p', or 'b') are stored in MntYUVFrame object as well.

Note:
Current implementation always assume 4:2:0 color-subsampling regarding of the value of csss_.


Constructor & Destructor Documentation

MntYUVFrame::MntYUVFrame int  w,
int  h,
uint32_t  ssrc,
int  csss,
unsigned char *  buf
 

Constructor for MntYUVFrame object.

A buffer that contains uncompressed YUV data, needs to be passed in. The pixels are assumed to be stored in the following order:

YYYYYYY.......YUUUU......UVVVV......V 
 
An MntYUVFrame object points its pointers to this buffer. Thus, the input buffer should NOT be freed nor modified while MntYUVFrame is still using the buffer.

Regardless of csss, we assume the input YUV has 4:2:0 sub-sampling. The input SSRC is ignored. These certainly need to be fixed in the future.

Parameters:
w width of the image
h height of the image
ssrc SSRC of the RTP source where this image comes from (if applicable). Ignored in current implementation.
csss Color sub-sampling scheme of the YUV image. Ignored in current implementation. Always assume 4:2:0.
buf A memory buffer that contains uncompressed image.


Member Function Documentation

void MntYUVFrame::copy_to MntYUVFrame target  ) 
 

Copy this YUV frame to another YUV frame.

Parameters:
target The destination YUV frame to copy this frame into.

void MntYUVFrame::set_buffer unsigned char *  buf  ) 
 

Change the buffer that contains the YUV image.

The new buffer should be of the same width and height as the width and height specified in constructor and has 4:2:0 color sub-sampling.

Parameters:
buf Pointer to memory locations that contains the new uncompressed YUV image.


Member Data Documentation

int MntYUVFrame::csss_
 

color sub-sampling scheme. It should be one of the following integer: 422,444,411,420

int MntYUVFrame::frame_no_
 

frame number of the MPEG frame where this uncompressed image is decoded from (starts from 0, in display order)

char MntYUVFrame::frame_type_
 

frame type of the MPEG frame where this uncompressed image is decoded from. Either 'i', 'p' or 'b'

int MntYUVFrame::height_
 

height of this frame

uint32_t MntYUVFrame::ssrc_
 

SSRC of the stream where this frame comes from.

MntByteImage MntYUVFrame::u_
 

U plane of this image

MntByteImage MntYUVFrame::v_
 

V plane of this image

int MntYUVFrame::width_
 

width of this frame

MntByteImage MntYUVFrame::y_
 

Y plane of this image


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