Lines Matching refs:cmd

38 static RK_S32 rga_test_parse_options(int argc, char **argv, RgaTestCmd *cmd)  in rga_test_parse_options()  argument
46 if (argc < 2 || cmd == NULL) { in rga_test_parse_options()
70 strncpy(cmd->input_file, next, MAX_NAME_LENGTH - 1); in rga_test_parse_options()
71 cmd->input_file[strlen(next)] = '\0'; in rga_test_parse_options()
72 cmd->have_input = 1; in rga_test_parse_options()
80 strncpy(cmd->output_file, next, MAX_NAME_LENGTH - 1); in rga_test_parse_options()
81 cmd->output_file[strlen(next)] = '\0'; in rga_test_parse_options()
82 cmd->have_output = 1; in rga_test_parse_options()
90 cmd->src_w = atoi(next); in rga_test_parse_options()
98 cmd->src_h = atoi(next); in rga_test_parse_options()
106 cmd->src_fmt = (MppFrameFormat) atoi(next); in rga_test_parse_options()
107 err = ((cmd->src_fmt >= MPP_FMT_YUV_BUTT && cmd->src_fmt < MPP_FRAME_FMT_RGB) || in rga_test_parse_options()
108 cmd->src_fmt >= MPP_FMT_RGB_BUTT); in rga_test_parse_options()
116 cmd->dst_w = atoi(next); in rga_test_parse_options()
118 cmd->dst_h = atoi(next); in rga_test_parse_options()
120 cmd->dst_fmt = (MppFrameFormat) atoi(next); in rga_test_parse_options()
138 RgaTestCmd cmd; in main() local
156 memset(&cmd, 0, sizeof(cmd)); in main()
157 if (rga_test_parse_options(argc, argv, &cmd)) { in main()
163 cmd.src_w, cmd.src_h, cmd.src_fmt, in main()
164 cmd.dst_w, cmd.dst_h, cmd.dst_fmt, in main()
165 cmd.input_file, cmd.output_file); in main()
167 src_w = cmd.src_w; in main()
168 src_h = cmd.src_h; in main()
169 dst_w = cmd.dst_w; in main()
170 dst_h = cmd.dst_h; in main()
174 if (cmd.have_input) { in main()
175 fin = fopen(cmd.input_file, "r"); in main()
177 mpp_log("open input file %s failed\n", cmd.input_file); in main()
182 if (cmd.have_output) { in main()
183 fout = fopen(cmd.output_file, "w+"); in main()
185 mpp_log("open output file %s failed\n", cmd.output_file); in main()
215 if (cmd.have_input) { in main()
216 ret = read_image((RK_U8 *)ptr, fin, cmd.src_w, cmd.src_h, in main()
217 cmd.src_w, cmd.src_h, cmd.dst_fmt); in main()
223 ret = fill_image((RK_U8 *)ptr, cmd.src_w, cmd.src_h, in main()
224 cmd.src_w, cmd.src_h, cmd.src_fmt, frame_count); in main()
236 mpp_frame_set_fmt(src_frm, cmd.src_fmt); in main()
243 mpp_frame_set_fmt(dst_frm, cmd.dst_fmt); in main()
282 mpp_frame_set_fmt(src_frm, cmd.dst_fmt); in main()
314 if (cmd.have_output) in main()