[vpu_api_test]: format file style

git-svn-id: https://10.10.10.66:8443/svn/MediaProcessPlatform/trunk/mpp@75 6e48237b-75ef-9749-8fc9-41990f28c85a
This commit is contained in:
ChenHengming
2015-08-12 06:00:31 +00:00
parent 8b7b9dc198
commit d8a5b75564

View File

@@ -29,7 +29,7 @@ static RK_U32 VPU_API_DEMO_DEBUG_DISABLE = 0;
#define BSWAP32(x) \ #define BSWAP32(x) \
((((x) & 0xff000000) >> 24) | (((x) & 0x00ff0000) >> 8) | \ ((((x) & 0xff000000) >> 24) | (((x) & 0x00ff0000) >> 8) | \
(((x) & 0x0000ff00) << 8) | (((x) & 0x000000ff) << 24)) (((x) & 0x0000ff00) << 8) | (((x) & 0x000000ff) << 24))
#define DEMO_ERR_RET(err) do { ret = err; goto DEMO_OUT; } while (0) #define DEMO_ERR_RET(err) do { ret = err; goto DEMO_OUT; } while (0)
#define DECODE_ERR_RET(err) do { ret = err; goto DECODE_OUT; } while (0) #define DECODE_ERR_RET(err) do { ret = err; goto DECODE_OUT; } while (0)
@@ -51,9 +51,9 @@ typedef enum VPU_API_DEMO_RET {
} VPU_API_DEMO_RET; } VPU_API_DEMO_RET;
typedef struct VpuApiCmd { typedef struct VpuApiCmd {
RK_U8* name; char* name;
RK_U8* argname; char* argname;
RK_U8* help; char* help;
} VpuApiCmd_t; } VpuApiCmd_t;
typedef struct VpuApiDemoCmdContext { typedef struct VpuApiDemoCmdContext {
@@ -76,15 +76,15 @@ typedef struct VpuApiEncInput {
} VpuApiEncInput; } VpuApiEncInput;
static VpuApiCmd_t vpuApiCmd[] = { static VpuApiCmd_t vpuApiCmd[] = {
{(RK_U8*)"i", (RK_U8*)"input_file", (RK_U8*)"input bitstream file"}, {"i", "input_file", "input bitstream file"},
{(RK_U8*)"o", (RK_U8*)"output_file", (RK_U8*)"output bitstream file, "}, {"o", "output_file", "output bitstream file, "},
{(RK_U8*)"w", (RK_U8*)"width", (RK_U8*)"the width of input bitstream"}, {"w", "width", "the width of input bitstream"},
{(RK_U8*)"h", (RK_U8*)"height", (RK_U8*)"the height of input bitstream"}, {"h", "height", "the height of input bitstream"},
{(RK_U8*)"t", (RK_U8*)"codec_type", (RK_U8*)"the codec type, dec: deoder, enc: encoder, default: decoder"}, {"t", "codec_type", "the codec type, dec: deoder, enc: encoder, default: decoder"},
{(RK_U8*)"coding", (RK_U8*)"coding_type", (RK_U8*)"encoding type of the bitstream"}, {"coding", "coding_type", "encoding type of the bitstream"},
{(RK_U8*)"vframes", (RK_U8*)"number", (RK_U8*)"set the number of video frames to record"}, {"vframes", "number", "set the number of video frames to record"},
{(RK_U8*)"ss", (RK_U8*)"time_off", (RK_U8*)"set the start time offset, use Ms as the unit."}, {"ss", "time_off", "set the start time offset, use Ms as the unit."},
{(RK_U8*)"d", (RK_U8*)"disable", (RK_U8*)"disable the debug output info."}, {"d", "disable", "disable the debug output info."},
}; };
static void show_usage() static void show_usage()
@@ -236,11 +236,11 @@ static RK_S32 readBytesFromFile(RK_U8* buf, RK_S32 aBytes, FILE* file)
} }
RK_S32 ret = (RK_S32)fread(buf, 1, aBytes, file); RK_S32 ret = (RK_S32)fread(buf, 1, aBytes, file);
if(ret != aBytes) if(ret != aBytes)
{ {
mpp_log("read %d bytes from file fail\n", aBytes); mpp_log("read %d bytes from file fail\n", aBytes);
return -1; return -1;
} }
return 0; return 0;
} }