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

Side by Side Diff: source/libvpx/vp9/vp9_iface_common.h

Issue 1162573005: libvpx: Pull from upstream (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/libvpx.git@master
Patch Set: Created 5 years, 6 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
« no previous file with comments | « source/libvpx/vp9/vp9_dx_iface.c ('k') | source/libvpx/vp9/vp9cx.mk » ('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) 2013 The WebM project authors. All Rights Reserved. 2 * Copyright (c) 2013 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 #ifndef VP9_VP9_IFACE_COMMON_H_ 10 #ifndef VP9_VP9_IFACE_COMMON_H_
11 #define VP9_VP9_IFACE_COMMON_H_ 11 #define VP9_VP9_IFACE_COMMON_H_
12 12
13 #include "vpx_ports/mem.h"
14
13 static void yuvconfig2image(vpx_image_t *img, const YV12_BUFFER_CONFIG *yv12, 15 static void yuvconfig2image(vpx_image_t *img, const YV12_BUFFER_CONFIG *yv12,
14 void *user_priv) { 16 void *user_priv) {
15 /** vpx_img_wrap() doesn't allow specifying independent strides for 17 /** vpx_img_wrap() doesn't allow specifying independent strides for
16 * the Y, U, and V planes, nor other alignment adjustments that 18 * the Y, U, and V planes, nor other alignment adjustments that
17 * might be representable by a YV12_BUFFER_CONFIG, so we just 19 * might be representable by a YV12_BUFFER_CONFIG, so we just
18 * initialize all the fields.*/ 20 * initialize all the fields.*/
19 int bps; 21 int bps;
20 if (!yv12->subsampling_y) { 22 if (!yv12->subsampling_y) {
21 if (!yv12->subsampling_x) { 23 if (!yv12->subsampling_x) {
22 img->fmt = VPX_IMG_FMT_I444; 24 img->fmt = VPX_IMG_FMT_I444;
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 yv12->border = (yv12->y_stride - img->w) / 2; 121 yv12->border = (yv12->y_stride - img->w) / 2;
120 #else 122 #else
121 yv12->border = (img->stride[VPX_PLANE_Y] - img->w) / 2; 123 yv12->border = (img->stride[VPX_PLANE_Y] - img->w) / 2;
122 #endif // CONFIG_VP9_HIGHBITDEPTH 124 #endif // CONFIG_VP9_HIGHBITDEPTH
123 yv12->subsampling_x = img->x_chroma_shift; 125 yv12->subsampling_x = img->x_chroma_shift;
124 yv12->subsampling_y = img->y_chroma_shift; 126 yv12->subsampling_y = img->y_chroma_shift;
125 return VPX_CODEC_OK; 127 return VPX_CODEC_OK;
126 } 128 }
127 129
128 #endif // VP9_VP9_IFACE_COMMON_H_ 130 #endif // VP9_VP9_IFACE_COMMON_H_
OLDNEW
« no previous file with comments | « source/libvpx/vp9/vp9_dx_iface.c ('k') | source/libvpx/vp9/vp9cx.mk » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698