Skip to content

Commit

Permalink
[fix] Use video color primaries to identify ICC color profile. (#173)
Browse files Browse the repository at this point in the history
  • Loading branch information
skidder authored Aug 7, 2024
1 parent 33ace82 commit deaff2e
Show file tree
Hide file tree
Showing 8 changed files with 37 additions and 37 deletions.
62 changes: 31 additions & 31 deletions avcodec.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -253,34 +253,27 @@ avcodec_decoder avcodec_decoder_create(const opencv_mat buf, const bool hevc_ena
return d;
}

const uint8_t* get_icc_profile(int colorspace, size_t& profile_size) {
switch (colorspace) {
case AVCOL_SPC_BT709:
profile_size = sizeof(rec709_profile);
return rec709_profile;
case AVCOL_SPC_BT2020_NCL:
case AVCOL_SPC_BT2020_CL:
const uint8_t* avcodec_get_icc_profile(int color_primaries, size_t& profile_size) {
switch (color_primaries) {
case AVCOL_PRI_BT2020:
profile_size = sizeof(rec2020_profile);
return rec2020_profile;
case AVCOL_SPC_BT470BG: // BT.601 PAL
case AVCOL_PRI_BT470BG: // BT.601 PAL
profile_size = sizeof(rec601_pal_profile);
return rec601_pal_profile;
case AVCOL_SPC_SMPTE170M: // BT.601 NTSC
case AVCOL_PRI_SMPTE170M: // BT.601 NTSC
profile_size = sizeof(rec601_ntsc_profile);
return rec601_ntsc_profile;
case AVCOL_SPC_RGB:
default:
// Default to sRGB profile
profile_size = sizeof(srgb_profile);
return srgb_profile;
default:
// Default to BT.709 profile
profile_size = sizeof(rec709_profile);
return rec709_profile;
}
}

int avcodec_decoder_get_icc(const avcodec_decoder d, void* dest, size_t dest_len) {
size_t profile_size;
const uint8_t* profile_data = get_icc_profile(d->codec->colorspace, profile_size);
const uint8_t* profile_data = avcodec_get_icc_profile(d->codec->color_primaries, profile_size);

if (profile_size > dest_len) {
return -1; // Destination buffer is too small
Expand Down Expand Up @@ -419,25 +412,32 @@ static int avcodec_decoder_copy_frame(const avcodec_decoder d, opencv_mat mat, A
SWS_BILINEAR, // Specify the scaling algorithm; you can choose another according to your needs
NULL, NULL, NULL);

// Configure colorspace conversion
int colorspace;
if (frame->colorspace != AVCOL_SPC_UNSPECIFIED) {
colorspace = frame->colorspace;
} else {
colorspace = AVCOL_SPC_BT709;
}

int srcRange;
switch (frame->color_range) {
case AVCOL_RANGE_JPEG:
srcRange = 1;
// Configure colorspace
int colorspace = SWS_CS_ITU709;
switch (frame->colorspace) {
case AVCOL_SPC_BT2020_NCL:
case AVCOL_SPC_BT2020_CL:
colorspace = SWS_CS_BT2020;
break;
case AVCOL_SPC_BT470BG:
colorspace = SWS_CS_ITU601;
break;
default:
// default to MPEG range
srcRange = 0;
case AVCOL_SPC_SMPTE170M:
colorspace = SWS_CS_SMPTE170M;
break;
case AVCOL_SPC_SMPTE240M:
colorspace = SWS_CS_SMPTE240M;
break;
}
sws_setColorspaceDetails(sws, sws_getCoefficients(colorspace), srcRange, sws_getCoefficients(SWS_CS_DEFAULT), 1, 0, 1 << 16, 1 << 16);
const int* inv_table = sws_getCoefficients(colorspace);

// Configure color range
int srcRange = frame->color_range == AVCOL_RANGE_JPEG ? 1 : 0;

// Configure YUV conversion table
const int* table = sws_getCoefficients(SWS_CS_DEFAULT);

sws_setColorspaceDetails(sws, inv_table, srcRange, table, 1, 0, 1 << 16, 1 << 16);

// The linesizes and data pointers for the destination
int dstLinesizes[4];
Expand Down
6 changes: 3 additions & 3 deletions icc_profiles/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ To generate the ICC profile headers, you can use the provided Python script. Thi
### Profiles

The following ICC profiles are included:
- [sRGB](https://www.color.org/srgbprofiles.xalter)
- [Rec709](https://www.color.org/chardata/rgb/BT709.xalter)
- [Rec2020](https://www.color.org/chardata/rgb/BT2020.xalter)
- [sRGB](https://github.com/saucecontrol/Compact-ICC-Profiles/blob/master/profiles/sRGB-v4.icc)
- [Rec709](https://github.com/saucecontrol/Compact-ICC-Profiles/blob/master/profiles/Rec709-v4.icc)
- [Rec2020](https://github.com/saucecontrol/Compact-ICC-Profiles/blob/master/profiles/Rec2020Compat-v4.icc)
- [Rec601 PAL](https://github.com/saucecontrol/Compact-ICC-Profiles/blob/master/profiles/Rec601PAL-v4.icc)
- [Rec601 NTSC](https://github.com/saucecontrol/Compact-ICC-Profiles/blob/master/profiles/Rec601NTSC-v4.icc)

Expand Down
2 changes: 1 addition & 1 deletion icc_profiles/rec2020_profile.h
Original file line number Diff line number Diff line change
@@ -1 +1 @@
const uint8_t rec2020_profile[] = { 0x00, 0x00, 0x02, 0xDC, 0x41, 0x44, 0x42, 0x45, 0x04, 0x30, 0x00, 0x00, 0x6D, 0x6E, 0x74, 0x72, 0x52, 0x47, 0x42, 0x20, 0x58, 0x59, 0x5A, 0x20, 0x07, 0xE0, 0x00, 0x09, 0x00, 0x1D, 0x00, 0x12, 0x00, 0x0A, 0x00, 0x00, 0x61, 0x63, 0x73, 0x70, 0x4D, 0x53, 0x46, 0x54, 0x00, 0x00, 0x00, 0x00, 0x49, 0x54, 0x55, 0x20, 0x32, 0x30, 0x32, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0xF6, 0xD6, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0xD3, 0x2D, 0x49, 0x43, 0x43, 0x20, 0xD2, 0xDD, 0x42, 0x64, 0x10, 0x7C, 0x8B, 0xB8, 0x84, 0xB9, 0xD7, 0xE6, 0xD4, 0x38, 0x4B, 0xA2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0D, 0x64, 0x65, 0x73, 0x63, 0x00, 0x00, 0x01, 0x20, 0x00, 0x00, 0x00, 0x5A, 0x63, 0x70, 0x72, 0x74, 0x00, 0x00, 0x01, 0x7C, 0x00, 0x00, 0x00, 0x7E, 0x77, 0x74, 0x70, 0x74, 0x00, 0x00, 0x01, 0xFC, 0x00, 0x00, 0x00, 0x14, 0x62, 0x6B, 0x70, 0x74, 0x00, 0x00, 0x02, 0x10, 0x00, 0x00, 0x00, 0x14, 0x72, 0x58, 0x59, 0x5A, 0x00, 0x00, 0x02, 0x24, 0x00, 0x00, 0x00, 0x14, 0x67, 0x58, 0x59, 0x5A, 0x00, 0x00, 0x02, 0x38, 0x00, 0x00, 0x00, 0x14, 0x62, 0x58, 0x59, 0x5A, 0x00, 0x00, 0x02, 0x4C, 0x00, 0x00, 0x00, 0x14, 0x6C, 0x75, 0x6D, 0x69, 0x00, 0x00, 0x02, 0x60, 0x00, 0x00, 0x00, 0x14, 0x74, 0x65, 0x63, 0x68, 0x00, 0x00, 0x02, 0x74, 0x00, 0x00, 0x00, 0x0C, 0x63, 0x68, 0x61, 0x64, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0x00, 0x2C, 0x72, 0x54, 0x52, 0x43, 0x00, 0x00, 0x02, 0xAC, 0x00, 0x00, 0x00, 0x10, 0x67, 0x54, 0x52, 0x43, 0x00, 0x00, 0x02, 0xBC, 0x00, 0x00, 0x00, 0x10, 0x62, 0x54, 0x52, 0x43, 0x00, 0x00, 0x02, 0xCC, 0x00, 0x00, 0x00, 0x10, 0x6D, 0x6C, 0x75, 0x63, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0C, 0x65, 0x6E, 0x55, 0x53, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x00, 0x1C, 0x00, 0x49, 0x00, 0x54, 0x00, 0x55, 0x00, 0x2D, 0x00, 0x52, 0x00, 0x20, 0x00, 0x42, 0x00, 0x54, 0x00, 0x2E, 0x00, 0x32, 0x00, 0x30, 0x00, 0x32, 0x00, 0x30, 0x00, 0x20, 0x00, 0x52, 0x00, 0x65, 0x00, 0x66, 0x00, 0x65, 0x00, 0x72, 0x00, 0x65, 0x00, 0x6E, 0x00, 0x63, 0x00, 0x65, 0x00, 0x20, 0x00, 0x44, 0x00, 0x69, 0x00, 0x73, 0x00, 0x70, 0x00, 0x6C, 0x00, 0x61, 0x00, 0x79, 0x00, 0x00, 0x6D, 0x6C, 0x75, 0x63, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0C, 0x65, 0x6E, 0x55, 0x53, 0x00, 0x00, 0x00, 0x62, 0x00, 0x00, 0x00, 0x1C, 0x00, 0x43, 0x00, 0x6F, 0x00, 0x70, 0x00, 0x79, 0x00, 0x72, 0x00, 0x69, 0x00, 0x67, 0x00, 0x68, 0x00, 0x74, 0x00, 0x20, 0x00, 0x28, 0x00, 0x63, 0x00, 0x29, 0x00, 0x20, 0x00, 0x32, 0x00, 0x30, 0x00, 0x31, 0x00, 0x36, 0x00, 0x20, 0x00, 0x49, 0x00, 0x6E, 0x00, 0x74, 0x00, 0x65, 0x00, 0x72, 0x00, 0x6E, 0x00, 0x61, 0x00, 0x74, 0x00, 0x69, 0x00, 0x6F, 0x00, 0x6E, 0x00, 0x61, 0x00, 0x6C, 0x00, 0x20, 0x00, 0x43, 0x00, 0x6F, 0x00, 0x6C, 0x00, 0x6F, 0x00, 0x72, 0x00, 0x20, 0x00, 0x43, 0x00, 0x6F, 0x00, 0x6E, 0x00, 0x73, 0x00, 0x6F, 0x00, 0x72, 0x00, 0x74, 0x00, 0x69, 0x00, 0x75, 0x00, 0x6D, 0x00, 0x00, 0x58, 0x59, 0x5A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF6, 0xD6, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0xD3, 0x2D, 0x58, 0x59, 0x5A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x59, 0x5A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xAC, 0x67, 0x00, 0x00, 0x47, 0x6E, 0xFF, 0xFF, 0xFF, 0x81, 0x58, 0x59, 0x5A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x68, 0x00, 0x00, 0xAC, 0xE4, 0x00, 0x00, 0x07, 0xAD, 0x58, 0x59, 0x5A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x03, 0x00, 0x00, 0x0B, 0xAD, 0x00, 0x00, 0xCC, 0x01, 0x58, 0x59, 0x5A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x73, 0x69, 0x67, 0x20, 0x00, 0x00, 0x00, 0x00, 0x76, 0x69, 0x64, 0x6D, 0x73, 0x66, 0x33, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x0C, 0x42, 0x00, 0x00, 0x05, 0xDE, 0xFF, 0xFF, 0xF3, 0x25, 0x00, 0x00, 0x07, 0x93, 0x00, 0x00, 0xFD, 0x90, 0xFF, 0xFF, 0xFB, 0xA1, 0xFF, 0xFF, 0xFD, 0xA2, 0x00, 0x00, 0x03, 0xDC, 0x00, 0x00, 0xC0, 0x6E, 0x70, 0x61, 0x72, 0x61, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x66, 0x66, 0x70, 0x61, 0x72, 0x61, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x66, 0x66, 0x70, 0x61, 0x72, 0x61, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x66, 0x66 };
const uint8_t rec2020_profile[] = { 0x00, 0x00, 0x01, 0xE0, 0x6C, 0x63, 0x6D, 0x73, 0x04, 0x20, 0x00, 0x00, 0x6D, 0x6E, 0x74, 0x72, 0x52, 0x47, 0x42, 0x20, 0x58, 0x59, 0x5A, 0x20, 0x07, 0xE2, 0x00, 0x03, 0x00, 0x14, 0x00, 0x09, 0x00, 0x0E, 0x00, 0x1D, 0x61, 0x63, 0x73, 0x70, 0x4D, 0x53, 0x46, 0x54, 0x00, 0x00, 0x00, 0x00, 0x73, 0x61, 0x77, 0x73, 0x63, 0x74, 0x72, 0x6C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF6, 0xD6, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0xD3, 0x2D, 0x68, 0x61, 0x6E, 0x64, 0x3F, 0x72, 0x17, 0xB7, 0x9E, 0xB7, 0x57, 0x05, 0x1E, 0xAE, 0x40, 0xC9, 0x73, 0x24, 0x0A, 0xC3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x64, 0x65, 0x73, 0x63, 0x00, 0x00, 0x00, 0xFC, 0x00, 0x00, 0x00, 0x24, 0x63, 0x70, 0x72, 0x74, 0x00, 0x00, 0x01, 0x20, 0x00, 0x00, 0x00, 0x22, 0x77, 0x74, 0x70, 0x74, 0x00, 0x00, 0x01, 0x44, 0x00, 0x00, 0x00, 0x14, 0x63, 0x68, 0x61, 0x64, 0x00, 0x00, 0x01, 0x58, 0x00, 0x00, 0x00, 0x2C, 0x72, 0x58, 0x59, 0x5A, 0x00, 0x00, 0x01, 0x84, 0x00, 0x00, 0x00, 0x14, 0x67, 0x58, 0x59, 0x5A, 0x00, 0x00, 0x01, 0x98, 0x00, 0x00, 0x00, 0x14, 0x62, 0x58, 0x59, 0x5A, 0x00, 0x00, 0x01, 0xAC, 0x00, 0x00, 0x00, 0x14, 0x72, 0x54, 0x52, 0x43, 0x00, 0x00, 0x01, 0xC0, 0x00, 0x00, 0x00, 0x20, 0x67, 0x54, 0x52, 0x43, 0x00, 0x00, 0x01, 0xC0, 0x00, 0x00, 0x00, 0x20, 0x62, 0x54, 0x52, 0x43, 0x00, 0x00, 0x01, 0xC0, 0x00, 0x00, 0x00, 0x20, 0x6D, 0x6C, 0x75, 0x63, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0C, 0x65, 0x6E, 0x55, 0x53, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x1C, 0x00, 0x32, 0x00, 0x30, 0x00, 0x32, 0x00, 0x43, 0x6D, 0x6C, 0x75, 0x63, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0C, 0x65, 0x6E, 0x55, 0x53, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x1C, 0x00, 0x43, 0x00, 0x43, 0x00, 0x30, 0x00, 0x00, 0x58, 0x59, 0x5A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF6, 0xD6, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0xD3, 0x2D, 0x73, 0x66, 0x33, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x0C, 0x42, 0x00, 0x00, 0x05, 0xDE, 0xFF, 0xFF, 0xF3, 0x25, 0x00, 0x00, 0x07, 0x93, 0x00, 0x00, 0xFD, 0x90, 0xFF, 0xFF, 0xFB, 0xA1, 0xFF, 0xFF, 0xFE, 0x7C, 0x00, 0x00, 0x03, 0xAC, 0x00, 0x00, 0xBF, 0xDB, 0x58, 0x59, 0x5A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xAC, 0x69, 0x00, 0x00, 0x47, 0x70, 0x00, 0x00, 0x00, 0x00, 0x58, 0x59, 0x5A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x6A, 0x00, 0x00, 0xAC, 0xE3, 0x00, 0x00, 0x07, 0xA8, 0x58, 0x59, 0x5A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x03, 0x00, 0x00, 0x0B, 0xAD, 0x00, 0x00, 0xCB, 0x85, 0x70, 0x61, 0x72, 0x61, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x38, 0xE5, 0x00, 0x00, 0xE8, 0xE0, 0x00, 0x00, 0x17, 0x20, 0x00, 0x00, 0x38, 0xE4, 0x00, 0x00, 0x14, 0xBD };
Binary file modified icc_profiles/rec2020_profile.icc
Binary file not shown.
2 changes: 1 addition & 1 deletion icc_profiles/rec709_profile.h
Original file line number Diff line number Diff line change
@@ -1 +1 @@
const uint8_t rec709_profile[] = { 0x00, 0x00, 0x02, 0x54, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x6D, 0x6E, 0x74, 0x72, 0x52, 0x47, 0x42, 0x20, 0x58, 0x59, 0x5A, 0x20, 0x07, 0xDB, 0x00, 0x02, 0x00, 0x10, 0x00, 0x12, 0x00, 0x1D, 0x00, 0x21, 0x61, 0x63, 0x73, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF6, 0xD6, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0xD3, 0x2D, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x72, 0x3A, 0x61, 0x57, 0x09, 0xAE, 0xA0, 0xE1, 0x65, 0x88, 0x4C, 0x20, 0x1D, 0x80, 0xE4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0B, 0x64, 0x65, 0x73, 0x63, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x00, 0x79, 0x62, 0x58, 0x59, 0x5A, 0x00, 0x00, 0x01, 0x84, 0x00, 0x00, 0x00, 0x14, 0x62, 0x54, 0x52, 0x43, 0x00, 0x00, 0x01, 0x98, 0x00, 0x00, 0x00, 0x10, 0x67, 0x58, 0x59, 0x5A, 0x00, 0x00, 0x01, 0xA8, 0x00, 0x00, 0x00, 0x14, 0x67, 0x54, 0x52, 0x43, 0x00, 0x00, 0x01, 0x98, 0x00, 0x00, 0x00, 0x10, 0x72, 0x58, 0x59, 0x5A, 0x00, 0x00, 0x01, 0xBC, 0x00, 0x00, 0x00, 0x14, 0x72, 0x54, 0x52, 0x43, 0x00, 0x00, 0x01, 0x98, 0x00, 0x00, 0x00, 0x10, 0x74, 0x65, 0x63, 0x68, 0x00, 0x00, 0x01, 0xD0, 0x00, 0x00, 0x00, 0x0C, 0x77, 0x74, 0x70, 0x74, 0x00, 0x00, 0x01, 0xDC, 0x00, 0x00, 0x00, 0x14, 0x63, 0x70, 0x72, 0x74, 0x00, 0x00, 0x01, 0xF0, 0x00, 0x00, 0x00, 0x37, 0x63, 0x68, 0x61, 0x64, 0x00, 0x00, 0x02, 0x28, 0x00, 0x00, 0x00, 0x2C, 0x64, 0x65, 0x73, 0x63, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x49, 0x54, 0x55, 0x2D, 0x52, 0x20, 0x42, 0x54, 0x2E, 0x37, 0x30, 0x39, 0x20, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6E, 0x63, 0x65, 0x20, 0x44, 0x69, 0x73, 0x70, 0x6C, 0x61, 0x79, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x59, 0x5A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0xA0, 0x00, 0x00, 0x0F, 0x84, 0x00, 0x00, 0xB6, 0xCF, 0x63, 0x75, 0x72, 0x76, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x66, 0x00, 0x00, 0x58, 0x59, 0x5A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x62, 0x99, 0x00, 0x00, 0xB7, 0x85, 0x00, 0x00, 0x18, 0xDA, 0x58, 0x59, 0x5A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6F, 0xA2, 0x00, 0x00, 0x38, 0xF5, 0x00, 0x00, 0x03, 0x90, 0x73, 0x69, 0x67, 0x20, 0x00, 0x00, 0x00, 0x00, 0x43, 0x52, 0x54, 0x20, 0x58, 0x59, 0x5A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF6, 0xD6, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0xD3, 0x2D, 0x74, 0x65, 0x78, 0x74, 0x00, 0x00, 0x00, 0x00, 0x43, 0x6F, 0x70, 0x79, 0x72, 0x69, 0x67, 0x68, 0x74, 0x20, 0x49, 0x6E, 0x74, 0x65, 0x72, 0x6E, 0x61, 0x74, 0x69, 0x6F, 0x6E, 0x61, 0x6C, 0x20, 0x43, 0x6F, 0x6C, 0x6F, 0x72, 0x20, 0x43, 0x6F, 0x6E, 0x73, 0x6F, 0x72, 0x74, 0x69, 0x75, 0x6D, 0x2C, 0x20, 0x32, 0x30, 0x31, 0x31, 0x00, 0x00, 0x73, 0x66, 0x33, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x0C, 0x44, 0x00, 0x00, 0x05, 0xDF, 0xFF, 0xFF, 0xF3, 0x26, 0x00, 0x00, 0x07, 0x94, 0x00, 0x00, 0xFD, 0x8F, 0xFF, 0xFF, 0xFB, 0xA1, 0xFF, 0xFF, 0xFD, 0xA2, 0x00, 0x00, 0x03, 0xDB, 0x00, 0x00, 0xC0, 0x75 };
const uint8_t rec709_profile[] = { 0x00, 0x00, 0x01, 0xE0, 0x6C, 0x63, 0x6D, 0x73, 0x04, 0x20, 0x00, 0x00, 0x6D, 0x6E, 0x74, 0x72, 0x52, 0x47, 0x42, 0x20, 0x58, 0x59, 0x5A, 0x20, 0x07, 0xE2, 0x00, 0x03, 0x00, 0x14, 0x00, 0x09, 0x00, 0x0E, 0x00, 0x1D, 0x61, 0x63, 0x73, 0x70, 0x4D, 0x53, 0x46, 0x54, 0x00, 0x00, 0x00, 0x00, 0x73, 0x61, 0x77, 0x73, 0x63, 0x74, 0x72, 0x6C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF6, 0xD6, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0xD3, 0x2D, 0x68, 0x61, 0x6E, 0x64, 0x0E, 0xCC, 0xC5, 0x21, 0xF3, 0x1D, 0x30, 0x7C, 0x28, 0x1D, 0xCC, 0xC0, 0xF1, 0xF4, 0xBA, 0xEC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x64, 0x65, 0x73, 0x63, 0x00, 0x00, 0x00, 0xFC, 0x00, 0x00, 0x00, 0x24, 0x63, 0x70, 0x72, 0x74, 0x00, 0x00, 0x01, 0x20, 0x00, 0x00, 0x00, 0x22, 0x77, 0x74, 0x70, 0x74, 0x00, 0x00, 0x01, 0x44, 0x00, 0x00, 0x00, 0x14, 0x63, 0x68, 0x61, 0x64, 0x00, 0x00, 0x01, 0x58, 0x00, 0x00, 0x00, 0x2C, 0x72, 0x58, 0x59, 0x5A, 0x00, 0x00, 0x01, 0x84, 0x00, 0x00, 0x00, 0x14, 0x67, 0x58, 0x59, 0x5A, 0x00, 0x00, 0x01, 0x98, 0x00, 0x00, 0x00, 0x14, 0x62, 0x58, 0x59, 0x5A, 0x00, 0x00, 0x01, 0xAC, 0x00, 0x00, 0x00, 0x14, 0x72, 0x54, 0x52, 0x43, 0x00, 0x00, 0x01, 0xC0, 0x00, 0x00, 0x00, 0x20, 0x67, 0x54, 0x52, 0x43, 0x00, 0x00, 0x01, 0xC0, 0x00, 0x00, 0x00, 0x20, 0x62, 0x54, 0x52, 0x43, 0x00, 0x00, 0x01, 0xC0, 0x00, 0x00, 0x00, 0x20, 0x6D, 0x6C, 0x75, 0x63, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0C, 0x65, 0x6E, 0x55, 0x53, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x1C, 0x00, 0x52, 0x00, 0x37, 0x00, 0x30, 0x00, 0x39, 0x6D, 0x6C, 0x75, 0x63, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0C, 0x65, 0x6E, 0x55, 0x53, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x1C, 0x00, 0x43, 0x00, 0x43, 0x00, 0x30, 0x00, 0x00, 0x58, 0x59, 0x5A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF6, 0xD6, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0xD3, 0x2D, 0x73, 0x66, 0x33, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x0C, 0x42, 0x00, 0x00, 0x05, 0xDE, 0xFF, 0xFF, 0xF3, 0x25, 0x00, 0x00, 0x07, 0x93, 0x00, 0x00, 0xFD, 0x90, 0xFF, 0xFF, 0xFB, 0xA1, 0xFF, 0xFF, 0xFD, 0xA2, 0x00, 0x00, 0x03, 0xDC, 0x00, 0x00, 0xC0, 0x6E, 0x58, 0x59, 0x5A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6F, 0xA0, 0x00, 0x00, 0x38, 0xF5, 0x00, 0x00, 0x03, 0x90, 0x58, 0x59, 0x5A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x62, 0x97, 0x00, 0x00, 0xB7, 0x87, 0x00, 0x00, 0x18, 0xDA, 0x58, 0x59, 0x5A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x9F, 0x00, 0x00, 0x0F, 0x84, 0x00, 0x00, 0xB6, 0xC3, 0x70, 0x61, 0x72, 0x61, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x38, 0xE5, 0x00, 0x00, 0xE8, 0xF0, 0x00, 0x00, 0x17, 0x10, 0x00, 0x00, 0x38, 0xE4, 0x00, 0x00, 0x14, 0xBD };
Binary file modified icc_profiles/rec709_profile.icc
Binary file not shown.
2 changes: 1 addition & 1 deletion icc_profiles/srgb_profile.h

Large diffs are not rendered by default.

Binary file modified icc_profiles/srgb_profile.icc
Binary file not shown.

0 comments on commit deaff2e

Please sign in to comment.