Index: source/libvpx/vp9/encoder/vp9_mcomp.h |
=================================================================== |
--- source/libvpx/vp9/encoder/vp9_mcomp.h (revision 263011) |
+++ source/libvpx/vp9/encoder/vp9_mcomp.h (working copy) |
@@ -35,6 +35,17 @@ |
void vp9_set_mv_search_range(MACROBLOCK *x, const MV *mv); |
int vp9_mv_bit_cost(const MV *mv, const MV *ref, |
const int *mvjcost, int *mvcost[2], int weight); |
+ |
+// Utility to compute variance + MV rate cost for a given MV |
+int vp9_get_mvpred_var(const MACROBLOCK *x, |
+ const MV *best_mv, const MV *center_mv, |
+ const vp9_variance_fn_ptr_t *vfp, |
+ int use_mvcost); |
+int vp9_get_mvpred_av_var(const MACROBLOCK *x, |
+ const MV *best_mv, const MV *center_mv, |
+ const uint8_t *second_pred, |
+ const vp9_variance_fn_ptr_t *vfp, |
+ int use_mvcost); |
void vp9_init_dsmotion_compensation(MACROBLOCK *x, int stride); |
void vp9_init3smotion_compensation(MACROBLOCK *x, int stride); |
@@ -42,48 +53,29 @@ |
int vp9_init_search_range(struct VP9_COMP *cpi, int size); |
// Runs sequence of diamond searches in smaller steps for RD |
-int vp9_full_pixel_diamond(struct VP9_COMP *cpi, MACROBLOCK *x, |
+int vp9_full_pixel_diamond(const struct VP9_COMP *cpi, MACROBLOCK *x, |
MV *mvp_full, int step_param, |
int sadpb, int further_steps, int do_refine, |
const vp9_variance_fn_ptr_t *fn_ptr, |
const MV *ref_mv, MV *dst_mv); |
-int vp9_hex_search(const MACROBLOCK *x, |
- MV *ref_mv, |
- int search_param, |
- int error_per_bit, |
- int do_init_search, |
- const vp9_variance_fn_ptr_t *vf, |
- int use_mvcost, |
- const MV *center_mv, |
- MV *best_mv); |
-int vp9_bigdia_search(const MACROBLOCK *x, |
- MV *ref_mv, |
- int search_param, |
- int error_per_bit, |
- int do_init_search, |
- const vp9_variance_fn_ptr_t *vf, |
- int use_mvcost, |
- const MV *center_mv, |
- MV *best_mv); |
-int vp9_square_search(const MACROBLOCK *x, |
- MV *ref_mv, |
- int search_param, |
- int error_per_bit, |
- int do_init_search, |
- const vp9_variance_fn_ptr_t *vf, |
- int use_mvcost, |
- const MV *center_mv, |
- MV *best_mv); |
-int vp9_fast_hex_search(const MACROBLOCK *x, |
- MV *ref_mv, |
- int search_param, |
- int sad_per_bit, |
- const vp9_variance_fn_ptr_t *vfp, |
- int use_mvcost, |
- const MV *center_mv, |
- MV *best_mv); |
+typedef int (integer_mv_pattern_search_fn) ( |
+ const MACROBLOCK *x, |
+ MV *ref_mv, |
+ int search_param, |
+ int error_per_bit, |
+ int do_init_search, |
+ const vp9_variance_fn_ptr_t *vf, |
+ int use_mvcost, |
+ const MV *center_mv, |
+ MV *best_mv); |
+integer_mv_pattern_search_fn vp9_hex_search; |
+integer_mv_pattern_search_fn vp9_bigdia_search; |
+integer_mv_pattern_search_fn vp9_square_search; |
+integer_mv_pattern_search_fn vp9_fast_hex_search; |
+integer_mv_pattern_search_fn vp9_fast_dia_search; |
+ |
typedef int (fractional_mv_step_fp) ( |
const MACROBLOCK *x, |
MV *bestmv, const MV *ref_mv, |