Mesa (master): radeon/vce: 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: 55cf565698b05cd900c37ace02235f874d1ac093
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=55cf565698b05cd900c37ace02235f874d1ac093
Author: Boyuan Zhang <boyuan.zhang at amd.com>
Date: Tue Oct 23 11:20:33 2018 -0400
radeon/vce: 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_vce_40_2_2.c | 5 +----
src/gallium/drivers/radeon/radeon_vce_52.c | 5 +----
2 files changed, 2 insertions(+), 8 deletions(-)
diff --git a/src/gallium/drivers/radeon/radeon_vce_40_2_2.c b/src/gallium/drivers/radeon/radeon_vce_40_2_2.c
index 66b54dab25..e17468c909 100644
--- a/src/gallium/drivers/radeon/radeon_vce_40_2_2.c
+++ b/src/gallium/drivers/radeon/radeon_vce_40_2_2.c
@@ -38,8 +38,6 @@
#include "radeon_video.h"
#include "radeon_vce.h"
-static const unsigned profiles[7] = { 66, 77, 88, 100, 110, 122, 244 };
-
static void session(struct rvce_encoder *enc)
{
RVCE_BEGIN(0x00000001); // session cmd
@@ -82,8 +80,7 @@ static void create(struct rvce_encoder *enc)
RVCE_BEGIN(0x01000001); // create cmd
RVCE_CS(0x00000000); // encUseCircularBuffer
- RVCE_CS(profiles[enc->base.profile -
- PIPE_VIDEO_PROFILE_MPEG4_AVC_BASELINE]); // encProfile
+ RVCE_CS(u_get_h264_profile_idc(enc->base.profile)); // encProfile
RVCE_CS(enc->base.level); // encLevel
RVCE_CS(0x00000000); // encPicStructRestriction
RVCE_CS(enc->base.width); // encImageWidth
diff --git a/src/gallium/drivers/radeon/radeon_vce_52.c b/src/gallium/drivers/radeon/radeon_vce_52.c
index 421539c4bd..fc7ddc62a9 100644
--- a/src/gallium/drivers/radeon/radeon_vce_52.c
+++ b/src/gallium/drivers/radeon/radeon_vce_52.c
@@ -38,8 +38,6 @@
#include "radeon_video.h"
#include "radeon_vce.h"
-static const unsigned profiles[7] = { 66, 77, 88, 100, 110, 122, 244 };
-
static void get_rate_control_param(struct rvce_encoder *enc, struct pipe_h264_enc_picture_desc *pic)
{
enc->enc_pic.rc.rc_method = pic->rate_ctrl.rate_ctrl_method;
@@ -172,8 +170,7 @@ static void create(struct rvce_encoder *enc)
RVCE_BEGIN(0x01000001); // create cmd
RVCE_CS(enc->enc_pic.ec.enc_use_circular_buffer);
- RVCE_CS(profiles[enc->base.profile -
- PIPE_VIDEO_PROFILE_MPEG4_AVC_BASELINE]); // encProfile
+ RVCE_CS(u_get_h264_profile_idc(enc->base.profile)); // encProfile
RVCE_CS(enc->base.level); // encLevel
RVCE_CS(enc->enc_pic.ec.enc_pic_struct_restriction);
RVCE_CS(enc->base.width); // encImageWidth
More information about the mesa-commit
mailing list