[Mesa-dev] [PATCH 01/13] radeon/vcn: move radeon decoder define to header file

boyuan.zhang at amd.com boyuan.zhang at amd.com
Thu Aug 16 16:06:19 UTC 2018


From: Boyuan Zhang <boyuan.zhang at amd.com>

Move radeon_decoder definition from "radeon_vcn_dec.c" to "radeon_vcn_dec.h",
so that it can be included by other files later.

Signed-off-by: Boyuan Zhang <boyuan.zhang at amd.com>
---
 src/gallium/drivers/radeon/radeon_vcn_dec.c | 28 ----------------------------
 src/gallium/drivers/radeon/radeon_vcn_dec.h | 29 +++++++++++++++++++++++++++++
 2 files changed, 29 insertions(+), 28 deletions(-)

diff --git a/src/gallium/drivers/radeon/radeon_vcn_dec.c b/src/gallium/drivers/radeon/radeon_vcn_dec.c
index 4bc922d..8bea704 100644
--- a/src/gallium/drivers/radeon/radeon_vcn_dec.c
+++ b/src/gallium/drivers/radeon/radeon_vcn_dec.c
@@ -49,38 +49,10 @@
 #define RDECODE_GPCOM_VCPU_DATA1	0x20714
 #define RDECODE_ENGINE_CNTL		0x20718
 
-#define NUM_BUFFERS			4
 #define NUM_MPEG2_REFS			6
 #define NUM_H264_REFS			17
 #define NUM_VC1_REFS			5
 
-struct radeon_decoder {
-	struct pipe_video_codec		base;
-
-	unsigned			stream_handle;
-	unsigned			stream_type;
-	unsigned			frame_number;
-
-	struct pipe_screen		*screen;
-	struct radeon_winsys		*ws;
-	struct radeon_winsys_cs		*cs;
-
-	void				*msg;
-	uint32_t			*fb;
-	uint8_t				*it;
-	void				*bs_ptr;
-
-	struct rvid_buffer		msg_fb_it_buffers[NUM_BUFFERS];
-	struct rvid_buffer		bs_buffers[NUM_BUFFERS];
-	struct rvid_buffer		dpb;
-	struct rvid_buffer		ctx;
-	struct rvid_buffer		sessionctx;
-
-	unsigned			bs_size;
-	unsigned			cur_buffer;
-	void				*render_pic_list[16];
-};
-
 static rvcn_dec_message_avc_t get_h264_msg(struct radeon_decoder *dec,
 		struct pipe_h264_picture_desc *pic)
 {
diff --git a/src/gallium/drivers/radeon/radeon_vcn_dec.h b/src/gallium/drivers/radeon/radeon_vcn_dec.h
index accffef..4a90687 100644
--- a/src/gallium/drivers/radeon/radeon_vcn_dec.h
+++ b/src/gallium/drivers/radeon/radeon_vcn_dec.h
@@ -105,6 +105,8 @@
 
 #define RDECODE_SPS_INFO_H264_EXTENSION_SUPPORT_FLAG_SHIFT	7
 
+#define NUM_BUFFERS			4
+
 typedef struct rvcn_dec_message_index_s {
 	unsigned int	message_id;
 	unsigned int	offset;
@@ -500,6 +502,33 @@ typedef struct rvcn_dec_feedback_profiling_s {
 	unsigned int	dmaHwCrc32Value2;
 } rvcn_dec_feedback_profiling_t;
 
+struct radeon_decoder {
+	struct pipe_video_codec		base;
+
+	unsigned			stream_handle;
+	unsigned			stream_type;
+	unsigned			frame_number;
+
+	struct pipe_screen		*screen;
+	struct radeon_winsys		*ws;
+	struct radeon_winsys_cs		*cs;
+
+	void				*msg;
+	uint32_t			*fb;
+	uint8_t				*it;
+	void				*bs_ptr;
+
+	struct rvid_buffer		msg_fb_it_buffers[NUM_BUFFERS];
+	struct rvid_buffer		bs_buffers[NUM_BUFFERS];
+	struct rvid_buffer		dpb;
+	struct rvid_buffer		ctx;
+	struct rvid_buffer		sessionctx;
+
+	unsigned			bs_size;
+	unsigned			cur_buffer;
+	void				*render_pic_list[16];
+};
+
 struct pipe_video_codec *radeon_create_decoder(struct pipe_context *context,
 		const struct pipe_video_codec *templat);
 
-- 
2.7.4



More information about the mesa-dev mailing list