Skip to content

Commit

Permalink
use MC=6 for sRGB because of potential incompatibility of Safari/iOS …
Browse files Browse the repository at this point in the history
…with MC=5 (#1017)
  • Loading branch information
farindk committed Oct 30, 2023
1 parent 4809d30 commit 7cd873f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions libheif/nclx.cc
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ struct heif_color_profile_nclx* color_profile_nclx::alloc_nclx_color_profile()
// sRGB defaults
profile->color_primaries = heif_color_primaries_ITU_R_BT_709_5; // 1
profile->transfer_characteristics = heif_transfer_characteristic_IEC_61966_2_1; // 13
profile->matrix_coefficients = heif_matrix_coefficients_ITU_R_BT_470_6_System_B_G; // 5
profile->matrix_coefficients = heif_matrix_coefficients_ITU_R_BT_601_6; // 6
profile->full_range_flag = true;
}

Expand All @@ -312,7 +312,7 @@ void color_profile_nclx::free_nclx_color_profile(struct heif_color_profile_nclx*
}


void color_profile_nclx::set_default()
void color_profile_nclx::set_sRGB_defaults()
{
// sRGB defaults
m_colour_primaries = 1;
Expand Down
4 changes: 2 additions & 2 deletions libheif/nclx.h
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ class color_profile_raw : public color_profile
class color_profile_nclx : public color_profile
{
public:
color_profile_nclx() { set_default(); }
color_profile_nclx() { set_sRGB_defaults(); }

uint32_t get_type() const override { return fourcc("nclx"); }

Expand All @@ -147,7 +147,7 @@ class color_profile_nclx : public color_profile

void set_full_range_flag(bool full_range) { m_full_range_flag = full_range; }

void set_default();
void set_sRGB_defaults();

void set_undefined();

Expand Down

0 comments on commit 7cd873f

Please sign in to comment.