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

MntMPEGFrameDecoder Class Reference

This component receives an MntMPEGRTPReassemblerBuffer, which contains an array of RTP packets, and decode the packets into YUV data. More...

#include <mnt_mpeg_frame_decoder.h>

Inheritance diagram for MntMPEGFrameDecoder:

MntComponent List of all members.

Public Member Functions

 MntMPEGFrameDecoder ()
 Initialize the decoder with empty headers (sequence, GOP, picture and slice), and other members.
virtual void recv (MntData *)
 This method expects a reassemble buffer as input, containing a sequence of packets that made up a complete MPEG frame.
int copy_next_slice_to_bs (MntMPEGRTPReassemblerBuffer *buf, BitStream *bs, int &i)
 Copy the next complete slice from buffer to bitstream.
void init_frame (MntMPEGFrame *frame)
void decode_i_slice (BitStream *bs)
void decode_p_slice (BitStream *bs)
void decode_b_slice (BitStream *bs)
void dct_i_to_byte (MntYUVFrame *, MntMPEGFrame *, MntYUVFrame *)
void dct_p_to_byte (MntYUVFrame *, MntMPEGFrame *, MntYUVFrame *, MntYUVFrame *)
void dct_b_to_byte (MntYUVFrame *, MntMPEGFrame *, MntYUVFrame *, MntYUVFrame *, MntYUVFrame *)
void sc_i_to_byte (MntDCTImage *sc, MntByteImage *byte, MntByteImage *last)
void sc_p_to_y (MntDCTImage *sc, MntVectorImage *mv, MntByteImage *prev, MntByteImage *byte, MntByteImage *last)
void sc_p_to_uv (MntDCTImage *sc, MntVectorImage *mv, MntByteImage *prev, MntByteImage *byte, MntByteImage *last)
void sc_b_to_y (MntDCTImage *sc, MntVectorImage *fwdmv, MntVectorImage *bwdmv, MntByteImage *prev, MntByteImage *future, MntByteImage *byte, MntByteImage *last)
void sc_b_to_uv (MntDCTImage *sc, MntVectorImage *fwdmv, MntVectorImage *bwdmv, MntByteImage *prev, MntByteImage *future, MntByteImage *byte, MntByteImage *last)
void process_seq_hdr ()
void skip_p_macroblocks (int prev_mb_addr, int curr_mb_addr)
void skip_b_macroblocks (int prev_mb_addr, int curr_mb_addr, int, int, int, int, int, int)
void skip_macroblock (int curr_mb_addr)

Private Attributes

MntMPEG1SeqHdrseq_hdr_
MntMPEG1GopHdrgop_hdr_
MntMPEG1PicHdrpic_hdr_
MntMPEG1SliceHdrslice_hdr_
MntMPEGFrameframe_
BitStreambs_
BitParserbp_
MntYUVFramecurr_
MntYUVFrameprev_
MntYUVFramenext_
MntYUVFramelast_decoded_
int skip_check_addr_
int prev_fwd_down_
int prev_fwd_right_
int prev_bwd_down_
int prev_bwd_right_
int prev_fwd_exists_
int prev_bwd_exists_
int gop_start_
int gop_size_
int curr_frame_no_

Detailed Description

This component receives an MntMPEGRTPReassemblerBuffer, which contains an array of RTP packets, and decode the packets into YUV data.


Member Function Documentation

int MntMPEGFrameDecoder::copy_next_slice_to_bs MntMPEGRTPReassemblerBuffer buf,
BitStream bs,
int &  i
 

Copy the next complete slice from buffer to bitstream.

Update i to the last copied packet. Return 1 if successful, 0 if not (no more packets in buffer or no complete slices can be found due to loss packet).

Important: Note that after copying the slices, the end of bitstream is padded with 4 bytes of 0x000001ff. This is necessary so that the slice decoder knows when to stop decoding.

void MntMPEGFrameDecoder::recv MntData data  )  [virtual]
 

This method expects a reassemble buffer as input, containing a sequence of packets that made up a complete MPEG frame.

(No packet loss is assumed). It performs decoding in three main steps: (i) copy payload into bistream. (ii) decode slices into DCT blocks (iii) decode DCT blocks into uncompressed YUV data.

The decoded data is then push to the next components.

Reimplemented from MntComponent.


Member Data Documentation

BitParser* MntMPEGFrameDecoder::bp_ [private]
 

BitParser for the BitStream above

BitStream* MntMPEGFrameDecoder::bs_ [private]
 

BitStream to store payloads from RTP packets before decoding

MntYUVFrame* MntMPEGFrameDecoder::curr_ [private]
 

Current decoded frame

int MntMPEGFrameDecoder::curr_frame_no_ [private]
 

frame number (in display order) of the current frame being decoded

MntMPEGFrame* MntMPEGFrameDecoder::frame_ [private]
 

Pointer to an internal storage of partially decoded frame

MntMPEG1GopHdr* MntMPEGFrameDecoder::gop_hdr_ [private]
 

GOP header of the GOP being decoded

int MntMPEGFrameDecoder::gop_size_ [private]
 

the number of frames encountered in the current GOP

int MntMPEGFrameDecoder::gop_start_ [private]
 

frame number (in display order) of the first frame in the current GOP

MntYUVFrame* MntMPEGFrameDecoder::last_decoded_ [private]
 

The previous decoded frame for error concealment if some blocks are not decoded

MntYUVFrame* MntMPEGFrameDecoder::next_ [private]
 

Future reference frame to decode B-frames.

Reimplemented from MntComponent.

MntMPEG1PicHdr* MntMPEGFrameDecoder::pic_hdr_ [private]
 

Picture header of the MPEG frame being decoded

MntYUVFrame* MntMPEGFrameDecoder::prev_ [private]
 

Previous reference frame to decode P or B-frames.

MntMPEG1SeqHdr* MntMPEGFrameDecoder::seq_hdr_ [private]
 

Sequence header of the MPEG video being decoded

int MntMPEGFrameDecoder::skip_check_addr_ [private]
 

last macroblock addr to check for skipping.

MntMPEG1SliceHdr* MntMPEGFrameDecoder::slice_hdr_ [private]
 

Slice header of the slice being decoded


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