diff mbox

[FFmpeg-devel,3/3] vf_colorspace: Add support for smpte 431/432 (dci/display p3) primaries

Message ID 20161030070746.37115-3-vittorio.giovara@gmail.com
State Accepted
Commit 4697f6044489d9a528eac823c7ae216bc431f38a
Headers show

Commit Message

Vittorio Giovara Oct. 30, 2016, 7:07 a.m. UTC
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
---
I couldn't find any reference to the name of the whitepoint used for 431,
so I came up with DCI, since it looks like it is only used there.
Please CC.
Vittorio

 libavfilter/vf_colorspace.c | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Ronald S. Bultje Oct. 30, 2016, 1:18 p.m. UTC | #1
Hi,

On Sun, Oct 30, 2016 at 3:07 AM, Vittorio Giovara <
vittorio.giovara@gmail.com> wrote:

> Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
> ---
> I couldn't find any reference to the name of the whitepoint used for 431,
> so I came up with DCI, since it looks like it is only used there.
> Please CC.
> Vittorio
>
>  libavfilter/vf_colorspace.c | 6 ++++++
>  1 file changed, 6 insertions(+)
>
> diff --git a/libavfilter/vf_colorspace.c b/libavfilter/vf_colorspace.c
> index 7e0bafa..4265aa1 100644
> --- a/libavfilter/vf_colorspace.c
> +++ b/libavfilter/vf_colorspace.c
> @@ -56,6 +56,7 @@ enum Colorspace {
>  enum Whitepoint {
>      WP_D65,
>      WP_C,
> +    WP_DCI,
>      WP_NB,
>  };
>
> @@ -268,6 +269,7 @@ static const struct TransferCharacteristics *
>  static const struct WhitepointCoefficients whitepoint_coefficients[WP_NB]
> = {
>      [WP_D65] = { 0.3127, 0.3290 },
>      [WP_C]   = { 0.3100, 0.3160 },
> +    [WP_DCI] = { 0.3140, 0.3510 },
>  };


Hmm... So, the wikipedia page https://en.wikipedia.org/wiki/DCI-P3 refers
to the two whitepoints here as DCI-P3 D65 and DCI-P3 Theater. Calling one
D65 and the other DCI seems confusing in that light (assuming the wikipedia
page is correct). I'd call it THEATER or DCI_P3_THEATER, to distinguish it
from DCI-P3 D65. Is that OK?

Ronald
Kieran O Leary Oct. 30, 2016, 2:06 p.m. UTC | #2
Hi,

On Sun, Oct 30, 2016 at 7:07 AM, Vittorio Giovara <
vittorio.giovara@gmail.com> wrote:

> Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
> ---
> I couldn't find any reference to the name of the whitepoint used for 431,
> so I came up with DCI, since it looks like it is only used there.
> Please CC.
>

Could this patch be used to convert XYZ Digital Cinema Packages to Rec.709?
I've found that converting a DCP to a YUV format in ffmpeg results in
colours and contrast that look different to how the image displays in
EasyDCP player or a cinema screen. IIRC, -vf colorspace doesn't accept XYZ
input, so is there some intermediate step that I could take to achieve this
kind of transformation, or have I just misunderstood the patch?

Best,

Kieran.
Ronald S. Bultje Oct. 30, 2016, 6:47 p.m. UTC | #3
Hi Kieran,

On Sun, Oct 30, 2016 at 10:06 AM, Kieran O Leary <kieran.o.leary@gmail.com>
wrote:

> Hi,
>
> On Sun, Oct 30, 2016 at 7:07 AM, Vittorio Giovara <
> vittorio.giovara@gmail.com> wrote:
>
> > Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
> > ---
> > I couldn't find any reference to the name of the whitepoint used for 431,
> > so I came up with DCI, since it looks like it is only used there.
> > Please CC.
> >
>
> Could this patch be used to convert XYZ Digital Cinema Packages to Rec.709?
> I've found that converting a DCP to a YUV format in ffmpeg results in
> colours and contrast that look different to how the image displays in
> EasyDCP player or a cinema screen. IIRC, -vf colorspace doesn't accept XYZ
> input, so is there some intermediate step that I could take to achieve this
> kind of transformation, or have I just misunderstood the patch?


Does -vf colorspace accept XYZ as input? No, not right now.

It could be made to work but since raw XYZ stored in files is such a fringe
feature, I didn't focus on implementing support for that. The current
filter accepts any YUV colorspace, converts that to XYZ and then converts
that back to any other YUV colorspace. You could conceptually skip half of
that and allow XYZ input and/or output, but like I said, right now it
doesn't support that yet.

Ronald
Kevin Wheatley Oct. 31, 2016, 9:50 a.m. UTC | #4
On Sun, Oct 30, 2016 at 1:18 PM, Ronald S. Bultje <rsbultje@gmail.com> wrote:
> Hmm... So, the wikipedia page https://en.wikipedia.org/wiki/DCI-P3 refers
> to the two whitepoints here as DCI-P3 D65 and DCI-P3 Theater. Calling one
> D65 and the other DCI seems confusing in that light (assuming the wikipedia
> page is correct). I'd call it THEATER or DCI_P3_THEATER, to distinguish it
> from DCI-P3 D65. Is that OK?

In the industry people just call it the DCI P3 white point (or 'Urgh')
it is not limited to theater usage, you might consider it the
calibration white point for the reference projector, so
WP_DCI_P3_REFERENCE might be better, but that is a little long.

I'd go for something like WP_DCI_P3 it is not really ambiguous.

Kevin
Ronald S. Bultje Oct. 31, 2016, 11:43 a.m. UTC | #5
Hi,

On Mon, Oct 31, 2016 at 5:50 AM, Kevin Wheatley <kevin.j.wheatley@gmail.com>
wrote:

> On Sun, Oct 30, 2016 at 1:18 PM, Ronald S. Bultje <rsbultje@gmail.com>
> wrote:
> > Hmm... So, the wikipedia page https://en.wikipedia.org/wiki/DCI-P3
> refers
> > to the two whitepoints here as DCI-P3 D65 and DCI-P3 Theater. Calling one
> > D65 and the other DCI seems confusing in that light (assuming the
> wikipedia
> > page is correct). I'd call it THEATER or DCI_P3_THEATER, to distinguish
> it
> > from DCI-P3 D65. Is that OK?
>
> In the industry people just call it the DCI P3 white point (or 'Urgh')
> it is not limited to theater usage, you might consider it the
> calibration white point for the reference projector, so
> WP_DCI_P3_REFERENCE might be better, but that is a little long.
>
> I'd go for something like WP_DCI_P3 it is not really ambiguous.


Hm... OK with me (though not ideal, but what do I know). Vittorio, OK also?
I can modify patch so you don't have to resend.

Ronald
Vittorio Giovara Oct. 31, 2016, 3:13 p.m. UTC | #6
On Mon, Oct 31, 2016 at 7:43 AM, Ronald S. Bultje <rsbultje@gmail.com> wrote:
> Hi,
>
> On Mon, Oct 31, 2016 at 5:50 AM, Kevin Wheatley <kevin.j.wheatley@gmail.com>
> wrote:
>>
>> On Sun, Oct 30, 2016 at 1:18 PM, Ronald S. Bultje <rsbultje@gmail.com>
>> wrote:
>> > Hmm... So, the wikipedia page https://en.wikipedia.org/wiki/DCI-P3
>> > refers
>> > to the two whitepoints here as DCI-P3 D65 and DCI-P3 Theater. Calling
>> > one
>> > D65 and the other DCI seems confusing in that light (assuming the
>> > wikipedia
>> > page is correct). I'd call it THEATER or DCI_P3_THEATER, to distinguish
>> > it
>> > from DCI-P3 D65. Is that OK?
>>
>> In the industry people just call it the DCI P3 white point (or 'Urgh')
>> it is not limited to theater usage, you might consider it the
>> calibration white point for the reference projector, so
>> WP_DCI_P3_REFERENCE might be better, but that is a little long.
>>
>> I'd go for something like WP_DCI_P3 it is not really ambiguous.
>
>
> Hm... OK with me (though not ideal, but what do I know). Vittorio, OK also?
> I can modify patch so you don't have to resend.

I find it a little long and not less confusing than my initial WP_DCI,
among all the alternatives I liked the THEATER one the most. If that's
a no-go, how about we could settle for WP_PROJ maybe?
Kevin Wheatley Oct. 31, 2016, 5:21 p.m. UTC | #7
I would really strongly suggest including DCI in the name at least -
though nobody else would choose to use it for anything other than the
reference calibration - most titles use a creative white different to
that of the encoding reference (one that is less green).

Kevin
Ronald S. Bultje Oct. 31, 2016, 6:53 p.m. UTC | #8
Hi,

On Mon, Oct 31, 2016 at 11:13 AM, Vittorio Giovara <
vittorio.giovara@gmail.com> wrote:

> On Mon, Oct 31, 2016 at 7:43 AM, Ronald S. Bultje <rsbultje@gmail.com>
> wrote:
> > Hi,
> >
> > On Mon, Oct 31, 2016 at 5:50 AM, Kevin Wheatley <
> kevin.j.wheatley@gmail.com>
> > wrote:
> >>
> >> On Sun, Oct 30, 2016 at 1:18 PM, Ronald S. Bultje <rsbultje@gmail.com>
> >> wrote:
> >> > Hmm... So, the wikipedia page https://en.wikipedia.org/wiki/DCI-P3
> >> > refers
> >> > to the two whitepoints here as DCI-P3 D65 and DCI-P3 Theater. Calling
> >> > one
> >> > D65 and the other DCI seems confusing in that light (assuming the
> >> > wikipedia
> >> > page is correct). I'd call it THEATER or DCI_P3_THEATER, to
> distinguish
> >> > it
> >> > from DCI-P3 D65. Is that OK?
> >>
> >> In the industry people just call it the DCI P3 white point (or 'Urgh')
> >> it is not limited to theater usage, you might consider it the
> >> calibration white point for the reference projector, so
> >> WP_DCI_P3_REFERENCE might be better, but that is a little long.
> >>
> >> I'd go for something like WP_DCI_P3 it is not really ambiguous.
> >
> >
> > Hm... OK with me (though not ideal, but what do I know). Vittorio, OK
> also?
> > I can modify patch so you don't have to resend.
>
> I find it a little long and not less confusing than my initial WP_DCI,
> among all the alternatives I liked the THEATER one the most. If that's
> a no-go, how about we could settle for WP_PROJ maybe?


Wait, wait. Length is an issue? Really?

The only reason the other names are short is because the names of the
whitepoints are short. D65 is really just called that: D65. Likewise for
D50. This name (whatever it is :D) is simply longer.

Ronald
Vittorio Giovara Oct. 31, 2016, 7:31 p.m. UTC | #9
On Mon, Oct 31, 2016 at 2:53 PM, Ronald S. Bultje <rsbultje@gmail.com> wrote:
> Hi,
>
> On Mon, Oct 31, 2016 at 11:13 AM, Vittorio Giovara
> <vittorio.giovara@gmail.com> wrote:
>>
>> On Mon, Oct 31, 2016 at 7:43 AM, Ronald S. Bultje <rsbultje@gmail.com>
>> wrote:
>> > Hi,
>> >
>> > On Mon, Oct 31, 2016 at 5:50 AM, Kevin Wheatley
>> > <kevin.j.wheatley@gmail.com>
>> > wrote:
>> >>
>> >> On Sun, Oct 30, 2016 at 1:18 PM, Ronald S. Bultje <rsbultje@gmail.com>
>> >> wrote:
>> >> > Hmm... So, the wikipedia page https://en.wikipedia.org/wiki/DCI-P3
>> >> > refers
>> >> > to the two whitepoints here as DCI-P3 D65 and DCI-P3 Theater. Calling
>> >> > one
>> >> > D65 and the other DCI seems confusing in that light (assuming the
>> >> > wikipedia
>> >> > page is correct). I'd call it THEATER or DCI_P3_THEATER, to
>> >> > distinguish
>> >> > it
>> >> > from DCI-P3 D65. Is that OK?
>> >>
>> >> In the industry people just call it the DCI P3 white point (or 'Urgh')
>> >> it is not limited to theater usage, you might consider it the
>> >> calibration white point for the reference projector, so
>> >> WP_DCI_P3_REFERENCE might be better, but that is a little long.
>> >>
>> >> I'd go for something like WP_DCI_P3 it is not really ambiguous.
>> >
>> >
>> > Hm... OK with me (though not ideal, but what do I know). Vittorio, OK
>> > also?
>> > I can modify patch so you don't have to resend.
>>
>> I find it a little long and not less confusing than my initial WP_DCI,
>> among all the alternatives I liked the THEATER one the most. If that's
>> a no-go, how about we could settle for WP_PROJ maybe?
>
>
> Wait, wait. Length is an issue? Really?
>
> The only reason the other names are short is because the names of the
> whitepoints are short. D65 is really just called that: D65. Likewise for
> D50. This name (whatever it is :D) is simply longer.

It's not a matter of length but a matter of descriptiveness: right now
there is only one single different whitepoint defined by DCI, so IMO
it makes sense to call it simply WP_DCI. In case DCI adds new values,
naming can be modified later. The other whitepoints could also have
longer, more descriptive names too, like WP_ILLUMINANT_C, but at the
same time the WP_C shorthand is convenient and immediate (and IMO
better suited as variable name).

At any rate, pick the one you prefer ;)
Ronald S. Bultje Oct. 31, 2016, 8:08 p.m. UTC | #10
Hi,

On Mon, Oct 31, 2016 at 3:31 PM, Vittorio Giovara <
vittorio.giovara@gmail.com> wrote:

> On Mon, Oct 31, 2016 at 2:53 PM, Ronald S. Bultje <rsbultje@gmail.com>
> wrote:
> > Hi,
> >
> > On Mon, Oct 31, 2016 at 11:13 AM, Vittorio Giovara
> > <vittorio.giovara@gmail.com> wrote:
> >>
> >> On Mon, Oct 31, 2016 at 7:43 AM, Ronald S. Bultje <rsbultje@gmail.com>
> >> wrote:
> >> > Hi,
> >> >
> >> > On Mon, Oct 31, 2016 at 5:50 AM, Kevin Wheatley
> >> > <kevin.j.wheatley@gmail.com>
> >> > wrote:
> >> >>
> >> >> On Sun, Oct 30, 2016 at 1:18 PM, Ronald S. Bultje <
> rsbultje@gmail.com>
> >> >> wrote:
> >> >> > Hmm... So, the wikipedia page https://en.wikipedia.org/wiki/DCI-P3
> >> >> > refers
> >> >> > to the two whitepoints here as DCI-P3 D65 and DCI-P3 Theater.
> Calling
> >> >> > one
> >> >> > D65 and the other DCI seems confusing in that light (assuming the
> >> >> > wikipedia
> >> >> > page is correct). I'd call it THEATER or DCI_P3_THEATER, to
> >> >> > distinguish
> >> >> > it
> >> >> > from DCI-P3 D65. Is that OK?
> >> >>
> >> >> In the industry people just call it the DCI P3 white point (or
> 'Urgh')
> >> >> it is not limited to theater usage, you might consider it the
> >> >> calibration white point for the reference projector, so
> >> >> WP_DCI_P3_REFERENCE might be better, but that is a little long.
> >> >>
> >> >> I'd go for something like WP_DCI_P3 it is not really ambiguous.
> >> >
> >> >
> >> > Hm... OK with me (though not ideal, but what do I know). Vittorio, OK
> >> > also?
> >> > I can modify patch so you don't have to resend.
> >>
> >> I find it a little long and not less confusing than my initial WP_DCI,
> >> among all the alternatives I liked the THEATER one the most. If that's
> >> a no-go, how about we could settle for WP_PROJ maybe?
> >
> >
> > Wait, wait. Length is an issue? Really?
> >
> > The only reason the other names are short is because the names of the
> > whitepoints are short. D65 is really just called that: D65. Likewise for
> > D50. This name (whatever it is :D) is simply longer.
>
> It's not a matter of length but a matter of descriptiveness: right now
> there is only one single different whitepoint defined by DCI, so IMO
> it makes sense to call it simply WP_DCI. In case DCI adds new values,
> naming can be modified later. The other whitepoints could also have
> longer, more descriptive names too, like WP_ILLUMINANT_C, but at the
> same time the WP_C shorthand is convenient and immediate (and IMO
> better suited as variable name).


That's actually a good point. I'm not sure if C is better than
ILLUMINANT_C... WDYT? I guess you're sticking to the "shorter is better"? :)

Ronald
Vittorio Giovara Oct. 31, 2016, 9:51 p.m. UTC | #11
On Mon, Oct 31, 2016 at 4:08 PM, Ronald S. Bultje <rsbultje@gmail.com> wrote:
> Hi,
>
> On Mon, Oct 31, 2016 at 3:31 PM, Vittorio Giovara
> <vittorio.giovara@gmail.com> wrote:
>>
>> On Mon, Oct 31, 2016 at 2:53 PM, Ronald S. Bultje <rsbultje@gmail.com>
>> wrote:
>> > Hi,
>> >
>> > On Mon, Oct 31, 2016 at 11:13 AM, Vittorio Giovara
>> > <vittorio.giovara@gmail.com> wrote:
>> >>
>> >> On Mon, Oct 31, 2016 at 7:43 AM, Ronald S. Bultje <rsbultje@gmail.com>
>> >> wrote:
>> >> > Hi,
>> >> >
>> >> > On Mon, Oct 31, 2016 at 5:50 AM, Kevin Wheatley
>> >> > <kevin.j.wheatley@gmail.com>
>> >> > wrote:
>> >> >>
>> >> >> On Sun, Oct 30, 2016 at 1:18 PM, Ronald S. Bultje
>> >> >> <rsbultje@gmail.com>
>> >> >> wrote:
>> >> >> > Hmm... So, the wikipedia page https://en.wikipedia.org/wiki/DCI-P3
>> >> >> > refers
>> >> >> > to the two whitepoints here as DCI-P3 D65 and DCI-P3 Theater.
>> >> >> > Calling
>> >> >> > one
>> >> >> > D65 and the other DCI seems confusing in that light (assuming the
>> >> >> > wikipedia
>> >> >> > page is correct). I'd call it THEATER or DCI_P3_THEATER, to
>> >> >> > distinguish
>> >> >> > it
>> >> >> > from DCI-P3 D65. Is that OK?
>> >> >>
>> >> >> In the industry people just call it the DCI P3 white point (or
>> >> >> 'Urgh')
>> >> >> it is not limited to theater usage, you might consider it the
>> >> >> calibration white point for the reference projector, so
>> >> >> WP_DCI_P3_REFERENCE might be better, but that is a little long.
>> >> >>
>> >> >> I'd go for something like WP_DCI_P3 it is not really ambiguous.
>> >> >
>> >> >
>> >> > Hm... OK with me (though not ideal, but what do I know). Vittorio, OK
>> >> > also?
>> >> > I can modify patch so you don't have to resend.
>> >>
>> >> I find it a little long and not less confusing than my initial WP_DCI,
>> >> among all the alternatives I liked the THEATER one the most. If that's
>> >> a no-go, how about we could settle for WP_PROJ maybe?
>> >
>> >
>> > Wait, wait. Length is an issue? Really?
>> >
>> > The only reason the other names are short is because the names of the
>> > whitepoints are short. D65 is really just called that: D65. Likewise for
>> > D50. This name (whatever it is :D) is simply longer.
>>
>> It's not a matter of length but a matter of descriptiveness: right now
>> there is only one single different whitepoint defined by DCI, so IMO
>> it makes sense to call it simply WP_DCI. In case DCI adds new values,
>> naming can be modified later. The other whitepoints could also have
>> longer, more descriptive names too, like WP_ILLUMINANT_C, but at the
>> same time the WP_C shorthand is convenient and immediate (and IMO
>> better suited as variable name).
>
>
> That's actually a good point. I'm not sure if C is better than
> ILLUMINANT_C... WDYT? I guess you're sticking to the "shorter is better"? :)

In this case, yes, shorter is better, in my opinion.
Ronald S. Bultje Nov. 1, 2016, 12:09 p.m. UTC | #12
Hi,

On Mon, Oct 31, 2016 at 5:51 PM, Vittorio Giovara <
vittorio.giovara@gmail.com> wrote:

> On Mon, Oct 31, 2016 at 4:08 PM, Ronald S. Bultje <rsbultje@gmail.com>
> wrote:
> > Hi,
> >
> > On Mon, Oct 31, 2016 at 3:31 PM, Vittorio Giovara
> > <vittorio.giovara@gmail.com> wrote:
> >>
> >> On Mon, Oct 31, 2016 at 2:53 PM, Ronald S. Bultje <rsbultje@gmail.com>
> >> wrote:
> >> > Hi,
> >> >
> >> > On Mon, Oct 31, 2016 at 11:13 AM, Vittorio Giovara
> >> > <vittorio.giovara@gmail.com> wrote:
> >> >>
> >> >> On Mon, Oct 31, 2016 at 7:43 AM, Ronald S. Bultje <
> rsbultje@gmail.com>
> >> >> wrote:
> >> >> > Hi,
> >> >> >
> >> >> > On Mon, Oct 31, 2016 at 5:50 AM, Kevin Wheatley
> >> >> > <kevin.j.wheatley@gmail.com>
> >> >> > wrote:
> >> >> >>
> >> >> >> On Sun, Oct 30, 2016 at 1:18 PM, Ronald S. Bultje
> >> >> >> <rsbultje@gmail.com>
> >> >> >> wrote:
> >> >> >> > Hmm... So, the wikipedia page https://en.wikipedia.org/wiki/
> DCI-P3
> >> >> >> > refers
> >> >> >> > to the two whitepoints here as DCI-P3 D65 and DCI-P3 Theater.
> >> >> >> > Calling
> >> >> >> > one
> >> >> >> > D65 and the other DCI seems confusing in that light (assuming
> the
> >> >> >> > wikipedia
> >> >> >> > page is correct). I'd call it THEATER or DCI_P3_THEATER, to
> >> >> >> > distinguish
> >> >> >> > it
> >> >> >> > from DCI-P3 D65. Is that OK?
> >> >> >>
> >> >> >> In the industry people just call it the DCI P3 white point (or
> >> >> >> 'Urgh')
> >> >> >> it is not limited to theater usage, you might consider it the
> >> >> >> calibration white point for the reference projector, so
> >> >> >> WP_DCI_P3_REFERENCE might be better, but that is a little long.
> >> >> >>
> >> >> >> I'd go for something like WP_DCI_P3 it is not really ambiguous.
> >> >> >
> >> >> >
> >> >> > Hm... OK with me (though not ideal, but what do I know). Vittorio,
> OK
> >> >> > also?
> >> >> > I can modify patch so you don't have to resend.
> >> >>
> >> >> I find it a little long and not less confusing than my initial
> WP_DCI,
> >> >> among all the alternatives I liked the THEATER one the most. If
> that's
> >> >> a no-go, how about we could settle for WP_PROJ maybe?
> >> >
> >> >
> >> > Wait, wait. Length is an issue? Really?
> >> >
> >> > The only reason the other names are short is because the names of the
> >> > whitepoints are short. D65 is really just called that: D65. Likewise
> for
> >> > D50. This name (whatever it is :D) is simply longer.
> >>
> >> It's not a matter of length but a matter of descriptiveness: right now
> >> there is only one single different whitepoint defined by DCI, so IMO
> >> it makes sense to call it simply WP_DCI. In case DCI adds new values,
> >> naming can be modified later. The other whitepoints could also have
> >> longer, more descriptive names too, like WP_ILLUMINANT_C, but at the
> >> same time the WP_C shorthand is convenient and immediate (and IMO
> >> better suited as variable name).
> >
> >
> > That's actually a good point. I'm not sure if C is better than
> > ILLUMINANT_C... WDYT? I guess you're sticking to the "shorter is
> better"? :)
>
> In this case, yes, shorter is better, in my opinion.


OK fine then we'll keep it as-is.

Happy halloween!
Ronald
Ronald S. Bultje Nov. 1, 2016, 9:48 p.m. UTC | #13
Hi,

On Tue, Nov 1, 2016 at 8:09 AM, Ronald S. Bultje <rsbultje@gmail.com> wrote:

> Hi,
>
> On Mon, Oct 31, 2016 at 5:51 PM, Vittorio Giovara <
> vittorio.giovara@gmail.com> wrote:
>
>> On Mon, Oct 31, 2016 at 4:08 PM, Ronald S. Bultje <rsbultje@gmail.com>
>> wrote:
>> > Hi,
>> >
>> > On Mon, Oct 31, 2016 at 3:31 PM, Vittorio Giovara
>> > <vittorio.giovara@gmail.com> wrote:
>> >>
>> >> On Mon, Oct 31, 2016 at 2:53 PM, Ronald S. Bultje <rsbultje@gmail.com>
>> >> wrote:
>> >> > Hi,
>> >> >
>> >> > On Mon, Oct 31, 2016 at 11:13 AM, Vittorio Giovara
>> >> > <vittorio.giovara@gmail.com> wrote:
>> >> >>
>> >> >> On Mon, Oct 31, 2016 at 7:43 AM, Ronald S. Bultje <
>> rsbultje@gmail.com>
>> >> >> wrote:
>> >> >> > Hi,
>> >> >> >
>> >> >> > On Mon, Oct 31, 2016 at 5:50 AM, Kevin Wheatley
>> >> >> > <kevin.j.wheatley@gmail.com>
>> >> >> > wrote:
>> >> >> >>
>> >> >> >> On Sun, Oct 30, 2016 at 1:18 PM, Ronald S. Bultje
>> >> >> >> <rsbultje@gmail.com>
>> >> >> >> wrote:
>> >> >> >> > Hmm... So, the wikipedia page https://en.wikipedia.org/wiki/
>> DCI-P3
>> >> >> >> > refers
>> >> >> >> > to the two whitepoints here as DCI-P3 D65 and DCI-P3 Theater.
>> >> >> >> > Calling
>> >> >> >> > one
>> >> >> >> > D65 and the other DCI seems confusing in that light (assuming
>> the
>> >> >> >> > wikipedia
>> >> >> >> > page is correct). I'd call it THEATER or DCI_P3_THEATER, to
>> >> >> >> > distinguish
>> >> >> >> > it
>> >> >> >> > from DCI-P3 D65. Is that OK?
>> >> >> >>
>> >> >> >> In the industry people just call it the DCI P3 white point (or
>> >> >> >> 'Urgh')
>> >> >> >> it is not limited to theater usage, you might consider it the
>> >> >> >> calibration white point for the reference projector, so
>> >> >> >> WP_DCI_P3_REFERENCE might be better, but that is a little long.
>> >> >> >>
>> >> >> >> I'd go for something like WP_DCI_P3 it is not really ambiguous.
>> >> >> >
>> >> >> >
>> >> >> > Hm... OK with me (though not ideal, but what do I know).
>> Vittorio, OK
>> >> >> > also?
>> >> >> > I can modify patch so you don't have to resend.
>> >> >>
>> >> >> I find it a little long and not less confusing than my initial
>> WP_DCI,
>> >> >> among all the alternatives I liked the THEATER one the most. If
>> that's
>> >> >> a no-go, how about we could settle for WP_PROJ maybe?
>> >> >
>> >> >
>> >> > Wait, wait. Length is an issue? Really?
>> >> >
>> >> > The only reason the other names are short is because the names of the
>> >> > whitepoints are short. D65 is really just called that: D65. Likewise
>> for
>> >> > D50. This name (whatever it is :D) is simply longer.
>> >>
>> >> It's not a matter of length but a matter of descriptiveness: right now
>> >> there is only one single different whitepoint defined by DCI, so IMO
>> >> it makes sense to call it simply WP_DCI. In case DCI adds new values,
>> >> naming can be modified later. The other whitepoints could also have
>> >> longer, more descriptive names too, like WP_ILLUMINANT_C, but at the
>> >> same time the WP_C shorthand is convenient and immediate (and IMO
>> >> better suited as variable name).
>> >
>> >
>> > That's actually a good point. I'm not sure if C is better than
>> > ILLUMINANT_C... WDYT? I guess you're sticking to the "shorter is
>> better"? :)
>>
>> In this case, yes, shorter is better, in my opinion.
>
>
> OK fine then we'll keep it as-is.
>

Pushed.

Ronald
diff mbox

Patch

diff --git a/libavfilter/vf_colorspace.c b/libavfilter/vf_colorspace.c
index 7e0bafa..4265aa1 100644
--- a/libavfilter/vf_colorspace.c
+++ b/libavfilter/vf_colorspace.c
@@ -56,6 +56,7 @@  enum Colorspace {
 enum Whitepoint {
     WP_D65,
     WP_C,
+    WP_DCI,
     WP_NB,
 };
 
@@ -268,6 +269,7 @@  static const struct TransferCharacteristics *
 static const struct WhitepointCoefficients whitepoint_coefficients[WP_NB] = {
     [WP_D65] = { 0.3127, 0.3290 },
     [WP_C]   = { 0.3100, 0.3160 },
+    [WP_DCI] = { 0.3140, 0.3510 },
 };
 
 static const struct ColorPrimaries color_primaries[AVCOL_PRI_NB] = {
@@ -276,6 +278,8 @@  static const struct ColorPrimaries color_primaries[AVCOL_PRI_NB] = {
     [AVCOL_PRI_BT470BG]   = { WP_D65, 0.640, 0.330, 0.290, 0.600, 0.150, 0.060,},
     [AVCOL_PRI_SMPTE170M] = { WP_D65, 0.630, 0.340, 0.310, 0.595, 0.155, 0.070 },
     [AVCOL_PRI_SMPTE240M] = { WP_D65, 0.630, 0.340, 0.310, 0.595, 0.155, 0.070 },
+    [AVCOL_PRI_SMPTE431]  = { WP_DCI, 0.680, 0.320, 0.265, 0.690, 0.150, 0.060 },
+    [AVCOL_PRI_SMPTE432]  = { WP_D65, 0.680, 0.320, 0.265, 0.690, 0.150, 0.060 },
     [AVCOL_PRI_BT2020]    = { WP_D65, 0.708, 0.292, 0.170, 0.797, 0.131, 0.046 },
 };
 
@@ -1080,6 +1084,8 @@  static const AVOption colorspace_options[] = {
     ENUM("bt470bg",      AVCOL_PRI_BT470BG,    "prm"),
     ENUM("smpte170m",    AVCOL_PRI_SMPTE170M,  "prm"),
     ENUM("smpte240m",    AVCOL_PRI_SMPTE240M,  "prm"),
+    ENUM("smpte431",     AVCOL_PRI_SMPTE431,   "prm"),
+    ENUM("smpte432",     AVCOL_PRI_SMPTE432,   "prm"),
     ENUM("bt2020",       AVCOL_PRI_BT2020,     "prm"),
 
     { "trc",        "Output transfer characteristics",