me_epzs.c File Reference

Motion Estimation using EPZS. More...

#include "contributors.h"
#include <limits.h>
#include "global.h"
#include "image.h"
#include "memalloc.h"
#include "mb_access.h"
#include "refbuf.h"
#include "macroblock.h"
#include "me_distortion.h"
#include "me_epzs.h"
#include "me_epzs_common.h"
#include "mv_search.h"

Include dependency graph for me_epzs.c:

Go to the source code of this file.

Functions

int EPZSPelBlockMotionSearch (Macroblock *currMB, MotionVector *pred_mv, MEBlock *mv_block, int min_mcost, int lambda_factor)
int EPZSPelBlockMotionSearchSubMB (Macroblock *currMB, MotionVector *pred_mv, MEBlock *mv_block, int min_mcost, int lambda_factor)
int EPZSBiPredBlockMotionSearch (Macroblock *currMB, int list, MotionVector *pred_mv1, MotionVector *pred_mv2, MotionVector *mv1, MotionVector *mv2, MEBlock *mv_block, int search_range, int min_mcost, int lambda_factor)


Detailed Description

Motion Estimation using EPZS.

Author:
Main contributors (see contributors.h for copyright, address and affiliation details)

Definition in file me_epzs.c.


Function Documentation

int EPZSBiPredBlockMotionSearch ( Macroblock currMB,
int  list,
MotionVector pred_mv1,
MotionVector pred_mv2,
MotionVector mv1,
MotionVector mv2,
MEBlock *  mv_block,
int  search_range,
int  min_mcost,
int  lambda_factor 
)

FAST Motion Estimation using EPZS AMT/HYC.

Returns:
minimum motion cost after search

If p_EPZS->medthres satisfied, then terminate, otherwise generate Predictors

Add Spatial Predictors in predictor list. Scheme adds zero, left, top-left, top, top-right. Note that top-left adds very little in terms of performance and could be removed with little penalty if any.

Check all predictors

Refine using EPZS pattern if needed Note that we are using a conservative threshold method. Threshold could be tested after checking only a certain number of predictors instead of the full set. Code could be easily modified for this task.

Adapt pattern based on different conditions.

center on best predictor

Check Second best predictor with EPZS pattern

Second best. Note that following code is identical as for best predictor.

Parameters:
currMB Current Macroblock
list reference list
pred_mv1 motion vector predictor in sub-pel units
pred_mv2 motion vector predictor in sub-pel units
mv1 in: search center (x|y) / out: motion vector (x|y) - in pel units
mv2 in: search center (x|y)
mv_block motion vector information
search_range 1-d search range in pel units
min_mcost minimum motion cost (cost for center or huge value)
lambda_factor lagrangian parameter for determining motion cost

Definition at line 728 of file me_epzs.c.

References EPZSDetermineStopCriterion(), EPZSSpatialPredictors(), storable_picture::motion, pic_motion_params::mv, macroblock::p_Img, macroblock::p_slice, and pic_motion_params::ref_idx.

Referenced by init_ME_engine().

Here is the call graph for this function:

int EPZSPelBlockMotionSearch ( Macroblock currMB,
MotionVector pred_mv,
MEBlock *  mv_block,
int  min_mcost,
int  lambda_factor 
)

FAST Motion Estimation using EPZS AMT/HYC.

If p_EPZS->medthres satisfied, then terminate, otherwise generate Predictors Condition could be strengthened by consideration distortion of adjacent partitions.

Add Spatial Predictors in predictor list. Scheme adds zero, left, top-left, top, top-right. Note that top-left adds very little in terms of performance and could be removed with little penalty if any.

Window Size Based Predictors Basically replaces a Hierarchical ME concept and helps escaping local minima, or determining large motion variations. Following predictors can be adjusted further (i.e. removed, conditioned etc) based on distortion, correlation of adjacent MVs, complexity etc. These predictors and their conditioning could also be moved after all other predictors have been tested. Adaptation could also be based on type of material and coding mode (i.e. field/frame coding,MBAFF etc considering the higher dependency with opposite parity field

Blocktype/Reference dependent predictors. Since already mvs for other blocktypes/references have been computed, we can reuse them in order to easier determine the optimal point. Use of predictors could depend on cost,

Check all predictors

Refine using EPZS pattern if needed Note that we are using a conservative threshold method. Threshold could be tested after checking only a certain number of predictors instead of the full set. Code could be easily modified for this task.

Adapt pattern based on different conditions.

center on best predictor

Check Second best predictor with EPZS pattern

Second best. Note that following code is identical as for best predictor.

Definition at line 42 of file me_epzs.c.

References EPZSBlockTypePredictorsMB(), EPZSDetermineStopCriterion(), EPZSSpatialMemPredictors(), EPZSSpatialPredictors(), EPZSTemporalPredictors(), EPZSWindowPredictors(), macroblock::mbAddrX, storable_picture::motion, pic_motion_params::mv, macroblock::p_Img, macroblock::p_slice, pic_motion_params::ref_idx, and slice::slice_type.

Referenced by init_ME_engine(), PartitionMotionSearch(), and SubPartitionMotionSearch().

Here is the call graph for this function:

int EPZSPelBlockMotionSearchSubMB ( Macroblock currMB,
MotionVector pred_mv,
MEBlock *  mv_block,
int  min_mcost,
int  lambda_factor 
)

FAST Motion Estimation using EPZS AMT/HYC.

If p_EPZS->medthres satisfied, then terminate, otherwise generate Predictors Condition could be strengthened by consideration distortion of adjacent partitions.

Add Spatial Predictors in predictor list. Scheme adds zero, left, top-left, top, top-right. Note that top-left adds very little in terms of performance and could be removed with little penalty if any.

Blocktype/Reference dependent predictors. Since already mvs for other blocktypes/references have been computed, we can reuse them in order to easier determine the optimal point. Use of predictors could depend on cost,

Check all predictors

Refine using EPZS pattern if needed Note that we are using a conservative threshold method. Threshold could be tested after checking only a certain number of predictors instead of the full set. Code could be easily modified for this task.

Adapt pattern based on different conditions.

center on best predictor

Check Second best predictor with EPZS pattern

Now consider second best.

Definition at line 394 of file me_epzs.c.

References EPZSBlockTypePredictors(), EPZSDetermineStopCriterion(), EPZSSpatialMemPredictors(), EPZSSpatialPredictors(), macroblock::mbAddrX, storable_picture::motion, pic_motion_params::mv, macroblock::p_Img, macroblock::p_slice, pic_motion_params::ref_idx, and slice::slice_type.

Referenced by SubPartitionMotionSearch().

Here is the call graph for this function:


Documentation generated with DoxyGen