From 3383a53e7d0abb9639c3ea3481f0eda9dca61a26 Mon Sep 17 00:00:00 2001 From: Mans Rullgard Date: Sun, 27 Nov 2011 14:04:16 +0000 Subject: lavu: replace int/float punning functions The existing functions defined in intfloat_readwrite.[ch] are both slow and incorrect (infinities are not handled). This introduces a new header with fast, inline conversion functions using direct union punning assuming an IEEE-754 system, an assumption already made throughout the code. The one use of Intel/Motorola extended 80-bit format is replaced by simpler code sufficient under the present constraints (positive normal values). The old functions are marked deprecated and retained for compatibility. Signed-off-by: Mans Rullgard --- libavformat/nuv.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'libavformat/nuv.c') diff --git a/libavformat/nuv.c b/libavformat/nuv.c index ddca4fecff..262c4c58e9 100644 --- a/libavformat/nuv.c +++ b/libavformat/nuv.c @@ -20,7 +20,7 @@ */ #include "libavutil/intreadwrite.h" -#include "libavutil/intfloat_readwrite.h" +#include "libavutil/intfloat.h" #include "avformat.h" #include "internal.h" #include "riff.h" @@ -140,10 +140,10 @@ static int nuv_header(AVFormatContext *s, AVFormatParameters *ap) { avio_rl32(pb); // unused, "desiredheight" avio_r8(pb); // 'P' == progressive, 'I' == interlaced avio_skip(pb, 3); // padding - aspect = av_int2dbl(avio_rl64(pb)); + aspect = av_int2double(avio_rl64(pb)); if (aspect > 0.9999 && aspect < 1.0001) aspect = 4.0 / 3.0; - fps = av_int2dbl(avio_rl64(pb)); + fps = av_int2double(avio_rl64(pb)); // number of packets per stream type, -1 means unknown, e.g. streaming v_packs = avio_rl32(pb); -- cgit v1.2.3