Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(68)

Side by Side Diff: source/libvpx/vp9/encoder/vp9_mcomp.h

Issue 232133009: libvpx: Pull from upstream (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/libvpx/
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « source/libvpx/vp9/encoder/vp9_mbgraph.c ('k') | source/libvpx/vp9/encoder/vp9_mcomp.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved. 2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 17 matching lines...) Expand all
28 // Maximum size of the first step in full pel units 28 // Maximum size of the first step in full pel units
29 #define MAX_FIRST_STEP (1 << (MAX_MVSEARCH_STEPS-1)) 29 #define MAX_FIRST_STEP (1 << (MAX_MVSEARCH_STEPS-1))
30 // Allowed motion vector pixel distance outside image border 30 // Allowed motion vector pixel distance outside image border
31 // for Block_16x16 31 // for Block_16x16
32 #define BORDER_MV_PIXELS_B16 (16 + VP9_INTERP_EXTEND) 32 #define BORDER_MV_PIXELS_B16 (16 + VP9_INTERP_EXTEND)
33 33
34 34
35 void vp9_set_mv_search_range(MACROBLOCK *x, const MV *mv); 35 void vp9_set_mv_search_range(MACROBLOCK *x, const MV *mv);
36 int vp9_mv_bit_cost(const MV *mv, const MV *ref, 36 int vp9_mv_bit_cost(const MV *mv, const MV *ref,
37 const int *mvjcost, int *mvcost[2], int weight); 37 const int *mvjcost, int *mvcost[2], int weight);
38
39 // Utility to compute variance + MV rate cost for a given MV
40 int vp9_get_mvpred_var(const MACROBLOCK *x,
41 const MV *best_mv, const MV *center_mv,
42 const vp9_variance_fn_ptr_t *vfp,
43 int use_mvcost);
44 int vp9_get_mvpred_av_var(const MACROBLOCK *x,
45 const MV *best_mv, const MV *center_mv,
46 const uint8_t *second_pred,
47 const vp9_variance_fn_ptr_t *vfp,
48 int use_mvcost);
38 void vp9_init_dsmotion_compensation(MACROBLOCK *x, int stride); 49 void vp9_init_dsmotion_compensation(MACROBLOCK *x, int stride);
39 void vp9_init3smotion_compensation(MACROBLOCK *x, int stride); 50 void vp9_init3smotion_compensation(MACROBLOCK *x, int stride);
40 51
41 struct VP9_COMP; 52 struct VP9_COMP;
42 int vp9_init_search_range(struct VP9_COMP *cpi, int size); 53 int vp9_init_search_range(struct VP9_COMP *cpi, int size);
43 54
44 // Runs sequence of diamond searches in smaller steps for RD 55 // Runs sequence of diamond searches in smaller steps for RD
45 int vp9_full_pixel_diamond(struct VP9_COMP *cpi, MACROBLOCK *x, 56 int vp9_full_pixel_diamond(const struct VP9_COMP *cpi, MACROBLOCK *x,
46 MV *mvp_full, int step_param, 57 MV *mvp_full, int step_param,
47 int sadpb, int further_steps, int do_refine, 58 int sadpb, int further_steps, int do_refine,
48 const vp9_variance_fn_ptr_t *fn_ptr, 59 const vp9_variance_fn_ptr_t *fn_ptr,
49 const MV *ref_mv, MV *dst_mv); 60 const MV *ref_mv, MV *dst_mv);
50 61
51 int vp9_hex_search(const MACROBLOCK *x, 62 typedef int (integer_mv_pattern_search_fn) (
52 MV *ref_mv, 63 const MACROBLOCK *x,
53 int search_param, 64 MV *ref_mv,
54 int error_per_bit, 65 int search_param,
55 int do_init_search, 66 int error_per_bit,
56 const vp9_variance_fn_ptr_t *vf, 67 int do_init_search,
57 int use_mvcost, 68 const vp9_variance_fn_ptr_t *vf,
58 const MV *center_mv, 69 int use_mvcost,
59 MV *best_mv); 70 const MV *center_mv,
60 int vp9_bigdia_search(const MACROBLOCK *x, 71 MV *best_mv);
61 MV *ref_mv, 72
62 int search_param, 73 integer_mv_pattern_search_fn vp9_hex_search;
63 int error_per_bit, 74 integer_mv_pattern_search_fn vp9_bigdia_search;
64 int do_init_search, 75 integer_mv_pattern_search_fn vp9_square_search;
65 const vp9_variance_fn_ptr_t *vf, 76 integer_mv_pattern_search_fn vp9_fast_hex_search;
66 int use_mvcost, 77 integer_mv_pattern_search_fn vp9_fast_dia_search;
67 const MV *center_mv,
68 MV *best_mv);
69 int vp9_square_search(const MACROBLOCK *x,
70 MV *ref_mv,
71 int search_param,
72 int error_per_bit,
73 int do_init_search,
74 const vp9_variance_fn_ptr_t *vf,
75 int use_mvcost,
76 const MV *center_mv,
77 MV *best_mv);
78 int vp9_fast_hex_search(const MACROBLOCK *x,
79 MV *ref_mv,
80 int search_param,
81 int sad_per_bit,
82 const vp9_variance_fn_ptr_t *vfp,
83 int use_mvcost,
84 const MV *center_mv,
85 MV *best_mv);
86 78
87 typedef int (fractional_mv_step_fp) ( 79 typedef int (fractional_mv_step_fp) (
88 const MACROBLOCK *x, 80 const MACROBLOCK *x,
89 MV *bestmv, const MV *ref_mv, 81 MV *bestmv, const MV *ref_mv,
90 int allow_hp, 82 int allow_hp,
91 int error_per_bit, 83 int error_per_bit,
92 const vp9_variance_fn_ptr_t *vfp, 84 const vp9_variance_fn_ptr_t *vfp,
93 int forced_stop, // 0 - full, 1 - qtr only, 2 - half only 85 int forced_stop, // 0 - full, 1 - qtr only, 2 - half only
94 int iters_per_step, 86 int iters_per_step,
95 int *mvjcost, 87 int *mvjcost,
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 int search_range, 133 int search_range,
142 const vp9_variance_fn_ptr_t *fn_ptr, 134 const vp9_variance_fn_ptr_t *fn_ptr,
143 int *mvjcost, int *mvcost[2], 135 int *mvjcost, int *mvcost[2],
144 const MV *center_mv, const uint8_t *second_pred, 136 const MV *center_mv, const uint8_t *second_pred,
145 int w, int h); 137 int w, int h);
146 #ifdef __cplusplus 138 #ifdef __cplusplus
147 } // extern "C" 139 } // extern "C"
148 #endif 140 #endif
149 141
150 #endif // VP9_ENCODER_VP9_MCOMP_H_ 142 #endif // VP9_ENCODER_VP9_MCOMP_H_
OLDNEW
« no previous file with comments | « source/libvpx/vp9/encoder/vp9_mbgraph.c ('k') | source/libvpx/vp9/encoder/vp9_mcomp.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698