aboutsummaryrefslogtreecommitdiff
path: root/libvpx/vp9/vp9_iface_common.h
diff options
context:
space:
mode:
authorJohann <johannkoenig@google.com>2015-11-19 16:07:27 -0800
committerJohann <johannkoenig@google.com>2015-11-19 16:07:27 -0800
commit2263fc984bdc858ee931d3e35c87c404de923950 (patch)
treef42181486e87a18dba9945956209fae0366172cb /libvpx/vp9/vp9_iface_common.h
parentfcb21993aab051313aeeb2a9fcd70abc6bfd6869 (diff)
downloadlibvpx-2263fc984bdc858ee931d3e35c87c404de923950.tar.gz
Update external/libvpx to 1.5.0 release
Change-Id: Idbffcaf52c19f78927c57e4947fc230d48836076
Diffstat (limited to 'libvpx/vp9/vp9_iface_common.h')
-rw-r--r--libvpx/vp9/vp9_iface_common.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/libvpx/vp9/vp9_iface_common.h b/libvpx/vp9/vp9_iface_common.h
index 58bb7d5d6..938d4224b 100644
--- a/libvpx/vp9/vp9_iface_common.h
+++ b/libvpx/vp9/vp9_iface_common.h
@@ -37,11 +37,14 @@ static void yuvconfig2image(vpx_image_t *img, const YV12_BUFFER_CONFIG *yv12,
}
}
img->cs = yv12->color_space;
+ img->range = yv12->color_range;
img->bit_depth = 8;
img->w = yv12->y_stride;
img->h = ALIGN_POWER_OF_TWO(yv12->y_height + 2 * VP9_ENC_BORDER_IN_PIXELS, 3);
img->d_w = yv12->y_crop_width;
img->d_h = yv12->y_crop_height;
+ img->r_w = yv12->render_width;
+ img->r_h = yv12->render_height;
img->x_chroma_shift = yv12->subsampling_x;
img->y_chroma_shift = yv12->subsampling_y;
img->planes[VPX_PLANE_Y] = yv12->y_buffer;
@@ -56,7 +59,7 @@ static void yuvconfig2image(vpx_image_t *img, const YV12_BUFFER_CONFIG *yv12,
if (yv12->flags & YV12_FLAG_HIGHBITDEPTH) {
// vpx_image_t uses byte strides and a pointer to the first byte
// of the image.
- img->fmt |= VPX_IMG_FMT_HIGHBITDEPTH;
+ img->fmt = (vpx_img_fmt_t)(img->fmt | VPX_IMG_FMT_HIGHBITDEPTH);
img->bit_depth = yv12->bit_depth;
img->planes[VPX_PLANE_Y] = (uint8_t*)CONVERT_TO_SHORTPTR(yv12->y_buffer);
img->planes[VPX_PLANE_U] = (uint8_t*)CONVERT_TO_SHORTPTR(yv12->u_buffer);
@@ -83,6 +86,8 @@ static vpx_codec_err_t image2yuvconfig(const vpx_image_t *img,
yv12->y_crop_width = img->d_w;
yv12->y_crop_height = img->d_h;
+ yv12->render_width = img->r_w;
+ yv12->render_height = img->r_h;
yv12->y_width = img->d_w;
yv12->y_height = img->d_h;
@@ -96,6 +101,7 @@ static vpx_codec_err_t image2yuvconfig(const vpx_image_t *img,
yv12->y_stride = img->stride[VPX_PLANE_Y];
yv12->uv_stride = img->stride[VPX_PLANE_U];
yv12->color_space = img->cs;
+ yv12->color_range = img->range;
#if CONFIG_VP9_HIGHBITDEPTH
if (img->fmt & VPX_IMG_FMT_HIGHBITDEPTH) {