mirror of
https://github.com/nyanmisaka/mpp.git
synced 2025-10-05 01:02:39 +08:00
[test]: Use different function name in dec tests
Change-Id: I672abbcc654f084b52d337c61d55218d7f342f7b Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
This commit is contained in:
@@ -242,7 +242,7 @@ void *thread_output(void *arg)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
int mpi_dec_test_decode(MpiDecTestCmd *cmd)
|
int mt_dec_decode(MpiDecTestCmd *cmd)
|
||||||
{
|
{
|
||||||
MPP_RET ret = MPP_OK;
|
MPP_RET ret = MPP_OK;
|
||||||
size_t file_size = 0;
|
size_t file_size = 0;
|
||||||
@@ -451,7 +451,7 @@ int main(int argc, char **argv)
|
|||||||
|
|
||||||
mpp_env_set_u32("mpi_debug", cmd->debug);
|
mpp_env_set_u32("mpi_debug", cmd->debug);
|
||||||
|
|
||||||
ret = mpi_dec_test_decode(cmd);
|
ret = mt_dec_decode(cmd);
|
||||||
if (MPP_OK == ret)
|
if (MPP_OK == ret)
|
||||||
mpp_log("test success\n");
|
mpp_log("test success\n");
|
||||||
else
|
else
|
||||||
|
@@ -76,7 +76,7 @@ typedef struct {
|
|||||||
MpiDecCtxRet ret; // return of decoder
|
MpiDecCtxRet ret; // return of decoder
|
||||||
} MpiDecCtxInfo;
|
} MpiDecCtxInfo;
|
||||||
|
|
||||||
static int decode_simple(MpiDecCtx *data)
|
static int multi_dec_simple(MpiDecCtx *data)
|
||||||
{
|
{
|
||||||
RK_U32 pkt_done = 0;
|
RK_U32 pkt_done = 0;
|
||||||
RK_U32 pkt_eos = 0;
|
RK_U32 pkt_eos = 0;
|
||||||
@@ -249,7 +249,7 @@ static int decode_simple(MpiDecCtx *data)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int decode_advanced(MpiDecCtx *data)
|
static int multi_dec_advanced(MpiDecCtx *data)
|
||||||
{
|
{
|
||||||
RK_U32 pkt_eos = 0;
|
RK_U32 pkt_eos = 0;
|
||||||
MPP_RET ret = MPP_OK;
|
MPP_RET ret = MPP_OK;
|
||||||
@@ -346,7 +346,7 @@ static int decode_advanced(MpiDecCtx *data)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
void* mpi_dec_test_decode(void *cmd_ctx)
|
void* multi_dec_decode(void *cmd_ctx)
|
||||||
{
|
{
|
||||||
MpiDecCtxInfo *info = (MpiDecCtxInfo *)cmd_ctx;
|
MpiDecCtxInfo *info = (MpiDecCtxInfo *)cmd_ctx;
|
||||||
MpiDecTestCmd *cmd = info->cmd;
|
MpiDecTestCmd *cmd = info->cmd;
|
||||||
@@ -516,11 +516,11 @@ void* mpi_dec_test_decode(void *cmd_ctx)
|
|||||||
t_s = mpp_time();
|
t_s = mpp_time();
|
||||||
if (cmd->simple) {
|
if (cmd->simple) {
|
||||||
while (!dec_ctx->eos) {
|
while (!dec_ctx->eos) {
|
||||||
decode_simple(dec_ctx);
|
multi_dec_simple(dec_ctx);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
while (!dec_ctx->eos) {
|
while (!dec_ctx->eos) {
|
||||||
decode_advanced(dec_ctx);
|
multi_dec_advanced(dec_ctx);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
t_e = mpp_time();
|
t_e = mpp_time();
|
||||||
@@ -625,7 +625,7 @@ int main(int argc, char **argv)
|
|||||||
for (i = 0; i < cmd->nthreads; i++) {
|
for (i = 0; i < cmd->nthreads; i++) {
|
||||||
ctxs[i].cmd = cmd;
|
ctxs[i].cmd = cmd;
|
||||||
|
|
||||||
ret = pthread_create(&ctxs[i].thd, NULL, mpi_dec_test_decode, &ctxs[i]);
|
ret = pthread_create(&ctxs[i].thd, NULL, multi_dec_decode, &ctxs[i]);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
mpp_log("failed to create thread %d\n", i);
|
mpp_log("failed to create thread %d\n", i);
|
||||||
return ret;
|
return ret;
|
||||||
|
@@ -57,7 +57,7 @@ typedef struct {
|
|||||||
FileReader reader;
|
FileReader reader;
|
||||||
} MpiDecLoopData;
|
} MpiDecLoopData;
|
||||||
|
|
||||||
static int decode_simple(MpiDecLoopData *data)
|
static int dec_simple(MpiDecLoopData *data)
|
||||||
{
|
{
|
||||||
RK_U32 pkt_done = 0;
|
RK_U32 pkt_done = 0;
|
||||||
RK_U32 pkt_eos = 0;
|
RK_U32 pkt_eos = 0;
|
||||||
@@ -359,7 +359,7 @@ static int decode_simple(MpiDecLoopData *data)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int decode_advanced(MpiDecLoopData *data)
|
static int dec_advanced(MpiDecLoopData *data)
|
||||||
{
|
{
|
||||||
RK_U32 pkt_eos = 0;
|
RK_U32 pkt_eos = 0;
|
||||||
MPP_RET ret = MPP_OK;
|
MPP_RET ret = MPP_OK;
|
||||||
@@ -459,7 +459,7 @@ static int decode_advanced(MpiDecLoopData *data)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
int mpi_dec_test_decode(MpiDecTestCmd *cmd)
|
int dec_decode(MpiDecTestCmd *cmd)
|
||||||
{
|
{
|
||||||
MPP_RET ret = MPP_OK;
|
MPP_RET ret = MPP_OK;
|
||||||
size_t file_size = 0;
|
size_t file_size = 0;
|
||||||
@@ -633,7 +633,7 @@ int mpi_dec_test_decode(MpiDecTestCmd *cmd)
|
|||||||
|
|
||||||
if (cmd->simple) {
|
if (cmd->simple) {
|
||||||
while (!data.eos) {
|
while (!data.eos) {
|
||||||
decode_simple(&data);
|
dec_simple(&data);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
/* NOTE: change output format before jpeg decoding */
|
/* NOTE: change output format before jpeg decoding */
|
||||||
@@ -641,7 +641,7 @@ int mpi_dec_test_decode(MpiDecTestCmd *cmd)
|
|||||||
ret = mpi->control(ctx, MPP_DEC_SET_OUTPUT_FORMAT, &cmd->format);
|
ret = mpi->control(ctx, MPP_DEC_SET_OUTPUT_FORMAT, &cmd->format);
|
||||||
|
|
||||||
while (!data.eos) {
|
while (!data.eos) {
|
||||||
decode_advanced(&data);
|
dec_advanced(&data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -752,7 +752,7 @@ int main(int argc, char **argv)
|
|||||||
|
|
||||||
cmd->simple = (cmd->type != MPP_VIDEO_CodingMJPEG) ? (1) : (0);
|
cmd->simple = (cmd->type != MPP_VIDEO_CodingMJPEG) ? (1) : (0);
|
||||||
|
|
||||||
ret = mpi_dec_test_decode(cmd);
|
ret = dec_decode(cmd);
|
||||||
if (MPP_OK == ret)
|
if (MPP_OK == ret)
|
||||||
mpp_log("test success max memory %.2f MB\n", cmd->max_usage / (float)(1 << 20));
|
mpp_log("test success max memory %.2f MB\n", cmd->max_usage / (float)(1 << 20));
|
||||||
else
|
else
|
||||||
|
Reference in New Issue
Block a user