mirror of
https://github.com/nyanmisaka/mpp.git
synced 2025-10-08 02:20:06 +08:00
[all]: fix compiling error and coding style formating
git-svn-id: https://10.10.10.66:8443/svn/MediaProcessPlatform/trunk/mpp@354 6e48237b-75ef-9749-8fc9-41990f28c85a
This commit is contained in:
@@ -1616,7 +1616,8 @@ MPP_RET h265d_prepare(void *ctx, MppPacket pkt, HalDecTask *task)
|
||||
|
||||
}
|
||||
|
||||
MPP_RET h265d_get_stream(void *ctx, RK_U8 **buf, RK_S32 *size){
|
||||
MPP_RET h265d_get_stream(void *ctx, RK_U8 **buf, RK_S32 *size)
|
||||
{
|
||||
MPP_RET ret = MPP_OK;
|
||||
H265dContext_t *h265dctx = (H265dContext_t *)ctx;
|
||||
HEVCContext *s = h265dctx->priv_data;
|
||||
@@ -1625,7 +1626,8 @@ MPP_RET h265d_get_stream(void *ctx, RK_U8 **buf, RK_S32 *size){
|
||||
return ret;
|
||||
}
|
||||
|
||||
MPP_RET h265d_set_compare_info(void *ctx, void *info){
|
||||
MPP_RET h265d_set_compare_info(void *ctx, void *info)
|
||||
{
|
||||
MPP_RET ret = MPP_OK;
|
||||
H265dContext_t *h265dctx = (H265dContext_t *)ctx;
|
||||
h265dctx->compare_info = info;
|
||||
@@ -1658,7 +1660,7 @@ MPP_RET h265d_parse(void *ctx, HalDecTask *task)
|
||||
s->task->syntax.number = 1;
|
||||
s->task->valid = 1;
|
||||
if (s->eos) {
|
||||
s->task->flags |= MPP_PACKET_FLAG_EOS;
|
||||
s->task->flags.eos = 1;
|
||||
}
|
||||
} else {
|
||||
if (s->eos) {
|
||||
|
@@ -332,7 +332,7 @@ void *mpp_dec_hal_thread(void *data)
|
||||
mpp_buf_slot_clr_flag(frame_slots, index, SLOT_HAL_INPUT);
|
||||
}
|
||||
|
||||
if (task_dec->eos) {
|
||||
if (task_dec->flags.eos) {
|
||||
mpp_dec_flush(dec);
|
||||
}
|
||||
|
||||
|
@@ -196,8 +196,7 @@ MPP_RET hal_task_info_init(HalTaskInfo *task, MppCtxType type)
|
||||
if (MPP_CTX_DEC == type) {
|
||||
HalDecTask *p = &task->dec;
|
||||
p->valid = 0;
|
||||
p->eos = 0;
|
||||
p->info_change = 0;
|
||||
p->flags.val = 0;
|
||||
p->input_packet = NULL;
|
||||
p->output = -1;
|
||||
p->input = -1;
|
||||
|
@@ -73,11 +73,19 @@ typedef struct MppSyntax_t {
|
||||
* | | |
|
||||
* +----------------------+ +----v----+
|
||||
*/
|
||||
|
||||
typedef union HalDecTaskFlag_t {
|
||||
RK_U32 val;
|
||||
struct {
|
||||
RK_U32 eos : 1;
|
||||
RK_U32 info_change : 1;
|
||||
};
|
||||
} HalDecTaskFlag;
|
||||
|
||||
typedef struct HalDecTask_t {
|
||||
// set by parser to signal that it is valid
|
||||
RK_U32 valid;
|
||||
RK_U32 eos;
|
||||
RK_U32 info_change;
|
||||
HalDecTaskFlag flags;
|
||||
|
||||
// current tesk protocol syntax information
|
||||
MppSyntax syntax;
|
||||
|
@@ -54,8 +54,8 @@ MPP_RET hal_h264d_init(void *hal, MppHalCfg *cfg)
|
||||
|
||||
p_api = &p_hal->hal_api;
|
||||
//!< choose hard mode
|
||||
switch (cfg->hard_mode) {
|
||||
case HAL_HARD_RKVDEC:
|
||||
switch (cfg->device_id) {
|
||||
case HAL_RKVDEC:
|
||||
p_api->init = rkv_h264d_init;
|
||||
p_api->deinit = rkv_h264d_deinit;
|
||||
p_api->reg_gen = rkv_h264d_gen_regs;
|
||||
@@ -65,7 +65,7 @@ MPP_RET hal_h264d_init(void *hal, MppHalCfg *cfg)
|
||||
p_api->flush = rkv_h264d_flush;
|
||||
p_api->control = rkv_h264d_control;
|
||||
break;
|
||||
case HAL_HARD_VDPU:
|
||||
case HAL_VDPU:
|
||||
p_api->init = vdpu_h264d_init;
|
||||
p_api->deinit = vdpu_h264d_deinit;
|
||||
p_api->reg_gen = vdpu_h264d_gen_regs;
|
||||
@@ -74,12 +74,6 @@ MPP_RET hal_h264d_init(void *hal, MppHalCfg *cfg)
|
||||
p_api->reset = vdpu_h264d_reset;
|
||||
p_api->flush = vdpu_h264d_flush;
|
||||
p_api->control = vdpu_h264d_control;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@@ -94,7 +94,7 @@ static MPP_RET decoder_init(MppDec *pApi)
|
||||
hal_cfg.type = MPP_CTX_DEC;
|
||||
hal_cfg.coding = pApi->coding;
|
||||
hal_cfg.work_mode = HAL_MODE_LIBVPU;
|
||||
hal_cfg.hard_mode = HAL_HARD_RKVDEC;
|
||||
hal_cfg.device_id = HAL_RKVDEC;
|
||||
hal_cfg.frame_slots = pApi->frame_slots;
|
||||
hal_cfg.packet_slots = pApi->packet_slots;
|
||||
hal_cfg.task_count = parser_cfg.task_count;
|
||||
|
Reference in New Issue
Block a user