Mesa (master): radeon/vcn: move radeon decoder define to header file

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Oct 23 13:30:53 UTC 2018


Module: Mesa
Branch: master
Commit: 6bc0a3a8347d2e8c5be920d921a898746dda4e84
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=6bc0a3a8347d2e8c5be920d921a898746dda4e84

Author: Boyuan Zhang <boyuan.zhang at amd.com>
Date:   Wed Oct 17 15:03:18 2018 -0400

radeon/vcn: move radeon decoder define to header file

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>
Reviewed-by: Leo Liu <leo.liu at amd.com>

---

 src/gallium/drivers/radeon/radeon_vcn_dec.c | 31 ----------------------------
 src/gallium/drivers/radeon/radeon_vcn_dec.h | 32 +++++++++++++++++++++++++++++
 2 files changed, 32 insertions(+), 31 deletions(-)

diff --git a/src/gallium/drivers/radeon/radeon_vcn_dec.c b/src/gallium/drivers/radeon/radeon_vcn_dec.c
index c2e22048ce..fbfef6d273 100644
--- a/src/gallium/drivers/radeon/radeon_vcn_dec.c
+++ b/src/gallium/drivers/radeon/radeon_vcn_dec.c
@@ -51,42 +51,11 @@
 #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
 #define NUM_VP9_REFS			8
 
-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_cmdbuf		*cs;
-
-	void				*msg;
-	uint32_t			*fb;
-	uint8_t				*it;
-	uint8_t				*probs;
-	void				*bs_ptr;
-
-	struct rvid_buffer		msg_fb_it_probs_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];
-	bool				show_frame;
-	unsigned			ref_idx;
-};
-
 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 7a07ad0637..c6c2a933cc 100644
--- a/src/gallium/drivers/radeon/radeon_vcn_dec.h
+++ b/src/gallium/drivers/radeon/radeon_vcn_dec.h
@@ -108,6 +108,8 @@
 
 #define RDECODE_SPS_INFO_H264_EXTENSION_SUPPORT_FLAG_SHIFT	7
 
+#define NUM_BUFFERS			4
+
 #define RDECODE_VP9_PROBS_DATA_SIZE			2304
 
 /* VP9 Frame header flags */
@@ -639,6 +641,36 @@ typedef struct rvcn_dec_vp9_probs_segment_s {
     };
 } rvcn_dec_vp9_probs_segment_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_cmdbuf		*cs;
+
+	void				*msg;
+	uint32_t			*fb;
+	uint8_t				*it;
+	uint8_t				*probs;
+	void				*bs_ptr;
+
+	struct rvid_buffer		msg_fb_it_probs_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];
+	bool				show_frame;
+	unsigned			ref_idx;
+};
+
 struct pipe_video_codec *radeon_create_decoder(struct pipe_context *context,
 		const struct pipe_video_codec *templat);
 




More information about the mesa-commit mailing list