summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibVideo/VP9/Utilities.cpp
diff options
context:
space:
mode:
authorZaggy1024 <zaggy1024@gmail.com>2022-10-08 21:54:20 -0500
committerAndrew Kaster <andrewdkaster@gmail.com>2022-10-09 20:32:40 -0600
commit1514004cd59798f9e2eeb44f381d78a9c1caa877 (patch)
tree421351cab9737fe23424d8f0b2d0ce41f0125d38 /Userland/Libraries/LibVideo/VP9/Utilities.cpp
parentda9ff3116681800d0d6ed7c6a1e62c5b91df1264 (diff)
downloadserenity-1514004cd59798f9e2eeb44f381d78a9c1caa877.zip
LibVideo: Implement VP9 intra-predicted frame decoding
The first keyframe of the test video can be decoded with these changes. Raw memory allocations in the Parser have been replaced with Vector or Array to avoid memory leaks and OOBs.
Diffstat (limited to 'Userland/Libraries/LibVideo/VP9/Utilities.cpp')
-rw-r--r--Userland/Libraries/LibVideo/VP9/Utilities.cpp21
1 files changed, 0 insertions, 21 deletions
diff --git a/Userland/Libraries/LibVideo/VP9/Utilities.cpp b/Userland/Libraries/LibVideo/VP9/Utilities.cpp
deleted file mode 100644
index 70336efc6d..0000000000
--- a/Userland/Libraries/LibVideo/VP9/Utilities.cpp
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * 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;
-}
-
-}