From 5f7099cff6f2321ea9b1c0eaadab8a4bbc553099 Mon Sep 17 00:00:00 2001 From: Zaggy1024 Date: Mon, 28 Nov 2022 07:53:13 -0600 Subject: [PATCH] LibVideo/VP9: Apply higher optimization levels to Decoder and Parser With this change, decode times on GCC as measured by TestVP9Decode are reduced by about 15%. Not a bad improvement for a few added lines :^) --- Userland/Libraries/LibVideo/VP9/Decoder.cpp | 4 ++++ Userland/Libraries/LibVideo/VP9/Parser.cpp | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/Userland/Libraries/LibVideo/VP9/Decoder.cpp b/Userland/Libraries/LibVideo/VP9/Decoder.cpp index 5a22587d8f..8a75293bfe 100644 --- a/Userland/Libraries/LibVideo/VP9/Decoder.cpp +++ b/Userland/Libraries/LibVideo/VP9/Decoder.cpp @@ -12,6 +12,10 @@ #include "Decoder.h" #include "Utilities.h" +#if defined(AK_COMPILER_GCC) +# pragma GCC optimize("O3") +#endif + namespace Video::VP9 { Decoder::Decoder() diff --git a/Userland/Libraries/LibVideo/VP9/Parser.cpp b/Userland/Libraries/LibVideo/VP9/Parser.cpp index c0d894edf8..9aa1b972e1 100644 --- a/Userland/Libraries/LibVideo/VP9/Parser.cpp +++ b/Userland/Libraries/LibVideo/VP9/Parser.cpp @@ -13,6 +13,10 @@ #include "Parser.h" #include "Utilities.h" +#if defined(AK_COMPILER_GCC) +# pragma GCC optimize("O3") +#endif + namespace Video::VP9 { #define TRY_READ(expression) DECODER_TRY(DecoderErrorCategory::Corrupted, expression)