[test]: Add read packet config function

When mpp output packet binary file with size config file test case
should be enable to parser the corresponding config file.
This patch implement the config file option with "-c" prefix.

Command line sample:
mpi_dec_test -t 7 -i /sdcard/in.bin -i /sdcard/ops.bin
Then the test case will read in.bin file with size division specified
in ops.bin.

Change-Id: I8b18a6475d77f0303f12614a063888dcd9505f16
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
This commit is contained in:
Herman Chen
2018-10-12 09:11:45 +08:00
parent a0f76729d5
commit 4553fac11e
3 changed files with 90 additions and 3 deletions

View File

@@ -18,6 +18,7 @@
#define __UTILS_H__
#include <stdio.h>
#include "mpp_err.h"
#include "mpp_frame.h"
@@ -66,6 +67,15 @@ MPP_RET fill_yuv_image(RK_U8 *buf, RK_U32 width, RK_U32 height,
RK_U32 hor_stride, RK_U32 ver_stride, MppFrameFormat fmt,
RK_U32 frame_count);
typedef struct OpsLine_t {
RK_U32 index;
char cmd[8];
RK_U64 value1;
RK_U64 value2;
} OpsLine;
RK_S32 parse_config_line(const char *str, OpsLine *info);
#ifdef __cplusplus
}
#endif