#include "me_epzs_common.h"
Go to the source code of this file.
Functions | |
int | EPZSPelBlockMotionSearch (Macroblock *, MotionVector *, MEBlock *, int, int) |
int | EPZSPelBlockMotionSearchSubMB (Macroblock *, MotionVector *, MEBlock *, int, int) |
int | EPZSBiPredBlockMotionSearch (Macroblock *, int, MotionVector *, MotionVector *, MotionVector *, MotionVector *, MEBlock *, int, int, int) |
int | EPZSSubPelBlockMotionSearch (Macroblock *, MotionVector *, MEBlock *mv_block, int, int *) |
int | EPZSSubPelBlockSearchBiPred (Macroblock *, MEBlock *mv_block, int list, MotionVector *pred_mv1, MotionVector *pred_mv2, MotionVector *mv1, MotionVector *mv2, int min_mcost, int *lambda_factor) |
Definition in file me_epzs.h.
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.
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.
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().
int EPZSPelBlockMotionSearch | ( | Macroblock * | , | |
MotionVector * | , | |||
MEBlock * | , | |||
int | , | |||
int | ||||
) |
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().
int EPZSPelBlockMotionSearchSubMB | ( | Macroblock * | , | |
MotionVector * | , | |||
MEBlock * | , | |||
int | , | |||
int | ||||
) |
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().
int EPZSSubPelBlockMotionSearch | ( | Macroblock * | , | |
MotionVector * | , | |||
MEBlock * | mv_block, | |||
int | , | |||
int * | ||||
) |
Fast sub pixel block motion search to support EPZS.
Definition at line 40 of file me_epzs_sub.c.
References H_PEL, macroblock::p_Img, macroblock::p_slice, Q_PEL, img_par::start_me_refinement_hp, and img_par::start_me_refinement_qp.
Referenced by init_ME_engine().
int EPZSSubPelBlockSearchBiPred | ( | Macroblock * | , | |
MEBlock * | mv_block, | |||
int | list, | |||
MotionVector * | pred_mv1, | |||
MotionVector * | pred_mv2, | |||
MotionVector * | mv1, | |||
MotionVector * | mv2, | |||
int | min_mcost, | |||
int * | lambda_factor | |||
) |
Fast bipred sub pixel block motion search to support EPZS.
Definition at line 319 of file me_epzs_sub.c.
References H_PEL, img_par::mb_data, macroblock::p_Img, Q_PEL, img_par::start_me_refinement_hp, and img_par::start_me_refinement_qp.
Referenced by init_ME_engine().