]> granicus.if.org Git - libvpx/commitdiff
vp8e_get_preview fixed for resized frames
authorJames Berry <jamesberry@google.com>
Tue, 8 Feb 2011 19:23:18 +0000 (14:23 -0500)
committerJames Berry <jamesberry@google.com>
Tue, 8 Feb 2011 19:27:00 +0000 (14:27 -0500)
preview_img d_w and d_h along with w and h
would not be updated for resized frames.

now uses sd.y_width and sd.y_height

Change-Id: I52241de4cc1de5e73f865e668bd70a7cbd954390

vp8/vp8_cx_iface.c

index b23bd951df6a7ddcb3fde2d6a51c5f372b593690..ea99c6102b71560c17836b61a7c5ca5d4bca5f70 100644 (file)
@@ -912,8 +912,8 @@ static vpx_image_t *vp8e_get_preview(vpx_codec_alg_priv_t *ctx)
         ctx->preview_img.x_chroma_shift = 1;
         ctx->preview_img.y_chroma_shift = 1;
 
-        ctx->preview_img.d_w = ctx->cfg.g_w;
-        ctx->preview_img.d_h = ctx->cfg.g_h;
+        ctx->preview_img.d_w = sd.y_width;
+        ctx->preview_img.d_h = sd.y_height;
         ctx->preview_img.stride[VPX_PLANE_Y] = sd.y_stride;
         ctx->preview_img.stride[VPX_PLANE_U] = sd.uv_stride;
         ctx->preview_img.stride[VPX_PLANE_V] = sd.uv_stride;