1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 08:17:35 +00:00

LibVideo/VP9: Implement sections 6.1.2 and 8.4.1-8.4.4

These section implement the behavior to refresh the probability
tables after parsing a frame.
This commit is contained in:
FalseHonesty 2021-06-26 23:23:22 -04:00 committed by Andreas Kling
parent cf6b3d0ce9
commit d79c9c262f
8 changed files with 188 additions and 9 deletions

View file

@ -0,0 +1,21 @@
/*
* Copyright (c) 2021, Hunter Salyer <thefalsehonesty@gmail.com>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#include "Utilities.h"
namespace Video::VP9 {
u8 clip_3(u8 x, u8 y, u8 z)
{
return clamp(z, x, y);
}
u8 round_2(u8 x, u8 n)
{
return (x + (1 << (n - 1))) >> n;
}
}