Skip to content

Commit

Permalink
WIP: change value codecs output_bit_depth
Browse files Browse the repository at this point in the history
  • Loading branch information
Jamaika1 authored Nov 25, 2024
1 parent 5bb6ff9 commit 9baf768
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions examples/heif_enc.cc
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
int master_alpha = 1;
int thumb_alpha = 1;
int list_encoders = 0;
int bit_depth = 8;
int bit_depth = 10;
int two_colr_boxes = 0;
int premultiplied_alpha = 0;
int run_benchmark = 0;
Expand Down Expand Up @@ -864,7 +864,7 @@ int main(int argc, char** argv)
int output_bit_depth = bit_depth;
struct heif_encoder* encoder = nullptr;
//#if (UVG_BIT_DEPTH == 10) || (KVZ_BIT_DEPTH == 10) || HAVE_VVENC
if ((output_bit_depth == 10)&& ((encoderId[0] == 'k' && encoderId[1] == 'v') ||
if ((output_bit_depth == 10) && ((encoderId[0] == 'k' && encoderId[1] == 'v') ||
(encoderId[0] == 'u' && encoderId[1] == 'v') ||
(encoderId[0] == 'v' && encoderId[1] == 'v'))) {
int output_bit_depth = 10;
Expand All @@ -885,15 +885,15 @@ int main(int argc, char** argv)
int output_bit_depth = 16;
heif_encoder_set_parameter(encoder, "chroma", "444");
printf("Warming: Don't use jpeg image 8bit. openjpeg is always output rgb48(a)\n"
"libheif has no added functions openjpeg2000 in yuv420/422 or 10/12bit\n");
"libheif has no added functions openjpeg2000 in yuv420/422/444 10/12bit\n");
}
//#else
if ((output_bit_depth == 8) && ((encoderId[4] == 'j' && encoderId[5] == 'p' && encoderId[6] == 'e') ||
(encoderId[4] == 'j' && encoderId[5] == 'p' && encoderId[6] == 'h'))) {
int output_bit_depth = 10;
heif_encoder_set_parameter(encoder, "chroma", "444");
printf("Warming: openjpeg is always output rgb24(a)\n"
"libheif has no added functions openjpeg2000 in yuv420/422 or 10/12bit\n");
"libheif has no added functions openjpeg2000 in yuv420/422/444 10/12bit\n");
}
#if !HAVE_LIBDE265 && !HAVE_OpenH264_DECODER && !HAVE_AOM_DECODER && !HAVE_DAV1D && \
!HAVE_JPEG_DECODER && !HAVE_OPENJPEG_DECODER && !HAVE_VVDEC
Expand Down

0 comments on commit 9baf768

Please sign in to comment.