Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify the difference between Pixel and Sample #92

Closed
wants to merge 1 commit into from

Conversation

JeromeMartinez
Copy link
Contributor

There are sometimes inversion between the meaning of each word. Trying to clarify, with definition.

Issue reported by @dwbuiten

ffv1.md Outdated
@@ -23,17 +23,21 @@ The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "S
## Definitions

-------- --------------------------------------------------------------
`Sample`: The smallest addressable representation of a primary color in a frame. Examples of sample are Luminance, Blue Chrominance, Red Chrominance, Alpha, Red, Green, Blue.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the term primary color is misleading here, since a Y sample does not represent color. I see some language from RFC4175 which discusses this like:

A sample may represent a color component or a luminance component of the video.

ffv1.md Outdated
@@ -23,17 +23,21 @@ The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "S
## Definitions

-------- --------------------------------------------------------------
`Sample`: The smallest addressable representation of a primary color in a frame. Examples of sample are Luminance, Blue Chrominance, Red Chrominance, Alpha, Red, Green, Blue.

`Pixel`: The smallest addressable representation of a color in a frame. It is composed of 1 or more samples.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Worthwhile to mention subsamples here when pixels share samples?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO useful for clear split between pixel and sample.
But no strong opinion on keeping it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: strictly speaking, luma ≠ luminance and chroma ≠ chrominance.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You mean you prefer me to write luma and chroma?

Copy link
Contributor

@retokromer retokromer Jan 4, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, I mean that, if I’ll find the time, I would like to go through the full document and distinguish between.
Add: this might be a following PR.

ffv1.md Outdated
`ESC`: An ESCape symbol to indicate that the symbol to be stored is too large for normal storage and that an alternate storage method.

`MSB`: Most Significant Bit, the bit that can cause the largest change in magnitude of the symbol.

`RCT`: Reversible Color Transform, a near linear, exactly reversible integer transform that converts between RGB and YCbCr representations of a sample.
`RCT`: Reversible Color Transform, a near linear, exactly reversible integer transform that converts between RGB and YCbCr representations of a pixel.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since Pixel is defined locally, I suggest to write it in Titlecase whenever it is used with the locally defined meaning.

@@ -929,10 +933,10 @@ pseudo-code | type
Line( p, y ) { |
if (colorspace_type == 0) { |
for( x = 0; x < plane_pixel_width[ p ]; x++ ) |
Pixel( p, y, x ) |
Sample( p, y, x ) |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIRC part of @dwbuiten was pointing out the need to define a Pixel/Sample function. Not blocking this commit or PR though.

@JeromeMartinez
Copy link
Contributor Author

PR update with Pixel and color component or a luminance component.

@@ -23,17 +23,21 @@ The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "S
## Definitions

-------- --------------------------------------------------------------
`Sample`: The smallest addressable representation of a color component or a luminance component in a frame. Examples of sample are Luminance, Blue Chrominance, Red Chrominance, Alpha, Red, Green, Blue.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be luma and not luminance?


`YCbCr`: A reference to the method of storing the value of a sample by using three numeric values that represent the luminance of the sample (Y) and the chrominance of the sample (Cb and Cr).
`YCbCr`: A reference to the method of storing the value of a Pixel by using three numeric values that represent the luminance of the Pixel (Y) and the chrominance of the Pixel (Cb and Cr).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(although this was already in the definition) should also be changed here?

Copy link
Contributor

@ablwr ablwr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

luma vs luminance. cc @retokromer who has corrected me on this in the past.

@ablwr
Copy link
Contributor

ablwr commented Jan 4, 2018

Here is an educated rant to support my requested change: http://poynton.ca/PDFs/YUV_and_luminance_harmful.pdf

@JeromeMartinez
Copy link
Contributor Author

JeromeMartinez commented Jan 4, 2018

luma vs luminance.

In this PR, I reused the wording near the change I do (e.g. for Sample definition I reused the content of YCbCr definition).
It would be weird:

  • to change to Luma at one place and not at the place beside this change
  • or to change Luminance to Luma everywhere, the PR would have changes not associated with the subject of the change.

I suggest that it is not blocking for this PR and another (by @retokromer as he has more knowledge than me on this subject) PR would be done focused on this issue. If the PR about Luminance vs Luma is merged before this PR, I rebase and use the wording decided in the merged PR.

Let's keep PR with only one subject, here the subject is Pixel vs Sample.

@ablwr
Copy link
Contributor

ablwr commented Jan 4, 2018

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants