Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 13 additions & 4 deletions src/as-02-wrap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,8 @@ class CommandOptions
ui32_t duration; // number of frames to be processed
bool j2c_pedantic; // passed to JP2K::SequenceParser::OpenRead
bool write_j2clayout; // true if a J2CLayout field should be written
bool use_cdci_descriptor; //
bool use_cdci_descriptor; //
bool has_coding_equations; //
Rational edit_rate; // edit rate of JP2K sequence
ui32_t fb_size; // size of picture frame buffer
byte_t key_value[KeyLen]; // value of given encryption key (when key_flag is true)
Expand Down Expand Up @@ -465,6 +466,13 @@ class CommandOptions
use_cdci_descriptor = true;
break;

case '6':
transfer_characteristic = g_dict->ul(MDD_TransferCharacteristic_SMPTEST2084);
color_primaries = g_dict->ul(MDD_ColorPrimaries_P3D65);
use_cdci_descriptor = false;
has_coding_equations = false;
break;

case '7':
coding_equations = g_dict->ul(MDD_CodingEquations_Rec2020);
transfer_characteristic = g_dict->ul(MDD_TransferCharacteristic_SMPTEST2084);
Expand All @@ -473,7 +481,7 @@ class CommandOptions
break;

default:
fprintf(stderr, "Unrecognized color system number, expecting one of 1-5 or 7.\n");
fprintf(stderr, "Unrecognized color system number, expecting one of 1-7.\n");
return false;
}

Expand Down Expand Up @@ -518,7 +526,7 @@ class CommandOptions
error_flag(true), key_flag(false), key_id_flag(false), asset_id_flag(false),
encrypt_header_flag(true), write_hmac(true), verbose_flag(false), fb_dump_size(0),
no_write_flag(false), version_flag(false), help_flag(false),
duration(0xffffffff), j2c_pedantic(true), write_j2clayout(false), use_cdci_descriptor(false),
duration(0xffffffff), j2c_pedantic(true), write_j2clayout(false), use_cdci_descriptor(false), has_coding_equations(true),
edit_rate(24,1), fb_size(FRAME_BUFFER_SIZE),
show_ul_values_flag(false), index_strategy(AS_02::IS_FOLLOW), partition_space(60),
mca_config(g_dict), rgba_MaxRef(1023), rgba_MinRef(0),
Expand Down Expand Up @@ -1120,7 +1128,8 @@ write_JP2K_file(CommandOptions& Options)

if ( ASDCP_SUCCESS(result) )
{
tmp_dscr->CodingEquations = Options.coding_equations;
if ( Options.has_coding_equations )
tmp_dscr->CodingEquations = Options.coding_equations;
tmp_dscr->TransferCharacteristic = Options.transfer_characteristic;
tmp_dscr->ColorPrimaries = Options.color_primaries;
tmp_dscr->ScanningDirection = 0;
Expand Down