dirac::ModeDecider Class Reference

Decides between macroblock and block prediction modes. More...

#include <me_mode_decn.h>

List of all members.

Public Member Functions

 ModeDecider (const EncoderParams &encp)
 Constructor.
 ~ModeDecider ()
 Destructor.
void DoModeDecn (const FrameBuffer &my_buffer, int frame_num, MEData &me_data)
 Does the actual mode decision.


Detailed Description

Decides between macroblock and block prediction modes.

Loops over all the macroblocks and decides on the best modes. A macroblock is a square of 16 blocks. There are three possible splitting levels: level 0 means the macroblock is considered as a single block; level 1 means the macroblock is considered as 4 larger blocks, termed sub-macroblocks; level 0 means the macroblock is split right down to blocks.

In addition there is a common_ref mode which if true means the prediction mode of all units within the MB are the same (e.g. all sub-MBs are predicted only from reference 1). In deciding which modes to adopt, the ModeDecider object calculates costs for all permutations, doing motion estimation for the level 1 and level 0 modes as these have not been calculated before. The process of decision for each is as follows. For each MB, we loop over the levels, and call DoLevelDecn. DoLevelDecn does motion estimation if it's necessary. Then it assumes that we don't have a common block mode and calls DoUnitDecn which finds the best mode for each unit in the MB at that level, individually. Then we consider the case where we say that all the modes will be the same, and call DoCommonMode to see if we'll get a lower cost. Then when we've got a best cost for that level we go up to the next one.

Definition at line 73 of file me_mode_decn.h.


Constructor & Destructor Documentation

ModeDecider::ModeDecider const EncoderParams encp  ) 
 

Constructor.

The constructor creates arrays for handling the motion vector data at splitting levels 0 and 1, as motion estimation must be performed for these levels.

Definition at line 46 of file me_mode_decn.cpp.

References dirac::CodecParams::LumaBParams(), dirac::OLBParams::Xblen(), and dirac::OLBParams::Yblen().

ModeDecider::~ModeDecider  ) 
 

Destructor.

The destructor destroys the classes created in the constructor

Definition at line 74 of file me_mode_decn.cpp.


Member Function Documentation

void ModeDecider::DoModeDecn const FrameBuffer my_buffer,
int  frame_num,
MEData me_data
 

Does the actual mode decision.

Does the mode decision

Parameters:
my_buffer the buffer of all the relevant frames
frame_num the frame number for which motion estimation is being done
me_data the motion vector data into which decisions will be written

Definition at line 83 of file me_mode_decn.cpp.

References dirac::FrameParams::FSort(), dirac::FrameBuffer::GetComponent(), dirac::Frame::GetFparams(), dirac::FrameBuffer::GetFrame(), dirac::FrameBuffer::GetUpComponent(), dirac::MEData::LambdaMap(), dirac::FrameParams::Refs(), dirac::CodecParams::XNumBlocks(), dirac::CodecParams::XNumMB(), dirac::CodecParams::YNumBlocks(), and dirac::CodecParams::YNumMB().

Referenced by dirac::MotionEstimator::DoME().


The documentation for this class was generated from the following files:
Generated on Tue Dec 13 14:49:24 2005 for guliverkli by  doxygen 1.4.5