diff --git a/libavformat/mov.c b/libavformat/mov.c
index 51cdd21abd3fc1286a4703ec65ca96a073a31d11..60729343dd20807597eadd3234b402392aed7879 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -1711,9 +1711,9 @@ static uint32_t yuv_to_rgba(uint32_t ycbcr)
     cr = (ycbcr >> 8)  & 0xFF;
     cb =  ycbcr        & 0xFF;
 
-    b = av_clip_uint8(1.164 * (y - 16)                      + 2.018 * (cb - 128));
-    g = av_clip_uint8(1.164 * (y - 16) - 0.813 * (cr - 128) - 0.391 * (cb - 128));
-    r = av_clip_uint8(1.164 * (y - 16) + 1.596 * (cr - 128));
+    b = av_clip_uint8((1164 * (y - 16)                     + 2018 * (cb - 128)) / 1000);
+    g = av_clip_uint8((1164 * (y - 16) -  813 * (cr - 128) -  391 * (cb - 128)) / 1000);
+    r = av_clip_uint8((1164 * (y - 16) + 1596 * (cr - 128)                    ) / 1000);
 
     return (r << 16) | (g << 8) | b;
 }