[17/18] radeonsi: enable vcn encode

Submitted by Zhang, Boyuan on Nov. 8, 2017, 6:08 p.m.

Details

Message ID 1510164503-13038-17-git-send-email-boyuan.zhang@amd.com
State New
Headers show
Series "Series without cover letter" ( rev: 3 2 1 ) in Mesa

Not browsing as part of any series.

Commit Message

Zhang, Boyuan Nov. 8, 2017, 6:08 p.m.
From: Boyuan Zhang <boyuan.zhang@amd.com>

Enable vcn encode by creating radeon_encoder for vcn.

Signed-off-by: Boyuan Zhang <boyuan.zhang@amd.com>
---
 src/gallium/drivers/radeonsi/si_uvd.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/src/gallium/drivers/radeonsi/si_uvd.c b/src/gallium/drivers/radeonsi/si_uvd.c
index 2fc5e30..09fdb23 100644
--- a/src/gallium/drivers/radeonsi/si_uvd.c
+++ b/src/gallium/drivers/radeonsi/si_uvd.c
@@ -30,6 +30,7 @@ 
 #include "radeon/radeon_uvd.h"
 #include "radeon/radeon_vce.h"
 #include "radeon/radeon_vcn_dec.h"
+#include "radeon/radeon_vcn_enc.h"
 
 /**
  * creates an video buffer with an UVD compatible memory layout
@@ -146,7 +147,8 @@  struct pipe_video_codec *si_uvd_create_decoder(struct pipe_context *context,
 	bool vcn = (ctx->b.family == CHIP_RAVEN) ? true : false;
 
 	if (templ->entrypoint == PIPE_VIDEO_ENTRYPOINT_ENCODE)
-		return si_vce_create_encoder(context, templ, ctx->b.ws, si_vce_get_buffer);
+		return (vcn) ? radeon_create_encoder(context, templ, ctx->b.ws, si_vce_get_buffer) :
+               si_vce_create_encoder(context, templ, ctx->b.ws, si_vce_get_buffer);
 
 	return (vcn) ? 	radeon_create_decoder(context, templ) :
 		si_common_uvd_create_decoder(context, templ, si_uvd_set_dtb);