OLD | NEW |
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 Loading... |
28 BLOCK_SIZE bsize); | 28 BLOCK_SIZE bsize); |
29 | 29 |
30 void vp9_dec_build_inter_predictors_sb(MACROBLOCKD *xd, int mi_row, int mi_col, | 30 void vp9_dec_build_inter_predictors_sb(MACROBLOCKD *xd, int mi_row, int mi_col, |
31 BLOCK_SIZE bsize); | 31 BLOCK_SIZE bsize); |
32 | 32 |
33 void vp9_build_inter_predictor(const uint8_t *src, int src_stride, | 33 void vp9_build_inter_predictor(const uint8_t *src, int src_stride, |
34 uint8_t *dst, int dst_stride, | 34 uint8_t *dst, int dst_stride, |
35 const MV *mv_q3, | 35 const MV *mv_q3, |
36 const struct scale_factors *sf, | 36 const struct scale_factors *sf, |
37 int w, int h, int do_avg, | 37 int w, int h, int do_avg, |
38 const interp_kernel *kernel, | 38 const InterpKernel *kernel, |
39 enum mv_precision precision, | 39 enum mv_precision precision, |
40 int x, int y); | 40 int x, int y); |
41 | 41 |
42 static int scaled_buffer_offset(int x_offset, int y_offset, int stride, | 42 static INLINE int scaled_buffer_offset(int x_offset, int y_offset, int stride, |
43 const struct scale_factors *sf) { | 43 const struct scale_factors *sf) { |
44 const int x = sf ? sf->scale_value_x(x_offset, sf) : x_offset; | 44 const int x = sf ? sf->scale_value_x(x_offset, sf) : x_offset; |
45 const int y = sf ? sf->scale_value_y(y_offset, sf) : y_offset; | 45 const int y = sf ? sf->scale_value_y(y_offset, sf) : y_offset; |
46 return y * stride + x; | 46 return y * stride + x; |
47 } | 47 } |
48 | 48 |
49 static void setup_pred_plane(struct buf_2d *dst, | 49 static INLINE void setup_pred_plane(struct buf_2d *dst, |
50 uint8_t *src, int stride, | 50 uint8_t *src, int stride, |
51 int mi_row, int mi_col, | 51 int mi_row, int mi_col, |
52 const struct scale_factors *scale, | 52 const struct scale_factors *scale, |
53 int subsampling_x, int subsampling_y) { | 53 int subsampling_x, int subsampling_y) { |
54 const int x = (MI_SIZE * mi_col) >> subsampling_x; | 54 const int x = (MI_SIZE * mi_col) >> subsampling_x; |
55 const int y = (MI_SIZE * mi_row) >> subsampling_y; | 55 const int y = (MI_SIZE * mi_row) >> subsampling_y; |
56 dst->buf = src + scaled_buffer_offset(x, y, stride, scale); | 56 dst->buf = src + scaled_buffer_offset(x, y, stride, scale); |
57 dst->stride = stride; | 57 dst->stride = stride; |
58 } | 58 } |
59 | 59 |
60 // TODO(jkoleszar): audit all uses of this that don't set mb_row, mb_col | 60 // TODO(jkoleszar): audit all uses of this that don't set mb_row, mb_col |
61 static void setup_dst_planes(MACROBLOCKD *xd, | 61 static void setup_dst_planes(MACROBLOCKD *xd, |
62 const YV12_BUFFER_CONFIG *src, | 62 const YV12_BUFFER_CONFIG *src, |
63 int mi_row, int mi_col) { | 63 int mi_row, int mi_col) { |
(...skipping 27 matching lines...) Expand all Loading... |
91 sf, pd->subsampling_x, pd->subsampling_y); | 91 sf, pd->subsampling_x, pd->subsampling_y); |
92 } | 92 } |
93 } | 93 } |
94 } | 94 } |
95 | 95 |
96 #ifdef __cplusplus | 96 #ifdef __cplusplus |
97 } // extern "C" | 97 } // extern "C" |
98 #endif | 98 #endif |
99 | 99 |
100 #endif // VP9_COMMON_VP9_RECONINTER_H_ | 100 #endif // VP9_COMMON_VP9_RECONINTER_H_ |
OLD | NEW |