diff options
author | Mans Rullgard <mans@mansr.com> | 2011-11-27 18:04:16 +0400 |
---|---|---|
committer | Mans Rullgard <mans@mansr.com> | 2011-12-11 22:47:19 +0400 |
commit | 3383a53e7d0abb9639c3ea3481f0eda9dca61a26 (patch) | |
tree | d53f0c38d95d4256b727dc4f4c5add488aabe501 /libavformat/flvenc.c | |
parent | 5b3265a7181889b53ff8217c1bdccdf966c86955 (diff) |
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/flvenc.c')
-rw-r--r-- | libavformat/flvenc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/flvenc.c b/libavformat/flvenc.c index 84466aa8a0..dfa17e0374 100644 --- a/libavformat/flvenc.c +++ b/libavformat/flvenc.c @@ -19,7 +19,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "libavutil/intfloat_readwrite.h" +#include "libavutil/intfloat.h" #include "avformat.h" #include "flv.h" #include "internal.h" @@ -162,7 +162,7 @@ static void put_avc_eos_tag(AVIOContext *pb, unsigned ts) { static void put_amf_double(AVIOContext *pb, double d) { avio_w8(pb, AMF_DATA_TYPE_NUMBER); - avio_wb64(pb, av_dbl2int(d)); + avio_wb64(pb, av_double2int(d)); } static void put_amf_bool(AVIOContext *pb, int b) { |