summaryrefslogtreecommitdiff
path: root/vp8/encoder/mcomp.h
diff options
context:
space:
mode:
Diffstat (limited to 'vp8/encoder/mcomp.h')
-rw-r--r--vp8/encoder/mcomp.h30
1 files changed, 23 insertions, 7 deletions
diff --git a/vp8/encoder/mcomp.h b/vp8/encoder/mcomp.h
index c27f3bf75..afca58084 100644
--- a/vp8/encoder/mcomp.h
+++ b/vp8/encoder/mcomp.h
@@ -15,6 +15,22 @@
#include "block.h"
#include "variance.h"
+#if CONFIG_NEWMVENTROPY
+#define MVCOSTS mvjcost, mvcost
+#define MVSADCOSTS mvjsadcost, mvsadcost
+#define DEC_MVCOSTS int *mvjcost, int *mvcost[2]
+#define DEC_MVSADCOSTS int *mvjsadcost, int *mvsadcost[2]
+#define NULLMVCOST NULL, NULL
+#define XMVCOST x->nmvjointcost, (x->e_mbd.allow_high_precision_mv?x->nmvcost_hp:x->nmvcost)
+#else
+#define MVCOSTS mvcost
+#define MVSADCOSTS mvsadcost
+#define DEC_MVCOSTS int *mvcost[2]
+#define DEC_MVSADCOSTS int *mvsadcost[2]
+#define NULLMVCOST NULL
+#define XMVCOST (x->e_mbd.allow_high_precision_mv?x->mvcost_hp:x->mvcost)
+#endif /* CONFIG_NEWMVENTROPY */
+
#ifdef ENTROPY_STATS
extern void init_mv_ref_counts();
extern void accum_mv_refs(MB_PREDICTION_MODE, const int near_mv_ref_cts[4]);
@@ -26,7 +42,7 @@ extern void accum_mv_refs(MB_PREDICTION_MODE, const int near_mv_ref_cts[4]);
#define MAX_FIRST_STEP (1 << (MAX_MVSEARCH_STEPS-1)) // Maximum size of the first step in full pel units
extern void vp8_clamp_mv_min_max(MACROBLOCK *x, int_mv *ref_mv);
-extern int vp8_mv_bit_cost(int_mv *mv, int_mv *ref, int *mvcost[2],
+extern int vp8_mv_bit_cost(int_mv *mv, int_mv *ref, DEC_MVCOSTS,
int Weight, int ishp);
extern void vp8_init_dsmotion_compensation(MACROBLOCK *x, int stride);
extern void vp8_init3smotion_compensation(MACROBLOCK *x, int stride);
@@ -48,14 +64,14 @@ extern int vp8_hex_search
int search_param,
int error_per_bit,
const vp8_variance_fn_ptr_t *vf,
- int *mvsadcost[2],
- int *mvcost[2],
+ DEC_MVSADCOSTS,
+ DEC_MVCOSTS,
int_mv *center_mv
);
typedef int (fractional_mv_step_fp)
(MACROBLOCK *x, BLOCK *b, BLOCKD *d, int_mv *bestmv, int_mv *ref_mv,
- int error_per_bit, const vp8_variance_fn_ptr_t *vfp, int *mvcost[2],
+ int error_per_bit, const vp8_variance_fn_ptr_t *vfp, DEC_MVCOSTS,
int *distortion, unsigned int *sse);
extern fractional_mv_step_fp vp8_find_best_sub_pixel_step_iteratively;
extern fractional_mv_step_fp vp8_find_best_sub_pixel_step;
@@ -72,7 +88,7 @@ extern fractional_mv_step_fp vp8_skip_fractional_mv_step;
int sad_per_bit, \
int distance, \
vp8_variance_fn_ptr_t *fn_ptr, \
- int *mvcost[2], \
+ DEC_MVSADCOSTS, \
int_mv *center_mv \
)
@@ -86,7 +102,7 @@ extern fractional_mv_step_fp vp8_skip_fractional_mv_step;
int sad_per_bit, \
int distance, \
vp8_variance_fn_ptr_t *fn_ptr, \
- int *mvcost[2], \
+ DEC_MVSADCOSTS, \
int_mv *center_mv \
)
@@ -102,7 +118,7 @@ extern fractional_mv_step_fp vp8_skip_fractional_mv_step;
int sad_per_bit, \
int *num00, \
vp8_variance_fn_ptr_t *fn_ptr, \
- int *mvcost[2], \
+ DEC_MVSADCOSTS, \
int_mv *center_mv \
)