diff --git a/README.md b/README.md index 6ceaace..79f650c 100644 --- a/README.md +++ b/README.md @@ -71,7 +71,7 @@ The APV codec standard has the following features: - Executable applications can be found under build*/bin/ - Library files can be found under build*/lib/ -## How to use +## How to use applications ### Encoder Encoder as input require raw YCbCr file (422, 444), 10-bit or more. diff --git a/app/oapv_app_enc.c b/app/oapv_app_enc.c index e6ea261..1132208 100644 --- a/app/oapv_app_enc.c +++ b/app/oapv_app_enc.c @@ -70,11 +70,11 @@ static const args_opt_t enc_args_opts[] = { "file name of reconstructed video" }, { - 'w', "width", ARGS_VAL_TYPE_STRING | ARGS_VAL_TYPE_MANDATORY, 0, NULL, + 'w', "width", ARGS_VAL_TYPE_STRING, 0, NULL, "pixel width of input video" }, { - 'h', "height", ARGS_VAL_TYPE_STRING | ARGS_VAL_TYPE_MANDATORY, 0, NULL, + 'h', "height", ARGS_VAL_TYPE_STRING, 0, NULL, "pixel height of input video" }, { @@ -85,7 +85,7 @@ static const args_opt_t enc_args_opts[] = { " - 'auto' means that the value is internally determined" }, { - 'z', "fps", ARGS_VAL_TYPE_STRING | ARGS_VAL_TYPE_MANDATORY, 0, NULL, + 'z', "fps", ARGS_VAL_TYPE_STRING, 0, NULL, "frame rate (frame per second))" }, { @@ -203,7 +203,7 @@ typedef struct args_var { char width[16]; char height[16]; - char fps[256]; + char fps[16]; char qp[16]; char qp_offset_c1[16]; @@ -679,6 +679,17 @@ int main(int argc, const char **argv) (args_var->input_csp == 4 ? OAPV_CF_YCBCR4444 : \ (args_var->input_csp == 5 ? OAPV_CF_PLANAR2 : OAPV_CF_UNKNOWN)))))); // clang-format on + + // check mandatory parameters for YUV raw file. + if(strlen(args_var->width) == 0) { + logerr("'--width' argument is required\n"); ret = -1; goto ERR; + } + if(strlen(args_var->height) == 0) { + logerr("'--height' argument is required\n"); ret = -1; goto ERR; + } + if(strlen(args_var->fps) == 0) { + logerr("'--fps' argument is required\n"); ret = -1; goto ERR; + } } if(args_var->input_csp == -1) { logerr("Unknown input color space. set '--input-csp' argument\n"); diff --git a/inc/oapv.h b/inc/oapv.h index 9fbb685..84dc1c2 100644 --- a/inc/oapv.h +++ b/inc/oapv.h @@ -408,7 +408,9 @@ static const oapv_dict_str_int_t oapv_param_opts_preset[] = { static const oapv_dict_str_int_t oapv_param_opts_color_range[] = { {"limited", 0}, + {"tv", 0}, // alternative value of "limited" {"full", 1}, + {"pc", 1}, // alternative value of "full" {"", 0} // termination }; diff --git a/readme/img/apv_parser_on_imhex.png b/readme/img/apv_parser_on_imhex.png index 3ad7a2e..46dbd0d 100644 Binary files a/readme/img/apv_parser_on_imhex.png and b/readme/img/apv_parser_on_imhex.png differ