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

Side by Side Diff: source/libvpx/vp9/common/vp9_reconinter.h

Issue 54923004: libvpx: Pull from upstream (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/libvpx/
Patch Set: Created 7 years, 1 month 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/common/vp9_quant_common.c ('k') | source/libvpx/vp9/common/vp9_reconinter.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
11 #ifndef VP9_COMMON_VP9_RECONINTER_H_ 11 #ifndef VP9_COMMON_VP9_RECONINTER_H_
12 #define VP9_COMMON_VP9_RECONINTER_H_ 12 #define VP9_COMMON_VP9_RECONINTER_H_
13 13
14 #include "vpx/vpx_integer.h" 14 #include "vpx/vpx_integer.h"
15 #include "vp9/common/vp9_onyxc_int.h" 15 #include "vp9/common/vp9_onyxc_int.h"
16 16
17 struct subpix_fn_table; 17 struct subpix_fn_table;
18 void vp9_build_inter_predictors_sby(MACROBLOCKD *xd, int mi_row, int mi_col, 18 void vp9_build_inter_predictors_sby(MACROBLOCKD *xd, int mi_row, int mi_col,
19 BLOCK_SIZE bsize); 19 BLOCK_SIZE bsize);
20 20
21 void vp9_build_inter_predictors_sbuv(MACROBLOCKD *xd, int mi_row, int mi_col, 21 void vp9_build_inter_predictors_sbuv(MACROBLOCKD *xd, int mi_row, int mi_col,
22 BLOCK_SIZE bsize); 22 BLOCK_SIZE bsize);
23 23
24 void vp9_build_inter_predictors_sb(MACROBLOCKD *xd, int mi_row, int mi_col, 24 void vp9_build_inter_predictors_sb(MACROBLOCKD *xd, int mi_row, int mi_col,
25 BLOCK_SIZE bsize); 25 BLOCK_SIZE bsize);
26 26
27 void vp9_setup_interp_filters(MACROBLOCKD *xd, 27 void vp9_setup_interp_filters(MACROBLOCKD *xd,
28 INTERPOLATIONFILTERTYPE filter, 28 INTERPOLATION_TYPE filter,
29 VP9_COMMON *cm); 29 VP9_COMMON *cm);
30 30
31 void vp9_build_inter_predictor(const uint8_t *src, int src_stride, 31 void vp9_build_inter_predictor(const uint8_t *src, int src_stride,
32 uint8_t *dst, int dst_stride, 32 uint8_t *dst, int dst_stride,
33 const MV *mv_q3, 33 const MV *mv_q3,
34 const struct scale_factors *scale, 34 const struct scale_factors *scale,
35 int w, int h, int do_avg, 35 int w, int h, int do_avg,
36 const struct subpix_fn_table *subpix, 36 const struct subpix_fn_table *subpix,
37 enum mv_precision precision); 37 enum mv_precision precision);
38 38
39 static int scaled_buffer_offset(int x_offset, int y_offset, int stride, 39 static int scaled_buffer_offset(int x_offset, int y_offset, int stride,
40 const struct scale_factors *scale) { 40 const struct scale_factors *scale) {
41 const int x = scale ? scale->scale_value_x(x_offset, scale) : x_offset; 41 const int x = scale ? scale->sfc->scale_value_x(x_offset, scale->sfc) :
42 const int y = scale ? scale->scale_value_y(y_offset, scale) : y_offset; 42 x_offset;
43 const int y = scale ? scale->sfc->scale_value_y(y_offset, scale->sfc) :
44 y_offset;
43 return y * stride + x; 45 return y * stride + x;
44 } 46 }
45 47
46 static void setup_pred_plane(struct buf_2d *dst, 48 static void setup_pred_plane(struct buf_2d *dst,
47 uint8_t *src, int stride, 49 uint8_t *src, int stride,
48 int mi_row, int mi_col, 50 int mi_row, int mi_col,
49 const struct scale_factors *scale, 51 const struct scale_factors *scale,
50 int subsampling_x, int subsampling_y) { 52 int subsampling_x, int subsampling_y) {
51 const int x = (MI_SIZE * mi_col) >> subsampling_x; 53 const int x = (MI_SIZE * mi_col) >> subsampling_x;
52 const int y = (MI_SIZE * mi_row) >> subsampling_y; 54 const int y = (MI_SIZE * mi_row) >> subsampling_y;
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 94
93 static void set_scale_factors(MACROBLOCKD *xd, int ref0, int ref1, 95 static void set_scale_factors(MACROBLOCKD *xd, int ref0, int ref1,
94 struct scale_factors sf[MAX_REF_FRAMES]) { 96 struct scale_factors sf[MAX_REF_FRAMES]) {
95 xd->scale_factor[0] = sf[ref0 >= 0 ? ref0 : 0]; 97 xd->scale_factor[0] = sf[ref0 >= 0 ? ref0 : 0];
96 xd->scale_factor[1] = sf[ref1 >= 0 ? ref1 : 0]; 98 xd->scale_factor[1] = sf[ref1 >= 0 ? ref1 : 0];
97 } 99 }
98 100
99 void vp9_setup_scale_factors(VP9_COMMON *cm, int i); 101 void vp9_setup_scale_factors(VP9_COMMON *cm, int i);
100 102
101 #endif // VP9_COMMON_VP9_RECONINTER_H_ 103 #endif // VP9_COMMON_VP9_RECONINTER_H_
OLDNEW
« no previous file with comments | « source/libvpx/vp9/common/vp9_quant_common.c ('k') | source/libvpx/vp9/common/vp9_reconinter.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698