From e6b696fe246f5fbbf345dbbc8c88e685f5a076a1 Mon Sep 17 00:00:00 2001 From: Zaggy1024 Date: Mon, 28 Nov 2022 06:51:35 -0600 Subject: [PATCH] LibVideo/VP9: Remove now-unused clear_context function from Parser --- Userland/Libraries/LibVideo/VP9/Parser.cpp | 16 ---------------- Userland/Libraries/LibVideo/VP9/Parser.h | 6 ------ 2 files changed, 22 deletions(-) diff --git a/Userland/Libraries/LibVideo/VP9/Parser.cpp b/Userland/Libraries/LibVideo/VP9/Parser.cpp index 6fb1436bad9..1e65a11a917 100644 --- a/Userland/Libraries/LibVideo/VP9/Parser.cpp +++ b/Userland/Libraries/LibVideo/VP9/Parser.cpp @@ -886,22 +886,6 @@ DecoderErrorOr Parser::decode_tiles(FrameContext& frame_context) return {}; } -template -void Parser::clear_context(Vector& context, size_t size) -{ - context.resize_and_keep_capacity(size); - __builtin_memset(context.data(), 0, sizeof(T) * size); -} - -template -void Parser::clear_context(Vector>& context, size_t outer_size, size_t inner_size) -{ - if (context.size() < outer_size) - context.resize(outer_size); - for (auto& sub_vector : context) - clear_context(sub_vector, inner_size); -} - u32 Parser::get_tile_offset(u32 tile_num, u32 mis, u32 tile_size_log2) { u32 super_blocks = (mis + 7) >> 3u; diff --git a/Userland/Libraries/LibVideo/VP9/Parser.h b/Userland/Libraries/LibVideo/VP9/Parser.h index 83550bdb052..96b42754f6d 100644 --- a/Userland/Libraries/LibVideo/VP9/Parser.h +++ b/Userland/Libraries/LibVideo/VP9/Parser.h @@ -49,12 +49,6 @@ private: DecoderErrorOr read_frame_type(); DecoderErrorOr read_color_range(); - /* Utilities */ - template - void clear_context(Vector& context, size_t size); - template - void clear_context(Vector>& context, size_t outer_size, size_t inner_size); - /* (6.1) Frame Syntax */ bool trailing_bits(); DecoderErrorOr refresh_probs(FrameContext const&);