From 17e1b205a4a85d55111a9023cb18c4573f57cd8d Mon Sep 17 00:00:00 2001 From: Zaggy1024 Date: Sun, 6 Nov 2022 15:00:26 -0600 Subject: [PATCH] LibVideo: Use the BlockSubsize enum where appropriate in the VP9 parser --- Userland/Libraries/LibVideo/VP9/Parser.cpp | 2 +- Userland/Libraries/LibVideo/VP9/Parser.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Userland/Libraries/LibVideo/VP9/Parser.cpp b/Userland/Libraries/LibVideo/VP9/Parser.cpp index eac043cede..3e092aa355 100644 --- a/Userland/Libraries/LibVideo/VP9/Parser.cpp +++ b/Userland/Libraries/LibVideo/VP9/Parser.cpp @@ -905,7 +905,7 @@ void Parser::clear_left_context() clear_context(m_left_partition_context, m_sb64_rows * 8); } -DecoderErrorOr Parser::decode_partition(u32 row, u32 col, u8 block_subsize) +DecoderErrorOr Parser::decode_partition(u32 row, u32 col, BlockSubsize block_subsize) { if (row >= m_mi_rows || col >= m_mi_cols) return {}; diff --git a/Userland/Libraries/LibVideo/VP9/Parser.h b/Userland/Libraries/LibVideo/VP9/Parser.h index e4eec171bc..d86751d052 100644 --- a/Userland/Libraries/LibVideo/VP9/Parser.h +++ b/Userland/Libraries/LibVideo/VP9/Parser.h @@ -103,7 +103,7 @@ private: u32 get_tile_offset(u32 tile_num, u32 mis, u32 tile_size_log2); DecoderErrorOr decode_tile(); void clear_left_context(); - DecoderErrorOr decode_partition(u32 row, u32 col, u8 block_subsize); + DecoderErrorOr decode_partition(u32 row, u32 col, BlockSubsize block_subsize); DecoderErrorOr decode_block(u32 row, u32 col, BlockSubsize subsize); DecoderErrorOr mode_info(); DecoderErrorOr intra_frame_mode_info(); @@ -227,7 +227,7 @@ private: bool m_has_rows { false }; bool m_has_cols { false }; TXSize m_max_tx_size { TX_4x4 }; - u8 m_block_subsize { 0 }; + BlockSubsize m_block_subsize { BlockSubsize::Block_4x4 }; // The row to use for getting partition tree probability lookups. u32 m_row { 0 }; // The column to use for getting partition tree probability lookups.