me_distortion.c File Reference

Motion estimation error calculation functions. More...

#include "contributors.h"
#include <limits.h>
#include "global.h"
#include "image.h"
#include "memalloc.h"
#include "mb_access.h"
#include "refbuf.h"
#include "mv-search.h"
#include "me_distortion.h"

Include dependency graph for me_distortion.c:

Go to the source code of this file.

Functions

int distortion4x4 (int *diff)
int distortion8x8 (int *diff)
int HadamardMB (int c_diff[MB_PIXELS], int blocktype)
int HadamardSAD4x4 (int *diff)
int HadamardSAD8x8 (int *diff)
int computeSAD (imgpel *src_pic, int blocksize_y, int blocksize_x, int min_mcost, int cand_x, int cand_y)
int computeSADWP (imgpel *src_pic, int blocksize_y, int blocksize_x, int min_mcost, int cand_x, int cand_y)
int computeBiPredSAD1 (imgpel *src_pic, int blocksize_y, int blocksize_x, int min_mcost, int cand_x1, int cand_y1, int cand_x2, int cand_y2)
int computeBiPredSAD2 (imgpel *src_pic, int blocksize_y, int blocksize_x, int min_mcost, int cand_x1, int cand_y1, int cand_x2, int cand_y2)
int computeSATD (imgpel *src_pic, int blocksize_y, int blocksize_x, int min_mcost, int cand_x, int cand_y)
int computeSATDWP (imgpel *src_pic, int blocksize_y, int blocksize_x, int min_mcost, int cand_x, int cand_y)
int computeBiPredSATD1 (imgpel *src_pic, int blocksize_y, int blocksize_x, int min_mcost, int cand_x1, int cand_y1, int cand_x2, int cand_y2)
int computeBiPredSATD2 (imgpel *src_pic, int blocksize_y, int blocksize_x, int min_mcost, int cand_x1, int cand_y1, int cand_x2, int cand_y2)
int computeSSE (imgpel *src_pic, int blocksize_y, int blocksize_x, int min_mcost, int cand_x, int cand_y)
int computeSSEWP (imgpel *src_pic, int blocksize_y, int blocksize_x, int min_mcost, int cand_x, int cand_y)
int computeBiPredSSE1 (imgpel *src_pic, int blocksize_y, int blocksize_x, int min_mcost, int cand_x1, int cand_y1, int cand_x2, int cand_y2)
int computeBiPredSSE2 (imgpel *src_pic, int blocksize_y, int blocksize_x, int min_mcost, int cand_x1, int cand_y1, int cand_x2, int cand_y2)

Variables

SubImageContainer ref_pic_sub
SubImageContainer ref_pic1_sub
SubImageContainer ref_pic2_sub
short weight1
short weight2
short offsetBi
short weight1_cr [2]
short weight2_cr [2]
short offsetBi_cr [2]
int weight_luma
int weight_cr [2]
int offset_luma
int offset_cr [2]
short img_width
short img_height
int test8x8transform
int ChromaMEEnable
static int diff [MB_PIXELS]
static int m [16]
static int d [16]
static int m1 [8][8]
static int m2 [8][8]
static int m3 [8][8]
static imgpel * src_line
static imgpel * ref_line
static imgpel * ref1_line
static imgpel * ref2_line
int(* computeUniPred [6])(imgpel *, int, int, int, int, int)
int(* computeBiPred )(imgpel *, int, int, int, int, int, int, int)
int(* computeBiPred1 [3])(imgpel *, int, int, int, int, int, int, int)
int(* computeBiPred2 [3])(imgpel *, int, int, int, int, int, int, int)


Detailed Description

Motion estimation error calculation functions.

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

Definition in file me_distortion.c.


Function Documentation

int computeBiPredSAD1 ( imgpel *  src_pic,
int  blocksize_y,
int  blocksize_x,
int  min_mcost,
int  cand_x1,
int  cand_y1,
int  cand_x2,
int  cand_y2 
)

BiPred SAD computation (no weights).

Definition at line 469 of file me_distortion.c.

References InputParameters::ChromaMEWeight, UMVLine4X(), and UMVLine8X_chroma().

Referenced by Init_Motion_Search_Module(), smpUMHEXBipredIntegerPelBlockMotionSearch(), and UMHEXBipredIntegerPelBlockMotionSearch().

Here is the call graph for this function:

int computeBiPredSAD2 ( imgpel *  src_pic,
int  blocksize_y,
int  blocksize_x,
int  min_mcost,
int  cand_x1,
int  cand_y1,
int  cand_x2,
int  cand_y2 
)

int computeBiPredSATD1 ( imgpel *  src_pic,
int  blocksize_y,
int  blocksize_x,
int  min_mcost,
int  cand_x1,
int  cand_y1,
int  cand_x2,
int  cand_y2 
)

BiPred (w/o weights) SATD computation.

Definition at line 813 of file me_distortion.c.

References HadamardSAD4x4(), HadamardSAD8x8(), and UMVLine4X().

Referenced by Init_Motion_Search_Module().

Here is the call graph for this function:

int computeBiPredSATD2 ( imgpel *  src_pic,
int  blocksize_y,
int  blocksize_x,
int  min_mcost,
int  cand_x1,
int  cand_y1,
int  cand_x2,
int  cand_y2 
)

BiPred (w/ weights) SATD computation.

Definition at line 896 of file me_distortion.c.

References HadamardSAD4x4(), HadamardSAD8x8(), ImageParameters::max_imgpel_value, and UMVLine4X().

Referenced by Init_Motion_Search_Module().

Here is the call graph for this function:

int computeBiPredSSE1 ( imgpel *  src_pic,
int  blocksize_y,
int  blocksize_x,
int  min_mcost,
int  cand_x1,
int  cand_y1,
int  cand_x2,
int  cand_y2 
)

BiPred SSE computation (no weights).

Definition at line 1171 of file me_distortion.c.

References InputParameters::ChromaMEWeight, ImageParameters::quad, UMVLine4X(), and UMVLine8X_chroma().

Referenced by Init_Motion_Search_Module().

Here is the call graph for this function:

int computeBiPredSSE2 ( imgpel *  src_pic,
int  blocksize_y,
int  blocksize_x,
int  min_mcost,
int  cand_x1,
int  cand_y1,
int  cand_x2,
int  cand_y2 
)

BiPred SSE computation (with weights).

Definition at line 1250 of file me_distortion.c.

References InputParameters::ChromaMEWeight, ImageParameters::max_imgpel_value, ImageParameters::max_imgpel_value_comp, UMVLine4X(), and UMVLine8X_chroma().

Referenced by Init_Motion_Search_Module().

Here is the call graph for this function:

int computeSAD ( imgpel *  src_pic,
int  blocksize_y,
int  blocksize_x,
int  min_mcost,
int  cand_x,
int  cand_y 
)

SAD computation.

Definition at line 336 of file me_distortion.c.

References InputParameters::ChromaMEWeight, UMVLine4X(), and UMVLine8X_chroma().

Referenced by Init_Motion_Search_Module().

Here is the call graph for this function:

int computeSADWP ( imgpel *  src_pic,
int  blocksize_y,
int  blocksize_x,
int  min_mcost,
int  cand_x,
int  cand_y 
)

SAD computation for weighted samples.

Definition at line 399 of file me_distortion.c.

References InputParameters::ChromaMEWeight, ImageParameters::max_imgpel_value, ImageParameters::max_imgpel_value_comp, UMVLine4X(), and UMVLine8X_chroma().

Referenced by Init_Motion_Search_Module().

Here is the call graph for this function:

int computeSATD ( imgpel *  src_pic,
int  blocksize_y,
int  blocksize_x,
int  min_mcost,
int  cand_x,
int  cand_y 
)

SAD computation _with_ Hadamard Transform.

Definition at line 646 of file me_distortion.c.

References HadamardSAD4x4(), HadamardSAD8x8(), and UMVLine4X().

Referenced by Init_Motion_Search_Module().

Here is the call graph for this function:

int computeSATDWP ( imgpel *  src_pic,
int  blocksize_y,
int  blocksize_x,
int  min_mcost,
int  cand_x,
int  cand_y 
)

SAD computation of weighted samples _with_ Hadamard Transform.

Definition at line 723 of file me_distortion.c.

References HadamardSAD4x4(), HadamardSAD8x8(), ImageParameters::max_imgpel_value, and UMVLine4X().

Referenced by Init_Motion_Search_Module().

Here is the call graph for this function:

int computeSSE ( imgpel *  src_pic,
int  blocksize_y,
int  blocksize_x,
int  min_mcost,
int  cand_x,
int  cand_y 
)

SSE computation.

Definition at line 1031 of file me_distortion.c.

References InputParameters::ChromaMEWeight, ImageParameters::quad, UMVLine4X(), and UMVLine8X_chroma().

Referenced by Init_Motion_Search_Module().

Here is the call graph for this function:

int computeSSEWP ( imgpel *  src_pic,
int  blocksize_y,
int  blocksize_x,
int  min_mcost,
int  cand_x,
int  cand_y 
)

SSE computation of weighted samples.

Definition at line 1097 of file me_distortion.c.

References InputParameters::ChromaMEWeight, ImageParameters::max_imgpel_value, ImageParameters::max_imgpel_value_comp, ImageParameters::quad, UMVLine4X(), and UMVLine8X_chroma().

Referenced by Init_Motion_Search_Module().

Here is the call graph for this function:

int distortion4x4 ( int *  diff  ) 

int distortion8x8 ( int *  diff  ) 

Calculate SA(T)D for 8x8.

Definition at line 95 of file me_distortion.c.

References HadamardSAD8x8(), InputParameters::ModeDecisionMetric, and ImageParameters::quad.

Referenced by BIDPartitionCost(), BPredPartitionCost(), compute_comp_cost8x8(), GetBestTransformP8x8(), GetDirectCost8x8(), GetSkipCostMB(), and TransformDecision().

Here is the call graph for this function:

int HadamardMB ( int  c_diff[MB_PIXELS],
int  blocktype 
)

Calculate SA(T)D for 8x8.

Definition at line 129 of file me_distortion.c.

References HadamardSAD8x8().

Here is the call graph for this function:

int HadamardSAD4x4 ( int *  diff  ) 

Calculate 4x4 Hadamard-Transformed SAD.

Definition at line 167 of file me_distortion.c.

Referenced by computeBiPredSATD1(), computeBiPredSATD2(), computeSATD(), computeSATDWP(), and distortion4x4().

int HadamardSAD8x8 ( int *  diff  ) 

Calculate 8x8 Hadamard-Transformed SAD.

Definition at line 257 of file me_distortion.c.

Referenced by computeBiPredSATD1(), computeBiPredSATD2(), computeSATD(), computeSATDWP(), distortion8x8(), and HadamardMB().


Documentation generated with DoxyGen