Lines Matching refs:cmd

441     MpiDecTestCmd *cmd = (MpiDecTestCmd *)ctx;  in mpi_dec_opt_i()  local
444 strncpy(cmd->file_input, next, MAX_FILE_NAME_LENGTH - 1); in mpi_dec_opt_i()
445 cmd->have_input = 1; in mpi_dec_opt_i()
446 if (!cmd->type) in mpi_dec_opt_i()
447 name_to_coding_type(cmd->file_input, &cmd->type); in mpi_dec_opt_i()
457 MpiDecTestCmd *cmd = (MpiDecTestCmd *)ctx; in mpi_dec_opt_o() local
460 strncpy(cmd->file_output, next, MAX_FILE_NAME_LENGTH - 1); in mpi_dec_opt_o()
461 cmd->have_output = 1; in mpi_dec_opt_o()
471 MpiDecTestCmd *cmd = (MpiDecTestCmd *)ctx; in mpi_dec_opt_w() local
474 cmd->width = atoi(next); in mpi_dec_opt_w()
484 MpiDecTestCmd *cmd = (MpiDecTestCmd *)ctx; in mpi_dec_opt_h() local
487 cmd->height = atoi(next); in mpi_dec_opt_h()
497 MpiDecTestCmd *cmd = (MpiDecTestCmd *)ctx; in mpi_dec_opt_t() local
502 cmd->type = (MppCodingType)atoi(next); in mpi_dec_opt_t()
503 ret = mpp_check_support_format(MPP_CTX_DEC, cmd->type); in mpi_dec_opt_t()
514 MpiDecTestCmd *cmd = (MpiDecTestCmd *)ctx; in mpi_dec_opt_f() local
517 cmd->format = (MppFrameFormat)atoi(next); in mpi_dec_opt_f()
519 if (MPP_FRAME_FMT_IS_YUV(cmd->format) || in mpi_dec_opt_f()
520 MPP_FRAME_FMT_IS_RGB(cmd->format)) in mpi_dec_opt_f()
525 cmd->format = MPP_FMT_BUTT; in mpi_dec_opt_f()
531 MpiDecTestCmd *cmd = (MpiDecTestCmd *)ctx; in mpi_dec_opt_n() local
534 cmd->frame_num = atoi(next); in mpi_dec_opt_n()
536 if (cmd->frame_num < 0) in mpi_dec_opt_n()
548 MpiDecTestCmd *cmd = (MpiDecTestCmd *)ctx; in mpi_dec_opt_s() local
550 cmd->nthreads = -1; in mpi_dec_opt_s()
552 cmd->nthreads = atoi(next); in mpi_dec_opt_s()
553 if (cmd->nthreads >= 1) in mpi_dec_opt_s()
557 mpp_err("invalid nthreads %d\n", cmd->nthreads); in mpi_dec_opt_s()
558 cmd->nthreads = 1; in mpi_dec_opt_s()
564 MpiDecTestCmd *cmd = (MpiDecTestCmd *)ctx; in mpi_dec_opt_v() local
568 cmd->quiet = 1; in mpi_dec_opt_v()
570 cmd->trace_fps = 1; in mpi_dec_opt_v()
580 MpiDecTestCmd *cmd = (MpiDecTestCmd *)ctx; in mpi_dec_opt_slt() local
585 cmd->file_slt = mpp_calloc(char, len + 1); in mpi_dec_opt_slt()
586 strncpy(cmd->file_slt, next, len); in mpi_dec_opt_slt()
665 RK_S32 mpi_dec_test_cmd_init(MpiDecTestCmd* cmd, int argc, char **argv) in mpi_dec_test_cmd_init() argument
671 if ((argc < 2) || (cmd == NULL)) in mpi_dec_test_cmd_init()
676 mpp_opt_setup(opts, cmd, 22, dec_opt_cnt); in mpi_dec_test_cmd_init()
686 if (cmd->have_input) { in mpi_dec_test_cmd_init()
687 reader_init(&cmd->reader, cmd->file_input, cmd->type); in mpi_dec_test_cmd_init()
688 if (cmd->reader) in mpi_dec_test_cmd_init()
689 mpp_log("input file %s size %ld\n", cmd->file_input, reader_size(cmd->reader)); in mpi_dec_test_cmd_init()
691 if (cmd->trace_fps) { in mpi_dec_test_cmd_init()
692 fps_calc_init(&cmd->fps); in mpi_dec_test_cmd_init()
693 mpp_assert(cmd->fps); in mpi_dec_test_cmd_init()
694 fps_calc_set_cb(cmd->fps, show_dec_fps); in mpi_dec_test_cmd_init()
709 RK_S32 mpi_dec_test_cmd_deinit(MpiDecTestCmd* cmd) in mpi_dec_test_cmd_deinit() argument
711 if (!cmd) in mpi_dec_test_cmd_deinit()
714 if (cmd->reader) { in mpi_dec_test_cmd_deinit()
715 reader_deinit(cmd->reader); in mpi_dec_test_cmd_deinit()
716 cmd->reader = NULL; in mpi_dec_test_cmd_deinit()
719 MPP_FREE(cmd->file_slt); in mpi_dec_test_cmd_deinit()
721 if (cmd->fps) { in mpi_dec_test_cmd_deinit()
722 fps_calc_deinit(cmd->fps); in mpi_dec_test_cmd_deinit()
723 cmd->fps = NULL; in mpi_dec_test_cmd_deinit()
729 void mpi_dec_test_cmd_options(MpiDecTestCmd* cmd) in mpi_dec_test_cmd_options() argument
731 if (cmd->quiet) in mpi_dec_test_cmd_options()
735 mpp_log("input file name: %s\n", cmd->file_input); in mpi_dec_test_cmd_options()
736 mpp_log("output file name: %s\n", cmd->file_output); in mpi_dec_test_cmd_options()
737 mpp_log("width : %4d\n", cmd->width); in mpi_dec_test_cmd_options()
738 mpp_log("height : %4d\n", cmd->height); in mpi_dec_test_cmd_options()
739 mpp_log("type : %4d\n", cmd->type); in mpi_dec_test_cmd_options()
740 mpp_log("max frames : %4d\n", cmd->frame_num); in mpi_dec_test_cmd_options()
741 if (cmd->file_slt) in mpi_dec_test_cmd_options()
742 mpp_log("verify : %s\n", cmd->file_slt); in mpi_dec_test_cmd_options()