diff --git a/libswscale/rgb2rgb_template.c b/libswscale/rgb2rgb_template.c
index 5b446debfaf08dc66f7f99527ceb9a6e0048a408..1cc28cdd13f233ee70f9bb08c4ab77a8c0913477 100644
--- a/libswscale/rgb2rgb_template.c
+++ b/libswscale/rgb2rgb_template.c
@@ -322,7 +322,7 @@ static inline void shuffle_bytes_2103_c(const uint8_t *src, uint8_t *dst,
     uint8_t *d       = dst - idx;
 
     for (; idx < 15; idx += 4) {
-        register int v        = *(const uint32_t *)&s[idx], g = v & 0xff00ff00;
+        register unsigned v   = *(const uint32_t *)&s[idx], g = v & 0xff00ff00;
         v                    &= 0xff00ff;
         *(uint32_t *)&d[idx]  = (v >> 16) + g + (v << 16);
     }