Skip to content

Commit

Permalink
setting PixelLayout value based on component depth
Browse files Browse the repository at this point in the history
  • Loading branch information
fschleich committed Dec 6, 2024
1 parent 32220b3 commit 5fc9072
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions src/as-02-wrap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<ASDCP::MXF::FileDescriptor*>(tmp_dscr);

if (Options.write_j2clayout)
Expand Down

0 comments on commit 5fc9072

Please sign in to comment.