Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
michael@0 | 1 | /* |
michael@0 | 2 | * Copyright (c) 2010 The WebM project authors. All Rights Reserved. |
michael@0 | 3 | * |
michael@0 | 4 | * Use of this source code is governed by a BSD-style license |
michael@0 | 5 | * that can be found in the LICENSE file in the root of the source |
michael@0 | 6 | * tree. An additional intellectual property rights grant can be found |
michael@0 | 7 | * in the file PATENTS. All contributing project authors may |
michael@0 | 8 | * be found in the AUTHORS file in the root of the source tree. |
michael@0 | 9 | */ |
michael@0 | 10 | |
michael@0 | 11 | |
michael@0 | 12 | #ifndef __INC_MCOMP_H |
michael@0 | 13 | #define __INC_MCOMP_H |
michael@0 | 14 | |
michael@0 | 15 | #include "block.h" |
michael@0 | 16 | #include "vp8/common/variance.h" |
michael@0 | 17 | |
michael@0 | 18 | #ifdef VP8_ENTROPY_STATS |
michael@0 | 19 | extern void init_mv_ref_counts(); |
michael@0 | 20 | extern void accum_mv_refs(MB_PREDICTION_MODE, const int near_mv_ref_cts[4]); |
michael@0 | 21 | #endif |
michael@0 | 22 | |
michael@0 | 23 | |
michael@0 | 24 | /* The maximum number of steps in a step search given the largest allowed |
michael@0 | 25 | * initial step |
michael@0 | 26 | */ |
michael@0 | 27 | #define MAX_MVSEARCH_STEPS 8 |
michael@0 | 28 | |
michael@0 | 29 | /* Max full pel mv specified in 1 pel units */ |
michael@0 | 30 | #define MAX_FULL_PEL_VAL ((1 << (MAX_MVSEARCH_STEPS)) - 1) |
michael@0 | 31 | |
michael@0 | 32 | /* Maximum size of the first step in full pel units */ |
michael@0 | 33 | #define MAX_FIRST_STEP (1 << (MAX_MVSEARCH_STEPS-1)) |
michael@0 | 34 | |
michael@0 | 35 | extern void print_mode_context(void); |
michael@0 | 36 | extern int vp8_mv_bit_cost(int_mv *mv, int_mv *ref, int *mvcost[2], int Weight); |
michael@0 | 37 | extern void vp8_init_dsmotion_compensation(MACROBLOCK *x, int stride); |
michael@0 | 38 | extern void vp8_init3smotion_compensation(MACROBLOCK *x, int stride); |
michael@0 | 39 | |
michael@0 | 40 | |
michael@0 | 41 | extern int vp8_hex_search |
michael@0 | 42 | ( |
michael@0 | 43 | MACROBLOCK *x, |
michael@0 | 44 | BLOCK *b, |
michael@0 | 45 | BLOCKD *d, |
michael@0 | 46 | int_mv *ref_mv, |
michael@0 | 47 | int_mv *best_mv, |
michael@0 | 48 | int search_param, |
michael@0 | 49 | int error_per_bit, |
michael@0 | 50 | const vp8_variance_fn_ptr_t *vf, |
michael@0 | 51 | int *mvsadcost[2], |
michael@0 | 52 | int *mvcost[2], |
michael@0 | 53 | int_mv *center_mv |
michael@0 | 54 | ); |
michael@0 | 55 | |
michael@0 | 56 | typedef int (fractional_mv_step_fp) |
michael@0 | 57 | (MACROBLOCK *x, BLOCK *b, BLOCKD *d, int_mv *bestmv, int_mv *ref_mv, |
michael@0 | 58 | int error_per_bit, const vp8_variance_fn_ptr_t *vfp, int *mvcost[2], |
michael@0 | 59 | int *distortion, unsigned int *sse); |
michael@0 | 60 | |
michael@0 | 61 | extern fractional_mv_step_fp vp8_find_best_sub_pixel_step_iteratively; |
michael@0 | 62 | extern fractional_mv_step_fp vp8_find_best_sub_pixel_step; |
michael@0 | 63 | extern fractional_mv_step_fp vp8_find_best_half_pixel_step; |
michael@0 | 64 | extern fractional_mv_step_fp vp8_skip_fractional_mv_step; |
michael@0 | 65 | |
michael@0 | 66 | typedef int (*vp8_full_search_fn_t) |
michael@0 | 67 | ( |
michael@0 | 68 | MACROBLOCK *x, |
michael@0 | 69 | BLOCK *b, |
michael@0 | 70 | BLOCKD *d, |
michael@0 | 71 | int_mv *ref_mv, |
michael@0 | 72 | int sad_per_bit, |
michael@0 | 73 | int distance, |
michael@0 | 74 | vp8_variance_fn_ptr_t *fn_ptr, |
michael@0 | 75 | int *mvcost[2], |
michael@0 | 76 | int_mv *center_mv |
michael@0 | 77 | ); |
michael@0 | 78 | |
michael@0 | 79 | typedef int (*vp8_refining_search_fn_t) |
michael@0 | 80 | ( |
michael@0 | 81 | MACROBLOCK *x, |
michael@0 | 82 | BLOCK *b, |
michael@0 | 83 | BLOCKD *d, |
michael@0 | 84 | int_mv *ref_mv, |
michael@0 | 85 | int sad_per_bit, |
michael@0 | 86 | int distance, |
michael@0 | 87 | vp8_variance_fn_ptr_t *fn_ptr, |
michael@0 | 88 | int *mvcost[2], |
michael@0 | 89 | int_mv *center_mv |
michael@0 | 90 | ); |
michael@0 | 91 | |
michael@0 | 92 | typedef int (*vp8_diamond_search_fn_t) |
michael@0 | 93 | ( |
michael@0 | 94 | MACROBLOCK *x, |
michael@0 | 95 | BLOCK *b, |
michael@0 | 96 | BLOCKD *d, |
michael@0 | 97 | int_mv *ref_mv, |
michael@0 | 98 | int_mv *best_mv, |
michael@0 | 99 | int search_param, |
michael@0 | 100 | int sad_per_bit, |
michael@0 | 101 | int *num00, |
michael@0 | 102 | vp8_variance_fn_ptr_t *fn_ptr, |
michael@0 | 103 | int *mvcost[2], |
michael@0 | 104 | int_mv *center_mv |
michael@0 | 105 | ); |
michael@0 | 106 | |
michael@0 | 107 | #endif |