Skip to content

Commit 5ea3135

Browse files
authored
Merge pull request #146 from fschleich/setting-pixellayout-values
setting PixelLayout value based on component depth
2 parents f3406c9 + 5fc9072 commit 5ea3135

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

src/as-02-wrap.cpp

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1141,6 +1141,27 @@ write_JP2K_file(CommandOptions& Options)
11411141
tmp_dscr->MasteringDisplayWhitePointChromaticity = Options.md_white_point;
11421142
}
11431143

1144+
if (Options.component_depth == 16)
1145+
{
1146+
tmp_dscr->PixelLayout = ASDCP::MXF::RGBALayout(ASDCP::MXF::RGBAValue_RGB_16);
1147+
}
1148+
else if (Options.component_depth == 12)
1149+
{
1150+
tmp_dscr->PixelLayout = ASDCP::MXF::RGBALayout(ASDCP::MXF::RGBAValue_RGB_12);
1151+
}
1152+
else if (Options.component_depth == 10)
1153+
{
1154+
tmp_dscr->PixelLayout = ASDCP::MXF::RGBALayout(ASDCP::MXF::RGBAValue_RGB_10);
1155+
}
1156+
else if (Options.component_depth == 8)
1157+
{
1158+
tmp_dscr->PixelLayout = ASDCP::MXF::RGBALayout(ASDCP::MXF::RGBAValue_RGB_8);
1159+
}
1160+
else
1161+
{
1162+
fprintf(stderr, "Warning: could not determine PixelLayout to write.\n");
1163+
}
1164+
11441165
essence_descriptor = static_cast<ASDCP::MXF::FileDescriptor*>(tmp_dscr);
11451166

11461167
if (Options.write_j2clayout)

0 commit comments

Comments
 (0)