From 5fc90722bdefb10bf77e26531b8b80c1c5b51699 Mon Sep 17 00:00:00 2001 From: Florian Schleich Date: Fri, 6 Dec 2024 12:48:51 -0800 Subject: [PATCH] setting PixelLayout value based on component depth --- src/as-02-wrap.cpp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/as-02-wrap.cpp b/src/as-02-wrap.cpp index 8dba4ceb..6de7c332 100755 --- a/src/as-02-wrap.cpp +++ b/src/as-02-wrap.cpp @@ -1117,6 +1117,27 @@ write_JP2K_file(CommandOptions& Options) tmp_dscr->MasteringDisplayWhitePointChromaticity = Options.md_white_point; } + if (Options.component_depth == 16) + { + tmp_dscr->PixelLayout = ASDCP::MXF::RGBALayout(ASDCP::MXF::RGBAValue_RGB_16); + } + else if (Options.component_depth == 12) + { + tmp_dscr->PixelLayout = ASDCP::MXF::RGBALayout(ASDCP::MXF::RGBAValue_RGB_12); + } + else if (Options.component_depth == 10) + { + tmp_dscr->PixelLayout = ASDCP::MXF::RGBALayout(ASDCP::MXF::RGBAValue_RGB_10); + } + else if (Options.component_depth == 8) + { + tmp_dscr->PixelLayout = ASDCP::MXF::RGBALayout(ASDCP::MXF::RGBAValue_RGB_8); + } + else + { + fprintf(stderr, "Warning: could not determine PixelLayout to write.\n"); + } + essence_descriptor = static_cast(tmp_dscr); if (Options.write_j2clayout)