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>
This implements reading the tag in the demuxer and adds support for writing it
in the muxer. Some example channel layout tables for muxing are included for
ac3, aac, and alac, but they are not utilized yet.
Its checked a few lines below too.
The only difference is that empty atoms with size=0 will now get parsed too.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
The computed size doesn't contain the header size because it's already
skipped by incrementing total_size, but then it's skipped again in the
last line. The atom comes out 8 bytes short and the function
mov_read_chan() aborts the whole parsing process. I think the computed
size should be atom.size - total_size + 8.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
malloc() is allowed to return NULL when zero is the argument. This
causes us to think malloc has failed and return AVERROR(ENOMEM). In
addition OS X malloc() returns an unfreeable non-NULL pointer for size
zero when alignment is greater than 16.
Earlier, sc->samples_per_frame was used for setting the frame size,
but all files don't have that set properly. The frame size is a
known constant for these codecs.
If frame_size isn't set, the mov/3gp muxer refuses to mux it.
This fixes stream copy of audio from
https://roundup.libav.org/file1248/Video_With_AMR-NB_Audio.3gp
to another 3gp file (roundup issue 2468).
Signed-off-by: Martin Storsjö <martin@martin.st>
This atom typically is used for a track title.
(cherry picked from commit a356137816b4ea20a892d1fb203b11dbfedbc543)
Reviewed-by: Baptiste Coudurier
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Manual replacements are done in this commit.
In many cases, the id is some constant made up number (e.g. 0 for video
and 1 for audio), which is then not used in the demuxer for anything.
Those ids are removed.
Extradata should only be parsed from the avss, fiel, jp2h and alac atoms for
AVS, MJPEG, Motion JPEG 2000 and ALAC respectively.
This also fixes the mov demuxer coming up with bogus extradata for some
AVC-Intra samples due to the presence of fiel atoms.