Skip to content

Commit f72b320

Browse files
tuzm24yearly-kim
andauthored
Update v0.1.10 (#31)
* Update v0.1.10 - Support y4m writing for recon file in the encoder. - Bug fix on meta data writing. - Add full range flag. - Add a few assert for tile, metadata and etc. - Update for coding the systax elements with _minus1. - Fix the range of DC differenece from 16bits to 17bits. - Add NEON func for SAD and DIFF. - Add AVX func for SAD computations. * Fix CmakeList.txt for pass ctest - Insert width, height, and fps. --------- Co-authored-by: Yangwoo Kim <[email protected]>
1 parent 820c9ec commit f72b320

35 files changed

+930
-460
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ The APV codec standard has the following features:
6464
## How to use
6565
### Encoder
6666

67-
Encoder as input require raw YUV file (422, 444), 10-bit or more.
67+
Encoder as input require raw YCbCr file (422, 444), 10-bit or more.
6868

6969
Displaying help:
7070

app/oapv_app_dec.c

Lines changed: 15 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -419,34 +419,22 @@ int main(int argc, const char **argv)
419419
if(fp_bs == NULL) {
420420
logerr("ERROR: cannot open bitstream file = %s\n", args_var->fname_inp);
421421
print_usage(argv);
422-
return -1;
422+
ret = -1; goto ERR;
423423
}
424424
/* open output file */
425425
if(strlen(args_var->fname_out) > 0) {
426-
char fext[16];
427-
char *fname = (char *)args_var->fname_out;
428-
429-
if(strlen(fname) < 5) { /* at least x.yuv or x.y4m */
430-
logerr("ERROR: invalide output file name\n");
431-
return -1;
426+
ret = check_file_name_type(args_var->fname_out);
427+
if(ret > 0) {
428+
is_y4m = 1;
432429
}
433-
strncpy(fext, fname + strlen(fname) - 3, sizeof(fext) - 1);
434-
fext[0] = toupper(fext[0]);
435-
fext[1] = toupper(fext[1]);
436-
fext[2] = toupper(fext[2]);
437-
438-
if(strcmp(fext, "YUV") == 0) {
430+
else if(ret == 0) {
439431
is_y4m = 0;
440432
}
441-
else if(strcmp(fext, "Y4M") == 0) {
442-
is_y4m = 1;
443-
}
444-
else {
445-
logerr("ERROR: unknown output format\n");
446-
ret = -1;
447-
goto ERR;
433+
else { // invalid or unknown file name type
434+
logerr("unknown file type name for decoded video\n");
435+
ret = -1; goto ERR;
448436
}
449-
clear_data(fname); /* remove decoded file contents if exists */
437+
clear_data(args_var->fname_out); /* remove decoded file contents if exists */
450438
}
451439

452440
// create bitstream buffer
@@ -609,10 +597,14 @@ int main(int argc, const char **argv)
609597
if(write_y4m_header(args_var->fname_out, imgb_o)) {
610598
logerr("cannot write Y4M header\n");
611599
ret = -1;
612-
goto END;
600+
goto ERR;
613601
}
614602
}
615-
write_dec_img(args_var->fname_out, imgb_o, is_y4m);
603+
if(write_dec_img(args_var->fname_out, imgb_o, is_y4m)) {
604+
logerr("cannot write decoded video\n");
605+
ret = -1;
606+
goto ERR;
607+
}
616608
}
617609
frm_cnt[i]++;
618610
}

0 commit comments

Comments
 (0)