Browse code

avfilter/vsrc_mptestsrc: use lrint instead of floor hack

lrint is faster, and is more consistent across the codebase.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>

Ganesh Ajjanagadde authored on 2015/11/26 07:27:27
Showing 1 changed files
... ...
@@ -121,7 +121,7 @@ static void idct(uint8_t *dst, int dst_linesize, int src[64])
121 121
             for (k = 0; k < 8; k++)
122 122
                 sum += c[k*8+i]*tmp[8*k+j];
123 123
 
124
-            dst[dst_linesize*i + j] = av_clip_uint8((int)floor(sum+0.5));
124
+            dst[dst_linesize*i + j] = av_clip_uint8(lrint(sum));
125 125
         }
126 126
     }
127 127
 }