From: Alex Converse Date: Fri, 17 Jan 2014 22:01:53 +0000 (-0800) Subject: Fix output cropping in vp9_get_preview_raw_frame. X-Git-Tag: v1.4.0~2640^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9c19953763c139cfe0ee94fc94ac3c285e151d3c;p=libvpx Fix output cropping in vp9_get_preview_raw_frame. Handle the non-420 case and set uv_width. This is needed to get the correct colorspace information out of vp9e_get_preview(). Change-Id: I62ce118cd7082708d812deb0843c1be87582e0fe --- diff --git a/vp9/encoder/vp9_onyx_if.c b/vp9/encoder/vp9_onyx_if.c index 42d4196c5..59d36ee14 100644 --- a/vp9/encoder/vp9_onyx_if.c +++ b/vp9/encoder/vp9_onyx_if.c @@ -3689,7 +3689,8 @@ int vp9_get_preview_raw_frame(VP9_PTR comp, YV12_BUFFER_CONFIG *dest, *dest = *cpi->common.frame_to_show; dest->y_width = cpi->common.width; dest->y_height = cpi->common.height; - dest->uv_height = cpi->common.height / 2; + dest->uv_width = cpi->common.width >> cpi->common.subsampling_x; + dest->uv_height = cpi->common.height >> cpi->common.subsampling_y; ret = 0; } else { ret = -1;