mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 06:37:44 +00:00
LibVideo/VP9: Specify more units in Parser::residual()
Previously, the variables were named similarly to the names in spec which aren't very human-readable. This adds some utility functions for dimensional unit conversions and names the variables in residual() based on their units. References to 4x4 blocks were also renamed to call them sub-blocks instead, since unit conversion functions would not be able to begin with "4x4_blocks".
This commit is contained in:
parent
f4af6714d2
commit
f898a00eb3
3 changed files with 112 additions and 71 deletions
|
@ -16,6 +16,7 @@
|
|||
#include "Enums.h"
|
||||
#include "LookupTables.h"
|
||||
#include "MotionVector.h"
|
||||
#include "Utilities.h"
|
||||
|
||||
namespace Video::VP9 {
|
||||
|
||||
|
@ -178,11 +179,9 @@ struct BlockContext {
|
|||
u32 row { 0 };
|
||||
u32 column { 0 };
|
||||
BlockSubsize size;
|
||||
Gfx::Size<u8> get_size_in_4x4_blocks() const
|
||||
Gfx::Size<u8> get_size_in_sub_blocks() const
|
||||
{
|
||||
auto width = num_4x4_blocks_wide_lookup[size];
|
||||
auto height = num_4x4_blocks_high_lookup[size];
|
||||
return Gfx::Size<u8>(width, height);
|
||||
return block_size_to_sub_blocks(size);
|
||||
}
|
||||
|
||||
Vector2DView<FrameBlockContext> contexts_view;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue