mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 06:57:44 +00:00
LibVideo/VP9: Begin reference frame update process (8.10)
This was required for correctly parsing more than one frame's height/width data properly. Additionally, start handling failure a little more gracefully. Since we don't fully parse a tile before starting to parse the next tile, we will now no longer make it past the first tile mark, meaning we should not handle that scenario well.
This commit is contained in:
parent
514559f074
commit
cf6b3d0ce9
6 changed files with 54 additions and 10 deletions
|
@ -6,6 +6,7 @@
|
|||
|
||||
#include "Parser.h"
|
||||
#include "Decoder.h"
|
||||
#include "Utilities.h"
|
||||
|
||||
namespace Video::VP9 {
|
||||
|
||||
|
@ -13,10 +14,6 @@ namespace Video::VP9 {
|
|||
if (m_bit_stream->read_bit() != 0) \
|
||||
return false
|
||||
|
||||
#define SAFE_CALL(call) \
|
||||
if (!(call)) [[unlikely]] \
|
||||
return false
|
||||
|
||||
Parser::Parser(Decoder& decoder)
|
||||
: m_probability_tables(make<ProbabilityTables>())
|
||||
, m_tree_parser(make<TreeParser>(*this))
|
||||
|
@ -220,6 +217,7 @@ bool Parser::frame_size_with_refs()
|
|||
for (auto frame_index : m_ref_frame_idx) {
|
||||
found_ref = m_bit_stream->read_bit();
|
||||
if (found_ref) {
|
||||
dbgln("Reading size from ref frame {}", frame_index);
|
||||
m_frame_width = m_ref_frame_width[frame_index];
|
||||
m_frame_height = m_ref_frame_height[frame_index];
|
||||
break;
|
||||
|
@ -1203,10 +1201,10 @@ bool Parser::append_sub8x8_mvs(u8, u8)
|
|||
|
||||
void Parser::dump_info()
|
||||
{
|
||||
dbgln("Frame dimensions: {}x{}", m_frame_width, m_frame_height);
|
||||
dbgln("Render dimensions: {}x{}", m_render_width, m_render_height);
|
||||
dbgln("Bit depth: {}", m_bit_depth);
|
||||
dbgln("Interpolation filter: {}", (u8)m_interpolation_filter);
|
||||
outln("Frame dimensions: {}x{}", m_frame_width, m_frame_height);
|
||||
outln("Render dimensions: {}x{}", m_render_width, m_render_height);
|
||||
outln("Bit depth: {}", m_bit_depth);
|
||||
outln("Interpolation filter: {}", (u8)m_interpolation_filter);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue