[vlc-devel] [PATCH 19/19] packetizer/startcode_helper: optimise AVX2 use with vzeroupper use

Lyndon Brown jnqnfe at gmail.com
Thu Sep 24 21:42:59 CEST 2020


From: Lyndon Brown <jnqnfe at gmail.com>
Date: Thu, 4 Apr 2019 07:57:13 +0100
Subject: packetizer/startcode_helper: optimise AVX2 use with vzeroupper use

helps performance should SSE code also be in use at the same time

diff --git a/modules/packetizer/startcode_helper.h b/modules/packetizer/startcode_helper.h
index bd19855a48..fb2988faaa 100644
--- a/modules/packetizer/startcode_helper.h
+++ b/modules/packetizer/startcode_helper.h
@@ -119,6 +119,8 @@ static inline const uint8_t * startcode_FindAnnexB_AVX2( const uint8_t *p, const
             if( match & 0xF0000000 )
                 TRY_MATCH(p, 28);
         }
+
+        __asm__ volatile( "vzeroupper\n" ::: );
     }
 
     for (; p <= end; p++) {



More information about the vlc-devel mailing list