diff options
author | Leo Liu <[email protected]> | 2017-08-18 12:12:05 -0400 |
---|---|---|
committer | Leo Liu <[email protected]> | 2017-08-21 10:09:09 -0400 |
commit | 7319ff87871c8e5f909a1674cd60279ef53cbbd0 (patch) | |
tree | 0f53e452cb1ed01b214e6aa7c1be3c7e1a1a8ecb /src/gallium/drivers/radeon | |
parent | c4061bb5fa1c15a77ded16f1de3a4bfa2df20384 (diff) |
radeon/uvd: add YUYV format support for target buffer
Make chroma plane optional for YUYV support
Signed-off-by: Leo Liu <[email protected]>
Reviewed-by: Christian König <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeon')
-rw-r--r-- | src/gallium/drivers/radeon/radeon_uvd.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gallium/drivers/radeon/radeon_uvd.c b/src/gallium/drivers/radeon/radeon_uvd.c index 9ebc31c170c..648a493b59c 100644 --- a/src/gallium/drivers/radeon/radeon_uvd.c +++ b/src/gallium/drivers/radeon/radeon_uvd.c @@ -1566,10 +1566,12 @@ void ruvd_set_dt_surfaces(struct ruvd_msg *msg, struct radeon_surf *luma, } msg->body.decode.dt_luma_top_offset = texture_offset(luma, 0, type); - msg->body.decode.dt_chroma_top_offset = texture_offset(chroma, 0, type); + if (chroma) + msg->body.decode.dt_chroma_top_offset = texture_offset(chroma, 0, type); if (msg->body.decode.dt_field_mode) { msg->body.decode.dt_luma_bottom_offset = texture_offset(luma, 1, type); - msg->body.decode.dt_chroma_bottom_offset = texture_offset(chroma, 1, type); + if (chroma) + msg->body.decode.dt_chroma_bottom_offset = texture_offset(chroma, 1, type); } else { msg->body.decode.dt_luma_bottom_offset = msg->body.decode.dt_luma_top_offset; msg->body.decode.dt_chroma_bottom_offset = msg->body.decode.dt_chroma_top_offset; |