-
Notifications
You must be signed in to change notification settings - Fork 70
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
Add CSP_CENTER. #308
base: master
Are you sure you want to change the base?
Add CSP_CENTER. #308
Conversation
The chroma_sample_position syntax element is only used for YUV 4:2:0 in the AV1 bitstream. So set chroma_sample_position to ChromaSamplePosition::Unknown for all other YUV formats, including monochrome (YUV 4:0:0). Note: For still images, the most common chroma sample position in practice is the "center" position. Unfortunately the AV1 specification does not have a value for the "center" chroma sample position. See AOMediaCodec/av1-avif#88 and AOMediaCodec/av1-spec#308. This pull request preserves the ChromaSamplePosition::Colocated value that is currently used, but it is likely to be incorrect when YUV 4:2:0 is supported.
07.bitstream.semantics.md
Outdated
@@ -461,9 +461,11 @@ that subsampling_x is equal to 0 and subsampling_y is equal to 0. | |||
| 0 | CSP_UNKNOWN | Unknown (in this case the source video transfer function must be signaled outside the AV1 bitstream) | |||
| 1 | CSP_VERTICAL | Horizontally co-located with (0, 0) luma sample, vertical position in the middle between two luma samples | |||
| 2 | CSP_COLOCATED | co-located with (0, 0) luma sample | |||
| 3 | CSP_RESERVED | | |||
| 3 | CSP_CENTER | In the middle between four luma samples |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest changing the description to "In the center of a 2x2 block of luma samples" or "In the center of each 2x2 block of luma samples"
I also found that ITU-T H.273 (07/21) specifies Chroma420SampleLocType
in Section 8.7 Chroma 4:2:0 sample location type. We can also note the correspondence:
CSP_VERTICAL
is the same asChroma420SampleLocType
0CSP_COLOCATED
is the same asChroma420SampleLocType
2CSP_CENTER
is the same asChroma420SampleLocType
1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I discussed the description of CSP_CENTER with Adrian. We propose the following description, which is similar to the description for CSP_VERTICAL:
Horizontal position in the middle between two luma samples, vertical position in the middle between two luma samples
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated to this description. We do have a reference to H.273 in the spec already also, so adding a correspondence might make sense (maybe as a table in a note, rather than extra columns in a table?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, the corresponence to Chroma420SampleLocType
in H.273 could be added as a table in a note. Note sure if we should aim to minimize changes in the AV1 spec update and refrain from clarification changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks! I will send an email to the Codec WG to request review.
Looks good to me! |
Please let me know if you'd like me to rebuild docs/ in this PR as well.