diff options
author | Mans Rullgard <mans@mansr.com> | 2011-11-27 14:04:16 +0000 |
---|---|---|
committer | Mans Rullgard <mans@mansr.com> | 2011-12-11 18:47:19 +0000 |
commit | 3383a53e7d0abb9639c3ea3481f0eda9dca61a26 (patch) | |
tree | d53f0c38d95d4256b727dc4f4c5add488aabe501 /libavformat/thp.c | |
parent | 5b3265a7181889b53ff8217c1bdccdf966c86955 (diff) | |
download | ffmpeg-3383a53e7d0abb9639c3ea3481f0eda9dca61a26.tar.gz |
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 <mans@mansr.com>
Diffstat (limited to 'libavformat/thp.c')
-rw-r--r-- | libavformat/thp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/thp.c b/libavformat/thp.c index 5b1d180f4b..25efcbba82 100644 --- a/libavformat/thp.c +++ b/libavformat/thp.c @@ -20,7 +20,7 @@ */ #include "libavutil/intreadwrite.h" -#include "libavutil/intfloat_readwrite.h" +#include "libavutil/intfloat.h" #include "avformat.h" #include "internal.h" @@ -69,7 +69,7 @@ static int thp_read_header(AVFormatContext *s, avio_rb32(pb); /* Max buf size. */ avio_rb32(pb); /* Max samples. */ - thp->fps = av_d2q(av_int2flt(avio_rb32(pb)), INT_MAX); + thp->fps = av_d2q(av_int2float(avio_rb32(pb)), INT_MAX); thp->framecnt = avio_rb32(pb); thp->first_framesz = avio_rb32(pb); avio_rb32(pb); /* Data size. */ |