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

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

Issue 1339513003: libvpx: Pull from upstream (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/libvpx.git@master
Patch Set: Created 5 years, 3 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
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 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 const MV mv_q4 = clamp_mv_to_umv_border_sb(xd, &mv, bw, bh, 180 const MV mv_q4 = clamp_mv_to_umv_border_sb(xd, &mv, bw, bh,
181 pd->subsampling_x, 181 pd->subsampling_x,
182 pd->subsampling_y); 182 pd->subsampling_y);
183 183
184 uint8_t *pre; 184 uint8_t *pre;
185 MV32 scaled_mv; 185 MV32 scaled_mv;
186 int xs, ys, subpel_x, subpel_y; 186 int xs, ys, subpel_x, subpel_y;
187 const int is_scaled = vp9_is_scaled(sf); 187 const int is_scaled = vp9_is_scaled(sf);
188 188
189 if (is_scaled) { 189 if (is_scaled) {
190 pre = pre_buf->buf + scaled_buffer_offset(x, y, pre_buf->stride, sf); 190 // Co-ordinate of containing block to pixel precision.
191 const int x_start = (-xd->mb_to_left_edge >> (3 + pd->subsampling_x));
192 const int y_start = (-xd->mb_to_top_edge >> (3 + pd->subsampling_y));
193 if (plane == 0)
194 pre_buf->buf = xd->block_refs[ref]->buf->y_buffer;
195 else if (plane == 1)
196 pre_buf->buf = xd->block_refs[ref]->buf->u_buffer;
197 else
198 pre_buf->buf = xd->block_refs[ref]->buf->v_buffer;
199
200 pre_buf->buf += scaled_buffer_offset(x_start + x, y_start + y,
201 pre_buf->stride, sf);
202 pre = pre_buf->buf;
191 scaled_mv = vp9_scale_mv(&mv_q4, mi_x + x, mi_y + y, sf); 203 scaled_mv = vp9_scale_mv(&mv_q4, mi_x + x, mi_y + y, sf);
192 xs = sf->x_step_q4; 204 xs = sf->x_step_q4;
193 ys = sf->y_step_q4; 205 ys = sf->y_step_q4;
194 } else { 206 } else {
195 pre = pre_buf->buf + (y * pre_buf->stride + x); 207 pre = pre_buf->buf + (y * pre_buf->stride + x);
196 scaled_mv.row = mv_q4.row; 208 scaled_mv.row = mv_q4.row;
197 scaled_mv.col = mv_q4.col; 209 scaled_mv.col = mv_q4.col;
198 xs = ys = 16; 210 xs = ys = 16;
199 } 211 }
200 subpel_x = scaled_mv.col & SUBPEL_MASK; 212 subpel_x = scaled_mv.col & SUBPEL_MASK;
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 src->v_buffer}; 306 src->v_buffer};
295 const int strides[MAX_MB_PLANE] = { src->y_stride, src->uv_stride, 307 const int strides[MAX_MB_PLANE] = { src->y_stride, src->uv_stride,
296 src->uv_stride}; 308 src->uv_stride};
297 for (i = 0; i < MAX_MB_PLANE; ++i) { 309 for (i = 0; i < MAX_MB_PLANE; ++i) {
298 struct macroblockd_plane *const pd = &xd->plane[i]; 310 struct macroblockd_plane *const pd = &xd->plane[i];
299 setup_pred_plane(&pd->pre[idx], buffers[i], strides[i], mi_row, mi_col, 311 setup_pred_plane(&pd->pre[idx], buffers[i], strides[i], mi_row, mi_col,
300 sf, pd->subsampling_x, pd->subsampling_y); 312 sf, pd->subsampling_x, pd->subsampling_y);
301 } 313 }
302 } 314 }
303 } 315 }
OLDNEW
« no previous file with comments | « source/libvpx/vp9/common/vp9_pred_common.h ('k') | source/libvpx/vp9/common/vp9_thread_common.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698