Skip to content

Commit 938691c

Browse files
authored
Update readme (#67)
* updated imhex screenshot compatible with version 4 Signed-off-by: [email protected] <[email protected]> * updated README Signed-off-by: [email protected] <[email protected]> * fixed invalid operation incase of y4m input Signed-off-by: [email protected] <[email protected]> --------- Signed-off-by: [email protected] <[email protected]>
1 parent e95c6d5 commit 938691c

File tree

4 files changed

+18
-5
lines changed

4 files changed

+18
-5
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ The APV codec standard has the following features:
7171
- Executable applications can be found under build*/bin/
7272
- Library files can be found under build*/lib/
7373

74-
## How to use
74+
## How to use applications
7575
### Encoder
7676

7777
Encoder as input require raw YCbCr file (422, 444), 10-bit or more.

app/oapv_app_enc.c

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,11 @@ static const args_opt_t enc_args_opts[] = {
7070
"file name of reconstructed video"
7171
},
7272
{
73-
'w', "width", ARGS_VAL_TYPE_STRING | ARGS_VAL_TYPE_MANDATORY, 0, NULL,
73+
'w', "width", ARGS_VAL_TYPE_STRING, 0, NULL,
7474
"pixel width of input video"
7575
},
7676
{
77-
'h', "height", ARGS_VAL_TYPE_STRING | ARGS_VAL_TYPE_MANDATORY, 0, NULL,
77+
'h', "height", ARGS_VAL_TYPE_STRING, 0, NULL,
7878
"pixel height of input video"
7979
},
8080
{
@@ -85,7 +85,7 @@ static const args_opt_t enc_args_opts[] = {
8585
" - 'auto' means that the value is internally determined"
8686
},
8787
{
88-
'z', "fps", ARGS_VAL_TYPE_STRING | ARGS_VAL_TYPE_MANDATORY, 0, NULL,
88+
'z', "fps", ARGS_VAL_TYPE_STRING, 0, NULL,
8989
"frame rate (frame per second))"
9090
},
9191
{
@@ -203,7 +203,7 @@ typedef struct args_var {
203203

204204
char width[16];
205205
char height[16];
206-
char fps[256];
206+
char fps[16];
207207

208208
char qp[16];
209209
char qp_offset_c1[16];
@@ -679,6 +679,17 @@ int main(int argc, const char **argv)
679679
(args_var->input_csp == 4 ? OAPV_CF_YCBCR4444 : \
680680
(args_var->input_csp == 5 ? OAPV_CF_PLANAR2 : OAPV_CF_UNKNOWN))))));
681681
// clang-format on
682+
683+
// check mandatory parameters for YUV raw file.
684+
if(strlen(args_var->width) == 0) {
685+
logerr("'--width' argument is required\n"); ret = -1; goto ERR;
686+
}
687+
if(strlen(args_var->height) == 0) {
688+
logerr("'--height' argument is required\n"); ret = -1; goto ERR;
689+
}
690+
if(strlen(args_var->fps) == 0) {
691+
logerr("'--fps' argument is required\n"); ret = -1; goto ERR;
692+
}
682693
}
683694
if(args_var->input_csp == -1) {
684695
logerr("Unknown input color space. set '--input-csp' argument\n");

inc/oapv.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,9 @@ static const oapv_dict_str_int_t oapv_param_opts_preset[] = {
408408

409409
static const oapv_dict_str_int_t oapv_param_opts_color_range[] = {
410410
{"limited", 0},
411+
{"tv", 0}, // alternative value of "limited"
411412
{"full", 1},
413+
{"pc", 1}, // alternative value of "full"
412414
{"", 0} // termination
413415
};
414416

readme/img/apv_parser_on_imhex.png

7.04 KB
Loading

0 commit comments

Comments
 (0)