[mpg4d]: fixup the compiler warnings

Change-Id: I70b6731258aaf34ef6f5e605ae8332218dab710b
Signed-off-by: Randy Li <randy.li@rock-chips.com>
This commit is contained in:
Randy Li
2017-08-17 16:52:20 +08:00
parent 7790a03213
commit 28027cdaa4
4 changed files with 22 additions and 24 deletions

View File

@@ -52,7 +52,7 @@ typedef struct {
Mpg4dParser parser;
} Mpg4dCtx;
MPP_RET mpg4d_init(void *dec, ParserCfg *cfg)
static MPP_RET mpg4d_init(void *dec, ParserCfg *cfg)
{
Mpg4dParser parser = NULL;
MppPacket task_pkt = NULL;
@@ -113,7 +113,7 @@ ERR_RET:
return ret;
}
MPP_RET mpg4d_deinit(void *dec)
static MPP_RET mpg4d_deinit(void *dec)
{
Mpg4dCtx *p;
if (NULL == dec) {
@@ -138,7 +138,7 @@ MPP_RET mpg4d_deinit(void *dec)
return MPP_OK;
}
MPP_RET mpg4d_reset(void *dec)
static MPP_RET mpg4d_reset(void *dec)
{
if (NULL == dec) {
mpp_err_f("found NULL intput\n");
@@ -150,8 +150,7 @@ MPP_RET mpg4d_reset(void *dec)
return mpp_mpg4_parser_reset(p->parser);
}
MPP_RET mpg4d_flush(void *dec)
static MPP_RET mpg4d_flush(void *dec)
{
if (NULL == dec) {
mpp_err_f("found NULL intput\n");
@@ -162,8 +161,7 @@ MPP_RET mpg4d_flush(void *dec)
return mpp_mpg4_parser_flush(p->parser);
}
MPP_RET mpg4d_control(void *dec, RK_S32 cmd_type, void *param)
static MPP_RET mpg4d_control(void *dec, RK_S32 cmd_type, void *param)
{
Mpg4dCtx *p;
@@ -182,7 +180,7 @@ MPP_RET mpg4d_control(void *dec, RK_S32 cmd_type, void *param)
return MPP_OK;
}
MPP_RET mpg4d_prepare(void *dec, MppPacket pkt, HalDecTask *task)
static MPP_RET mpg4d_prepare(void *dec, MppPacket pkt, HalDecTask *task)
{
Mpg4dCtx *p;
RK_U8 *pos;
@@ -202,7 +200,6 @@ MPP_RET mpg4d_prepare(void *dec, MppPacket pkt, HalDecTask *task)
if (eos && !length) {
task->valid = 0;
task->flags.eos = 1;
mpp_log("mpeg4d flush eos");
mpg4d_flush(dec);
return MPP_OK;
}
@@ -280,7 +277,7 @@ MPP_RET mpg4d_prepare(void *dec, MppPacket pkt, HalDecTask *task)
return MPP_OK;
}
MPP_RET mpg4d_parse(void *dec, HalDecTask *task)
static MPP_RET mpg4d_parse(void *dec, HalDecTask *task)
{
MPP_RET ret;
Mpg4dCtx *p;
@@ -310,7 +307,7 @@ MPP_RET mpg4d_parse(void *dec, HalDecTask *task)
return MPP_OK;
}
MPP_RET mpg4d_callback(void *dec, void *err_info)
static MPP_RET mpg4d_callback(void *dec, void *err_info)
{
(void)dec;
(void)err_info;
@@ -318,17 +315,17 @@ MPP_RET mpg4d_callback(void *dec, void *err_info)
}
const ParserApi api_mpg4d_parser = {
"api_mpg4d_parser",
MPP_VIDEO_CodingMPEG4,
sizeof(Mpg4dCtx),
0,
mpg4d_init,
mpg4d_deinit,
mpg4d_prepare,
mpg4d_parse,
mpg4d_reset,
mpg4d_flush,
mpg4d_control,
mpg4d_callback,
.name = "api_mpg4d_parser",
.coding = MPP_VIDEO_CodingMPEG4,
.ctx_size = sizeof(Mpg4dCtx),
.flag = 0,
.init = mpg4d_init,
.deinit = mpg4d_deinit,
.prepare = mpg4d_prepare,
.parse = mpg4d_parse,
.reset = mpg4d_reset,
.flush = mpg4d_flush,
.control = mpg4d_control,
.callback = mpg4d_callback,
};

View File

@@ -796,7 +796,6 @@ static MPP_RET mpeg4_parse_profile_level(Mpg4dParserImpl *p, BitReadCtx_t *bc)
{
READ_BITS(bc, 4, &p->profile);
READ_BITS(bc, 4, &p->level);
mpp_log("mpeg4 stream profile %d level %d\n", p->profile, p->level);
return MPP_OK;
__BITREAD_ERR:

View File

@@ -31,6 +31,7 @@
#include "mpg4d_syntax.h"
#include "hal_mpg4d_api.h"
#include "hal_m4vd_com.h"
#include "hal_m4vd_vdpu1.h"
#include "hal_m4vd_vdpu1_reg.h"
static void vdpu1_mpg4d_setup_regs_by_syntax(hal_mpg4_ctx *ctx, MppSyntax syntax)

View File

@@ -31,6 +31,7 @@
#include "mpg4d_syntax.h"
#include "hal_mpg4d_api.h"
#include "hal_m4vd_com.h"
#include "hal_m4vd_vdpu2.h"
#include "hal_m4vd_vdpu2_reg.h"
static void vdpu2_mpg4d_setup_regs_by_syntax(hal_mpg4_ctx *ctx, MppSyntax syntax)