Lines Matching refs:cmd

433     MpiDecTestCmd *cmd = (MpiDecTestCmd *)ctx;  in mpi_dec_opt_i()  local
436 strncpy(cmd->file_input, next, MAX_FILE_NAME_LENGTH - 1); in mpi_dec_opt_i()
437 cmd->have_input = 1; in mpi_dec_opt_i()
438 if (!cmd->type) in mpi_dec_opt_i()
439 name_to_coding_type(cmd->file_input, &cmd->type); in mpi_dec_opt_i()
449 MpiDecTestCmd *cmd = (MpiDecTestCmd *)ctx; in mpi_dec_opt_o() local
452 strncpy(cmd->file_output, next, MAX_FILE_NAME_LENGTH - 1); in mpi_dec_opt_o()
453 cmd->have_output = 1; in mpi_dec_opt_o()
463 MpiDecTestCmd *cmd = (MpiDecTestCmd *)ctx; in mpi_dec_opt_w() local
466 cmd->width = atoi(next); in mpi_dec_opt_w()
476 MpiDecTestCmd *cmd = (MpiDecTestCmd *)ctx; in mpi_dec_opt_h() local
479 cmd->height = atoi(next); in mpi_dec_opt_h()
489 MpiDecTestCmd *cmd = (MpiDecTestCmd *)ctx; in mpi_dec_opt_t() local
494 cmd->type = (MppCodingType)atoi(next); in mpi_dec_opt_t()
495 ret = mpp_check_support_format(MPP_CTX_DEC, cmd->type); in mpi_dec_opt_t()
506 MpiDecTestCmd *cmd = (MpiDecTestCmd *)ctx; in mpi_dec_opt_f() local
516 cmd->format = format; in mpi_dec_opt_f()
524 cmd->format = MPP_FMT_YUV420SP; in mpi_dec_opt_f()
530 MpiDecTestCmd *cmd = (MpiDecTestCmd *)ctx; in mpi_dec_opt_n() local
533 cmd->frame_num = atoi(next); in mpi_dec_opt_n()
535 if (cmd->frame_num < 0) in mpi_dec_opt_n()
547 MpiDecTestCmd *cmd = (MpiDecTestCmd *)ctx; in mpi_dec_opt_s() local
549 cmd->nthreads = -1; in mpi_dec_opt_s()
551 cmd->nthreads = atoi(next); in mpi_dec_opt_s()
552 if (cmd->nthreads >= 1) in mpi_dec_opt_s()
556 mpp_err("invalid nthreads %d\n", cmd->nthreads); in mpi_dec_opt_s()
557 cmd->nthreads = 1; in mpi_dec_opt_s()
563 MpiDecTestCmd *cmd = (MpiDecTestCmd *)ctx; in mpi_dec_opt_v() local
567 cmd->quiet = 1; in mpi_dec_opt_v()
569 cmd->trace_fps = 1; in mpi_dec_opt_v()
579 MpiDecTestCmd *cmd = (MpiDecTestCmd *)ctx; in mpi_dec_opt_slt() local
584 cmd->file_slt = mpp_calloc(char, len + 1); in mpi_dec_opt_slt()
585 strncpy(cmd->file_slt, next, len); in mpi_dec_opt_slt()
597 MpiDecTestCmd *cmd = (MpiDecTestCmd *)ctx; in mpi_dec_opt_bufmode() local
601 cmd->buf_mode = MPP_DEC_BUF_HALF_INT; in mpi_dec_opt_bufmode()
603 cmd->buf_mode = MPP_DEC_BUF_INTERNAL; in mpi_dec_opt_bufmode()
605 cmd->buf_mode = MPP_DEC_BUF_EXTERNAL; in mpi_dec_opt_bufmode()
607 cmd->buf_mode = MPP_DEC_BUF_HALF_INT; in mpi_dec_opt_bufmode()
688 RK_S32 mpi_dec_test_cmd_init(MpiDecTestCmd* cmd, int argc, char **argv) in mpi_dec_test_cmd_init() argument
694 if ((argc < 2) || (cmd == NULL)) in mpi_dec_test_cmd_init()
699 mpp_opt_setup(opts, cmd); in mpi_dec_test_cmd_init()
709 if (cmd->have_input) { in mpi_dec_test_cmd_init()
710 reader_init(&cmd->reader, cmd->file_input, cmd->type); in mpi_dec_test_cmd_init()
711 if (cmd->reader) in mpi_dec_test_cmd_init()
712 mpp_log("input file %s size %ld\n", cmd->file_input, reader_size(cmd->reader)); in mpi_dec_test_cmd_init()
714 if (cmd->trace_fps) { in mpi_dec_test_cmd_init()
715 fps_calc_init(&cmd->fps); in mpi_dec_test_cmd_init()
716 mpp_assert(cmd->fps); in mpi_dec_test_cmd_init()
717 fps_calc_set_cb(cmd->fps, show_dec_fps); in mpi_dec_test_cmd_init()
732 RK_S32 mpi_dec_test_cmd_deinit(MpiDecTestCmd* cmd) in mpi_dec_test_cmd_deinit() argument
734 if (!cmd) in mpi_dec_test_cmd_deinit()
737 if (cmd->reader) { in mpi_dec_test_cmd_deinit()
738 reader_deinit(cmd->reader); in mpi_dec_test_cmd_deinit()
739 cmd->reader = NULL; in mpi_dec_test_cmd_deinit()
742 MPP_FREE(cmd->file_slt); in mpi_dec_test_cmd_deinit()
744 if (cmd->fps) { in mpi_dec_test_cmd_deinit()
745 fps_calc_deinit(cmd->fps); in mpi_dec_test_cmd_deinit()
746 cmd->fps = NULL; in mpi_dec_test_cmd_deinit()
752 void mpi_dec_test_cmd_options(MpiDecTestCmd* cmd) in mpi_dec_test_cmd_options() argument
754 if (cmd->quiet) in mpi_dec_test_cmd_options()
758 mpp_log("input file name: %s\n", cmd->file_input); in mpi_dec_test_cmd_options()
759 mpp_log("output file name: %s\n", cmd->file_output); in mpi_dec_test_cmd_options()
760 mpp_log("width : %4d\n", cmd->width); in mpi_dec_test_cmd_options()
761 mpp_log("height : %4d\n", cmd->height); in mpi_dec_test_cmd_options()
762 mpp_log("type : %4d\n", cmd->type); in mpi_dec_test_cmd_options()
763 mpp_log("max frames : %4d\n", cmd->frame_num); in mpi_dec_test_cmd_options()
764 if (cmd->file_slt) in mpi_dec_test_cmd_options()
765 mpp_log("verify : %s\n", cmd->file_slt); in mpi_dec_test_cmd_options()