yuvconfig2image(): add explicit cast to avoid conv warning
authorJames Zern <jzern@google.com>
Thu, 10 Sep 2015 07:19:18 +0000 (00:19 -0700)
committerJames Zern <jzern@google.com>
Thu, 10 Sep 2015 07:19:18 +0000 (00:19 -0700)
prevents an int -> vpx_img_fmt_t conversion warning with high-bitdepth
as it modifies the image format

Change-Id: Ie3135d031565312613a036a1e6937abb59760a7e

vp10/vp10_iface_common.h
vp9/vp9_iface_common.h

index 4bc3437..8e1bfc2 100644 (file)
@@ -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);
index 58bb7d5..da7ae0e 100644 (file)
@@ -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);