mirror of
https://github.com/nyanmisaka/mpp.git
synced 2025-10-18 15:10:39 +08:00
[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:
@@ -22,41 +22,45 @@
|
||||
|
||||
MPP_RET h264d_init(void *decoder, MppParserInitCfg *init)
|
||||
{
|
||||
(void)decoder;
|
||||
(void)init;
|
||||
return MPP_OK;
|
||||
}
|
||||
|
||||
MPP_RET h264d_deinit(void *decoder)
|
||||
{
|
||||
|
||||
|
||||
(void)decoder;
|
||||
return MPP_OK;
|
||||
}
|
||||
|
||||
MPP_RET h264d_reset(void *decoder)
|
||||
{
|
||||
|
||||
(void)decoder;
|
||||
return MPP_OK;
|
||||
}
|
||||
|
||||
|
||||
MPP_RET h264d_flush(void *decoder)
|
||||
{
|
||||
|
||||
|
||||
(void)decoder;
|
||||
return MPP_OK;
|
||||
}
|
||||
|
||||
|
||||
MPP_RET h264d_control(void *decoder, RK_S32 cmd_type, void *param)
|
||||
{
|
||||
|
||||
|
||||
(void)decoder;
|
||||
(void)cmd_type;
|
||||
(void)param;
|
||||
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;
|
||||
}
|
||||
|
||||
|
@@ -30,7 +30,7 @@ MPP_RET h264d_deinit (void *decoder);
|
||||
MPP_RET h264d_reset (void *decoder);
|
||||
MPP_RET h264d_flush (void *decoder);
|
||||
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
|
||||
}
|
||||
|
@@ -59,7 +59,7 @@ typedef struct {
|
||||
MPP_RET (*init)(void *ctx, MppParserInitCfg *cfg);
|
||||
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 (*flush)(void *ctx);
|
||||
@@ -72,11 +72,12 @@ struct MppDec_t {
|
||||
const MppDecParser *parser_api;
|
||||
void *parser_ctx;
|
||||
|
||||
MppHal *hal_ctx;
|
||||
const MppHalApi *hal_api;
|
||||
MppHal hal_ctx;
|
||||
|
||||
// common resource
|
||||
MppBufSlots slots;
|
||||
HalTaskGroup syntaxes;
|
||||
HalTaskGroup tasks;
|
||||
};
|
||||
|
||||
|
||||
|
@@ -38,9 +38,9 @@ static const MppDecParser *parsers[] = {
|
||||
|
||||
#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)
|
||||
@@ -50,10 +50,9 @@ void *mpp_dec_parser_thread(void *data)
|
||||
MppThread *hal = mpp->mThreadHal;
|
||||
MppDec *dec = mpp->mDec;
|
||||
mpp_list *packets = mpp->mPackets;
|
||||
MppHal *hal_ctx = dec->hal_ctx;
|
||||
MppPacketImpl packet;
|
||||
MppSyntax local_syntax;
|
||||
HalTaskHnd syntax = NULL;
|
||||
HalTask local_task;
|
||||
HalTaskHnd syntax = NULL;
|
||||
RK_U32 packet_ready = 0;
|
||||
RK_U32 packet_parsed = 0;
|
||||
RK_U32 syntax_ready = 0;
|
||||
@@ -94,14 +93,14 @@ void *mpp_dec_parser_thread(void *data)
|
||||
* buffer usage informatioin
|
||||
*/
|
||||
if (!packet_parsed) {
|
||||
mpp_dec_parse(dec, (MppPacket)&packet, &local_syntax);
|
||||
mpp_dec_parse(dec, (MppPacket)&packet, &local_task);
|
||||
packet_parsed = 1;
|
||||
}
|
||||
|
||||
if (!syntax_ready) {
|
||||
hal_task_get_hnd(dec->syntaxes, 0, &syntax);
|
||||
hal_task_get_hnd(dec->tasks, 0, &syntax);
|
||||
if (syntax) {
|
||||
hal_task_set_info(syntax, &local_syntax);
|
||||
hal_task_set_info(syntax, &local_task);
|
||||
syntax_ready = 1;
|
||||
}
|
||||
}
|
||||
@@ -152,31 +151,30 @@ void *mpp_dec_hal_thread(void *data)
|
||||
Mpp *mpp = (Mpp*)data;
|
||||
MppThread *hal = mpp->mThreadHal;
|
||||
MppDec *dec = mpp->mDec;
|
||||
MppHal *hal_ctx = dec->hal_ctx;
|
||||
mpp_list *frames = mpp->mFrames;
|
||||
HalTaskHnd syntax = NULL;
|
||||
MppSyntax local_syntax;
|
||||
HalTaskHnd syntax = NULL;
|
||||
HalTask local_task;
|
||||
|
||||
while (MPP_THREAD_RUNNING == hal->get_status()) {
|
||||
/*
|
||||
* hal thread wait for dxva interface intput firt
|
||||
*/
|
||||
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->unlock();
|
||||
|
||||
// get_config
|
||||
// register genertation
|
||||
if (NULL == syntax)
|
||||
hal_task_get_hnd(dec->syntaxes, 1, &syntax);
|
||||
hal_task_get_hnd(dec->tasks, 1, &syntax);
|
||||
|
||||
if (NULL == syntax)
|
||||
continue;
|
||||
|
||||
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_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
|
||||
MppHalCfg hal_cfg;
|
||||
MppHalCfg hal_cfg = {
|
||||
MPP_CTX_DEC,
|
||||
MPP_VIDEO_CodingAVC,
|
||||
NULL,
|
||||
0,
|
||||
};
|
||||
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
|
||||
MppParserInitCfg parser_cfg = {
|
||||
|
@@ -69,7 +69,7 @@ void *mpp_enc_hal_thread(void *data)
|
||||
// get_config
|
||||
// register genertation
|
||||
if (tasks->list_size()) {
|
||||
MppHalDecTask *task;
|
||||
HalDecTask *task;
|
||||
mpp->mTasks->del_at_head(&task, sizeof(task));
|
||||
mpp->mTaskGetCount++;
|
||||
|
||||
|
@@ -19,31 +19,37 @@
|
||||
|
||||
#include "mpp_mem.h"
|
||||
#include "mpp_log.h"
|
||||
#include "mpp_thread.h"
|
||||
#include "mpp_list.h"
|
||||
|
||||
#include "hal_task.h"
|
||||
|
||||
typedef struct MppSyntaxImpl_t MppSyntaxImpl;
|
||||
typedef struct MppSyntaxGroupImpl_t MppSyntaxGroupImpl;
|
||||
typedef struct HalTaskImpl_t HalTaskImpl;
|
||||
typedef struct HalTaskGroupImpl_t HalTaskGroupImpl;
|
||||
|
||||
struct MppSyntaxImpl_t {
|
||||
struct HalTaskImpl_t {
|
||||
struct list_head list;
|
||||
MppSyntaxGroupImpl *group;
|
||||
HalTaskGroupImpl *group;
|
||||
RK_U32 used;
|
||||
MppSyntax syntax;
|
||||
HalTask task;
|
||||
};
|
||||
|
||||
struct MppSyntaxGroupImpl_t {
|
||||
struct HalTaskGroupImpl_t {
|
||||
struct list_head list_unused;
|
||||
struct list_head list_used;
|
||||
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,
|
||||
sizeof(MppSyntaxGroupImpl) + count * sizeof(MppSyntaxImpl));
|
||||
return (group->type == MPP_CTX_DEC) ? (sizeof(HalDecTask)) : (sizeof(HalEncTask));
|
||||
}
|
||||
|
||||
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) {
|
||||
*group = NULL;
|
||||
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_used);
|
||||
p->lock = new Mutex();
|
||||
p->node = (MppSyntaxImpl*)(p+1);
|
||||
p->node = (HalTaskImpl*)(p+1);
|
||||
p->type = type;
|
||||
Mutex::Autolock auto_lock(p->lock);
|
||||
RK_U32 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)
|
||||
{
|
||||
MppSyntaxGroupImpl *p = (MppSyntaxGroupImpl *)group;
|
||||
HalTaskGroupImpl *p = (HalTaskGroupImpl *)group;
|
||||
if (p->lock) {
|
||||
delete p->lock;
|
||||
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)
|
||||
{
|
||||
MppSyntaxGroupImpl *p = (MppSyntaxGroupImpl *)group;
|
||||
HalTaskGroupImpl *p = (HalTaskGroupImpl *)group;
|
||||
Mutex::Autolock auto_lock(p->lock);
|
||||
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;
|
||||
}
|
||||
|
||||
*hnd = list_entry(head->next, MppSyntaxImpl, list);
|
||||
*hnd = list_entry(head->next, HalTaskImpl, list);
|
||||
return MPP_OK;
|
||||
}
|
||||
|
||||
MPP_RET hal_task_set_used(HalTaskHnd hnd, RK_U32 used)
|
||||
{
|
||||
MppSyntaxImpl *impl = (MppSyntaxImpl *)hnd;
|
||||
MppSyntaxGroupImpl *group = impl->group;
|
||||
HalTaskImpl *impl = (HalTaskImpl *)hnd;
|
||||
HalTaskGroupImpl *group = impl->group;
|
||||
Mutex::Autolock auto_lock(group->lock);
|
||||
struct list_head *head = (used) ? (&group->list_used) : (&group->list_unused);
|
||||
list_del_init(&impl->list);
|
||||
@@ -101,17 +108,17 @@ MPP_RET hal_task_set_used(HalTaskHnd hnd, RK_U32 used)
|
||||
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;
|
||||
memcpy(syntax, &impl->syntax, sizeof(impl->syntax));
|
||||
HalTaskImpl *impl = (HalTaskImpl *)hnd;
|
||||
memcpy(task, &impl->task, get_task_size(impl->group));
|
||||
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;
|
||||
memcpy(&impl->syntax, syntax, sizeof(impl->syntax));
|
||||
HalTaskImpl *impl = (HalTaskImpl *)hnd;
|
||||
memcpy(&impl->task, task, get_task_size(impl->group));
|
||||
return MPP_OK;
|
||||
}
|
||||
|
||||
|
@@ -334,9 +334,9 @@ extern const MppHalApi api_h264d_hal;
|
||||
|
||||
MPP_RET hal_h264d_init (void **hal, MppHalCfg *cfg);
|
||||
MPP_RET hal_h264d_deinit (void *hal);
|
||||
MPP_RET hal_h264d_gen_regs(void *hal, MppSyntax *syn);
|
||||
MPP_RET hal_h264d_start (void *hal, MppHalDecTask task);
|
||||
MPP_RET hal_h264d_wait (void *hal, MppHalDecTask task);
|
||||
MPP_RET hal_h264d_gen_regs(void *hal, HalTask *task);
|
||||
MPP_RET hal_h264d_start (void *hal, HalTask *task);
|
||||
MPP_RET hal_h264d_wait (void *hal, HalTask *task);
|
||||
MPP_RET hal_h264d_reset (void *hal);
|
||||
MPP_RET hal_h264d_flush (void *hal);
|
||||
MPP_RET hal_h264d_control (void *hal, RK_S32 cmd_type, void *param);
|
||||
|
@@ -18,8 +18,7 @@
|
||||
#ifndef __HAL_TASK__
|
||||
#define __HAL_TASK__
|
||||
|
||||
#include "mpp_err.h"
|
||||
#include "mpp_list.h"
|
||||
#include "rk_mpi.h"
|
||||
|
||||
#define MAX_DEC_REF_NUM 17
|
||||
|
||||
@@ -73,7 +72,7 @@ typedef struct {
|
||||
RK_S32 output;
|
||||
// current task reference slot index, -1 for unused
|
||||
RK_S32 refer[MAX_DEC_REF_NUM];
|
||||
} MppHalDecTask;
|
||||
} HalDecTask;
|
||||
|
||||
typedef struct {
|
||||
// current tesk protocol syntax information
|
||||
@@ -88,7 +87,12 @@ typedef struct {
|
||||
RK_S32 refer;
|
||||
// current task recon index
|
||||
RK_S32 recon;
|
||||
} MppHalEncTask;
|
||||
} HalEncTask;
|
||||
|
||||
typedef union {
|
||||
HalDecTask dec;
|
||||
HalEncTask enc;
|
||||
} HalTask;
|
||||
|
||||
typedef void* HalTaskHnd;
|
||||
typedef void* HalTaskGroup;
|
||||
@@ -100,7 +104,7 @@ extern "C" {
|
||||
/*
|
||||
* 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);
|
||||
|
||||
/*
|
||||
@@ -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_set_used(HalTaskHnd hnd, RK_U32 used);
|
||||
|
||||
MPP_RET hal_task_get_info(HalTaskHnd hnd, MppSyntax *syntax);
|
||||
MPP_RET hal_task_set_info(HalTaskHnd hnd, MppSyntax *syntax);
|
||||
MPP_RET hal_task_get_info(HalTaskHnd hnd, HalTask *task);
|
||||
MPP_RET hal_task_set_info(HalTaskHnd hnd, HalTask *task);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@@ -28,51 +28,40 @@ typedef struct MppHalCfg_t {
|
||||
MppCodingType coding;
|
||||
|
||||
// output
|
||||
HalTaskGroup syntaxes;
|
||||
RK_U32 syntax_count;
|
||||
HalTaskGroup tasks;
|
||||
RK_U32 task_count;
|
||||
} MppHalCfg;
|
||||
|
||||
|
||||
typedef struct {
|
||||
RK_U32 ctx_size;
|
||||
|
||||
MPP_RET (*init)(void **ctx, MppHalCfg *cfg);
|
||||
MPP_RET (*init)(void *ctx, MppHalCfg *cfg);
|
||||
MPP_RET (*deinit)(void *ctx);
|
||||
|
||||
// parser syntax process function
|
||||
MPP_RET (*reg_gen)(void *ctx, MppSyntax *syn);
|
||||
MPP_RET (*reg_gen)(void *ctx, HalTask *syn);
|
||||
|
||||
// hw operation function
|
||||
MPP_RET (*start)(void *ctx, MppHalDecTask task);
|
||||
MPP_RET (*wait)(void *ctx, MppHalDecTask task);
|
||||
MPP_RET (*start)(void *ctx, HalTask *task);
|
||||
MPP_RET (*wait)(void *ctx, HalTask *task);
|
||||
|
||||
MPP_RET (*reset)(void *ctx);
|
||||
MPP_RET (*flush)(void *ctx);
|
||||
MPP_RET (*control)(void *ctx, RK_S32 cmd, void *param);
|
||||
} MppHalApi;
|
||||
|
||||
typedef struct {
|
||||
MppCodingType mCoding;
|
||||
|
||||
void *mHalCtx;
|
||||
|
||||
MppSyntax mSyn[2];
|
||||
MppHalApi *api;
|
||||
|
||||
HalTaskGroup syntaxes;
|
||||
RK_U32 syntax_count;
|
||||
} MppHal;
|
||||
typedef void* MppHal;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
MPP_RET mpp_hal_init(MppHal **ctx, MppHalCfg *cfg);
|
||||
MPP_RET mpp_hal_deinit(MppHal *ctx);
|
||||
MPP_RET mpp_hal_init(MppHal *ctx, MppHalCfg *cfg);
|
||||
MPP_RET mpp_hal_deinit(MppHal ctx);
|
||||
|
||||
MPP_RET mpp_hal_reg_gen(MppHal *ctx, MppHalDecTask *task);
|
||||
MPP_RET mpp_hal_hw_start(MppHal *ctx, MppHalDecTask *task);
|
||||
MPP_RET mpp_hal_hw_wait(MppHal *ctx, MppHalDecTask *task);
|
||||
MPP_RET mpp_hal_reg_gen(MppHal ctx, HalDecTask *task);
|
||||
MPP_RET mpp_hal_hw_start(MppHal ctx, HalDecTask *task);
|
||||
MPP_RET mpp_hal_hw_wait(MppHal ctx, HalDecTask *task);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@@ -23,46 +23,72 @@
|
||||
#include "mpp_hal.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) {
|
||||
mpp_err_f("found NULL input ctx %p cfg %p\n", ctx, cfg);
|
||||
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;
|
||||
hal_task_group_init(&cfg->syntaxes, cfg->syntax_count);
|
||||
p->syntaxes = cfg->syntaxes;
|
||||
p->syntax_count = cfg->syntax_count;
|
||||
cfg->task_count = 2;
|
||||
MPP_RET ret = hal_task_group_init(&cfg->tasks, cfg->type, cfg->task_count);
|
||||
if (ret) {
|
||||
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;
|
||||
return MPP_OK;
|
||||
}
|
||||
|
||||
MPP_RET mpp_hal_deinit(MppHal *ctx)
|
||||
MPP_RET mpp_hal_deinit(MppHal ctx)
|
||||
{
|
||||
hal_task_group_deinit(ctx->syntaxes);
|
||||
mpp_free(ctx);
|
||||
if (NULL == 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;
|
||||
}
|
||||
|
||||
MPP_RET mpp_hal_reg_gen(MppHal *ctx, MppHalDecTask *task)
|
||||
MPP_RET mpp_hal_reg_gen(MppHal ctx, HalDecTask *task)
|
||||
{
|
||||
(void)ctx;
|
||||
(void)task;
|
||||
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)task;
|
||||
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)task;
|
||||
|
@@ -29,16 +29,16 @@ MPP_RET hal_h264d_deinit(void *hal)
|
||||
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;
|
||||
}
|
||||
MPP_RET hal_h264d_start(void *hal, MppHalDecTask task)
|
||||
MPP_RET hal_h264d_start(void *hal, HalTask *task)
|
||||
{
|
||||
return MPP_OK;
|
||||
}
|
||||
|
||||
MPP_RET hal_h264d_wait(void *hal, MppHalDecTask task)
|
||||
MPP_RET hal_h264d_wait(void *hal, HalTask *task)
|
||||
{
|
||||
return MPP_OK;
|
||||
}
|
||||
|
@@ -66,7 +66,7 @@ Mpp::Mpp(MppCtxType type, MppCodingType coding)
|
||||
mTheadCodec = new MppThread(mpp_dec_parser_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(&mPacketGroup, MPP_BUFFER_TYPE_NORMAL);
|
||||
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);
|
||||
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(&mPacketGroup, MPP_BUFFER_TYPE_NORMAL);
|
||||
mpp_buffer_group_limited_get(&mFrameGroup, MPP_BUFFER_TYPE_ION);
|
||||
|
@@ -17,7 +17,7 @@
|
||||
#ifndef __MPP_H__
|
||||
#define __MPP_H__
|
||||
|
||||
#include "rk_mpi.h"
|
||||
#include "mpp_list.h"
|
||||
#include "mpp_dec.h"
|
||||
|
||||
#define MPP_DBG_FUNCTION (0x00000001)
|
||||
@@ -107,7 +107,7 @@ public:
|
||||
MppDec *mDec;
|
||||
MppDec *mEnc;
|
||||
|
||||
MppHalDecTask **mTask;
|
||||
HalDecTask **mTask;
|
||||
RK_U32 mTaskNum;
|
||||
|
||||
private:
|
||||
|
Reference in New Issue
Block a user