vatrace: fix UV data offset issue of LIBVA_TRACE_SURFACE_GEOMETRY
authorAustin Yuan <shengquan.yuan@intel.com>
Thu, 17 Oct 2013 02:42:54 +0000 (10:42 +0800)
committerXiang, Haihao <haihao.xiang@intel.com>
Mon, 17 Mar 2014 01:41:55 +0000 (09:41 +0800)
Signed-off-by: Austin Yuan <shengquan.yuan@intel.com>
(cherry picked from commit c954ff868057e02f620470d64c1f2071e2cfbb4e)

va/va_trace.c

index fc1b867..4145848 100644 (file)
@@ -413,7 +413,7 @@ void va_TraceSurface(VADisplay dpy)
         
         tmp += luma_stride;
     }
-    tmp = UV_data + chroma_u_stride * trace_ctx->trace_surface_yoff;
+    tmp = UV_data + chroma_u_stride * trace_ctx->trace_surface_yoff / 2;
     if (fourcc == VA_FOURCC_NV12) {
         for (i=0; i<trace_ctx->trace_surface_height/2; i++) {
             fwrite(tmp + trace_ctx->trace_surface_xoff,