[09/10] radeonsi: add vcn jpeg decoder

Submitted by Zhang, Boyuan on Aug. 2, 2018, 7:44 p.m.

Details

Message ID 1533239090-1865-9-git-send-email-boyuan.zhang@amd.com
State New
Headers show
Series "Series without cover letter" ( rev: 1 ) in Mesa

Not browsing as part of any series.

Commit Message

Zhang, Boyuan Aug. 2, 2018, 7:44 p.m.
From: Boyuan Zhang <boyuan.zhang@amd.com>

Signed-off-by: Boyuan Zhang <boyuan.zhang@amd.com>
---
 src/gallium/drivers/radeonsi/si_uvd.c | 8 +++++++-
 1 file changed, 7 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 b6cb4cb..f0abc36 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_jpeg.h"
 #include "radeon/radeon_vcn_enc.h"
 #include "radeon/radeon_uvd_enc.h"
 #include "util/u_video.h"
@@ -159,6 +160,11 @@  struct pipe_video_codec *si_uvd_create_decoder(struct pipe_context *context,
 		}
 	}
 
-	return (vcn) ? 	radeon_create_decoder(context, templ) :
+	if (vcn) {
+		if (u_reduce_video_profile(templ->profile) == PIPE_VIDEO_FORMAT_JPEG)
+			radeon_create_decoder_jpeg(context, templ);
+		else
+			radeon_create_decoder(context, templ);
+	} else
 		si_common_uvd_create_decoder(context, templ, si_uvd_set_dtb);
 }