Lines Matching refs:argv
412 char **argv, in parse_commandline_options() argument
424 if (!strcmp(modes[i].opt, argv[1])) in parse_commandline_options()
434 printf("ERROR: Unrecognized operation '%s'\n", argv[1]); in parse_commandline_options()
456 char **argv, in init_astcenc_config() argument
490 int dimensions = sscanf(argv[4], "%ux%u%nx%u%n", in init_astcenc_config()
493 if (!(((dimensions == 2) && !argv[4][cnt2D]) || ((dimensions == 3) && !argv[4][cnt3D]))) in init_astcenc_config()
495 printf("ERROR: Block size '%s' is invalid\n", argv[4]); in init_astcenc_config()
506 if (!strcmp(argv[5], "-fastest")) in init_astcenc_config()
510 else if (!strcmp(argv[5], "-fast")) in init_astcenc_config()
514 else if (!strcmp(argv[5], "-medium")) in init_astcenc_config()
518 else if (!strcmp(argv[5], "-thorough")) in init_astcenc_config()
522 else if (!strcmp(argv[5], "-verythorough")) in init_astcenc_config()
526 else if (!strcmp(argv[5], "-exhaustive")) in init_astcenc_config()
530 else if (is_float(argv[5])) in init_astcenc_config()
532 quality = static_cast<float>(atof(argv[5])); in init_astcenc_config()
536 printf("ERROR: Search quality/preset '%s' is invalid\n", argv[5]); in init_astcenc_config()
548 if (!strcmp(argv[argidx], "-a")) in init_astcenc_config()
554 else if (!strcmp(argv[argidx], "-mask")) in init_astcenc_config()
558 else if (!strcmp(argv[argidx], "-normal")) in init_astcenc_config()
562 else if (!strcmp(argv[argidx], "-rgbm")) in init_astcenc_config()
568 else if (!strcmp(argv[argidx], "-perceptual")) in init_astcenc_config()
572 else if (!strcmp(argv[argidx], "-pp-normalize")) in init_astcenc_config()
581 else if (!strcmp(argv[argidx], "-pp-premultiply")) in init_astcenc_config()
614 printf("ERROR: Block size '%s' is invalid\n", argv[4]); in init_astcenc_config()
649 char **argv, in edit_astcenc_config() argument
659 if (!strcmp(argv[argidx], "-silent")) in edit_astcenc_config()
664 else if (!strcmp(argv[argidx], "-cw")) in edit_astcenc_config()
673 config.cw_r_weight = static_cast<float>(atof(argv[argidx - 4])); in edit_astcenc_config()
674 config.cw_g_weight = static_cast<float>(atof(argv[argidx - 3])); in edit_astcenc_config()
675 config.cw_b_weight = static_cast<float>(atof(argv[argidx - 2])); in edit_astcenc_config()
676 config.cw_a_weight = static_cast<float>(atof(argv[argidx - 1])); in edit_astcenc_config()
678 else if (!strcmp(argv[argidx], "-a")) in edit_astcenc_config()
687 config.a_scale_radius = atoi(argv[argidx - 1]); in edit_astcenc_config()
689 else if (!strcmp(argv[argidx], "-esw")) in edit_astcenc_config()
698 if (strlen(argv[argidx - 1]) != 4) in edit_astcenc_config()
707 switch (argv[argidx - 1][i]) in edit_astcenc_config()
728 printf("ERROR: -esw component '%c' is not valid\n", argv[argidx - 1][i]); in edit_astcenc_config()
738 else if (!strcmp(argv[argidx], "-ssw")) in edit_astcenc_config()
747 size_t char_count = strlen(argv[argidx - 1]); in edit_astcenc_config()
767 switch (argv[argidx - 1][i]) in edit_astcenc_config()
782 printf("ERROR: -ssw component '%c' is not valid\n", argv[argidx - 1][i]); in edit_astcenc_config()
792 else if (!strcmp(argv[argidx], "-dsw")) in edit_astcenc_config()
801 if (strlen(argv[argidx - 1]) != 4) in edit_astcenc_config()
810 switch (argv[argidx - 1][i]) in edit_astcenc_config()
834 printf("ERROR: ERROR: -dsw component '%c' is not valid\n", argv[argidx - 1][i]); in edit_astcenc_config()
845 else if (!strcmp(argv[argidx], "-mask")) in edit_astcenc_config()
849 else if (!strcmp(argv[argidx], "-normal")) in edit_astcenc_config()
863 else if (!strcmp(argv[argidx], "-rgbm")) in edit_astcenc_config()
872 config.rgbm_m_scale = static_cast<float>(atof(argv[argidx - 1])); in edit_astcenc_config()
875 else if (!strcmp(argv[argidx], "-perceptual")) in edit_astcenc_config()
879 else if (!strcmp(argv[argidx], "-pp-normalize")) in edit_astcenc_config()
883 else if (!strcmp(argv[argidx], "-pp-premultiply")) in edit_astcenc_config()
887 else if (!strcmp(argv[argidx], "-blockmodelimit")) in edit_astcenc_config()
896 config.tune_block_mode_limit = atoi(argv[argidx - 1]); in edit_astcenc_config()
898 else if (!strcmp(argv[argidx], "-partitioncountlimit")) in edit_astcenc_config()
907 config.tune_partition_count_limit = atoi(argv[argidx - 1]); in edit_astcenc_config()
909 else if (!strcmp(argv[argidx], "-2partitionindexlimit")) in edit_astcenc_config()
918 config.tune_2partition_index_limit = atoi(argv[argidx - 1]); in edit_astcenc_config()
920 else if (!strcmp(argv[argidx], "-3partitionindexlimit")) in edit_astcenc_config()
929 config.tune_2partition_index_limit = atoi(argv[argidx - 1]); in edit_astcenc_config()
931 else if (!strcmp(argv[argidx], "-4partitionindexlimit")) in edit_astcenc_config()
940 config.tune_2partition_index_limit = atoi(argv[argidx - 1]); in edit_astcenc_config()
942 else if (!strcmp(argv[argidx], "-2partitioncandiatelimit")) in edit_astcenc_config()
951 config.tune_2partitioning_candidate_limit = atoi(argv[argidx - 1]); in edit_astcenc_config()
953 else if (!strcmp(argv[argidx], "-3partitioncandiatelimit")) in edit_astcenc_config()
962 config.tune_3partitioning_candidate_limit = atoi(argv[argidx - 1]); in edit_astcenc_config()
964 else if (!strcmp(argv[argidx], "-4partitioncandiatelimit")) in edit_astcenc_config()
973 config.tune_4partitioning_candidate_limit = atoi(argv[argidx - 1]); in edit_astcenc_config()
975 else if (!strcmp(argv[argidx], "-dblimit")) in edit_astcenc_config()
986 config.tune_db_limit = static_cast<float>(atof(argv[argidx - 1])); in edit_astcenc_config()
989 else if (!strcmp(argv[argidx], "-2partitionlimitfactor")) in edit_astcenc_config()
998 config.tune_2_partition_early_out_limit_factor = static_cast<float>(atof(argv[argidx - 1])); in edit_astcenc_config()
1000 else if (!strcmp(argv[argidx], "-3partitionlimitfactor")) in edit_astcenc_config()
1009 config.tune_3_partition_early_out_limit_factor = static_cast<float>(atof(argv[argidx - 1])); in edit_astcenc_config()
1011 else if (!strcmp(argv[argidx], "-2planelimitcorrelation")) in edit_astcenc_config()
1020 config.tune_2_plane_early_out_limit_correlation = static_cast<float>(atof(argv[argidx - 1])); in edit_astcenc_config()
1022 else if (!strcmp(argv[argidx], "-refinementlimit")) in edit_astcenc_config()
1031 config.tune_refinement_limit = atoi(argv[argidx - 1]); in edit_astcenc_config()
1033 else if (!strcmp(argv[argidx], "-candidatelimit")) in edit_astcenc_config()
1042 config.tune_candidate_limit = atoi(argv[argidx - 1]); in edit_astcenc_config()
1044 else if (!strcmp(argv[argidx], "-j")) in edit_astcenc_config()
1053 cli_config.thread_count = atoi(argv[argidx - 1]); in edit_astcenc_config()
1055 else if (!strcmp(argv[argidx], "-repeats")) in edit_astcenc_config()
1064 cli_config.repeat_count = atoi(argv[argidx - 1]); in edit_astcenc_config()
1071 else if (!strcmp(argv[argidx], "-yflip")) in edit_astcenc_config()
1076 else if (!strcmp(argv[argidx], "-mpsnr")) in edit_astcenc_config()
1085 cli_config.low_fstop = atoi(argv[argidx - 2]); in edit_astcenc_config()
1086 cli_config.high_fstop = atoi(argv[argidx - 1]); in edit_astcenc_config()
1094 else if (!strcmp(argv[argidx], "-zdim")) in edit_astcenc_config()
1112 if (!sscanf(argv[argidx], "%u", &cli_config.array_size) || cli_config.array_size == 0) in edit_astcenc_config()
1114 printf("ERROR: -zdim size '%s' is invalid\n", argv[argidx]); in edit_astcenc_config()
1126 else if (!strcmp(argv[argidx], "-dtrace")) in edit_astcenc_config()
1135 config.trace_file_path = argv[argidx - 1]; in edit_astcenc_config()
1138 else if (!strcmp(argv[argidx], "-dimage")) in edit_astcenc_config()
1145 printf("ERROR: Argument '%s' not recognized\n", argv[argidx]); in edit_astcenc_config()
1852 char **argv in main() argument
1864 int error = parse_commandline_options(argc, argv, operation, profile); in main()
1882 std::string input_filename = argc >= 3 ? argv[2] : ""; in main()
1883 std::string output_filename = argc >= 4 ? argv[3] : ""; in main()
1940 error = init_astcenc_config(argc, argv, profile, operation, image_comp, preprocess, config); in main()
1951 error = edit_astcenc_config(argc, argv, operation, cli_config, config); in main()