[Mesa-dev] Status of VDPAU and XvMC state-trackers (was Re: Build error on current xvmc-r600 pipe-video)

Andy Furniss andyqos at ukfsn.org
Thu May 5 04:11:32 PDT 2011


Andy Furniss wrote:
> There has been a regression though -
>
> [g3dvl] remove resource_format workaround
>
> causes quite bad artifacts on newmobcal.

I can get rid of the new artifacts for xvmc with the patch below.

ffmpeg12vdpau shows the same "new" artifacts, but is not fixed by this.

diff --git a/src/gallium/auxiliary/vl/vl_context.c 
b/src/gallium/auxiliary/vl/vl_context.c
index be28bb5..34381f9 100644
--- a/src/gallium/auxiliary/vl/vl_context.c
+++ b/src/gallium/auxiliary/vl/vl_context.c
@@ -36,9 +36,9 @@
  #include "vl_mpeg12_decoder.h"

  const enum pipe_format const_resource_formats_YV12[3] = {
-   PIPE_FORMAT_R8_UNORM,
-   PIPE_FORMAT_R8_UNORM,
-   PIPE_FORMAT_R8_UNORM
+   PIPE_FORMAT_R8_SNORM,
+   PIPE_FORMAT_R8_SNORM,
+   PIPE_FORMAT_R8_SNORM
  };

  const enum pipe_format const_resource_formats_NV12[3] = {
diff --git a/src/gallium/state_trackers/xorg/xvmc/surface.c 
b/src/gallium/state_trackers/xorg/xvmc/surface.c
index da41a18..0677cea 100644
--- a/src/gallium/state_trackers/xorg/xvmc/surface.c
+++ b/src/gallium/state_trackers/xorg/xvmc/surface.c
@@ -313,7 +313,7 @@ Status XvMCCreateSurface(Display *dpy, XvMCContext 
*context, XvMCSurface *surfac

     surface_priv->decode_buffer = 
context_priv->decoder->create_buffer(context_priv->decoder);
     surface_priv->mv_stride = 
surface_priv->decode_buffer->get_mv_stream_stride(surface_priv->decode_buffer);
-   surface_priv->video_buffer = vpipe->create_buffer(vpipe, 
PIPE_FORMAT_NV12,
+   surface_priv->video_buffer = vpipe->create_buffer(vpipe, 
PIPE_FORMAT_YV12,
 
context_priv->decoder->chroma_format,
 
context_priv->decoder->width,
 
context_priv->decoder->height);


More information about the mesa-dev mailing list