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

Side by Side Diff: source/libvpx/vp9/common/vp9_reconinter.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/common/vp9_pred_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
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 void vp9_setup_dst_planes(MACROBLOCKD *xd, const YV12_BUFFER_CONFIG *src,
61 static void setup_dst_planes(MACROBLOCKD *xd, 61 int mi_row, int mi_col);
62 const YV12_BUFFER_CONFIG *src,
63 int mi_row, int mi_col) {
64 uint8_t *const buffers[4] = {src->y_buffer, src->u_buffer, src->v_buffer,
65 src->alpha_buffer};
66 const int strides[4] = {src->y_stride, src->uv_stride, src->uv_stride,
67 src->alpha_stride};
68 int i;
69 62
70 for (i = 0; i < MAX_MB_PLANE; ++i) { 63 void vp9_setup_pre_planes(MACROBLOCKD *xd, int idx,
71 struct macroblockd_plane *const pd = &xd->plane[i]; 64 const YV12_BUFFER_CONFIG *src, int mi_row, int mi_col,
72 setup_pred_plane(&pd->dst, buffers[i], strides[i], mi_row, mi_col, NULL, 65 const struct scale_factors *sf);
73 pd->subsampling_x, pd->subsampling_y);
74 }
75 }
76
77 static void setup_pre_planes(MACROBLOCKD *xd, int idx,
78 const YV12_BUFFER_CONFIG *src,
79 int mi_row, int mi_col,
80 const struct scale_factors *sf) {
81 if (src != NULL) {
82 int i;
83 uint8_t *const buffers[4] = {src->y_buffer, src->u_buffer, src->v_buffer,
84 src->alpha_buffer};
85 const int strides[4] = {src->y_stride, src->uv_stride, src->uv_stride,
86 src->alpha_stride};
87
88 for (i = 0; i < MAX_MB_PLANE; ++i) {
89 struct macroblockd_plane *const pd = &xd->plane[i];
90 setup_pred_plane(&pd->pre[idx], buffers[i], strides[i], mi_row, mi_col,
91 sf, pd->subsampling_x, pd->subsampling_y);
92 }
93 }
94 }
95 66
96 #ifdef __cplusplus 67 #ifdef __cplusplus
97 } // extern "C" 68 } // extern "C"
98 #endif 69 #endif
99 70
100 #endif // VP9_COMMON_VP9_RECONINTER_H_ 71 #endif // VP9_COMMON_VP9_RECONINTER_H_
OLDNEW
« no previous file with comments | « source/libvpx/vp9/common/vp9_pred_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