To Propagate Pixel Aspect Ratio from GstCaps to HAL and expose new setPixelAspectRatio() API #441
Replies: 2 comments
|
Design is sound — mirrors Two implementation details worth nailing down before this lands so vendors don't drift:
Status
Happy to raise a tracking issue and implement once the two points above are clarified. |
|
Implementation up for review: PR #487 (tracking issue: #486). The two open design questions raised earlier are baked into the Doxygen:
Plus a new "Stream Hints vs Bitstream Truth" section in If anyone has objections to either decision, the PR is the place to push back. |
Uh oh!
There was an error while loading. Please reload this page.
Problem/Opportunity
The video decoder currently derives the Pixel Aspect Ratio (PAR) from the input GstCaps (for example, via the pixel-aspect-ratio field). However, this information is not propagated to the HAL layer.
As a result, downstream components do not have reliable knowledge of the stream’s pixel aspect ratio, even though this information is required to correctly populate the following metadata fields in the HAL:
C++/** * Pixel aspect ratio (PAR) defined as the ratio parX:parY. * e.g. 1:1 for square pixels, 480i=10:11, 576i=59:54 * @see Rec.601 and https://en.wikipedia.org/wiki/Pixel_aspect_ratio */int parX;int parY;Show more lines
This limitation prevents accurate handling of non‑square pixel formats (e.g. legacy SD content) and can lead to incorrect display aspect ratio (DAR) calculations in the downstream video pipeline.
Proposed Solution
Introduce an explicit API to pass pixel aspect ratio hints to the HAL before decoding begins, similar in spirit to setFrameRate().
Proposed API
/**
*/
void setPixelAspectRatio(in int parX, in int parY);
Acceptance Criteria (Optional)
No response
Additional Notes (Optional)
No response
All reactions