diff options
author | Christian König <[email protected]> | 2013-10-24 05:12:58 -0600 |
---|---|---|
committer | Christian König <[email protected]> | 2013-10-28 11:06:37 +0100 |
commit | 6f2410c9aa5b0a2e7f08c9e60f4d3dc84cfa9f41 (patch) | |
tree | 1414ea0f538ddf6ca4369d3c7294cb6b8fce2e37 | |
parent | cc49baeedc12521e60ea3ffc38f5c09ed3e9e1c3 (diff) |
radeon/uvd: fix H264 chroma format handling
Signed-off-by: Christian König <[email protected]>
-rw-r--r-- | src/gallium/drivers/radeon/radeon_uvd.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/gallium/drivers/radeon/radeon_uvd.c b/src/gallium/drivers/radeon/radeon_uvd.c index 134ce4e1b9f..6d878418ba7 100644 --- a/src/gallium/drivers/radeon/radeon_uvd.c +++ b/src/gallium/drivers/radeon/radeon_uvd.c @@ -385,6 +385,21 @@ static struct ruvd_h264 get_h264_msg(struct ruvd_decoder *dec, struct pipe_h264_ result.sps_info_flags |= pic->frame_mbs_only_flag << 2; result.sps_info_flags |= pic->delta_pic_order_always_zero_flag << 3; + switch (dec->base.chroma_format) { + case PIPE_VIDEO_CHROMA_FORMAT_400: + result.chroma_format = 0; + break; + case PIPE_VIDEO_CHROMA_FORMAT_420: + result.chroma_format = 1; + break; + case PIPE_VIDEO_CHROMA_FORMAT_422: + result.chroma_format = 2; + break; + case PIPE_VIDEO_CHROMA_FORMAT_444: + result.chroma_format = 3; + break; + } + result.pps_info_flags = 0; result.pps_info_flags |= pic->transform_8x8_mode_flag << 0; result.pps_info_flags |= pic->redundant_pic_cnt_present_flag << 1; @@ -395,7 +410,6 @@ static struct ruvd_h264 get_h264_msg(struct ruvd_decoder *dec, struct pipe_h264_ result.pps_info_flags |= pic->pic_order_present_flag << 7; result.pps_info_flags |= pic->entropy_coding_mode_flag << 8; - result.chroma_format = 0x1; result.bit_depth_luma_minus8 = 0; result.bit_depth_chroma_minus8 = 0; |