mirror of
https://github.com/nyanmisaka/mpp.git
synced 2025-10-05 09:06:50 +08:00
[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:
@@ -385,3 +385,12 @@ MPP_RET fill_yuv_image(RK_U8 *buf, RK_U32 width, RK_U32 height,
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
RK_S32 parse_config_line(const char *str, OpsLine *info)
|
||||
{
|
||||
RK_S32 cnt = sscanf(str, "%*[^,],%d,%[^,],%llu,%llu\n",
|
||||
&info->index, info->cmd,
|
||||
&info->value1, &info->value2);
|
||||
|
||||
return cnt;
|
||||
}
|
||||
|
Reference in New Issue
Block a user