[hal_task]: use hal_task to replace mpp_syntax

git-svn-id: https://10.10.10.66:8443/svn/MediaProcessPlatform/trunk/mpp@205 6e48237b-75ef-9749-8fc9-41990f28c85a
This commit is contained in:
ChenHengming
2008-01-29 21:45:11 +00:00
parent 6bc369d41b
commit 7a2fee57a4
13 changed files with 138 additions and 104 deletions

View File

@@ -22,41 +22,45 @@
MPP_RET h264d_init(void *decoder, MppParserInitCfg *init) MPP_RET h264d_init(void *decoder, MppParserInitCfg *init)
{ {
(void)decoder;
(void)init;
return MPP_OK; return MPP_OK;
} }
MPP_RET h264d_deinit(void *decoder) MPP_RET h264d_deinit(void *decoder)
{ {
(void)decoder;
return MPP_OK; return MPP_OK;
} }
MPP_RET h264d_reset(void *decoder) MPP_RET h264d_reset(void *decoder)
{ {
(void)decoder;
return MPP_OK; return MPP_OK;
} }
MPP_RET h264d_flush(void *decoder) MPP_RET h264d_flush(void *decoder)
{ {
(void)decoder;
return MPP_OK; return MPP_OK;
} }
MPP_RET h264d_control(void *decoder, RK_S32 cmd_type, void *param) MPP_RET h264d_control(void *decoder, RK_S32 cmd_type, void *param)
{ {
(void)decoder;
(void)cmd_type;
(void)param;
return MPP_OK; return MPP_OK;
} }
MPP_RET h264d_parser(void *decoder, MppPacket pkt, MppSyntax *syn) MPP_RET h264d_parser(void *decoder, MppPacket pkt, HalDecTask *task)
{ {
(void)decoder;
(void)pkt;
(void)task;
return MPP_OK; return MPP_OK;
} }

View File

@@ -30,7 +30,7 @@ MPP_RET h264d_deinit (void *decoder);
MPP_RET h264d_reset (void *decoder); MPP_RET h264d_reset (void *decoder);
MPP_RET h264d_flush (void *decoder); MPP_RET h264d_flush (void *decoder);
MPP_RET h264d_control(void *decoder, RK_S32 cmd_type, void *param); MPP_RET h264d_control(void *decoder, RK_S32 cmd_type, void *param);
MPP_RET h264d_parser (void *decoder, MppPacket pkt, MppSyntax *syn); MPP_RET h264d_parser (void *decoder, MppPacket pkt, HalDecTask *task);
#ifdef __cplusplus #ifdef __cplusplus
} }

View File

@@ -59,7 +59,7 @@ typedef struct {
MPP_RET (*init)(void *ctx, MppParserInitCfg *cfg); MPP_RET (*init)(void *ctx, MppParserInitCfg *cfg);
MPP_RET (*deinit)(void *ctx); MPP_RET (*deinit)(void *ctx);
MPP_RET (*parse)(void *ctx, MppPacket pkt, MppSyntax *syn); MPP_RET (*parse)(void *ctx, MppPacket pkt, HalDecTask *task);
MPP_RET (*reset)(void *ctx); MPP_RET (*reset)(void *ctx);
MPP_RET (*flush)(void *ctx); MPP_RET (*flush)(void *ctx);
@@ -72,11 +72,12 @@ struct MppDec_t {
const MppDecParser *parser_api; const MppDecParser *parser_api;
void *parser_ctx; void *parser_ctx;
MppHal *hal_ctx; const MppHalApi *hal_api;
MppHal hal_ctx;
// common resource // common resource
MppBufSlots slots; MppBufSlots slots;
HalTaskGroup syntaxes; HalTaskGroup tasks;
}; };

View File

@@ -38,9 +38,9 @@ static const MppDecParser *parsers[] = {
#define MPP_TEST_FRAME_SIZE SZ_1M #define MPP_TEST_FRAME_SIZE SZ_1M
static MPP_RET mpp_dec_parse(MppDec *dec, MppPacket pkt, MppSyntax *syn) static MPP_RET mpp_dec_parse(MppDec *dec, MppPacket pkt, HalTask *task)
{ {
return dec->parser_api->parse(dec->parser_ctx, pkt, syn); return dec->parser_api->parse(dec->parser_ctx, pkt, &task->dec);
} }
void *mpp_dec_parser_thread(void *data) void *mpp_dec_parser_thread(void *data)
@@ -50,10 +50,9 @@ void *mpp_dec_parser_thread(void *data)
MppThread *hal = mpp->mThreadHal; MppThread *hal = mpp->mThreadHal;
MppDec *dec = mpp->mDec; MppDec *dec = mpp->mDec;
mpp_list *packets = mpp->mPackets; mpp_list *packets = mpp->mPackets;
MppHal *hal_ctx = dec->hal_ctx;
MppPacketImpl packet; MppPacketImpl packet;
MppSyntax local_syntax; HalTask local_task;
HalTaskHnd syntax = NULL; HalTaskHnd syntax = NULL;
RK_U32 packet_ready = 0; RK_U32 packet_ready = 0;
RK_U32 packet_parsed = 0; RK_U32 packet_parsed = 0;
RK_U32 syntax_ready = 0; RK_U32 syntax_ready = 0;
@@ -94,14 +93,14 @@ void *mpp_dec_parser_thread(void *data)
* buffer usage informatioin * buffer usage informatioin
*/ */
if (!packet_parsed) { if (!packet_parsed) {
mpp_dec_parse(dec, (MppPacket)&packet, &local_syntax); mpp_dec_parse(dec, (MppPacket)&packet, &local_task);
packet_parsed = 1; packet_parsed = 1;
} }
if (!syntax_ready) { if (!syntax_ready) {
hal_task_get_hnd(dec->syntaxes, 0, &syntax); hal_task_get_hnd(dec->tasks, 0, &syntax);
if (syntax) { if (syntax) {
hal_task_set_info(syntax, &local_syntax); hal_task_set_info(syntax, &local_task);
syntax_ready = 1; syntax_ready = 1;
} }
} }
@@ -152,31 +151,30 @@ void *mpp_dec_hal_thread(void *data)
Mpp *mpp = (Mpp*)data; Mpp *mpp = (Mpp*)data;
MppThread *hal = mpp->mThreadHal; MppThread *hal = mpp->mThreadHal;
MppDec *dec = mpp->mDec; MppDec *dec = mpp->mDec;
MppHal *hal_ctx = dec->hal_ctx;
mpp_list *frames = mpp->mFrames; mpp_list *frames = mpp->mFrames;
HalTaskHnd syntax = NULL; HalTaskHnd syntax = NULL;
MppSyntax local_syntax; HalTask local_task;
while (MPP_THREAD_RUNNING == hal->get_status()) { while (MPP_THREAD_RUNNING == hal->get_status()) {
/* /*
* hal thread wait for dxva interface intput firt * hal thread wait for dxva interface intput firt
*/ */
hal->lock(); hal->lock();
if (0 == hal_task_get_hnd(dec->syntaxes, 1, &syntax)) if (0 == hal_task_get_hnd(dec->tasks, 1, &syntax))
hal->wait(); hal->wait();
hal->unlock(); hal->unlock();
// get_config // get_config
// register genertation // register genertation
if (NULL == syntax) if (NULL == syntax)
hal_task_get_hnd(dec->syntaxes, 1, &syntax); hal_task_get_hnd(dec->tasks, 1, &syntax);
if (NULL == syntax) if (NULL == syntax)
continue; continue;
mpp->mTaskGetCount++; mpp->mTaskGetCount++;
hal_task_get_info(dec->syntaxes, &local_syntax); hal_task_get_info(dec->tasks, &local_task);
// hal->mpp_hal_reg_gen(current); // hal->mpp_hal_reg_gen(current);
hal_task_set_used(syntax, 0); hal_task_set_used(syntax, 0);
@@ -240,9 +238,14 @@ MPP_RET mpp_dec_init(MppDec **dec, MppCodingType coding)
} }
// init hal first to get the syntax group // init hal first to get the syntax group
MppHalCfg hal_cfg; MppHalCfg hal_cfg = {
MPP_CTX_DEC,
MPP_VIDEO_CodingAVC,
NULL,
0,
};
mpp_hal_init(&p->hal_ctx, &hal_cfg); mpp_hal_init(&p->hal_ctx, &hal_cfg);
p->syntaxes = hal_cfg.syntaxes; p->tasks = hal_cfg.tasks;
// use syntax and dpb slot to init parser // use syntax and dpb slot to init parser
MppParserInitCfg parser_cfg = { MppParserInitCfg parser_cfg = {

View File

@@ -69,7 +69,7 @@ void *mpp_enc_hal_thread(void *data)
// get_config // get_config
// register genertation // register genertation
if (tasks->list_size()) { if (tasks->list_size()) {
MppHalDecTask *task; HalDecTask *task;
mpp->mTasks->del_at_head(&task, sizeof(task)); mpp->mTasks->del_at_head(&task, sizeof(task));
mpp->mTaskGetCount++; mpp->mTaskGetCount++;

View File

@@ -19,31 +19,37 @@
#include "mpp_mem.h" #include "mpp_mem.h"
#include "mpp_log.h" #include "mpp_log.h"
#include "mpp_thread.h" #include "mpp_list.h"
#include "hal_task.h" #include "hal_task.h"
typedef struct MppSyntaxImpl_t MppSyntaxImpl; typedef struct HalTaskImpl_t HalTaskImpl;
typedef struct MppSyntaxGroupImpl_t MppSyntaxGroupImpl; typedef struct HalTaskGroupImpl_t HalTaskGroupImpl;
struct MppSyntaxImpl_t { struct HalTaskImpl_t {
struct list_head list; struct list_head list;
MppSyntaxGroupImpl *group; HalTaskGroupImpl *group;
RK_U32 used; RK_U32 used;
MppSyntax syntax; HalTask task;
}; };
struct MppSyntaxGroupImpl_t { struct HalTaskGroupImpl_t {
struct list_head list_unused; struct list_head list_unused;
struct list_head list_used; struct list_head list_used;
Mutex *lock; Mutex *lock;
MppSyntaxImpl *node; MppCtxType type;
HalTaskImpl *node;
}; };
MPP_RET hal_task_group_init(HalTaskGroup *group, RK_U32 count) static size_t get_task_size(HalTaskGroupImpl *group)
{ {
MppSyntaxGroupImpl *p = mpp_malloc_size(MppSyntaxGroupImpl, return (group->type == MPP_CTX_DEC) ? (sizeof(HalDecTask)) : (sizeof(HalEncTask));
sizeof(MppSyntaxGroupImpl) + count * sizeof(MppSyntaxImpl)); }
MPP_RET hal_task_group_init(HalTaskGroup *group, MppCtxType type, RK_U32 count)
{
HalTaskGroupImpl *p = mpp_malloc_size(HalTaskGroupImpl,
sizeof(HalTaskGroupImpl) + count * sizeof(HalTaskImpl));
if (NULL == p) { if (NULL == p) {
*group = NULL; *group = NULL;
mpp_err_f("malloc group failed\n"); mpp_err_f("malloc group failed\n");
@@ -53,7 +59,8 @@ MPP_RET hal_task_group_init(HalTaskGroup *group, RK_U32 count)
INIT_LIST_HEAD(&p->list_unused); INIT_LIST_HEAD(&p->list_unused);
INIT_LIST_HEAD(&p->list_used); INIT_LIST_HEAD(&p->list_used);
p->lock = new Mutex(); p->lock = new Mutex();
p->node = (MppSyntaxImpl*)(p+1); p->node = (HalTaskImpl*)(p+1);
p->type = type;
Mutex::Autolock auto_lock(p->lock); Mutex::Autolock auto_lock(p->lock);
RK_U32 i; RK_U32 i;
for (i = 0; i < count; i++) { for (i = 0; i < count; i++) {
@@ -66,7 +73,7 @@ MPP_RET hal_task_group_init(HalTaskGroup *group, RK_U32 count)
MPP_RET hal_task_group_deinit(HalTaskGroup group) MPP_RET hal_task_group_deinit(HalTaskGroup group)
{ {
MppSyntaxGroupImpl *p = (MppSyntaxGroupImpl *)group; HalTaskGroupImpl *p = (HalTaskGroupImpl *)group;
if (p->lock) { if (p->lock) {
delete p->lock; delete p->lock;
p->lock = NULL; p->lock = NULL;
@@ -77,7 +84,7 @@ MPP_RET hal_task_group_deinit(HalTaskGroup group)
MPP_RET hal_task_get_hnd(HalTaskGroup group, RK_U32 used, HalTaskHnd *hnd) MPP_RET hal_task_get_hnd(HalTaskGroup group, RK_U32 used, HalTaskHnd *hnd)
{ {
MppSyntaxGroupImpl *p = (MppSyntaxGroupImpl *)group; HalTaskGroupImpl *p = (HalTaskGroupImpl *)group;
Mutex::Autolock auto_lock(p->lock); Mutex::Autolock auto_lock(p->lock);
struct list_head *head = (used) ? (&p->list_used) : (&p->list_unused); struct list_head *head = (used) ? (&p->list_used) : (&p->list_unused);
@@ -86,14 +93,14 @@ MPP_RET hal_task_get_hnd(HalTaskGroup group, RK_U32 used, HalTaskHnd *hnd)
return MPP_NOK; return MPP_NOK;
} }
*hnd = list_entry(head->next, MppSyntaxImpl, list); *hnd = list_entry(head->next, HalTaskImpl, list);
return MPP_OK; return MPP_OK;
} }
MPP_RET hal_task_set_used(HalTaskHnd hnd, RK_U32 used) MPP_RET hal_task_set_used(HalTaskHnd hnd, RK_U32 used)
{ {
MppSyntaxImpl *impl = (MppSyntaxImpl *)hnd; HalTaskImpl *impl = (HalTaskImpl *)hnd;
MppSyntaxGroupImpl *group = impl->group; HalTaskGroupImpl *group = impl->group;
Mutex::Autolock auto_lock(group->lock); Mutex::Autolock auto_lock(group->lock);
struct list_head *head = (used) ? (&group->list_used) : (&group->list_unused); struct list_head *head = (used) ? (&group->list_used) : (&group->list_unused);
list_del_init(&impl->list); list_del_init(&impl->list);
@@ -101,17 +108,17 @@ MPP_RET hal_task_set_used(HalTaskHnd hnd, RK_U32 used)
return MPP_OK; return MPP_OK;
} }
MPP_RET hal_task_get_info(HalTaskHnd hnd, MppSyntax *syntax) MPP_RET hal_task_get_info(HalTaskHnd hnd, HalTask *task)
{ {
MppSyntaxImpl *impl = (MppSyntaxImpl *)hnd; HalTaskImpl *impl = (HalTaskImpl *)hnd;
memcpy(syntax, &impl->syntax, sizeof(impl->syntax)); memcpy(task, &impl->task, get_task_size(impl->group));
return MPP_OK; return MPP_OK;
} }
MPP_RET hal_task_set_info(HalTaskHnd hnd, MppSyntax *syntax) MPP_RET hal_task_set_info(HalTaskHnd hnd, HalTask *task)
{ {
MppSyntaxImpl *impl = (MppSyntaxImpl *)hnd; HalTaskImpl *impl = (HalTaskImpl *)hnd;
memcpy(&impl->syntax, syntax, sizeof(impl->syntax)); memcpy(&impl->task, task, get_task_size(impl->group));
return MPP_OK; return MPP_OK;
} }

View File

@@ -334,9 +334,9 @@ extern const MppHalApi api_h264d_hal;
MPP_RET hal_h264d_init (void **hal, MppHalCfg *cfg); MPP_RET hal_h264d_init (void **hal, MppHalCfg *cfg);
MPP_RET hal_h264d_deinit (void *hal); MPP_RET hal_h264d_deinit (void *hal);
MPP_RET hal_h264d_gen_regs(void *hal, MppSyntax *syn); MPP_RET hal_h264d_gen_regs(void *hal, HalTask *task);
MPP_RET hal_h264d_start (void *hal, MppHalDecTask task); MPP_RET hal_h264d_start (void *hal, HalTask *task);
MPP_RET hal_h264d_wait (void *hal, MppHalDecTask task); MPP_RET hal_h264d_wait (void *hal, HalTask *task);
MPP_RET hal_h264d_reset (void *hal); MPP_RET hal_h264d_reset (void *hal);
MPP_RET hal_h264d_flush (void *hal); MPP_RET hal_h264d_flush (void *hal);
MPP_RET hal_h264d_control (void *hal, RK_S32 cmd_type, void *param); MPP_RET hal_h264d_control (void *hal, RK_S32 cmd_type, void *param);

View File

@@ -18,8 +18,7 @@
#ifndef __HAL_TASK__ #ifndef __HAL_TASK__
#define __HAL_TASK__ #define __HAL_TASK__
#include "mpp_err.h" #include "rk_mpi.h"
#include "mpp_list.h"
#define MAX_DEC_REF_NUM 17 #define MAX_DEC_REF_NUM 17
@@ -73,7 +72,7 @@ typedef struct {
RK_S32 output; RK_S32 output;
// current task reference slot index, -1 for unused // current task reference slot index, -1 for unused
RK_S32 refer[MAX_DEC_REF_NUM]; RK_S32 refer[MAX_DEC_REF_NUM];
} MppHalDecTask; } HalDecTask;
typedef struct { typedef struct {
// current tesk protocol syntax information // current tesk protocol syntax information
@@ -88,7 +87,12 @@ typedef struct {
RK_S32 refer; RK_S32 refer;
// current task recon index // current task recon index
RK_S32 recon; RK_S32 recon;
} MppHalEncTask; } HalEncTask;
typedef union {
HalDecTask dec;
HalEncTask enc;
} HalTask;
typedef void* HalTaskHnd; typedef void* HalTaskHnd;
typedef void* HalTaskGroup; typedef void* HalTaskGroup;
@@ -100,7 +104,7 @@ extern "C" {
/* /*
* group init / deinit will be called by hal * group init / deinit will be called by hal
*/ */
MPP_RET hal_task_group_init(HalTaskGroup *group, RK_U32 count); MPP_RET hal_task_group_init(HalTaskGroup *group, MppCtxType type, RK_U32 count);
MPP_RET hal_task_group_deinit(HalTaskGroup group); MPP_RET hal_task_group_deinit(HalTaskGroup group);
/* /*
@@ -125,8 +129,8 @@ MPP_RET hal_task_group_deinit(HalTaskGroup group);
MPP_RET hal_task_get_hnd(HalTaskGroup group, RK_U32 used, HalTaskHnd *hnd); MPP_RET hal_task_get_hnd(HalTaskGroup group, RK_U32 used, HalTaskHnd *hnd);
MPP_RET hal_task_set_used(HalTaskHnd hnd, RK_U32 used); MPP_RET hal_task_set_used(HalTaskHnd hnd, RK_U32 used);
MPP_RET hal_task_get_info(HalTaskHnd hnd, MppSyntax *syntax); MPP_RET hal_task_get_info(HalTaskHnd hnd, HalTask *task);
MPP_RET hal_task_set_info(HalTaskHnd hnd, MppSyntax *syntax); MPP_RET hal_task_set_info(HalTaskHnd hnd, HalTask *task);
#ifdef __cplusplus #ifdef __cplusplus
} }

View File

@@ -28,51 +28,40 @@ typedef struct MppHalCfg_t {
MppCodingType coding; MppCodingType coding;
// output // output
HalTaskGroup syntaxes; HalTaskGroup tasks;
RK_U32 syntax_count; RK_U32 task_count;
} MppHalCfg; } MppHalCfg;
typedef struct { typedef struct {
RK_U32 ctx_size; RK_U32 ctx_size;
MPP_RET (*init)(void **ctx, MppHalCfg *cfg); MPP_RET (*init)(void *ctx, MppHalCfg *cfg);
MPP_RET (*deinit)(void *ctx); MPP_RET (*deinit)(void *ctx);
// parser syntax process function // parser syntax process function
MPP_RET (*reg_gen)(void *ctx, MppSyntax *syn); MPP_RET (*reg_gen)(void *ctx, HalTask *syn);
// hw operation function // hw operation function
MPP_RET (*start)(void *ctx, MppHalDecTask task); MPP_RET (*start)(void *ctx, HalTask *task);
MPP_RET (*wait)(void *ctx, MppHalDecTask task); MPP_RET (*wait)(void *ctx, HalTask *task);
MPP_RET (*reset)(void *ctx); MPP_RET (*reset)(void *ctx);
MPP_RET (*flush)(void *ctx); MPP_RET (*flush)(void *ctx);
MPP_RET (*control)(void *ctx, RK_S32 cmd, void *param); MPP_RET (*control)(void *ctx, RK_S32 cmd, void *param);
} MppHalApi; } MppHalApi;
typedef struct { typedef void* MppHal;
MppCodingType mCoding;
void *mHalCtx;
MppSyntax mSyn[2];
MppHalApi *api;
HalTaskGroup syntaxes;
RK_U32 syntax_count;
} MppHal;
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
MPP_RET mpp_hal_init(MppHal **ctx, MppHalCfg *cfg); MPP_RET mpp_hal_init(MppHal *ctx, MppHalCfg *cfg);
MPP_RET mpp_hal_deinit(MppHal *ctx); MPP_RET mpp_hal_deinit(MppHal ctx);
MPP_RET mpp_hal_reg_gen(MppHal *ctx, MppHalDecTask *task); MPP_RET mpp_hal_reg_gen(MppHal ctx, HalDecTask *task);
MPP_RET mpp_hal_hw_start(MppHal *ctx, MppHalDecTask *task); MPP_RET mpp_hal_hw_start(MppHal ctx, HalDecTask *task);
MPP_RET mpp_hal_hw_wait(MppHal *ctx, MppHalDecTask *task); MPP_RET mpp_hal_hw_wait(MppHal ctx, HalDecTask *task);
#ifdef __cplusplus #ifdef __cplusplus
} }

View File

@@ -23,46 +23,72 @@
#include "mpp_hal.h" #include "mpp_hal.h"
#include "mpp_frame_impl.h" #include "mpp_frame_impl.h"
typedef struct {
MppCodingType mCoding;
MPP_RET mpp_hal_init(MppHal **ctx, MppHalCfg *cfg) void *mHalCtx;
MppHalApi *api;
HalTaskGroup tasks;
RK_U32 task_count;
} MppHalImpl;
MPP_RET mpp_hal_init(MppHal *ctx, MppHalCfg *cfg)
{ {
if (NULL == ctx || NULL == cfg) { if (NULL == ctx || NULL == cfg) {
mpp_err_f("found NULL input ctx %p cfg %p\n", ctx, cfg); mpp_err_f("found NULL input ctx %p cfg %p\n", ctx, cfg);
return MPP_ERR_NULL_PTR; return MPP_ERR_NULL_PTR;
} }
*ctx = NULL;
MppHal *p = mpp_calloc(MppHal, 1); MppHalImpl *p = mpp_calloc(MppHalImpl, 1);
if (NULL == p) {
mpp_err_f("malloc failed\n");
return MPP_ERR_MALLOC;
}
cfg->syntax_count = 2; cfg->task_count = 2;
hal_task_group_init(&cfg->syntaxes, cfg->syntax_count); MPP_RET ret = hal_task_group_init(&cfg->tasks, cfg->type, cfg->task_count);
p->syntaxes = cfg->syntaxes; if (ret) {
p->syntax_count = cfg->syntax_count; mpp_err_f("hal_task_group_init failed ret %d\n", ret);
mpp_free(p);
return MPP_ERR_MALLOC;
}
p->tasks = cfg->tasks;
p->task_count = cfg->task_count;
*ctx = p; *ctx = p;
return MPP_OK; return MPP_OK;
} }
MPP_RET mpp_hal_deinit(MppHal *ctx) MPP_RET mpp_hal_deinit(MppHal ctx)
{ {
hal_task_group_deinit(ctx->syntaxes); if (NULL == ctx) {
mpp_free(ctx); mpp_err_f("found NULL input\n");
return MPP_ERR_NULL_PTR;
}
MppHalImpl *p = (MppHalImpl*)ctx;
hal_task_group_deinit(p->tasks);
mpp_free(p);
return MPP_OK; return MPP_OK;
} }
MPP_RET mpp_hal_reg_gen(MppHal *ctx, MppHalDecTask *task) MPP_RET mpp_hal_reg_gen(MppHal ctx, HalDecTask *task)
{ {
(void)ctx; (void)ctx;
(void)task; (void)task;
return MPP_OK; return MPP_OK;
} }
MPP_RET mpp_hal_hw_start(MppHal *ctx, MppHalDecTask *task) MPP_RET mpp_hal_hw_start(MppHal ctx, HalDecTask *task)
{ {
(void)ctx; (void)ctx;
(void)task; (void)task;
return MPP_OK; return MPP_OK;
} }
MPP_RET mpp_hal_hw_wait(MppHal *ctx, MppHalDecTask *task) MPP_RET mpp_hal_hw_wait(MppHal ctx, HalDecTask *task)
{ {
(void)ctx; (void)ctx;
(void)task; (void)task;

View File

@@ -29,16 +29,16 @@ MPP_RET hal_h264d_deinit(void *hal)
return MPP_OK; return MPP_OK;
} }
MPP_RET hal_h264d_gen_regs(void *hal, MppSyntax *syn) MPP_RET hal_h264d_gen_regs(void *hal, HalTask *task)
{ {
return MPP_OK; return MPP_OK;
} }
MPP_RET hal_h264d_start(void *hal, MppHalDecTask task) MPP_RET hal_h264d_start(void *hal, HalTask *task)
{ {
return MPP_OK; return MPP_OK;
} }
MPP_RET hal_h264d_wait(void *hal, MppHalDecTask task) MPP_RET hal_h264d_wait(void *hal, HalTask *task)
{ {
return MPP_OK; return MPP_OK;
} }

View File

@@ -66,7 +66,7 @@ Mpp::Mpp(MppCtxType type, MppCodingType coding)
mTheadCodec = new MppThread(mpp_dec_parser_thread, this); mTheadCodec = new MppThread(mpp_dec_parser_thread, this);
mThreadHal = new MppThread(mpp_dec_hal_thread, this); mThreadHal = new MppThread(mpp_dec_hal_thread, this);
mTask = mpp_malloc(MppHalDecTask*, mTaskNum); mTask = mpp_malloc(HalDecTask*, mTaskNum);
mpp_buffer_group_normal_get(&mInternalGroup, MPP_BUFFER_TYPE_ION); mpp_buffer_group_normal_get(&mInternalGroup, MPP_BUFFER_TYPE_ION);
mpp_buffer_group_normal_get(&mPacketGroup, MPP_BUFFER_TYPE_NORMAL); mpp_buffer_group_normal_get(&mPacketGroup, MPP_BUFFER_TYPE_NORMAL);
mpp_buffer_group_limited_get(&mFrameGroup, MPP_BUFFER_TYPE_ION); mpp_buffer_group_limited_get(&mFrameGroup, MPP_BUFFER_TYPE_ION);
@@ -81,7 +81,7 @@ Mpp::Mpp(MppCtxType type, MppCodingType coding)
mTheadCodec = new MppThread(mpp_enc_control_thread, this); mTheadCodec = new MppThread(mpp_enc_control_thread, this);
mThreadHal = new MppThread(mpp_dec_hal_thread, this); mThreadHal = new MppThread(mpp_dec_hal_thread, this);
mTask = mpp_malloc(MppHalDecTask*, mTaskNum); mTask = mpp_malloc(HalDecTask*, mTaskNum);
mpp_buffer_group_normal_get(&mInternalGroup, MPP_BUFFER_TYPE_ION); mpp_buffer_group_normal_get(&mInternalGroup, MPP_BUFFER_TYPE_ION);
mpp_buffer_group_normal_get(&mPacketGroup, MPP_BUFFER_TYPE_NORMAL); mpp_buffer_group_normal_get(&mPacketGroup, MPP_BUFFER_TYPE_NORMAL);
mpp_buffer_group_limited_get(&mFrameGroup, MPP_BUFFER_TYPE_ION); mpp_buffer_group_limited_get(&mFrameGroup, MPP_BUFFER_TYPE_ION);

View File

@@ -17,7 +17,7 @@
#ifndef __MPP_H__ #ifndef __MPP_H__
#define __MPP_H__ #define __MPP_H__
#include "rk_mpi.h" #include "mpp_list.h"
#include "mpp_dec.h" #include "mpp_dec.h"
#define MPP_DBG_FUNCTION (0x00000001) #define MPP_DBG_FUNCTION (0x00000001)
@@ -107,7 +107,7 @@ public:
MppDec *mDec; MppDec *mDec;
MppDec *mEnc; MppDec *mEnc;
MppHalDecTask **mTask; HalDecTask **mTask;
RK_U32 mTaskNum; RK_U32 mTaskNum;
private: private: