Vittorio Giovara
059a934806
lavc: Consistently prefix input buffer defines
...
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
9 years ago
Vittorio Giovara
def97856de
lavc: AV-prefix all codec capabilities
...
Express bitfields more simply.
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
9 years ago
Anton Khirnov
ee964145b5
lavc: remove unused traces of fmtconvert usage
...
Those decoders have been switched to float output and so do not use
fmtconvert anymore.
10 years ago
Diego Biurrun
7f9f771eac
avcodec: Don't anonymously typedef structs
10 years ago
Diego Biurrun
f20518568a
build: Split WMA frequencies into a separate object file
...
These are the only WMA bits shared with binkaudio. Splitting them off
reduces the binnkaudio dependency on general WMA code.
10 years ago
Michael Niedermayer
07728a1115
avcodec/binkaudio: clear padding area of packet_buffer
...
Fixes use of uninitialized memory
Fixes: msan_uninit-mem_7f0dba198b34_2970_Snd0a3a2ad4.dee
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Paul B Mahol
1de8dfcbc4
avcodec/binkaudio: use init_get_bits8()
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
11 years ago
Diego Biurrun
b2bed9325d
cosmetics: Group .name and .long_name together in codec/format declarations
11 years ago
Diego Biurrun
c591d4575a
avcodec: Replace local extern declarations for tables with header #includes
11 years ago
Clément Bœsch
1ec94b0f06
lavc: factorize ff_{thread_,re,}get_buffer error messages.
...
Coccinelle profile used:
@@
expression r, ctx, f, loglevel, str, flags;
@@
-if ((r = ff_get_buffer(ctx, f, flags)) < 0) {
- av_log(ctx, loglevel, str);
- return r;
-}
+if ((r = ff_get_buffer(ctx, f, flags)) < 0)
+ return r;
@@
expression r, ctx, f, loglevel, str;
@@
-if ((r = ff_reget_buffer(ctx, f)) < 0) {
- av_log(ctx, loglevel, str);
- return r;
-}
+if ((r = ff_reget_buffer(ctx, f)) < 0)
+ return r;
@@
expression r, ctx, f, loglevel, str, flags;
@@
-if ((r = ff_thread_get_buffer(ctx, f, flags)) < 0) {
- av_log(ctx, loglevel, str);
- return r;
-}
+if ((r = ff_thread_get_buffer(ctx, f, flags)) < 0)
+ return r;
...along with some manual patches for the remaining ones.
12 years ago
Anton Khirnov
759001c534
lavc decoders: work with refcounted frames.
12 years ago
Diego Biurrun
c242bbd8b6
Remove unnecessary dsputil.h #includes
12 years ago
Justin Ruggles
5cc0bd2cb4
binkaudio: decode directly to the user-provided AVFrame
12 years ago
Anton Khirnov
594d4d5df3
lavc: add a wrapper for AVCodecContext.get_buffer().
...
It will be useful in the upcoming transition to refcounted AVFrames.
12 years ago
Justin Ruggles
faf340f60c
binkaudio: set channel layout
12 years ago
Justin Ruggles
ee90119e9e
binkaudio: remove unneeded GET_BITS_SAFE macro
...
Normal get_bits() already has overread protection.
12 years ago
Justin Ruggles
7bfd1766d1
binkaudio: use float sample format
...
Use planar for DCT codec, interleaved for RDFT codec.
12 years ago
Justin Ruggles
0801b5979b
binkaudio: use a different value for the coefficient scale for the DCT codec
...
Eliminates the need for vector_fmul_scalar() in each frame.
12 years ago
Anton Khirnov
36ef5369ee
Replace all CODEC_ID_* with AV_CODEC_ID_*
12 years ago
Paul B Mahol
c2dd01c16f
binkaudio: prevent extradata overread
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
13 years ago
Paul B Mahol
824a6975ee
binkaudio: check number of channels
...
Fixes #1380 .
Signed-off-by: Paul B Mahol <onemda@gmail.com>
13 years ago
Martin Storsjö
00c3b67b8a
cosmetics: Align codec declarations
...
Also break some long lines, remove codec function placeholder comments
and add spaces in sample/pixel format lists.
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Martin Storsjö
9cf0841ef3
dsputil: Add ff_ prefix to the dsputil*_init* functions
...
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Diego Biurrun
aaf47bcde7
Drop ALT_ prefix from BITSTREAM_READER_LE name.
...
The prefix is a historic remnant that probably meant "alternative".
Now that the A32 bitstream reader has been dropped it makes no sense anymore.
13 years ago
Mans Rullgard
3383a53e7d
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>
13 years ago
Justin Ruggles
0eea212943
Add avcodec_decode_audio4().
...
Deprecate avcodec_decode_audio3().
Implement audio support in avcodec_default_get_buffer().
Implement the new audio decoder API in all audio decoders.
13 years ago
Justin Ruggles
add7b1140f
binkaudio: expand quant_table to accommodate all possible values
13 years ago
Justin Ruggles
425a843505
binkaudio: change short to int16_t
13 years ago
Justin Ruggles
4f4e19480a
binkaudio: only decode one block at a time.
...
This prevents truncating output due to an output buffer that is too small for
all blocks. There is no limit on the number of blocks in a packet.
13 years ago
Justin Ruggles
eaddd29e00
binkaudio: store interleaved overlap samples in BinkAudioContext.
...
This fixes the requirement for the buffer size to be larger than the number of
samples actually decoded.
13 years ago
Justin Ruggles
9f48039a37
binkaudio: pre-calculate quantization factors
13 years ago
Justin Ruggles
101ef19ef4
binkaudio: add some buffer overread checks.
...
This stops decoding before overreads instead of after.
13 years ago
Anton Khirnov
ec6402b7c5
lavc: use designated initialisers for all codecs.
...
It's more readable and less prone to breakage.
13 years ago
Kostya
df64da3b1e
bink: pass Bink version to audio decoder through extradata instead of codec_tag.
...
This is needed because not all players (e.g. MPlayer) are able to distinguish
two different Bink audio decoders when codec_tag is set.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
14 years ago
Ivan Kalvachev
093768c9a4
Fix bink audio playback outside of FFmpeg.
...
There are 2 known Bink audio codecs. Additionally they have
a different flavor if they are found inside Bink-b "BIKb" file.
In order to guess the correct flavor, the demuxer sets the audio
codec_tag to be the same as the file format tag.
This causes problem because same tag is used for both audio codecs.
The hack works in FFmpeg because audio codecs are identified by their
codec_id, but other players rely on standard behavior.
This fix removes the codec_tag hack and instead uses artificial
extradata format to signal the codec flavor. This would also
allow proper embedding of Bink audio in other containers.
Signed-off-by: Ivan Kalvachev <ikalvachev@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
14 years ago
Vitor Sessak
9d35fa520e
Add AVX FFT implementation.
...
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
14 years ago
Mans Rullgard
0aded9484d
Move dct and rdft definitions to separate files
...
This leaves fft.h with only the core FFT and MDCT definitions
thus making it more managable.
Signed-off-by: Mans Rullgard <mans@mansr.com>
14 years ago
Mans Rullgard
26f548bb59
fft: remove inline wrappers for function pointers
...
This removes the rather pointless wrappers (one not even inline)
for calling the fft_calc and related function pointers.
Signed-off-by: Mans Rullgard <mans@mansr.com>
14 years ago
Mans Rullgard
2912e87a6c
Replace FFmpeg with Libav in licence headers
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
14 years ago
Peter Ross
4913af0cd3
Bink version 'b' audio decoder
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit ccfcddb3f2
)
14 years ago
Peter Ross
8d09fc1930
binkaudio: simplify frame_len_bits and frame_len calculation
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit 8a8c283edd
)
14 years ago
Peter Ross
408ee5a90c
binkaudio: remove unnecessary loop
...
decode_init sets bands[0] == 2, so this loop always sets the band table
index (k) to zero.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit a304def1dc
)
14 years ago
Peter Ross
23d82139d2
binkaudio: perform band table scaling in decode_init
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit 582ac86d19
)
14 years ago
Peter Ross
ccfcddb3f2
Bink version 'b' audio decoder
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
14 years ago
Peter Ross
8a8c283edd
binkaudio: simplify frame_len_bits and frame_len calculation
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
14 years ago
Peter Ross
a304def1dc
binkaudio: remove unnecessary loop
...
decode_init sets bands[0] == 2, so this loop always sets the band table
index (k) to zero.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
14 years ago
Peter Ross
582ac86d19
binkaudio: perform band table scaling in decode_init
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
14 years ago
Peter Ross
c4c9fb4690
binkaudio: remove unused copy of AVCodecContext*
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit 71f88b1f38
)
14 years ago
Peter Ross
136901567c
binkaudio: fix channel count check
...
Perform validity check on AVFormatContext.channels instead of
uninitialised field.
This fixes issue 2001.
Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit 9806fbd535
)
14 years ago
Peter Ross
71f88b1f38
binkaudio: remove unused copy of AVCodecContext*
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
14 years ago