1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/media/libvpx/vp8/encoder/mcomp.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,107 @@ 1.4 +/* 1.5 + * Copyright (c) 2010 The WebM project authors. All Rights Reserved. 1.6 + * 1.7 + * Use of this source code is governed by a BSD-style license 1.8 + * that can be found in the LICENSE file in the root of the source 1.9 + * tree. An additional intellectual property rights grant can be found 1.10 + * in the file PATENTS. All contributing project authors may 1.11 + * be found in the AUTHORS file in the root of the source tree. 1.12 + */ 1.13 + 1.14 + 1.15 +#ifndef __INC_MCOMP_H 1.16 +#define __INC_MCOMP_H 1.17 + 1.18 +#include "block.h" 1.19 +#include "vp8/common/variance.h" 1.20 + 1.21 +#ifdef VP8_ENTROPY_STATS 1.22 +extern void init_mv_ref_counts(); 1.23 +extern void accum_mv_refs(MB_PREDICTION_MODE, const int near_mv_ref_cts[4]); 1.24 +#endif 1.25 + 1.26 + 1.27 +/* The maximum number of steps in a step search given the largest allowed 1.28 + * initial step 1.29 + */ 1.30 +#define MAX_MVSEARCH_STEPS 8 1.31 + 1.32 +/* Max full pel mv specified in 1 pel units */ 1.33 +#define MAX_FULL_PEL_VAL ((1 << (MAX_MVSEARCH_STEPS)) - 1) 1.34 + 1.35 +/* Maximum size of the first step in full pel units */ 1.36 +#define MAX_FIRST_STEP (1 << (MAX_MVSEARCH_STEPS-1)) 1.37 + 1.38 +extern void print_mode_context(void); 1.39 +extern int vp8_mv_bit_cost(int_mv *mv, int_mv *ref, int *mvcost[2], int Weight); 1.40 +extern void vp8_init_dsmotion_compensation(MACROBLOCK *x, int stride); 1.41 +extern void vp8_init3smotion_compensation(MACROBLOCK *x, int stride); 1.42 + 1.43 + 1.44 +extern int vp8_hex_search 1.45 +( 1.46 + MACROBLOCK *x, 1.47 + BLOCK *b, 1.48 + BLOCKD *d, 1.49 + int_mv *ref_mv, 1.50 + int_mv *best_mv, 1.51 + int search_param, 1.52 + int error_per_bit, 1.53 + const vp8_variance_fn_ptr_t *vf, 1.54 + int *mvsadcost[2], 1.55 + int *mvcost[2], 1.56 + int_mv *center_mv 1.57 +); 1.58 + 1.59 +typedef int (fractional_mv_step_fp) 1.60 + (MACROBLOCK *x, BLOCK *b, BLOCKD *d, int_mv *bestmv, int_mv *ref_mv, 1.61 + int error_per_bit, const vp8_variance_fn_ptr_t *vfp, int *mvcost[2], 1.62 + int *distortion, unsigned int *sse); 1.63 + 1.64 +extern fractional_mv_step_fp vp8_find_best_sub_pixel_step_iteratively; 1.65 +extern fractional_mv_step_fp vp8_find_best_sub_pixel_step; 1.66 +extern fractional_mv_step_fp vp8_find_best_half_pixel_step; 1.67 +extern fractional_mv_step_fp vp8_skip_fractional_mv_step; 1.68 + 1.69 +typedef int (*vp8_full_search_fn_t) 1.70 + ( 1.71 + MACROBLOCK *x, 1.72 + BLOCK *b, 1.73 + BLOCKD *d, 1.74 + int_mv *ref_mv, 1.75 + int sad_per_bit, 1.76 + int distance, 1.77 + vp8_variance_fn_ptr_t *fn_ptr, 1.78 + int *mvcost[2], 1.79 + int_mv *center_mv 1.80 + ); 1.81 + 1.82 +typedef int (*vp8_refining_search_fn_t) 1.83 + ( 1.84 + MACROBLOCK *x, 1.85 + BLOCK *b, 1.86 + BLOCKD *d, 1.87 + int_mv *ref_mv, 1.88 + int sad_per_bit, 1.89 + int distance, 1.90 + vp8_variance_fn_ptr_t *fn_ptr, 1.91 + int *mvcost[2], 1.92 + int_mv *center_mv 1.93 + ); 1.94 + 1.95 +typedef int (*vp8_diamond_search_fn_t) 1.96 + ( 1.97 + MACROBLOCK *x, 1.98 + BLOCK *b, 1.99 + BLOCKD *d, 1.100 + int_mv *ref_mv, 1.101 + int_mv *best_mv, 1.102 + int search_param, 1.103 + int sad_per_bit, 1.104 + int *num00, 1.105 + vp8_variance_fn_ptr_t *fn_ptr, 1.106 + int *mvcost[2], 1.107 + int_mv *center_mv 1.108 + ); 1.109 + 1.110 +#endif