[Mesa-dev] [PATCH 2/2] radeon/uvd: fix VC-1 simple/main profile decode
Grigori Goronzy
greg at chown.ath.cx
Wed Sep 23 10:46:01 PDT 2015
Hi,
On 23.09.2015 10:11, Christian König wrote:
> From: Boyuan Zhang <boyuan.zhang at amd.com>
>
> Signed-off-by: Boyuan Zhang <boyuan.zhang at amd.com>
> Reviewed-by: Christian König <christian.koenig at amd.com>
> ---
Thanks, nice to see this finally getting fixed, and it was a pretty
simple thing after all... well, not quite yet apparently. Sometimes
playback works correctly, sometimes it doesn't and glitches around, on
my CIK (Bonaire) GPU. It seems random, but isn't as bad and
hang-inducing compared to before this was disabled in Mesa. Maybe some
state isn't being set all the time?
I tested these two samples:
> http://samples.ffmpeg.org/asf-wmv/asf_with_chapters.wmv
> http://samples.ffmpeg.org/V-codecs/WVC1/Test_1440x576_WVC1_6Mbps.wmv
I used "mpv --hwdec=vdpau --vo=vdpau" to test this.
Best regards
Grigori
> src/gallium/drivers/radeon/radeon_uvd.c | 6 ++++++
> src/gallium/drivers/radeon/radeon_video.c | 5 +----
> 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 81f3f45..9edb511 100644
> --- a/src/gallium/drivers/radeon/radeon_uvd.c
> +++ b/src/gallium/drivers/radeon/radeon_uvd.c
> @@ -940,6 +940,12 @@ static void ruvd_end_frame(struct pipe_video_codec *decoder,
> dec->msg->body.decode.width_in_samples = dec->base.width;
> dec->msg->body.decode.height_in_samples = dec->base.height;
>
> + if ((picture->profile == PIPE_VIDEO_PROFILE_VC1_SIMPLE)
> + || (picture->profile == PIPE_VIDEO_PROFILE_VC1_MAIN)) {
> + dec->msg->body.decode.width_in_samples = align(dec->msg->body.decode.width_in_samples, 16) / 16;
> + dec->msg->body.decode.height_in_samples = align(dec->msg->body.decode.height_in_samples, 16) / 16;
> + }
> +
> dec->msg->body.decode.dpb_size = dec->dpb.res->buf->size;
> dec->msg->body.decode.bsd_size = bs_size;
> dec->msg->body.decode.db_pitch = dec->base.width;
> diff --git a/src/gallium/drivers/radeon/radeon_video.c b/src/gallium/drivers/radeon/radeon_video.c
> index 3a1834b..e6cfdf6 100644
> --- a/src/gallium/drivers/radeon/radeon_video.c
> +++ b/src/gallium/drivers/radeon/radeon_video.c
> @@ -259,11 +259,8 @@ int rvid_get_video_param(struct pipe_screen *screen,
> case PIPE_VIDEO_FORMAT_MPEG12:
> case PIPE_VIDEO_FORMAT_MPEG4:
> case PIPE_VIDEO_FORMAT_MPEG4_AVC:
> - return entrypoint != PIPE_VIDEO_ENTRYPOINT_ENCODE;
> case PIPE_VIDEO_FORMAT_VC1:
> - /* FIXME: VC-1 simple/main profile is broken */
> - return profile == PIPE_VIDEO_PROFILE_VC1_ADVANCED &&
> - entrypoint != PIPE_VIDEO_ENTRYPOINT_ENCODE;
> + return entrypoint != PIPE_VIDEO_ENTRYPOINT_ENCODE;
> case PIPE_VIDEO_FORMAT_HEVC:
> /* Carrizo only supports HEVC Main */
> return rscreen->family >= CHIP_CARRIZO &&
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20150923/bdd278a9/attachment.sig>
More information about the mesa-dev
mailing list