--- origsrc/ffmpeg-3.4.14/libavcodec/x86/mathops.h	2025-03-12 23:05:40.000000000 +0100
+++ src/ffmpeg-3.4.14/libavcodec/x86/mathops.h	2025-03-29 18:12:10.685817600 +0100
@@ -115,7 +115,7 @@ __asm__ volatile(\
 static inline  int32_t NEG_SSR32( int32_t a, int8_t s){
     __asm__ ("sarl %1, %0\n\t"
          : "+r" (a)
-         : "ic" ((uint8_t)(-s))
+         : "ic" (-s & 0x1F)
     );
     return a;
 }
@@ -124,7 +124,7 @@ static inline  int32_t NEG_SSR32( int32_
 static inline uint32_t NEG_USR32(uint32_t a, int8_t s){
     __asm__ ("shrl %1, %0\n\t"
          : "+r" (a)
-         : "ic" ((uint8_t)(-s))
+         : "ic" (-s & 0x1F)
     );
     return a;
 }
