ffmpeg | branch: master | Michael Niedermayer <[email protected]> | Mon Mar 2 14:54:31 2015 +0100| [7c9e7bd4257a97dfcd287f77c5d27f3c8a74da34] | committer: Michael Niedermayer
avcodec/pngenc: replace round by lrint() Avoids passing double to AV_WB32() Suggested-by: "Ronald S. Bultje" <[email protected]> Signed-off-by: Michael Niedermayer <[email protected]> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7c9e7bd4257a97dfcd287f77c5d27f3c8a74da34 --- libavcodec/pngenc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavcodec/pngenc.c b/libavcodec/pngenc.c index 9fd8eef..4e67ce2 100644 --- a/libavcodec/pngenc.c +++ b/libavcodec/pngenc.c @@ -26,6 +26,7 @@ #include "png.h" #include "libavutil/avassert.h" +#include "libavutil/libm.h" #include "libavutil/opt.h" #include <zlib.h> @@ -231,7 +232,7 @@ static int png_write_row(PNGEncContext *s, const uint8_t *data, int size) return 0; } -#define AV_WB32_PNG(buf, n) (AV_WB32(buf, round((n) * 100000))) +#define AV_WB32_PNG(buf, n) (AV_WB32(buf, lrint((n) * 100000))) static int png_get_chrm(enum AVColorPrimaries prim, uint8_t *buf) { double rx, ry, gx, gy, bx, by, wx = 0.3127, wy = 0.3290; _______________________________________________ ffmpeg-cvslog mailing list [email protected] http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
