summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBoyuan Zhang <[email protected]>2018-10-17 15:03:18 -0400
committerLeo Liu <[email protected]>2018-10-23 08:50:02 -0400
commit6bc0a3a8347d2e8c5be920d921a898746dda4e84 (patch)
tree2656e81bf3620c32c5b87b44962a9783f1f7a4b9 /src
parent0f59e3f08885387dff2d510bffee86366f1c8099 (diff)
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 <[email protected]> Reviewed-by: Leo Liu <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/radeon/radeon_vcn_dec.c31
-rw-r--r--src/gallium/drivers/radeon/radeon_vcn_dec.h32
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 c2e22048cef..fbfef6d2736 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 7a07ad06376..c6c2a933ccb 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);