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@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
This commit is contained in:
Boyuan Zhang
2018-10-17 15:03:18 -04:00
committed by Leo Liu
parent 0f59e3f088
commit 6bc0a3a834
2 changed files with 32 additions and 31 deletions
@@ -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)
{
@@ -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);