diff options
author | James Zern <jzern@google.com> | 2015-09-10 00:19:18 -0700 |
---|---|---|
committer | James Zern <jzern@google.com> | 2015-09-10 00:19:18 -0700 |
commit | 58cb7886c3cd1b2c5663c6327f51f6f5ba6d8098 (patch) | |
tree | b6073dfbcfaae902ffea680a0f9d459d6824630f | |
parent | a124bc7a816d0b7d4eda64c253eb5083f8284cc8 (diff) | |
download | libvpx-58cb7886c3cd1b2c5663c6327f51f6f5ba6d8098.tar libvpx-58cb7886c3cd1b2c5663c6327f51f6f5ba6d8098.tar.gz libvpx-58cb7886c3cd1b2c5663c6327f51f6f5ba6d8098.tar.bz2 libvpx-58cb7886c3cd1b2c5663c6327f51f6f5ba6d8098.zip |
yuvconfig2image(): add explicit cast to avoid conv warning
prevents an int -> vpx_img_fmt_t conversion warning with high-bitdepth
as it modifies the image format
Change-Id: Ie3135d031565312613a036a1e6937abb59760a7e
-rw-r--r-- | vp10/vp10_iface_common.h | 2 | ||||
-rw-r--r-- | vp9/vp9_iface_common.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/vp10/vp10_iface_common.h b/vp10/vp10_iface_common.h index 4bc34372d..8e1bfc2bd 100644 --- a/vp10/vp10_iface_common.h +++ b/vp10/vp10_iface_common.h @@ -56,7 +56,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); diff --git a/vp9/vp9_iface_common.h b/vp9/vp9_iface_common.h index 58bb7d5d6..da7ae0eda 100644 --- a/vp9/vp9_iface_common.h +++ b/vp9/vp9_iface_common.h @@ -56,7 +56,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); |