diff options
Diffstat (limited to 'src/gallium/drivers/radeon/radeon_vce.c')
-rw-r--r-- | src/gallium/drivers/radeon/radeon_vce.c | 66 |
1 files changed, 33 insertions, 33 deletions
diff --git a/src/gallium/drivers/radeon/radeon_vce.c b/src/gallium/drivers/radeon/radeon_vce.c index 6b07a72f02c..0edbe0ffd19 100644 --- a/src/gallium/drivers/radeon/radeon_vce.c +++ b/src/gallium/drivers/radeon/radeon_vce.c @@ -198,7 +198,7 @@ static unsigned get_cpb_num(struct rvce_encoder *enc) /** * Get the slot for the currently encoded frame */ -struct rvce_cpb_slot *current_slot(struct rvce_encoder *enc) +struct rvce_cpb_slot *si_current_slot(struct rvce_encoder *enc) { return LIST_ENTRY(struct rvce_cpb_slot, enc->cpb_slots.prev, list); } @@ -206,7 +206,7 @@ struct rvce_cpb_slot *current_slot(struct rvce_encoder *enc) /** * Get the slot for L0 */ -struct rvce_cpb_slot *l0_slot(struct rvce_encoder *enc) +struct rvce_cpb_slot *si_l0_slot(struct rvce_encoder *enc) { return LIST_ENTRY(struct rvce_cpb_slot, enc->cpb_slots.next, list); } @@ -214,7 +214,7 @@ struct rvce_cpb_slot *l0_slot(struct rvce_encoder *enc) /** * Get the slot for L1 */ -struct rvce_cpb_slot *l1_slot(struct rvce_encoder *enc) +struct rvce_cpb_slot *si_l1_slot(struct rvce_encoder *enc) { return LIST_ENTRY(struct rvce_cpb_slot, enc->cpb_slots.next->next, list); } @@ -222,8 +222,8 @@ struct rvce_cpb_slot *l1_slot(struct rvce_encoder *enc) /** * Calculate the offsets into the CPB */ -void rvce_frame_offset(struct rvce_encoder *enc, struct rvce_cpb_slot *slot, - signed *luma_offset, signed *chroma_offset) +void si_vce_frame_offset(struct rvce_encoder *enc, struct rvce_cpb_slot *slot, + signed *luma_offset, signed *chroma_offset) { struct r600_common_screen *rscreen = (struct r600_common_screen *)enc->screen; unsigned pitch, vpitch, fsize; @@ -249,15 +249,15 @@ static void rvce_destroy(struct pipe_video_codec *encoder) struct rvce_encoder *enc = (struct rvce_encoder*)encoder; if (enc->stream_handle) { struct rvid_buffer fb; - rvid_create_buffer(enc->screen, &fb, 512, PIPE_USAGE_STAGING); + si_vid_create_buffer(enc->screen, &fb, 512, PIPE_USAGE_STAGING); enc->fb = &fb; enc->session(enc); enc->feedback(enc); enc->destroy(enc); flush(enc); - rvid_destroy_buffer(&fb); + si_vid_destroy_buffer(&fb); } - rvid_destroy_buffer(&enc->cpb); + si_vid_destroy_buffer(&enc->cpb); enc->ws->cs_destroy(enc->cs); FREE(enc->cpb_array); FREE(enc); @@ -278,7 +278,7 @@ static void rvce_begin_frame(struct pipe_video_codec *encoder, enc->pic.quant_b_frames != pic->quant_b_frames; enc->pic = *pic; - get_pic_param(enc, pic); + si_get_pic_param(enc, pic); enc->get_buffer(vid_buf->resources[0], &enc->handle, &enc->luma); enc->get_buffer(vid_buf->resources[1], NULL, &enc->chroma); @@ -291,8 +291,8 @@ static void rvce_begin_frame(struct pipe_video_codec *encoder, if (!enc->stream_handle) { struct rvid_buffer fb; - enc->stream_handle = rvid_alloc_stream_handle(); - rvid_create_buffer(enc->screen, &fb, 512, PIPE_USAGE_STAGING); + enc->stream_handle = si_vid_alloc_stream_handle(); + si_vid_create_buffer(enc->screen, &fb, 512, PIPE_USAGE_STAGING); enc->fb = &fb; enc->session(enc); enc->create(enc); @@ -300,7 +300,7 @@ static void rvce_begin_frame(struct pipe_video_codec *encoder, enc->feedback(enc); flush(enc); //dump_feedback(enc, &fb); - rvid_destroy_buffer(&fb); + si_vid_destroy_buffer(&fb); need_rate_control = false; } @@ -321,7 +321,7 @@ static void rvce_encode_bitstream(struct pipe_video_codec *encoder, enc->bs_size = destination->width0; *fb = enc->fb = CALLOC_STRUCT(rvid_buffer); - if (!rvid_create_buffer(enc->screen, enc->fb, 512, PIPE_USAGE_STAGING)) { + if (!si_vid_create_buffer(enc->screen, enc->fb, 512, PIPE_USAGE_STAGING)) { RVID_ERR("Can't create feedback buffer.\n"); return; } @@ -370,7 +370,7 @@ static void rvce_get_feedback(struct pipe_video_codec *encoder, enc->ws->buffer_unmap(fb->res->buf); } //dump_feedback(enc, fb); - rvid_destroy_buffer(fb); + si_vid_destroy_buffer(fb); FREE(fb); } @@ -390,10 +390,10 @@ static void rvce_cs_flush(void *ctx, unsigned flags, // just ignored } -struct pipe_video_codec *rvce_create_encoder(struct pipe_context *context, - const struct pipe_video_codec *templ, - struct radeon_winsys* ws, - rvce_get_buffer get_buffer) +struct pipe_video_codec *si_vce_create_encoder(struct pipe_context *context, + const struct pipe_video_codec *templ, + struct radeon_winsys* ws, + rvce_get_buffer get_buffer) { struct r600_common_screen *rscreen = (struct r600_common_screen *)context->screen; struct r600_common_context *rctx = (struct r600_common_context*)context; @@ -406,7 +406,7 @@ struct pipe_video_codec *rvce_create_encoder(struct pipe_context *context, RVID_ERR("Kernel doesn't supports VCE!\n"); return NULL; - } else if (!rvce_is_fw_version_supported(rscreen)) { + } else if (!si_vce_is_fw_version_supported(rscreen)) { RVID_ERR("Unsupported VCE fw version loaded!\n"); return NULL; } @@ -479,7 +479,7 @@ struct pipe_video_codec *rvce_create_encoder(struct pipe_context *context, cpb_size += RVCE_MAX_AUX_BUFFER_NUM * RVCE_MAX_BITSTREAM_OUTPUT_ROW_SIZE * 2; tmp_buf->destroy(tmp_buf); - if (!rvid_create_buffer(enc->screen, &enc->cpb, cpb_size, PIPE_USAGE_DEFAULT)) { + if (!si_vid_create_buffer(enc->screen, &enc->cpb, cpb_size, PIPE_USAGE_DEFAULT)) { RVID_ERR("Can't create CPB buffer.\n"); goto error; } @@ -492,29 +492,29 @@ struct pipe_video_codec *rvce_create_encoder(struct pipe_context *context, switch (rscreen->info.vce_fw_version) { case FW_40_2_2: - radeon_vce_40_2_2_init(enc); - get_pic_param = radeon_vce_40_2_2_get_param; + si_vce_40_2_2_init(enc); + si_get_pic_param = si_vce_40_2_2_get_param; break; case FW_50_0_1: case FW_50_1_2: case FW_50_10_2: case FW_50_17_3: - radeon_vce_50_init(enc); - get_pic_param = radeon_vce_50_get_param; + si_vce_50_init(enc); + si_get_pic_param = si_vce_50_get_param; break; case FW_52_0_3: case FW_52_4_3: case FW_52_8_3: - radeon_vce_52_init(enc); - get_pic_param = radeon_vce_52_get_param; + si_vce_52_init(enc); + si_get_pic_param = si_vce_52_get_param; break; default: if ((rscreen->info.vce_fw_version & (0xff << 24)) == FW_53) { - radeon_vce_52_init(enc); - get_pic_param = radeon_vce_52_get_param; + si_vce_52_init(enc); + si_get_pic_param = si_vce_52_get_param; } else goto error; } @@ -525,7 +525,7 @@ error: if (enc->cs) enc->ws->cs_destroy(enc->cs); - rvid_destroy_buffer(&enc->cpb); + si_vid_destroy_buffer(&enc->cpb); FREE(enc->cpb_array); FREE(enc); @@ -535,7 +535,7 @@ error: /** * check if kernel has the right fw version loaded */ -bool rvce_is_fw_version_supported(struct r600_common_screen *rscreen) +bool si_vce_is_fw_version_supported(struct r600_common_screen *rscreen) { switch (rscreen->info.vce_fw_version) { case FW_40_2_2: @@ -558,9 +558,9 @@ bool rvce_is_fw_version_supported(struct r600_common_screen *rscreen) /** * Add the buffer as relocation to the current command submission */ -void rvce_add_buffer(struct rvce_encoder *enc, struct pb_buffer *buf, - enum radeon_bo_usage usage, enum radeon_bo_domain domain, - signed offset) +void si_vce_add_buffer(struct rvce_encoder *enc, struct pb_buffer *buf, + enum radeon_bo_usage usage, enum radeon_bo_domain domain, + signed offset) { int reloc_idx; |