[misc]: Change internal API interface

1. Change internal api RK_S32 cmd to MpiCmd.
2. Remove external MppEncCfgSet in MPI and move it internal data.

Change-Id: I0b93429f3b9f92712a57d0df54a1c76b3e08bf9d
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
This commit is contained in:
Herman Chen
2019-10-14 19:45:46 +08:00
parent 585b187b18
commit ea476ad4d1
103 changed files with 249 additions and 303 deletions

View File

@@ -984,31 +984,4 @@ typedef struct MppEncOSDData_t {
MppEncOSDRegion region[8];
} MppEncOSDData;
typedef struct MppEncMiscCfg_t {
MppEncSliceSplit split;
MppEncGopRef gop_ref;
MppEncROICfg roi;
MppEncOSDData osd_data;
MppEncOSDPlt osd_plt;
} MppEncMiscCfg;
/*
* MppEncCfgSet shows the relationship between different configuration
* Due to the huge amount of configurable parameters we need to setup
* only minimum amount of necessary parameters.
*
* For normal user rc and prep config are enough.
*/
typedef struct MppEncCfgSet_t {
// esential config
MppEncPrepCfg prep;
MppEncRcCfg rc;
// codec detail config
MppEncCodecCfg codec;
// misc extra config
MppEncMiscCfg misc;
} MppEncCfgSet;
#endif /*__RK_VENC_CMD_H__*/

View File

@@ -163,7 +163,7 @@ MPP_RET avsd_flush(void *decoder)
* control/perform
***********************************************************************
*/
MPP_RET avsd_control(void *decoder, RK_S32 cmd_type, void *param)
MPP_RET avsd_control(void *decoder, MpiCmd cmd_type, void *param)
{
MPP_RET ret = MPP_ERR_UNKNOW;

View File

@@ -125,7 +125,7 @@ MPP_RET dummy_dec_flush(void *dec)
}
MPP_RET dummy_dec_control(void *dec, RK_S32 cmd_type, void *param)
MPP_RET dummy_dec_control(void *dec, MpiCmd cmd_type, void *param)
{
if (NULL == dec) {
mpp_err_f("found NULL intput\n");

View File

@@ -157,7 +157,7 @@ MPP_RET h263d_flush(void *dec)
}
MPP_RET h263d_control(void *dec, RK_S32 cmd_type, void *param)
MPP_RET h263d_control(void *dec, MpiCmd cmd_type, void *param)
{
if (NULL == dec) {
mpp_err_f("found NULL intput\n");

View File

@@ -467,7 +467,7 @@ __FAILED:
* control/perform
***********************************************************************
*/
MPP_RET h264d_control(void *decoder, RK_S32 cmd_type, void *param)
MPP_RET h264d_control(void *decoder, MpiCmd cmd_type, void *param)
{
MPP_RET ret = MPP_ERR_UNKNOW;
H264_DecCtx_t *dec = (H264_DecCtx_t *)decoder;

View File

@@ -27,12 +27,13 @@
#define MODULE_TAG "H265D_PARSER"
#include "mpp_bitread.h"
#include "h265d_parser.h"
#include "mpp_mem.h"
#include "mpp_env.h"
#include "h265d_syntax.h"
#include "mpp_mem.h"
#include "mpp_bitread.h"
#include "mpp_packet_impl.h"
#include "h265d_parser.h"
#include "h265d_syntax.h"
#include "h265d_api.h"
#define START_CODE 0x000001 ///< start_code_prefix_one_3bytes
@@ -1988,7 +1989,7 @@ MPP_RET h265d_reset(void *ctx)
return MPP_OK;
}
MPP_RET h265d_control(void *ctx, RK_S32 cmd, void *param)
MPP_RET h265d_control(void *ctx, MpiCmd cmd, void *param)
{
H265dContext_t *h265dctx = (H265dContext_t *)ctx;

View File

@@ -17,9 +17,9 @@
#define MODULE_TAG "jpegd_parser"
#include "mpp_bitread.h"
#include "mpp_mem.h"
#include "mpp_env.h"
#include "mpp_mem.h"
#include "mpp_bitread.h"
#include "mpp_packet_impl.h"
#include "jpegd_api.h"
@@ -1347,7 +1347,7 @@ static MPP_RET jpegd_reset(void *ctx)
return MPP_OK;
}
static MPP_RET jpegd_control(void *ctx, RK_S32 cmd, void *param)
static MPP_RET jpegd_control(void *ctx, MpiCmd cmd, void *param)
{
jpegd_dbg_func("enter\n");
MPP_RET ret = MPP_OK;

View File

@@ -370,7 +370,7 @@ MPP_RET m2vd_parser_flush(void *ctx)
* control/perform
***********************************************************************
*/
MPP_RET m2vd_parser_control(void *ctx, RK_S32 cmd_type, void *param)
MPP_RET m2vd_parser_control(void *ctx, MpiCmd cmd_type, void *param)
{
MPP_RET ret = MPP_OK;
m2vd_dbg_func("FUN_I");

View File

@@ -298,7 +298,7 @@ MPP_RET m2vd_parser_init (void *ctx, ParserCfg *cfg);
MPP_RET m2vd_parser_deinit (void *ctx);
MPP_RET m2vd_parser_reset (void *ctx);
MPP_RET m2vd_parser_flush (void *ctx);
MPP_RET m2vd_parser_control(void *ctx, RK_S32 cmd_type, void *param);
MPP_RET m2vd_parser_control(void *ctx, MpiCmd cmd_type, void *param);
MPP_RET m2vd_parser_prepare(void *ctx, MppPacket pkt, HalDecTask *task);
MPP_RET m2vd_parser_parse (void *ctx, HalDecTask *task);
MPP_RET m2vd_parser_callback(void *ctx, void *err_info);

View File

@@ -160,7 +160,7 @@ static MPP_RET mpg4d_flush(void *dec)
return mpp_mpg4_parser_flush(p->parser);
}
static MPP_RET mpg4d_control(void *dec, RK_S32 cmd_type, void *param)
static MPP_RET mpg4d_control(void *dec, MpiCmd cmd_type, void *param)
{
if (NULL == dec) {
mpp_err_f("found NULL intput\n");

View File

@@ -368,7 +368,7 @@ MPP_RET vp8d_parser_flush(void *ctx)
* control/perform
***********************************************************************
*/
MPP_RET vp8d_parser_control(void *ctx, RK_S32 cmd_type, void *param)
MPP_RET vp8d_parser_control(void *ctx, MpiCmd cmd_type, void *param)
{
MPP_RET ret = MPP_OK;

View File

@@ -186,7 +186,7 @@ MPP_RET vp8d_parser_init (void *ctx, ParserCfg *cfg);
MPP_RET vp8d_parser_deinit (void *ctx);
MPP_RET vp8d_parser_reset (void *ctx);
MPP_RET vp8d_parser_flush (void *ctx);
MPP_RET vp8d_parser_control(void *ctx, RK_S32 cmd_type, void *param);
MPP_RET vp8d_parser_control(void *ctx, MpiCmd cmd_type, void *param);
MPP_RET vp8d_parser_prepare(void *ctx, MppPacket pkt, HalDecTask *task);
MPP_RET vp8d_parser_parse (void *ctx, HalDecTask *task);
MPP_RET vp8d_parser_callback(void *ctx, void *hal_info);

View File

@@ -124,24 +124,6 @@ MPP_RET vp9d_flush(void *ctx)
return ret = MPP_OK;
}
/*!
***********************************************************************
* \brief
* control/perform
***********************************************************************
*/
MPP_RET vp9d_control(void *ctx, RK_S32 cmd_type, void *param)
{
MPP_RET ret = MPP_ERR_UNKNOW;
(void)ctx;
(void)cmd_type;
(void)param;
return ret = MPP_OK;
}
/*!
***********************************************************************
* \brief
@@ -240,7 +222,7 @@ const ParserApi api_vp9d_parser = {
.parse = vp9d_parse,
.reset = vp9d_reset,
.flush = vp9d_flush,
.control = vp9d_control,
.control = NULL,
.callback = vp9d_callback,
};

View File

@@ -17,8 +17,7 @@
#ifndef __VP9D_CODEC_H__
#define __VP9D_CODEC_H__
#include <stdlib.h>
#include "mpp_frame.h"
#include "hal_task.h"
#include "vp9d_syntax.h"

View File

@@ -194,7 +194,7 @@ MPP_RET h264e_flush(void *ctx)
return MPP_OK;
}
MPP_RET h264e_config(void *ctx, RK_S32 cmd, void *param)
MPP_RET h264e_config(void *ctx, MpiCmd cmd, void *param)
{
MPP_RET ret = MPP_OK;
H264eCtx *p = (H264eCtx *)ctx;

View File

@@ -153,7 +153,7 @@ MPP_RET h265e_flush(void *ctx)
return MPP_OK;
}
MPP_RET h265e_config(void *ctx, RK_S32 cmd, void *param)
MPP_RET h265e_config(void *ctx, MpiCmd cmd, void *param)
{
H265eCtx *p = (H265eCtx *)ctx;
MPP_RET ret = MPP_NOK;

View File

@@ -112,7 +112,7 @@ static MPP_RET jpege_flush(void *ctx)
return MPP_OK;
}
static MPP_RET jpege_config(void *ctx, RK_S32 cmd, void *param)
static MPP_RET jpege_config(void *ctx, MpiCmd cmd, void *param)
{
MPP_RET ret = MPP_OK;

View File

@@ -182,7 +182,7 @@ MPP_RET vp8e_flush(void *ctx)
return MPP_OK;
}
MPP_RET vp8e_config(void *ctx, RK_S32 cmd, void *param)
MPP_RET vp8e_config(void *ctx, MpiCmd cmd, void *param)
{
MPP_RET ret = MPP_OK;
Vp8eCtx *p = (Vp8eCtx *)ctx;

View File

@@ -17,6 +17,7 @@
#ifndef __VP8E_RC_H__
#define __VP8E_RC_H__
#include "mpp_enc_cfg.h"
#include "vp8e_syntax.h"
#ifdef __cplusplus

View File

@@ -19,7 +19,6 @@
#include "parser_api.h"
#ifdef __cplusplus
extern "C" {
#endif
@@ -29,7 +28,7 @@ MPP_RET avsd_init (void *decoder, ParserCfg *cfg);
MPP_RET avsd_deinit (void *decoder);
MPP_RET avsd_reset (void *decoder);
MPP_RET avsd_flush (void *decoder);
MPP_RET avsd_control(void *decoder, RK_S32 cmd_type, void *param);
MPP_RET avsd_control(void *decoder, MpiCmd cmd_type, void *param);
MPP_RET avsd_prepare(void *decoder, MppPacket pkt, HalDecTask *task);
MPP_RET avsd_parse (void *decoder, HalDecTask *task);
MPP_RET avsd_callback(void *decoder, void *err_info);

View File

@@ -29,7 +29,7 @@ MPP_RET dummy_dec_init (void *dec, ParserCfg *cfg);
MPP_RET dummy_dec_deinit (void *dec);
MPP_RET dummy_dec_reset (void *dec);
MPP_RET dummy_dec_flush (void *dec);
MPP_RET dummy_dec_control(void *dec, RK_S32 cmd_type, void *param);
MPP_RET dummy_dec_control(void *dec, MpiCmd cmd_type, void *param);
MPP_RET dummy_dec_prepare(void *dec, MppPacket pkt, HalDecTask *task);
MPP_RET dummy_dec_parse (void *dec, HalDecTask *task);
MPP_RET dummy_dec_callback(void *dec, void *err_info);

View File

@@ -17,7 +17,11 @@
#ifndef __ENC_IMPL_API_H__
#define __ENC_IMPL_API_H__
#include "rk_mpi_cmd.h"
#include "mpp_platform.h"
#include "hal_task.h"
#include "mpp_enc_cfg.h"
/*
* the reset wait for extension
@@ -57,7 +61,7 @@ typedef struct EncImplApi_t {
MPP_RET (*init)(void *ctx, EncImplCfg *ctrlCfg);
MPP_RET (*deinit)(void *ctx);
MPP_RET (*proc_cfg)(void *ctx, RK_S32 cmd, void *param);
MPP_RET (*proc_cfg)(void *ctx, MpiCmd cmd, void *param);
MPP_RET (*gen_hdr)(void *ctx, MppPacket pkt);
MPP_RET (*proc_dpb)(void *ctx);

View File

@@ -37,7 +37,7 @@ MPP_RET h264d_init (void *decoder, ParserCfg *cfg);
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_control(void *decoder, MpiCmd cmd_type, void *param);
MPP_RET h264d_prepare(void *decoder, MppPacket pkt, HalDecTask *task);
MPP_RET h264d_parse (void *decoder, HalDecTask *task);
MPP_RET h264d_callback(void *decoder, void *err_info);

View File

@@ -30,7 +30,7 @@ MPP_RET h265d_parse(void *ctx, HalDecTask *task);
MPP_RET h265d_deinit(void *ctx);
MPP_RET h265d_flush(void *ctx);
MPP_RET h265d_reset(void *ctx);
MPP_RET h265d_control(void *ctx, RK_S32 cmd, void *param);
MPP_RET h265d_control(void *ctx, MpiCmd cmd, void *param);
MPP_RET h265d_callback(void *ctx, void *err_info);
RK_S32 mpp_hevc_split_frame(void *sc,
const RK_U8 **poutbuf, RK_S32 *poutbuf_size,

View File

@@ -28,7 +28,7 @@ extern "C" {
MPP_RET enc_impl_init(EncImpl *ctrl, EncImplCfg *cfg);
MPP_RET enc_impl_deinit(EncImpl ctrl);
MPP_RET enc_impl_proc_cfg(EncImpl ctrl, RK_S32 cmd, void *para);
MPP_RET enc_impl_proc_cfg(EncImpl ctrl, MpiCmd cmd, void *para);
MPP_RET enc_impl_gen_hdr(EncImpl ctrl, MppPacket pkt);
MPP_RET enc_impl_proc_dpb(EncImpl ctrl);

View File

@@ -33,7 +33,7 @@ MPP_RET mpp_parser_parse(Parser prs, HalDecTask *task);
MPP_RET mpp_parser_reset(Parser prs);
MPP_RET mpp_parser_flush(Parser prs);
MPP_RET mpp_parser_control(Parser prs, RK_S32 cmd, void *para);
MPP_RET mpp_parser_control(Parser prs, MpiCmd cmd, void *para);
MPP_RET mpp_hal_callback(void* prs, void *err_info);
#ifdef __cplusplus

View File

@@ -17,6 +17,7 @@
#ifndef __PARSER_API_H__
#define __PARSER_API_H__
#include "rk_mpi_cmd.h"
#include "mpp_packet.h"
#include "mpp_buf_slot.h"
#include "hal_task.h"
@@ -70,7 +71,7 @@ typedef struct ParserApi_t {
MPP_RET (*reset)(void *ctx);
MPP_RET (*flush)(void *ctx);
MPP_RET (*control)(void *ctx, RK_S32 cmd, void *param);
MPP_RET (*control)(void *ctx, MpiCmd cmd, void *param);
MPP_RET (*callback)(void *ctx, void *err_info);
} ParserApi;

View File

@@ -31,7 +31,7 @@ MPP_RET vp9d_init (void *decoder, ParserCfg *cfg);
MPP_RET vp9d_deinit (void *decoder);
MPP_RET vp9d_reset (void *decoder);
MPP_RET vp9d_flush (void *decoder);
MPP_RET vp9d_control(void *decoder, RK_S32 cmd_type, void *param);
MPP_RET vp9d_control(void *decoder, MpiCmd cmd_type, void *param);
MPP_RET vp9d_prepare(void *decoder, MppPacket pkt, HalDecTask *task);
MPP_RET vp9d_parse (void *decoder, HalDecTask *task);
MPP_RET vp9d_callback(void *decoder, void *info);

View File

@@ -106,7 +106,7 @@ MPP_RET enc_impl_deinit(EncImpl impl)
return MPP_OK;
}
MPP_RET enc_impl_proc_cfg(EncImpl impl, RK_S32 cmd, void *para)
MPP_RET enc_impl_proc_cfg(EncImpl impl, MpiCmd cmd, void *para)
{
if (NULL == impl) {
mpp_err_f("found NULL input\n");

View File

@@ -200,7 +200,7 @@ MPP_RET mpp_parser_flush(Parser prs)
return p->api->flush(p->ctx);
}
MPP_RET mpp_parser_control(Parser prs, RK_S32 cmd, void *para)
MPP_RET mpp_parser_control(Parser prs, MpiCmd cmd, void *para)
{
if (NULL == prs) {
mpp_err_f("found NULL input\n");

View File

@@ -18,6 +18,8 @@
#ifndef __JPEGD_SYNTAX__
#define __JPEGD_SYNTAX__
#include "mpp_frame.h"
#define JPEGDEC_YUV400 (0)
#define JPEGDEC_YUV420 (2)
#define JPEGDEC_YUV422 (3)

View File

@@ -180,7 +180,7 @@ MPP_RET hal_h264e_flush(void *hal)
return api->flush(hal);
}
MPP_RET hal_h264e_control(void *hal, RK_S32 cmd_type, void *param)
MPP_RET hal_h264e_control(void *hal, MpiCmd cmd_type, void *param)
{
H264eHalContext *ctx = (H264eHalContext *)hal;
MppHalApi *api = &ctx->api;

View File

@@ -112,7 +112,7 @@ MPP_RET hal_h265e_flush(void *hal)
return ctx->hal_api.flush(hal);
}
MPP_RET hal_h265e_control(void *hal, RK_S32 cmd_type, void *param)
MPP_RET hal_h265e_control(void *hal, MpiCmd cmd_type, void *param)
{
HalH265eCtx* ctx = (HalH265eCtx*)hal;
return ctx->hal_api.control(hal, cmd_type, param);

View File

@@ -65,7 +65,7 @@ MPP_RET hal_dummy_dec_flush(void *hal)
return MPP_OK;
}
MPP_RET hal_dummy_dec_control(void *hal, RK_S32 cmd_type, void *param)
MPP_RET hal_dummy_dec_control(void *hal, MpiCmd cmd_type, void *param)
{
(void)hal;
(void)cmd_type;

View File

@@ -65,7 +65,7 @@ MPP_RET hal_dummy_enc_flush(void *hal)
return MPP_OK;
}
MPP_RET hal_dummy_enc_control(void *hal, RK_S32 cmd_type, void *param)
MPP_RET hal_dummy_enc_control(void *hal, MpiCmd cmd_type, void *param)
{
(void)hal;
(void)cmd_type;

View File

@@ -19,26 +19,14 @@
#ifndef __HAL_AVSD_API_H__
#define __HAL_AVSD_API_H__
#include "rk_type.h"
#include "mpp_err.h"
#include "mpp_hal.h"
#ifdef __cplusplus
extern "C" {
#endif
extern const MppHalApi hal_api_avsd;
MPP_RET hal_avsd_init (void *decoder, MppHalCfg *cfg);
MPP_RET hal_avsd_deinit (void *decoder);
MPP_RET hal_avsd_gen_regs(void *decoder, HalTaskInfo *task);
MPP_RET hal_avsd_start (void *decoder, HalTaskInfo *task);
MPP_RET hal_avsd_wait (void *decoder, HalTaskInfo *task);
MPP_RET hal_avsd_reset (void *decoder);
MPP_RET hal_avsd_flush (void *decoder);
MPP_RET hal_avsd_control (void *decoder, RK_S32 cmd_type, void *param);
#ifdef __cplusplus
}
#endif

View File

@@ -18,8 +18,6 @@
#ifndef __HAL_H263D_API_H__
#define __HAL_H263D_API_H__
#include "rk_type.h"
#include "mpp_err.h"
#include "mpp_hal.h"
#define H263D_HAL_DBG_REG_PUT (0x00000001)
@@ -33,15 +31,6 @@ extern RK_U32 h263d_hal_debug;
extern const MppHalApi hal_api_h263d;
MPP_RET hal_vpu_h263d_init(void *hal, MppHalCfg *cfg);
MPP_RET hal_vpu_h263d_gen_regs(void *hal, HalTaskInfo *syn);
MPP_RET hal_vpu_h263d_deinit(void *hal);
MPP_RET hal_vpu_h263d_start(void *hal, HalTaskInfo *task);
MPP_RET hal_vpu_h263d_wait(void *hal, HalTaskInfo *task);
MPP_RET hal_vpu_h263d_reset(void *hal);
MPP_RET hal_vpu_h263d_flush(void *hal);
MPP_RET hal_vpu_h263d_control(void *hal, RK_S32 cmd_type, void *param);
#ifdef __cplusplus
}
#endif

View File

@@ -38,7 +38,7 @@ MPP_RET hal_h264d_start (void *hal, HalTaskInfo *task);
MPP_RET hal_h264d_wait (void *hal, HalTaskInfo *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);
MPP_RET hal_h264d_control (void *hal, MpiCmd cmd_type, void *param);
#ifdef __cplusplus
}

View File

@@ -32,7 +32,7 @@ MPP_RET hal_h264e_start (void *hal, HalTaskInfo *task);
MPP_RET hal_h264e_wait (void *hal, HalTaskInfo *task);
MPP_RET hal_h264e_reset (void *hal);
MPP_RET hal_h264e_flush (void *hal);
MPP_RET hal_h264e_control (void *hal, RK_S32 cmd_type, void *param);
MPP_RET hal_h264e_control (void *hal, MpiCmd cmd_type, void *param);
#ifdef __cplusplus
}

View File

@@ -38,7 +38,7 @@ MPP_RET hal_h265d_start(void *hal, HalTaskInfo *task);
MPP_RET hal_h265d_wait(void *hal, HalTaskInfo *task);
MPP_RET hal_h265d_reset(void *hal);
MPP_RET hal_h265d_flush(void *hal);
MPP_RET hal_h265d_control(void *hal, RK_S32 cmd_type, void *param);
MPP_RET hal_h265d_control(void *hal, MpiCmd cmd_type, void *param);
#ifdef __cplusplus
}

View File

@@ -38,7 +38,7 @@ MPP_RET hal_jpegd_start(void *hal, HalTaskInfo *task);
MPP_RET hal_jpegd_wait(void *hal, HalTaskInfo *task);
MPP_RET hal_jpegd_reset(void *hal);
MPP_RET hal_jpegd_flush(void *hal);
MPP_RET hal_jpegd_control(void *hal, RK_S32 cmd_type, void *param);
MPP_RET hal_jpegd_control(void *hal, MpiCmd cmd_type, void *param);
#ifdef __cplusplus
}

View File

@@ -32,7 +32,7 @@ MPP_RET hal_m2vd_start (void *hal, HalTaskInfo *task);
MPP_RET hal_m2vd_wait (void *hal, HalTaskInfo *task);
MPP_RET hal_m2vd_reset (void *hal);
MPP_RET hal_m2vd_flush (void *hal);
MPP_RET hal_m2vd_control (void *hal, RK_S32 cmd_type, void *param);
MPP_RET hal_m2vd_control (void *hal, MpiCmd cmd_type, void *param);
#ifdef __cplusplus
}

View File

@@ -50,7 +50,7 @@ MPP_RET hal_vpu_mpg4d_start(void *hal, HalTaskInfo *task);
MPP_RET hal_vpu_mpg4d_wait(void *hal, HalTaskInfo *task);
MPP_RET hal_vpu_mpg4d_reset(void *hal);
MPP_RET hal_vpu_mpg4d_flush(void *hal);
MPP_RET hal_vpu_mpg4d_control(void *hal, RK_S32 cmd_type, void *param);
MPP_RET hal_vpu_mpg4d_control(void *hal, MpiCmd cmd_type, void *param);
#ifdef __cplusplus
}

View File

@@ -18,7 +18,8 @@
#ifndef __HAL_TASK__
#define __HAL_TASK__
#include "rk_mpi_cmd.h"
#include "rk_type.h"
#include "mpp_err.h"
#define MAX_DEC_REF_NUM 17

View File

@@ -34,7 +34,7 @@ MPP_RET hal_vp9d_start (void *hal, HalTaskInfo *task);
MPP_RET hal_vp9d_wait (void *hal, HalTaskInfo *task);
MPP_RET hal_vp9d_reset (void *hal);
MPP_RET hal_vp9d_flush (void *hal);
MPP_RET hal_vp9d_control (void *hal, RK_S32 cmd_type, void *param);
MPP_RET hal_vp9d_control (void *hal, MpiCmd cmd_type, void *param);
#ifdef __cplusplus
}

View File

@@ -17,9 +17,13 @@
#ifndef __MPP_HAL_H__
#define __MPP_HAL_H__
#include "rk_mpi_cmd.h"
#include "mpp_buf_slot.h"
#include "mpp_platform.h"
#include "hal_task.h"
#include "mpp_enc_cfg.h"
typedef enum MppHalType_e {
HAL_MODE_LIBVPU,
@@ -36,7 +40,6 @@ typedef enum vpu_hard_mode_e {
MODE_BUTT,
} VpuHardMode;
typedef void* MppHalCtx;
typedef struct MppHalCfg_t {
@@ -77,7 +80,7 @@ typedef struct MppHalApi_t {
MPP_RET (*reset)(void *ctx);
MPP_RET (*flush)(void *ctx);
MPP_RET (*control)(void *ctx, RK_S32 cmd, void *param);
MPP_RET (*control)(void *ctx, MpiCmd cmd, void *param);
} MppHalApi;
typedef void* MppHal;
@@ -95,7 +98,7 @@ MPP_RET mpp_hal_hw_wait(MppHal ctx, HalTaskInfo *task);
MPP_RET mpp_hal_reset(MppHal ctx);
MPP_RET mpp_hal_flush(MppHal ctx);
MPP_RET mpp_hal_control(MppHal ctx, RK_S32 cmd, void *param);
MPP_RET mpp_hal_control(MppHal ctx, MpiCmd cmd, void *param);
#ifdef __cplusplus
}

View File

@@ -230,7 +230,7 @@ MPP_RET mpp_hal_flush(MppHal ctx)
return p->api->flush(p->ctx);
}
MPP_RET mpp_hal_control(MppHal ctx, RK_S32 cmd, void *param)
MPP_RET mpp_hal_control(MppHal ctx, MpiCmd cmd, void *param)
{
if (NULL == ctx) {
mpp_err_f("found NULL input\n");

View File

@@ -33,9 +33,11 @@
#include "hal_avsd_api.h"
#include "hal_avsd_reg.h"
RK_U32 avsd_hal_debug = 0;
MPP_RET hal_avsd_start(void *decoder, HalTaskInfo *task);
MPP_RET hal_avsd_wait(void *decoder, HalTaskInfo *task);
static RK_U32 avsd_ver_align(RK_U32 val)
{
return MPP_ALIGN(val, 16);
@@ -332,42 +334,6 @@ MPP_RET hal_avsd_reset(void *decoder)
return ret = MPP_OK;
}
/*!
***********************************************************************
* \brief
* flush
***********************************************************************
*/
//extern "C"
MPP_RET hal_avsd_flush(void *decoder)
{
MPP_RET ret = MPP_ERR_UNKNOW;
AVSD_HAL_TRACE("In.");
(void)decoder;
return ret = MPP_OK;
}
/*!
***********************************************************************
* \brief
* control
***********************************************************************
*/
//extern "C"
MPP_RET hal_avsd_control(void *decoder, RK_S32 cmd_type, void *param)
{
MPP_RET ret = MPP_ERR_UNKNOW;
AVSD_HAL_TRACE("In.");
(void)decoder;
(void)cmd_type;
(void)param;
return ret = MPP_OK;
}
const MppHalApi hal_api_avsd = {
.name = "avsd_rkdec",
@@ -381,6 +347,6 @@ const MppHalApi hal_api_avsd = {
.start = hal_avsd_start,
.wait = hal_avsd_wait,
.reset = hal_avsd_reset,
.flush = hal_avsd_flush,
.control = hal_avsd_control,
.flush = NULL,
.control = NULL,
};

View File

@@ -295,7 +295,7 @@ MPP_RET hal_h264d_flush(void *hal)
***********************************************************************
*/
//extern "C"
MPP_RET hal_h264d_control(void *hal, RK_S32 cmd_type, void *param)
MPP_RET hal_h264d_control(void *hal, MpiCmd cmd_type, void *param)
{
H264dHalCtx_t *p_hal = (H264dHalCtx_t *)hal;

View File

@@ -812,7 +812,7 @@ __RETURN:
***********************************************************************
*/
//extern "C"
MPP_RET rkv_h264d_control(void *hal, RK_S32 cmd_type, void *param)
MPP_RET rkv_h264d_control(void *hal, MpiCmd cmd_type, void *param)
{
MPP_RET ret = MPP_ERR_UNKNOW;
H264dHalCtx_t *p_hal = (H264dHalCtx_t *)hal;

View File

@@ -240,7 +240,7 @@ MPP_RET rkv_h264d_start (void *hal, HalTaskInfo *task);
MPP_RET rkv_h264d_wait (void *hal, HalTaskInfo *task);
MPP_RET rkv_h264d_reset (void *hal);
MPP_RET rkv_h264d_flush (void *hal);
MPP_RET rkv_h264d_control (void *hal, RK_S32 cmd_type, void *param);
MPP_RET rkv_h264d_control (void *hal, MpiCmd cmd_type, void *param);
#ifdef __cplusplus
}

View File

@@ -967,7 +967,7 @@ __RETURN:
***********************************************************************
*/
//extern "C"
MPP_RET vdpu1_h264d_control(void *hal, RK_S32 cmd_type, void *param)
MPP_RET vdpu1_h264d_control(void *hal, MpiCmd cmd_type, void *param)
{
MPP_RET ret = MPP_ERR_UNKNOW;
H264dHalCtx_t *p_hal = (H264dHalCtx_t *)hal;

View File

@@ -31,7 +31,7 @@ MPP_RET vdpu1_h264d_start (void *hal, HalTaskInfo *task);
MPP_RET vdpu1_h264d_wait (void *hal, HalTaskInfo *task);
MPP_RET vdpu1_h264d_reset (void *hal);
MPP_RET vdpu1_h264d_flush (void *hal);
MPP_RET vdpu1_h264d_control (void *hal, RK_S32 cmd_type, void *param);
MPP_RET vdpu1_h264d_control (void *hal, MpiCmd cmd_type, void *param);
#ifdef __cplusplus
}

View File

@@ -928,7 +928,7 @@ __RETURN:
***********************************************************************
*/
//extern "C"
MPP_RET vdpu2_h264d_control(void *hal, RK_S32 cmd_type, void *param)
MPP_RET vdpu2_h264d_control(void *hal, MpiCmd cmd_type, void *param)
{
MPP_RET ret = MPP_ERR_UNKNOW;
H264dHalCtx_t *p_hal = (H264dHalCtx_t *)hal;

View File

@@ -31,7 +31,7 @@ MPP_RET vdpu2_h264d_start (void *hal, HalTaskInfo *task);
MPP_RET vdpu2_h264d_wait (void *hal, HalTaskInfo *task);
MPP_RET vdpu2_h264d_reset (void *hal);
MPP_RET vdpu2_h264d_flush (void *hal);
MPP_RET vdpu2_h264d_control (void *hal, RK_S32 cmd_type, void *param);
MPP_RET vdpu2_h264d_control (void *hal, MpiCmd cmd_type, void *param);
#ifdef __cplusplus

View File

@@ -1621,7 +1621,7 @@ MPP_RET hal_h265d_flush(void *hal)
return ret;
}
MPP_RET hal_h265d_control(void *hal, RK_S32 cmd_type, void *param)
MPP_RET hal_h265d_control(void *hal, MpiCmd cmd_type, void *param)
{
MPP_RET ret = MPP_OK;

View File

@@ -1083,7 +1083,7 @@ MPP_RET hal_vp9d_flush(void *hal)
***********************************************************************
*/
//extern "C"
MPP_RET hal_vp9d_control(void *hal, RK_S32 cmd_type, void *param)
MPP_RET hal_vp9d_control(void *hal, MpiCmd cmd_type, void *param)
{
switch ((MpiCmd)cmd_type) {
case MPP_DEC_SET_FRAME_INFO: {

View File

@@ -1820,7 +1820,7 @@ MPP_RET hal_h264e_rkv_flush(void *hal)
return MPP_OK;
}
MPP_RET hal_h264e_rkv_control(void *hal, RK_S32 cmd_type, void *param)
MPP_RET hal_h264e_rkv_control(void *hal, MpiCmd cmd_type, void *param)
{
H264eHalContext *ctx = (H264eHalContext *)hal;
h264e_hal_enter();

View File

@@ -741,6 +741,6 @@ MPP_RET hal_h264e_rkv_start (void *hal, HalTaskInfo *task);
MPP_RET hal_h264e_rkv_wait (void *hal, HalTaskInfo *task);
MPP_RET hal_h264e_rkv_reset (void *hal);
MPP_RET hal_h264e_rkv_flush (void *hal);
MPP_RET hal_h264e_rkv_control (void *hal, RK_S32 cmd_type, void *param);
MPP_RET hal_h264e_rkv_control (void *hal, MpiCmd cmd_type, void *param);
#endif

View File

@@ -66,7 +66,7 @@ static MPP_RET hal_h263d_flush(void *hal)
return ctx->hal_api.flush(hal);
}
static MPP_RET hal_h263d_control(void *hal, RK_S32 cmd_type, void *param)
static MPP_RET hal_h263d_control(void *hal, MpiCmd cmd_type, void *param)
{
hal_h263_ctx *ctx = (hal_h263_ctx *)hal;
return ctx->hal_api.control(hal, cmd_type, param);

View File

@@ -290,7 +290,7 @@ MPP_RET hal_vpu1_h263d_flush(void *hal)
return ret;
}
MPP_RET hal_vpu1_h263d_control(void *hal, RK_S32 cmd_type, void *param)
MPP_RET hal_vpu1_h263d_control(void *hal, MpiCmd cmd_type, void *param)
{
MPP_RET ret = MPP_OK;

View File

@@ -30,7 +30,7 @@ MPP_RET hal_vpu1_h263d_start(void *hal, HalTaskInfo *task);
MPP_RET hal_vpu1_h263d_wait(void *hal, HalTaskInfo *task);
MPP_RET hal_vpu1_h263d_reset(void *hal);
MPP_RET hal_vpu1_h263d_flush(void *hal);
MPP_RET hal_vpu1_h263d_control(void *hal, RK_S32 cmd_type, void *param);
MPP_RET hal_vpu1_h263d_control(void *hal, MpiCmd cmd_type, void *param);
#ifdef __cplusplus
}

View File

@@ -290,7 +290,7 @@ MPP_RET hal_vpu2_h263d_flush(void *hal)
return ret;
}
MPP_RET hal_vpu2_h263d_control(void *hal, RK_S32 cmd_type, void *param)
MPP_RET hal_vpu2_h263d_control(void *hal, MpiCmd cmd_type, void *param)
{
MPP_RET ret = MPP_OK;

View File

@@ -30,7 +30,7 @@ MPP_RET hal_vpu2_h263d_start(void *hal, HalTaskInfo *task);
MPP_RET hal_vpu2_h263d_wait(void *hal, HalTaskInfo *task);
MPP_RET hal_vpu2_h263d_reset(void *hal);
MPP_RET hal_vpu2_h263d_flush(void *hal);
MPP_RET hal_vpu2_h263d_control(void *hal, RK_S32 cmd_type, void *param);
MPP_RET hal_vpu2_h263d_control(void *hal, MpiCmd cmd_type, void *param);
#ifdef __cplusplus
}

View File

@@ -622,7 +622,7 @@ MPP_RET hal_h264e_vepu1_flush(void *hal)
return MPP_OK;
}
MPP_RET hal_h264e_vepu1_control(void *hal, RK_S32 cmd_type, void *param)
MPP_RET hal_h264e_vepu1_control(void *hal, MpiCmd cmd_type, void *param)
{
MPP_RET ret = MPP_OK;
H264eHalContext *ctx = (H264eHalContext *)hal;

View File

@@ -26,6 +26,6 @@ MPP_RET hal_h264e_vepu1_start (void *hal, HalTaskInfo *task);
MPP_RET hal_h264e_vepu1_wait (void *hal, HalTaskInfo *task);
MPP_RET hal_h264e_vepu1_reset (void *hal);
MPP_RET hal_h264e_vepu1_flush (void *hal);
MPP_RET hal_h264e_vepu1_control (void *hal, RK_S32 cmd_type, void *param);
MPP_RET hal_h264e_vepu1_control (void *hal, MpiCmd cmd_type, void *param);
#endif

View File

@@ -648,7 +648,7 @@ MPP_RET hal_h264e_vepu2_flush(void *hal)
return MPP_OK;
}
MPP_RET hal_h264e_vepu2_control(void *hal, RK_S32 cmd_type, void *param)
MPP_RET hal_h264e_vepu2_control(void *hal, MpiCmd cmd_type, void *param)
{
H264eHalContext *ctx = (H264eHalContext *)hal;
MPP_RET ret = MPP_OK;

View File

@@ -24,6 +24,6 @@ MPP_RET hal_h264e_vepu2_start (void *hal, HalTaskInfo *task);
MPP_RET hal_h264e_vepu2_wait (void *hal, HalTaskInfo *task);
MPP_RET hal_h264e_vepu2_reset (void *hal);
MPP_RET hal_h264e_vepu2_flush (void *hal);
MPP_RET hal_h264e_vepu2_control (void *hal, RK_S32 cmd_type, void *param);
MPP_RET hal_h264e_vepu2_control (void *hal, MpiCmd cmd_type, void *param);
#endif

View File

@@ -2112,7 +2112,7 @@ MPP_RET hal_h265e_vepu22_flush(void *hal)
return MPP_OK;
}
MPP_RET hal_h265e_vepu22_control(void *hal, RK_S32 cmd_type, void *param)
MPP_RET hal_h265e_vepu22_control(void *hal, MpiCmd cmd_type, void *param)
{
MPP_RET ret = MPP_OK;
RK_U32 change = 0;
@@ -2171,6 +2171,10 @@ MPP_RET hal_h265e_vepu22_control(void *hal, RK_S32 cmd_type, void *param)
ret = vepu22_set_roi(ctx, param);
break;
}
default : {
break;
}
}
hal_h265e_dbg_input("ctx->option = 0x%x H265E_SET_ALL_CFG = 0x%x\n",
ctx->option, H265E_SET_ALL_CFG);

View File

@@ -31,7 +31,7 @@ MPP_RET hal_h265e_vepu22_start (void *hal, HalTaskInfo *task);
MPP_RET hal_h265e_vepu22_wait (void *hal, HalTaskInfo *task);
MPP_RET hal_h265e_vepu22_reset (void *hal);
MPP_RET hal_h265e_vepu22_flush (void *hal);
MPP_RET hal_h265e_vepu22_control (void *hal, RK_S32 cmd_type, void *param);
MPP_RET hal_h265e_vepu22_control (void *hal, MpiCmd cmd_type, void *param);
#ifdef __cplusplus
}

View File

@@ -55,7 +55,7 @@ static MPP_RET hal_jpegd_flush (void *hal)
return self->hal_api.flush (hal);
}
static MPP_RET hal_jpegd_control (void *hal, RK_S32 cmd_type, void *param)
static MPP_RET hal_jpegd_control (void *hal, MpiCmd cmd_type, void *param)
{
JpegdHalCtx *self = (JpegdHalCtx *)hal;
return self->hal_api.control (hal, cmd_type, param);

View File

@@ -1037,7 +1037,7 @@ MPP_RET hal_jpegd_vdpu1_flush(void *hal)
return ret;
}
MPP_RET hal_jpegd_vdpu1_control(void *hal, RK_S32 cmd_type, void *param)
MPP_RET hal_jpegd_vdpu1_control(void *hal, MpiCmd cmd_type, void *param)
{
jpegd_dbg_func("enter\n");
MPP_RET ret = MPP_OK;

View File

@@ -26,6 +26,6 @@ MPP_RET hal_jpegd_vdpu1_start(void *hal, HalTaskInfo *task);
MPP_RET hal_jpegd_vdpu1_wait(void *hal, HalTaskInfo *task);
MPP_RET hal_jpegd_vdpu1_reset(void *hal);
MPP_RET hal_jpegd_vdpu1_flush(void *hal);
MPP_RET hal_jpegd_vdpu1_control(void *hal, RK_S32 cmd_type, void *param);
MPP_RET hal_jpegd_vdpu1_control(void *hal, MpiCmd cmd_type, void *param);
#endif /* __HAL_JPEGD_VDPU1_H__ */

View File

@@ -1016,7 +1016,7 @@ MPP_RET hal_jpegd_vdpu2_flush(void *hal)
return ret;
}
MPP_RET hal_jpegd_vdpu2_control(void *hal, RK_S32 cmd_type,
MPP_RET hal_jpegd_vdpu2_control(void *hal, MpiCmd cmd_type,
void *param)
{
jpegd_dbg_func("enter\n");

View File

@@ -25,6 +25,6 @@ MPP_RET hal_jpegd_vdpu2_start(void *hal, HalTaskInfo *task);
MPP_RET hal_jpegd_vdpu2_wait(void *hal, HalTaskInfo *task);
MPP_RET hal_jpegd_vdpu2_reset(void *hal);
MPP_RET hal_jpegd_vdpu2_flush(void *hal);
MPP_RET hal_jpegd_vdpu2_control(void *hal, RK_S32 cmd_type, void *param);
MPP_RET hal_jpegd_vdpu2_control(void *hal, MpiCmd cmd_type, void *param);
#endif /* __HAL_JPEGD_VDPU2_H__ */

View File

@@ -66,7 +66,7 @@ static MPP_RET hal_jpege_flush(void *hal)
return ctx->hal_api.flush(ctx);
}
static MPP_RET hal_jpege_control(void *hal, RK_S32 cmd_type, void *param)
static MPP_RET hal_jpege_control(void *hal, MpiCmd cmd_type, void *param)
{
HalJpegeCtx *ctx = (HalJpegeCtx *)hal;
return ctx->hal_api.control(ctx, cmd_type, param);

View File

@@ -529,7 +529,7 @@ MPP_RET hal_jpege_vepu1_flush(void *hal)
return MPP_OK;
}
MPP_RET hal_jpege_vepu1_control(void *hal, RK_S32 cmd, void *param)
MPP_RET hal_jpege_vepu1_control(void *hal, MpiCmd cmd, void *param)
{
(void)hal;
MPP_RET ret = MPP_OK;

View File

@@ -1,5 +1,22 @@
#ifndef __HAL_JPEGE_VEPU1_H
#define __HAL_JPEGE_VEPU1_H
/*
* Copyright 2015 Rockchip Electronics Co. LTD
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef __HAL_JPEGE_VEPU1_H__
#define __HAL_JPEGE_VEPU1_H__
#include "rk_type.h"
MPP_RET hal_jpege_vepu1_init(void *hal, MppHalCfg *cfg);
@@ -9,6 +26,6 @@ MPP_RET hal_jpege_vepu1_start(void *hal, HalTaskInfo *task);
MPP_RET hal_jpege_vepu1_wait(void *hal, HalTaskInfo *task);
MPP_RET hal_jpege_vepu1_reset(void *hal);
MPP_RET hal_jpege_vepu1_flush(void *hal);
MPP_RET hal_jpege_vepu1_control(void *hal, RK_S32 cmd, void *param);
MPP_RET hal_jpege_vepu1_control(void *hal, MpiCmd cmd, void *param);
#endif

View File

@@ -509,7 +509,7 @@ MPP_RET hal_jpege_vepu2_flush(void *hal)
return MPP_OK;
}
MPP_RET hal_jpege_vepu2_control(void *hal, RK_S32 cmd, void *param)
MPP_RET hal_jpege_vepu2_control(void *hal, MpiCmd cmd, void *param)
{
(void)hal;
MPP_RET ret = MPP_OK;

View File

@@ -15,8 +15,9 @@
* limitations under the License.
*/
#ifndef __HAL_JPEGE_VEPU2_H
#define __HAL_JPEGE_VEPU2_H
#ifndef __HAL_JPEGE_VEPU2_H__
#define __HAL_JPEGE_VEPU2_H__
#include "rk_type.h"
MPP_RET hal_jpege_vepu2_init(void *hal, MppHalCfg *cfg);
@@ -26,6 +27,6 @@ MPP_RET hal_jpege_vepu2_start(void *hal, HalTaskInfo *task);
MPP_RET hal_jpege_vepu2_wait(void *hal, HalTaskInfo *task);
MPP_RET hal_jpege_vepu2_reset(void *hal);
MPP_RET hal_jpege_vepu2_flush(void *hal);
MPP_RET hal_jpege_vepu2_control(void *hal, RK_S32 cmd, void *param);
MPP_RET hal_jpege_vepu2_control(void *hal, MpiCmd cmd, void *param);
#endif

View File

@@ -58,7 +58,7 @@ static MPP_RET hal_m2vd_flush (void *hal)
return self->hal_api.flush(hal);
}
static MPP_RET hal_m2vd_control (void *hal, RK_S32 cmd_type, void *param)
static MPP_RET hal_m2vd_control (void *hal, MpiCmd cmd_type, void *param)
{
M2vdHalCtx *self = (M2vdHalCtx *)hal;
return self->hal_api.control(hal, cmd_type, param);

View File

@@ -310,7 +310,7 @@ MPP_RET hal_m2vd_vdpu1_flush(void *hal)
return ret;
}
MPP_RET hal_m2vd_vdpu1_control(void *hal, RK_S32 cmd_type, void *param)
MPP_RET hal_m2vd_vdpu1_control(void *hal, MpiCmd cmd_type, void *param)
{
MPP_RET ret = MPP_OK;
(void)hal;

View File

@@ -393,7 +393,7 @@ MPP_RET hal_m2vd_vdpu2_flush(void *hal)
return ret;
}
MPP_RET hal_m2vd_vdpu2_control(void *hal, RK_S32 cmd_type, void *param)
MPP_RET hal_m2vd_vdpu2_control(void *hal, MpiCmd cmd_type, void *param)
{
MPP_RET ret = MPP_OK;
m2vh_dbg_func("FUN_I");

View File

@@ -30,7 +30,7 @@ MPP_RET hal_m2vd_vdpu1_start (void *hal, HalTaskInfo *task);
MPP_RET hal_m2vd_vdpu1_wait (void *hal, HalTaskInfo *task);
MPP_RET hal_m2vd_vdpu1_reset (void *hal);
MPP_RET hal_m2vd_vdpu1_flush (void *hal);
MPP_RET hal_m2vd_vdpu1_control (void *hal, RK_S32 cmd_type, void *param);
MPP_RET hal_m2vd_vdpu1_control (void *hal, MpiCmd cmd_type, void *param);
#ifdef __cplusplus
}

View File

@@ -30,7 +30,7 @@ MPP_RET hal_m2vd_vdpu2_start (void *hal, HalTaskInfo *task);
MPP_RET hal_m2vd_vdpu2_wait (void *hal, HalTaskInfo *task);
MPP_RET hal_m2vd_vdpu2_reset (void *hal);
MPP_RET hal_m2vd_vdpu2_flush (void *hal);
MPP_RET hal_m2vd_vdpu2_control (void *hal, RK_S32 cmd_type, void *param);
MPP_RET hal_m2vd_vdpu2_control (void *hal, MpiCmd cmd_type, void *param);
#ifdef __cplusplus
}

View File

@@ -185,7 +185,7 @@ MPP_RET hal_vpu_mpg4d_flush(void *hal)
***********************************************************************
*/
//extern "C"
MPP_RET hal_vpu_mpg4d_control(void *hal, RK_S32 cmd_type, void *param)
MPP_RET hal_vpu_mpg4d_control(void *hal, MpiCmd cmd_type, void *param)
{
hal_mpg4_ctx *p_hal = (hal_mpg4_ctx *)hal;

View File

@@ -458,7 +458,7 @@ MPP_RET vdpu1_mpg4d_flush(void *hal)
return ret;
}
MPP_RET vdpu1_mpg4d_control(void *hal, RK_S32 cmd_type, void *param)
MPP_RET vdpu1_mpg4d_control(void *hal, MpiCmd cmd_type, void *param)
{
MPP_RET ret = MPP_OK;

View File

@@ -30,7 +30,7 @@ MPP_RET vdpu1_mpg4d_start (void *hal, HalTaskInfo *task);
MPP_RET vdpu1_mpg4d_wait (void *hal, HalTaskInfo *task);
MPP_RET vdpu1_mpg4d_reset (void *hal);
MPP_RET vdpu1_mpg4d_flush (void *hal);
MPP_RET vdpu1_mpg4d_control (void *hal, RK_S32 cmd_type, void *param);
MPP_RET vdpu1_mpg4d_control (void *hal, MpiCmd cmd_type, void *param);
#ifdef __cplusplus
}

View File

@@ -456,7 +456,7 @@ MPP_RET vdpu2_mpg4d_flush(void *hal)
return ret;
}
MPP_RET vdpu2_mpg4d_control(void *hal, RK_S32 cmd_type, void *param)
MPP_RET vdpu2_mpg4d_control(void *hal, MpiCmd cmd_type, void *param)
{
MPP_RET ret = MPP_OK;

View File

@@ -30,7 +30,7 @@ MPP_RET vdpu2_mpg4d_start (void *hal, HalTaskInfo *task);
MPP_RET vdpu2_mpg4d_wait (void *hal, HalTaskInfo *task);
MPP_RET vdpu2_mpg4d_reset (void *hal);
MPP_RET vdpu2_mpg4d_flush (void *hal);
MPP_RET vdpu2_mpg4d_control (void *hal, RK_S32 cmd_type, void *param);
MPP_RET vdpu2_mpg4d_control (void *hal, MpiCmd cmd_type, void *param);
#ifdef __cplusplus
}

View File

@@ -27,43 +27,71 @@
static MPP_RET hal_vp8d_reg_gen (void *hal, HalTaskInfo *task)
{
VP8DHalContext_t *self = (VP8DHalContext_t *)hal;
return self->hal_api.reg_gen (hal, task);
if (!self->hal_api.reg_gen)
return MPP_OK;
return self->hal_api.reg_gen(hal, task);
}
static MPP_RET hal_vp8d_start (void *hal, HalTaskInfo *task)
{
VP8DHalContext_t *self = (VP8DHalContext_t *)hal;
return self->hal_api.start (hal, task);
if (!self->hal_api.start)
return MPP_OK;
return self->hal_api.start(hal, task);
}
static MPP_RET hal_vp8d_wait (void *hal, HalTaskInfo *task)
{
VP8DHalContext_t *self = (VP8DHalContext_t *)hal;
return self->hal_api.wait (hal, task);
if (!self->hal_api.wait)
return MPP_OK;
return self->hal_api.wait(hal, task);
}
static MPP_RET hal_vp8d_reset (void *hal)
{
VP8DHalContext_t *self = (VP8DHalContext_t *)hal;
return self->hal_api.reset (hal);
if (!self->hal_api.reset)
return MPP_OK;
return self->hal_api.reset(hal);;
}
static MPP_RET hal_vp8d_flush (void *hal)
{
VP8DHalContext_t *self = (VP8DHalContext_t *)hal;
return self->hal_api.flush (hal);
if (!self->hal_api.flush)
return MPP_OK;
return self->hal_api.flush(hal);
}
static MPP_RET hal_vp8d_control (void *hal, RK_S32 cmd_type, void *param)
static MPP_RET hal_vp8d_control (void *hal, MpiCmd cmd_type, void *param)
{
VP8DHalContext_t *self = (VP8DHalContext_t *)hal;
return self->hal_api.control (hal, cmd_type, param);
if (!self->hal_api.control)
return MPP_OK;
return self->hal_api.control(hal, cmd_type, param);
}
static MPP_RET hal_vp8d_deinit (void *hal)
{
VP8DHalContext_t *self = (VP8DHalContext_t *)hal;
return self->hal_api.deinit (hal);
if (!self->hal_api.deinit)
return MPP_OK;
return self->hal_api.deinit(hal);
}
static MPP_RET hal_vp8d_init (void *hal, MppHalCfg *cfg)
@@ -92,9 +120,9 @@ static MPP_RET hal_vp8d_init (void *hal, MppHalCfg *cfg)
p_api->reg_gen = hal_vp8d_vdpu2_gen_regs;
p_api->start = hal_vp8d_vdpu2_start;
p_api->wait = hal_vp8d_vdpu2_wait;
p_api->reset = hal_vp8d_vdpu2_reset;
p_api->flush = hal_vp8d_vdpu2_flush;
p_api->control = hal_vp8d_vdpu2_control;
p_api->reset = NULL;
p_api->flush = NULL;
p_api->control = NULL;
break;
case VDPU1_MODE:
p_api->init = hal_vp8d_vdpu1_init;
@@ -102,9 +130,9 @@ static MPP_RET hal_vp8d_init (void *hal, MppHalCfg *cfg)
p_api->reg_gen = hal_vp8d_vdpu1_gen_regs;
p_api->start = hal_vp8d_vdpu1_start;
p_api->wait = hal_vp8d_vdpu1_wait;
p_api->reset = hal_vp8d_vdpu1_reset;
p_api->flush = hal_vp8d_vdpu1_flush;
p_api->control = hal_vp8d_vdpu1_control;
p_api->reset = NULL;
p_api->flush = NULL;
p_api->control = NULL;
break;
default:
return MPP_ERR_INIT;

View File

@@ -633,35 +633,3 @@ MPP_RET hal_vp8d_vdpu1_wait(void *hal, HalTaskInfo *task)
(void)task;
return ret;
}
MPP_RET hal_vp8d_vdpu1_reset(void *hal)
{
MPP_RET ret = MPP_OK;
FUN_T("FUN_IN");
(void)hal;
FUN_T("FUN_OUT");
return ret;
}
MPP_RET hal_vp8d_vdpu1_flush(void *hal)
{
MPP_RET ret = MPP_OK;
FUN_T("FUN_IN");
(void)hal;
FUN_T("FUN_OUT");
return ret;
}
MPP_RET hal_vp8d_vdpu1_control(void *hal, RK_S32 cmd_type, void *param)
{
MPP_RET ret = MPP_OK;
FUN_T("FUN_IN");
(void)hal;
(void)cmd_type;
(void)param;
FUN_T("FUN_OUT");
return ret;
}

View File

@@ -16,6 +16,7 @@
#ifndef __HAL_VP8D_VDPU1_H__
#define __HAL_VP8D_VDPU1_H__
#include "hal_vp8d_base.h"
MPP_RET hal_vp8d_vdpu1_init (void *hal, MppHalCfg *cfg);
@@ -23,8 +24,5 @@ MPP_RET hal_vp8d_vdpu1_deinit (void *hal);
MPP_RET hal_vp8d_vdpu1_gen_regs(void *hal, HalTaskInfo *task);
MPP_RET hal_vp8d_vdpu1_start (void *hal, HalTaskInfo *task);
MPP_RET hal_vp8d_vdpu1_wait (void *hal, HalTaskInfo *task);
MPP_RET hal_vp8d_vdpu1_reset (void *hal);
MPP_RET hal_vp8d_vdpu1_flush (void *hal);
MPP_RET hal_vp8d_vdpu1_control (void *hal, RK_S32 cmd_type, void *param);
#endif

View File

@@ -608,35 +608,3 @@ MPP_RET hal_vp8d_vdpu2_wait(void *hal, HalTaskInfo *task)
(void)task;
return ret;
}
MPP_RET hal_vp8d_vdpu2_reset(void *hal)
{
MPP_RET ret = MPP_OK;
FUN_T("FUN_IN");
(void)hal;
FUN_T("FUN_OUT");
return ret;
}
MPP_RET hal_vp8d_vdpu2_flush(void *hal)
{
MPP_RET ret = MPP_OK;
FUN_T("FUN_IN");
(void)hal;
FUN_T("FUN_OUT");
return ret;
}
MPP_RET hal_vp8d_vdpu2_control(void *hal, RK_S32 cmd_type, void *param)
{
MPP_RET ret = MPP_OK;
FUN_T("FUN_IN");
(void)hal;
(void)cmd_type;
(void)param;
FUN_T("FUN_OUT");
return ret;
}

View File

@@ -16,6 +16,7 @@
#ifndef __HAL_VP8D_VDPU2_H__
#define __HAL_VP8D_VDPU2_H__
#include "hal_vp8d_base.h"
MPP_RET hal_vp8d_vdpu2_init (void *hal, MppHalCfg *cfg);
@@ -23,8 +24,5 @@ MPP_RET hal_vp8d_vdpu2_deinit (void *hal);
MPP_RET hal_vp8d_vdpu2_gen_regs(void *hal, HalTaskInfo *task);
MPP_RET hal_vp8d_vdpu2_start (void *hal, HalTaskInfo *task);
MPP_RET hal_vp8d_vdpu2_wait (void *hal, HalTaskInfo *task);
MPP_RET hal_vp8d_vdpu2_reset (void *hal);
MPP_RET hal_vp8d_vdpu2_flush (void *hal);
MPP_RET hal_vp8d_vdpu2_control (void *hal, RK_S32 cmd_type, void *param);
#endif

View File

@@ -68,7 +68,7 @@ static MPP_RET hal_vp8e_flush(void *hal)
return ctx->hal_api.flush(ctx);
}
static MPP_RET hal_vp8e_control(void *hal, RK_S32 cmd_type, void *param)
static MPP_RET hal_vp8e_control(void *hal, MpiCmd cmd_type, void *param)
{
HalVp8eCtx *ctx = (HalVp8eCtx *)hal;

View File

@@ -479,7 +479,7 @@ MPP_RET hal_vp8e_vepu1_flush(void *hal)
return MPP_OK;
}
MPP_RET hal_vp8e_vepu1_control(void *hal, RK_S32 cmd, void *param)
MPP_RET hal_vp8e_vepu1_control(void *hal, MpiCmd cmd, void *param)
{
(void)hal;
(void)cmd;

View File

@@ -22,6 +22,7 @@
#ifdef __cplusplus
extern "C" {
#endif
MPP_RET hal_vp8e_vepu1_init(void *hal, MppHalCfg *cfg);
MPP_RET hal_vp8e_vepu1_deinit(void *hal);
MPP_RET hal_vp8e_vepu1_gen_regs(void *hal, HalTaskInfo *task);
@@ -29,7 +30,8 @@ MPP_RET hal_vp8e_vepu1_start(void *hal, HalTaskInfo *task);
MPP_RET hal_vp8e_vepu1_wait(void *hal, HalTaskInfo *task);
MPP_RET hal_vp8e_vepu1_reset(void *hal);
MPP_RET hal_vp8e_vepu1_flush(void *hal);
MPP_RET hal_vp8e_vepu1_control(void *hal, RK_S32 cmd, void *param);
MPP_RET hal_vp8e_vepu1_control(void *hal, MpiCmd cmd, void *param);
#ifdef __cplusplus
}
#endif

View File

@@ -476,7 +476,7 @@ MPP_RET hal_vp8e_vepu2_flush(void *hal)
return MPP_OK;
}
MPP_RET hal_vp8e_vepu2_control(void *hal, RK_S32 cmd, void *param)
MPP_RET hal_vp8e_vepu2_control(void *hal, MpiCmd cmd, void *param)
{
(void)hal;
(void)cmd;

View File

@@ -29,7 +29,7 @@ MPP_RET hal_vp8e_vepu2_start(void *hal, HalTaskInfo *task);
MPP_RET hal_vp8e_vepu2_wait(void *hal, HalTaskInfo *task);
MPP_RET hal_vp8e_vepu2_reset(void *hal);
MPP_RET hal_vp8e_vepu2_flush(void *hal);
MPP_RET hal_vp8e_vepu2_control(void *hal, RK_S32 cmd, void *param);
MPP_RET hal_vp8e_vepu2_control(void *hal, MpiCmd cmd, void *param);
#ifdef __cplusplus
}
#endif

Some files were not shown because too many files have changed in this diff Show More