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

Clean Aperture semantics should be clarified #77

Open
cconcolato opened this issue Jun 14, 2023 · 1 comment
Open

Clean Aperture semantics should be clarified #77

cconcolato opened this issue Jun 14, 2023 · 1 comment
Labels
ISOBMFF related to 14496-12

Comments

@cconcolato
Copy link
Contributor

The current semantics indicate:

The pixel aspect ratio and clean aperture of the video may be specified using the PixelAspectRatioBox and CleanApertureBox sample entry boxes, respectively. These are both optional; if present, they over-ride the declarations (if any) in structures specific to the video codec, which structures should be examined if these boxes are absent.

I find the sentence "overriding structures specific to the video codec" unclear, especially for Clean Aperture.
I see 2 use cases related to cropping:

  • cropping because the codec can only code X pixels (e.g. multiple of 16 pixels) but the actual source is Y pixels. In this use case, there are 2 sub-cases:
    a) The codec has built-in cropping (e.g. HEVC). Cropping is applied by the decoder according to the "conformance cropping window" without the container level/application knowing about it. The extra pixels are not seen in the sample entry width and height. In that case, the clap cannot override that behavior.
    b) The codec does not have that cropping feature. In that case, the clean aperture box can be used to signal the cropping, and obviously it overrides the codec output (i.e. the sample entry still documents the additional pixels).
  • cropping because of the source content contains undesired pixels. I "think" this is the original intent of the QuickTime clean aperture. This can also be used to crop to the active picture.

I think the ISOBMFF spec should be update to say that:

  • in-stream cropping features that are mandated by the codec apply
  • in-stream cropping features that are optional, e.g. as metadata or sei, should be reflected at the container level (i.e. values should match) and if they don't the container should take precedence.
@podborski
Copy link
Member

in-stream cropping features that are optional, e.g. as metadata or sei, should be reflected at the container level (i.e. values should match) and if they don't the container should take precedence.

The container shall always take precedence, no?

@podborski podborski added the ISOBMFF related to 14496-12 label Jan 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ISOBMFF related to 14496-12
Projects
None yet
Development

No branches or pull requests

2 participants