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

Side by Side Diff: source/libvpx/vpx_scale/generic/yv12config.c

Issue 668403002: libvpx: Pull from upstream (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/libvpx/
Patch Set: Created 6 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/vpx_ports/arm.h ('k') | source/libvpx/vpx_scale/yv12config.h » ('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 #include <assert.h> 11 #include <assert.h>
12 12
13 #include "./vpx_config.h"
14 #include "vpx_scale/yv12config.h" 13 #include "vpx_scale/yv12config.h"
15 #include "vpx_mem/vpx_mem.h" 14 #include "vpx_mem/vpx_mem.h"
16 #if CONFIG_VP9 && CONFIG_VP9_HIGHBITDEPTH 15 #if CONFIG_VP9 && CONFIG_VP9_HIGHBITDEPTH
17 #include "vp9/common/vp9_common.h" 16 #include "vp9/common/vp9_common.h"
18 #endif 17 #endif
19 18
20 /**************************************************************************** 19 /****************************************************************************
21 * Exports 20 * Exports
22 ****************************************************************************/ 21 ****************************************************************************/
23 22
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 ybf->y_stride = y_stride; 234 ybf->y_stride = y_stride;
236 235
237 ybf->uv_crop_width = (width + ss_x) >> ss_x; 236 ybf->uv_crop_width = (width + ss_x) >> ss_x;
238 ybf->uv_crop_height = (height + ss_y) >> ss_y; 237 ybf->uv_crop_height = (height + ss_y) >> ss_y;
239 ybf->uv_width = uv_width; 238 ybf->uv_width = uv_width;
240 ybf->uv_height = uv_height; 239 ybf->uv_height = uv_height;
241 ybf->uv_stride = uv_stride; 240 ybf->uv_stride = uv_stride;
242 241
243 ybf->border = border; 242 ybf->border = border;
244 ybf->frame_size = (int)frame_size; 243 ybf->frame_size = (int)frame_size;
244 ybf->subsampling_x = ss_x;
245 ybf->subsampling_y = ss_y;
245 246
246 #if CONFIG_VP9_HIGHBITDEPTH 247 #if CONFIG_VP9_HIGHBITDEPTH
247 if (use_highbitdepth) { 248 if (use_highbitdepth) {
248 // Store uint16 addresses when using 16bit framebuffers 249 // Store uint16 addresses when using 16bit framebuffers
249 uint8_t *p = CONVERT_TO_BYTEPTR(ybf->buffer_alloc); 250 uint8_t *p = CONVERT_TO_BYTEPTR(ybf->buffer_alloc);
250 ybf->y_buffer = p + (border * y_stride) + border; 251 ybf->y_buffer = p + (border * y_stride) + border;
251 ybf->u_buffer = p + yplane_size + 252 ybf->u_buffer = p + yplane_size +
252 (uv_border_h * uv_stride) + uv_border_w; 253 (uv_border_h * uv_stride) + uv_border_w;
253 ybf->v_buffer = p + yplane_size + uvplane_size + 254 ybf->v_buffer = p + yplane_size + uvplane_size +
254 (uv_border_h * uv_stride) + uv_border_w; 255 (uv_border_h * uv_stride) + uv_border_w;
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 vp9_free_frame_buffer(ybf); 294 vp9_free_frame_buffer(ybf);
294 return vp9_realloc_frame_buffer(ybf, width, height, ss_x, ss_y, 295 return vp9_realloc_frame_buffer(ybf, width, height, ss_x, ss_y,
295 #if CONFIG_VP9_HIGHBITDEPTH 296 #if CONFIG_VP9_HIGHBITDEPTH
296 use_highbitdepth, 297 use_highbitdepth,
297 #endif 298 #endif
298 border, NULL, NULL, NULL); 299 border, NULL, NULL, NULL);
299 } 300 }
300 return -2; 301 return -2;
301 } 302 }
302 #endif 303 #endif
OLDNEW
« no previous file with comments | « source/libvpx/vpx_ports/arm.h ('k') | source/libvpx/vpx_scale/yv12config.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698