Mesa (master): radeon/vcn: use util function to get h264 profile idc
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Oct 26 17:24:26 UTC 2018
Module: Mesa
Branch: master
Commit: f4126cfaabc2deba9ddbbccc21eac7f43b760bef
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=f4126cfaabc2deba9ddbbccc21eac7f43b760bef
Author: Boyuan Zhang <boyuan.zhang at amd.com>
Date: Tue Oct 23 11:22:13 2018 -0400
radeon/vcn: use util function to get h264 profile idc
Use utility function for converting h264 pipe video profile to profile idc,
instead of using array.
Signed-off-by: Boyuan Zhang <boyuan.zhang at amd.com>
Acked-by: Christian König <christian.koenig at amd.com>
---
src/gallium/drivers/radeon/radeon_vcn_enc_1_2.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/gallium/drivers/radeon/radeon_vcn_enc_1_2.c b/src/gallium/drivers/radeon/radeon_vcn_enc_1_2.c
index 6632451900..7f5b190934 100644
--- a/src/gallium/drivers/radeon/radeon_vcn_enc_1_2.c
+++ b/src/gallium/drivers/radeon/radeon_vcn_enc_1_2.c
@@ -48,7 +48,6 @@ RADEON_ENC_CS(cmd)
#define RADEON_ENC_END() *begin = (&enc->cs->current.buf[enc->cs->current.cdw] - begin) * 4; \
enc->total_task_size += *begin;}
-static const unsigned profiles[7] = { 66, 77, 88, 100, 110, 122, 244 };
static const unsigned index_to_shifts[4] = {24, 16, 8, 0};
static void radeon_enc_add_buffer(struct radeon_encoder *enc, struct pb_buffer *buf,
@@ -303,7 +302,7 @@ static void radeon_enc_spec_misc(struct radeon_encoder *enc)
enc->enc_pic.spec_misc.cabac_init_idc = 0;
enc->enc_pic.spec_misc.half_pel_enabled = 1;
enc->enc_pic.spec_misc.quarter_pel_enabled = 1;
- enc->enc_pic.spec_misc.profile_idc = profiles[enc->base.profile - PIPE_VIDEO_PROFILE_MPEG4_AVC_BASELINE];
+ enc->enc_pic.spec_misc.profile_idc = u_get_h264_profile_idc(enc->base.profile);
enc->enc_pic.spec_misc.level_idc = enc->base.level;
RADEON_ENC_BEGIN(RENCODE_H264_IB_PARAM_SPEC_MISC);
More information about the mesa-commit
mailing list