mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 23:07:35 +00:00
LibVideo/VP9: Add a FIXME to keep render_and_frame_size_different
The flag should be used to determine whether the pixel aspect ratio should be updated when frame/render sizes change in the bitstream.
This commit is contained in:
parent
3259c99cab
commit
9f573264ea
1 changed files with 7 additions and 0 deletions
|
@ -309,6 +309,13 @@ DecoderErrorOr<Gfx::Size<u32>> Parser::parse_frame_size()
|
|||
|
||||
DecoderErrorOr<Gfx::Size<u32>> Parser::parse_render_size(Gfx::Size<u32> frame_size)
|
||||
{
|
||||
// FIXME: This function should save this bit as a value in the FrameContext. The bit can be
|
||||
// used in files where the pixel aspect ratio changes between samples in the video.
|
||||
// If the bit is set, the pixel aspect ratio should be recalculated, whereas if only
|
||||
// the frame size has changed and the render size is unadjusted, then the pixel aspect
|
||||
// ratio should be retained and the new render size determined based on that.
|
||||
// See the Firefox source code here:
|
||||
// https://searchfox.org/mozilla-central/source/dom/media/platforms/wrappers/MediaChangeMonitor.cpp#268-276
|
||||
if (!TRY_READ(m_bit_stream->read_bit()))
|
||||
return frame_size;
|
||||
return Gfx::Size<u32> { TRY_READ(m_bit_stream->read_f16()) + 1, TRY_READ(m_bit_stream->read_f16()) + 1 };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue