summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibVideo/VP9/BooleanDecoder.h
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Libraries/LibVideo/VP9/BooleanDecoder.h')
-rw-r--r--Userland/Libraries/LibVideo/VP9/BooleanDecoder.h31
1 files changed, 3 insertions, 28 deletions
diff --git a/Userland/Libraries/LibVideo/VP9/BooleanDecoder.h b/Userland/Libraries/LibVideo/VP9/BooleanDecoder.h
index 5a72f76d70..2c53fc8701 100644
--- a/Userland/Libraries/LibVideo/VP9/BooleanDecoder.h
+++ b/Userland/Libraries/LibVideo/VP9/BooleanDecoder.h
@@ -1,40 +1,15 @@
/*
- * Copyright (c) 2021, Hunter Salyer <thefalsehonesty@gmail.com>
- * Copyright (c) 2022, Gregory Bertilson <zaggy1024@gmail.com>
+ * Copyright (c) 2023, Nico Weber <thakis@chromium.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
-#include <AK/BitStream.h>
-#include <AK/Error.h>
-#include <AK/Optional.h>
-#include <AK/Types.h>
+#include <LibGfx/ImageFormats/BooleanDecoder.h>
namespace Video::VP9 {
-class BooleanDecoder {
-public:
- /* (9.2) */
- static ErrorOr<BooleanDecoder> initialize(MaybeOwned<BigEndianInputBitStream> bit_stream, size_t size_in_bytes);
- ErrorOr<bool> read_bool(u8 probability);
- ErrorOr<u8> read_literal(u8 bits);
- ErrorOr<void> finish_decode();
-
-private:
- BooleanDecoder(MaybeOwned<BigEndianInputBitStream>&& bit_stream, u8 value, u8 range, u64 bits_left)
- : m_bit_stream(move(bit_stream))
- , m_value(value)
- , m_range(range)
- , m_bits_left(bits_left)
- {
- }
-
- MaybeOwned<BigEndianInputBitStream> m_bit_stream;
- u8 m_value { 0 };
- u8 m_range { 0 };
- u64 m_bits_left { 0 };
-};
+using BooleanDecoder = Gfx::BooleanDecoder;
}