]> git.sesse.net Git - ffmpeg/blobdiff - libavutil/common.h
Use AV_PIX_FMT_FLAG_ALPHA for detecting transparency where nb_components was used
[ffmpeg] / libavutil / common.h
index 5e0382827b0832d0d4bf4cf8c6daeae96b6a45f0..0fffa67714e81781767e97c7e67b3017032a7af0 100644 (file)
@@ -158,7 +158,7 @@ static av_always_inline av_const int64_t av_clip64_c(int64_t a, int64_t amin, in
  */
 static av_always_inline av_const uint8_t av_clip_uint8_c(int a)
 {
-    if (a&(~0xFF)) return (-a)>>31;
+    if (a&(~0xFF)) return (~a)>>31;
     else           return a;
 }
 
@@ -180,7 +180,7 @@ static av_always_inline av_const int8_t av_clip_int8_c(int a)
  */
 static av_always_inline av_const uint16_t av_clip_uint16_c(int a)
 {
-    if (a&(~0xFFFF)) return (-a)>>31;
+    if (a&(~0xFFFF)) return (~a)>>31;
     else             return a;
 }