[Mesa-dev] [PATCH 1/9] st/vdpau: fix chroma_format handling in VideoSurfaceQueryGetPutBitsYCbCrCapabilities

Emeric Grange emeric.grange at gmail.com
Wed Mar 7 12:22:34 PST 2012


I'm not sure where to put this issue, but as this series seems to have some
effect on it, here it is :

I am trying to play a mpeg2 video with a 4:2:2 subsampling using mplayer,
with vdpau video output and regular ffmpeg12 video codec (the mesa mpeg2
decoder cannot handle 4:2:2 subsampling anyway if I read previous
discussions right ?).

With lateset mesa git master I had completly borked output and this error :
[vdpau] Error when calling vdp_video_surface_put_bits_y_cb_cr: No backend
implementation could be loaded.

With the previous series of 9 patches I had that output :
http://img9.imageshack.us/img9/7447/yv422bug.png

With today series I get that output :
http://img807.imageshack.us/img807/5593/cran07032012184105.png


By the way something seemed wrong while reading mplayer's log :
(the use of the software scaler and the "DRI failure")

Starting playback...
Could not find matching colorspace - retrying with -vf scale...
Opening video filter: [scale]
Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.
[swscaler @ 0x1001140]using unscaled yuv422p -> yuyv422 special converter
VO: [vdpau] 1920x1080 => 1920x1080 Packed YUY2
[mpeg2video @ 0xf50700]warning: first frame is no keyframe
[VD_FFMPEG] DRI failure.
V:  11.5   2/  2 ??% ??% ??,?% 0 0
[mpeg2video @ 0xf50700]warning: first frame is no keyframe
V:  16.6 125/125 21%  6%  0.0% 0 0


Emeric

2012/3/7 Christian König <deathsimple at vodafone.de>

> Signed-off-by: Christian König <deathsimple at vodafone.de>
> ---
>  src/gallium/state_trackers/vdpau/query.c |   22 ++++++++++++++++++----
>  1 files changed, 18 insertions(+), 4 deletions(-)
>
> diff --git a/src/gallium/state_trackers/vdpau/query.c
> b/src/gallium/state_trackers/vdpau/query.c
> index 9d40834..2b13ce1 100644
> --- a/src/gallium/state_trackers/vdpau/query.c
> +++ b/src/gallium/state_trackers/vdpau/query.c
> @@ -87,9 +87,6 @@ vlVdpVideoSurfaceQueryCapabilities(VdpDevice device,
> VdpChromaType surface_chrom
>
>    /* XXX: Current limits */
>    *is_supported = true;
> -   if (surface_chroma_type != VDP_CHROMA_TYPE_420)
> -      *is_supported = false;
> -
>    max_2d_texture_level = pscreen->get_param(pscreen,
> PIPE_CAP_MAX_TEXTURE_2D_LEVELS);
>    pipe_mutex_unlock(dev->mutex);
>    if (!max_2d_texture_level)
> @@ -124,7 +121,24 @@
> vlVdpVideoSurfaceQueryGetPutBitsYCbCrCapabilities(VdpDevice device,
> VdpChromaTyp
>       return VDP_STATUS_RESOURCES;
>
>    pipe_mutex_lock(dev->mutex);
> -   *is_supported = pscreen->is_video_format_supported
> +
> +   switch(bits_ycbcr_format) {
> +   case VDP_YCBCR_FORMAT_UYVY:
> +   case VDP_YCBCR_FORMAT_YUYV:
> +      *is_supported = surface_chroma_type == VDP_CHROMA_TYPE_422;
> +      break;
> +
> +   case VDP_YCBCR_FORMAT_Y8U8V8A8:
> +   case VDP_YCBCR_FORMAT_V8U8Y8A8:
> +      *is_supported = surface_chroma_type == VDP_CHROMA_TYPE_444;
> +      break;
> +
> +   default:
> +      *is_supported = true;
> +      break;
> +   }
> +
> +   *is_supported &= pscreen->is_video_format_supported
>    (
>       pscreen,
>       FormatYCBCRToPipe(bits_ycbcr_format),
> --
> 1.7.5.4
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20120307/25cf0acb/attachment.html>


More information about the mesa-dev mailing list