[Mesa-dev] [PATCH 1/2] radeon/uvd, st/vdpau: fix video format reporting
Ilia Mirkin
imirkin at alum.mit.edu
Tue Oct 1 12:12:37 PDT 2013
On Tue, Oct 1, 2013 at 3:06 PM, Grigori Goronzy <greg at chown.ath.cx> wrote:
> UVD can only support NV12 in the case of hardware decoding, but we
> can still use all other formats for software decoding. Use the UNKNOWN
> entrypoint to signal that we're not interesting in hardware decoding.
FYI, in nouveau, we use profile == UNKNOWN to determine this.
> ---
> src/gallium/drivers/radeon/radeon_uvd.c | 7 +++++--
> src/gallium/state_trackers/vdpau/query.c | 4 ++--
> 2 files changed, 7 insertions(+), 4 deletions(-)
>
> diff --git a/src/gallium/drivers/radeon/radeon_uvd.c b/src/gallium/drivers/radeon/radeon_uvd.c
> index 382b410..161dee8 100644
> --- a/src/gallium/drivers/radeon/radeon_uvd.c
> +++ b/src/gallium/drivers/radeon/radeon_uvd.c
> @@ -1154,6 +1154,9 @@ boolean ruvd_is_format_supported(struct pipe_screen *screen,
> enum pipe_video_profile profile,
> enum pipe_video_entrypoint entrypoint)
> {
> - /* we can only handle this one anyway */
> - return format == PIPE_FORMAT_NV12;
> + /* we can only handle this one with UVD */
> + if (entrypoint != PIPE_VIDEO_ENTRYPOINT_UNKNOWN)
> + return format == PIPE_FORMAT_NV12;
> +
> + return vl_video_buffer_is_format_supported(screen, format, profile, entrypoint);
> }
> diff --git a/src/gallium/state_trackers/vdpau/query.c b/src/gallium/state_trackers/vdpau/query.c
> index 1d35252..e7486b3 100644
> --- a/src/gallium/state_trackers/vdpau/query.c
> +++ b/src/gallium/state_trackers/vdpau/query.c
> @@ -147,7 +147,7 @@ vlVdpVideoSurfaceQueryGetPutBitsYCbCrCapabilities(VdpDevice device, VdpChromaTyp
> pscreen,
> FormatYCBCRToPipe(bits_ycbcr_format),
> PIPE_VIDEO_PROFILE_UNKNOWN,
> - PIPE_VIDEO_ENTRYPOINT_BITSTREAM
> + PIPE_VIDEO_ENTRYPOINT_UNKNOWN
> );
> pipe_mutex_unlock(dev->mutex);
>
> @@ -398,7 +398,7 @@ vlVdpOutputSurfaceQueryPutBitsYCbCrCapabilities(VdpDevice device, VdpRGBAFormat
> (
> pscreen, ycbcr_format,
> PIPE_VIDEO_PROFILE_UNKNOWN,
> - PIPE_VIDEO_ENTRYPOINT_BITSTREAM
> + PIPE_VIDEO_ENTRYPOINT_UNKNOWN
> );
> pipe_mutex_unlock(dev->mutex);
>
> --
> 1.8.1.2
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list