Index: source/libvpx/tools_common.c |
=================================================================== |
--- source/libvpx/tools_common.c (revision 291857) |
+++ source/libvpx/tools_common.c (working copy) |
@@ -83,7 +83,7 @@ |
struct FileTypeDetectionBuffer *detect = &input_ctx->detect; |
int plane = 0; |
int shortread = 0; |
- const int bytespp = (yuv_frame->fmt & VPX_IMG_FMT_HIGH) ? 2 : 1; |
+ const int bytespp = (yuv_frame->fmt & VPX_IMG_FMT_HIGHBITDEPTH) ? 2 : 1; |
for (plane = 0; plane < 3; ++plane) { |
uint8_t *ptr; |
@@ -241,7 +241,8 @@ |
for (plane = 0; plane < 3; ++plane) { |
unsigned char *buf = img->planes[plane]; |
const int stride = img->stride[plane]; |
- const int w = vpx_img_plane_width(img, plane); |
+ const int w = vpx_img_plane_width(img, plane) * |
+ ((img->fmt & VPX_IMG_FMT_HIGHBITDEPTH) ? 2 : 1); |
const int h = vpx_img_plane_height(img, plane); |
int y; |