Justin Ruggles and Martin Storsjö
39ef66f530
lpc: Add a function for calculating reflection coefficients from autocorrelation coefficients
...
Signed-off-by: Martin Storsjö <martin@martin.st >
2012-10-29 21:53:13 +02:00
Justin Ruggles
c68317ebbe
lavc: fix documentation for AVCodecContext.delay
2012-10-23 14:35:27 -04:00
Justin Ruggles
44d854a518
atrac3: return an error if extradata_size is not a specific known size
...
Also fixes 3 compiler warnings about using uninitialized variables.
2012-10-23 14:35:27 -04:00
Justin Ruggles
a5ef830b12
lavc: use the correct API version guard macro for avcodec_encode_audio()
2012-10-23 14:35:27 -04:00
Justin Ruggles
a1f4cd371a
atrac3: replace a calculation with FFALIGN()
...
This allocates 4 bytes less than the previous code if avctx->block_align is
a multiple of 4, but the extra 4 bytes is not really needed.
2012-10-22 10:10:08 -04:00
Justin Ruggles
808686fc1e
atrac3: remove unused ATRAC3Context field, sample_rate
2012-10-22 10:10:08 -04:00
Justin Ruggles
89a6c32bc1
atrac3: use sizeof(variable) instead of sizeof(type)
2012-10-22 10:10:08 -04:00
Justin Ruggles
327747de15
atrac3: simplify MDCT window calculation
2012-10-22 10:10:08 -04:00
Justin Ruggles
5d1007f74d
atrac3: initialize static tables in AVCodec.init_static_data()
2012-10-22 10:10:08 -04:00
Justin Ruggles
78edce3f19
atrac3: separate window initialization from IMDCT initialization
2012-10-22 10:10:08 -04:00
Justin Ruggles
c51311b907
atrac3: move the 'frame_factor' field from ATRAC3Context to where it is used
2012-10-22 10:10:08 -04:00
Justin Ruggles
7e76f27081
atrac3: remove unused ATRAC3Context field, bit_rate
2012-10-22 10:10:07 -04:00
Justin Ruggles
a2664c91fb
atrac3: move the 'samples_per_frame' field from ATRAC3Context to where it is used
2012-10-22 10:10:07 -04:00
Justin Ruggles
7c1f93afe6
atrac3: remove unused ATRAC3Context field, samples_per_channel
2012-10-22 10:10:07 -04:00
Justin Ruggles
cdd0e0de81
atrac3: use AVCodecContext.block_align instead of keeping a private copy
2012-10-22 10:10:07 -04:00
Justin Ruggles
64ebbb8f89
atrac3: move the 'delay' field from ATRAC3Context to where it is used
2012-10-22 10:10:07 -04:00
Justin Ruggles
56a9d2b44e
atrac3: move the 'version' field from ATRAC3Context to where it is used
2012-10-22 10:10:06 -04:00
Justin Ruggles
5ac673b553
atrac3: use AVCodecContext.channels instead of keeping a private copy
2012-10-22 10:10:06 -04:00
Justin Ruggles
aefdb735c3
atrac3: simplify some loop indexing
2012-10-22 10:10:06 -04:00
Justin Ruggles
e55d53905f
atrac3: cosmetics: pretty-printing and renaming
...
also does some minor refactoring.
2012-10-22 10:10:06 -04:00
Justin Ruggles
46a86c6194
alacdec: set bits_per_raw_sample
2012-10-21 23:54:51 -04:00
Justin Ruggles
abd8b9e7e0
libmp3lame: resize the output buffer if needed
...
The LAME API documentation for the required buffer size refers to the size for
a single encode call. However, we store multiple frames in the same output
buffer but only read 1 frame at a time out of it. As a result, the buffer size
given in lame_encode_buffer() is actually smaller than what it should be.
Since we do not know how many frames it will end up buffering, it is best to
just reallocate if needed.
2012-10-17 09:59:13 -04:00
Justin Ruggles
f9d732c264
wmapro: use planar sample format
2012-10-14 16:48:23 -04:00
Justin Ruggles
2725ce7c7c
wmalossless: output in planar sample format
2012-10-14 16:48:23 -04:00
Justin Ruggles
7ebfe5b44a
wmadec: use float planar sample format output
2012-10-14 16:48:23 -04:00
Justin Ruggles
977eb7d567
shorten: use planar sample format
2012-10-14 16:48:22 -04:00
Justin Ruggles
8441909f49
lavc: update documentation for AVFrame.extended_data
2012-10-14 15:00:45 -04:00
Justin Ruggles and Luca Barbato
10e645e9cb
lavr: handle clipping in the float to s32 conversion
...
We cannot clip to INT_MAX because that value cannot be exactly
represented by a float value and ends up overflowing during conversion
anyway. We need to use a slightly smaller float value, which ends up
with slightly inaccurate results for samples which clip or nearly clip,
but it is close enough. Using doubles as intermediates in the conversion
would be more accurate, but it takes about twice as much time.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org >
2012-10-13 12:34:34 +02:00
Justin Ruggles
6304f78edf
avplay: support mid-stream sample rate changes
...
Resample to the rate that was configured in SDL.
2012-10-13 00:19:00 -04:00
Justin Ruggles
f5962229bf
avplay: use audio parameters from the decoded frame instead of AVCodecContext
2012-10-13 00:18:48 -04:00
Justin Ruggles
61d5313d94
dca: allocate a secondary buffer for extra channels when downmixing
...
The output AVFrame buffer only has data for the downmix channels.
Fixes a segfault when decoding dca with request_channels == 2.
2012-10-13 00:07:10 -04:00
Justin Ruggles
cbcd497f38
adxdec: use planar sample format
2012-10-09 09:03:52 -04:00
Justin Ruggles
4ebd74cec7
adpcmdec: use planar sample format for adpcm_thp
2012-10-09 09:03:52 -04:00
Justin Ruggles
327cdb04e3
adpcmdec: use planar sample format for adpcm_ea_xas
2012-10-09 09:03:52 -04:00
Justin Ruggles
da9620e8e5
adpcmdec: use planar sample format for adpcm_ea_r1/r2/r3
2012-10-09 09:03:52 -04:00
Justin Ruggles
d2b6ae02aa
adpcmdec: use planar sample format for adpcm_xa
2012-10-09 09:03:52 -04:00
Justin Ruggles
8b854283c3
adpcmdec: use planar sample format for adpcm_ima_ws for vqa version 3
2012-10-09 09:03:52 -04:00
Justin Ruggles
4356d66d78
adpcmdec: use planar sample format for adpcm_4xm
2012-10-09 09:03:52 -04:00
Justin Ruggles
1b9ac72908
adpcmdec: use planar sample format for adpcm_ima_wav
2012-10-09 09:03:52 -04:00
Justin Ruggles
176db0b892
adpcmdec: use planar sample format for adpcm_ima_qt
2012-10-09 09:03:52 -04:00
Justin Ruggles
7e5f045039
pcmdec: use planar sample format for pcm_lxf
2012-10-09 09:03:51 -04:00
Justin Ruggles
c1a9cfd1fe
mace: use planar sample format
2012-10-09 09:03:51 -04:00
Justin Ruggles
23d53c5473
atrac1: use planar sample format
2012-10-09 09:03:51 -04:00
Justin Ruggles
7b556be673
af_resample: avoid conversion of identical sample formats for 1 channel
...
When there is only 1 channel, the planar and interleaved formats of the same
data type should be treated as identical.
2012-10-07 16:45:50 -04:00
Justin Ruggles
37f701f1c3
avcodec: allow either planar or interleaved sample format when encoding mono
...
When there is only 1 channel, the planar and interleaved formats of the same
data type should be treated as identical.
2012-10-07 16:45:50 -04:00
Justin Ruggles
5364327186
adpcmenc: ensure calls to adpcm_ima_compress_sample() are in the right order
...
Should fix fate-acodec-adpcm-ima_wav with several compilers.
2012-10-07 16:45:50 -04:00
Justin Ruggles
31b2262dca
wmaenc: use float planar sample format
2012-10-06 13:23:13 -04:00
Justin Ruggles
b1540fc884
(e)ac3enc: use planar sample format
2012-10-06 13:23:13 -04:00
Justin Ruggles
f3e2d68df6
aacenc: use planar sample format
2012-10-06 13:23:13 -04:00
Justin Ruggles
095be4fbf6
adpcmenc: use planar sample format for adpcm_ima_wav and adpcm_ima_qt
2012-10-06 12:25:33 -04:00
Justin Ruggles
d9a13c2f56
adpcmenc: move 'ch' variable to higher scope
...
It is used for multiple codecs.
2012-10-06 12:25:33 -04:00
Justin Ruggles
9606f19b4e
adpcmenc: fix 3 instances of variable shadowing
2012-10-06 12:25:33 -04:00
Justin Ruggles
1e35574bad
adpcm_ima_wav: simplify encoding
2012-10-06 12:25:33 -04:00
Justin Ruggles
cfc0a80a1d
libvorbis: use planar sample format
2012-10-06 12:25:32 -04:00
Justin Ruggles
473b297f26
libmp3lame: use planar sample formats
2012-10-06 12:25:32 -04:00
Justin Ruggles
233783e2c1
vorbisenc: use float planar sample format
2012-10-06 12:25:32 -04:00
Justin Ruggles
11dcddb97b
ffm: do not write or read the audio sample format
2012-10-06 12:21:54 -04:00
Justin Ruggles
c9df48909e
libspeexdec: handle NULL return value from speex_packet_to_header()
...
This will happen when the extradata is not a valid Speex header.
2012-10-03 18:26:25 -04:00
Justin Ruggles
45e5d0c3ac
libspeexdec: properly handle DTX for multiple frames-per-packet
2012-10-03 16:03:32 -04:00
Justin Ruggles
908e22b93a
libspeexdec: move the SpeexHeader from LibSpeexContext to where it is used
2012-10-03 16:03:32 -04:00
Justin Ruggles
892695c851
libspeexdec: simplify setting of frame_size
2012-10-03 16:03:32 -04:00
Justin Ruggles
27c3f9c03e
libspeexdec: set channel_layout
2012-10-03 16:03:32 -04:00
Justin Ruggles
29abb04e73
libspeexdec: If the channel count is not valid, decode as stereo.
...
When initialized as stereo, libspeex can decode either mono or stereo packets
and will output stereo.
2012-10-03 16:03:32 -04:00
Justin Ruggles
3b061c5e10
libspeexdec: improve setting of Speex mode and sample rate
...
If there is no extradata and the sample rate given by the user is not valid,
decode as ultra-wideband.
2012-10-03 16:03:31 -04:00
Justin Ruggles
bfcd4b6a16
adpcmdec: set AVCodec.sample_fmts
2012-10-01 13:42:44 -04:00
Justin Ruggles
1478a3601e
twinvq: use planar sample format
2012-10-01 13:42:44 -04:00
Justin Ruggles
a34be78546
ralf: use planar sample format
2012-10-01 13:42:44 -04:00
Justin Ruggles
1a3459033d
mpc7/8: use planar sample format
2012-10-01 13:42:44 -04:00
Justin Ruggles
3fca0d7210
iac/imc: use planar sample format
2012-10-01 13:42:43 -04:00
Justin Ruggles
64c312aa29
dcadec: use float planar sample format
2012-10-01 13:42:43 -04:00
Justin Ruggles
cbf6ee7823
cook: use planar sample format
2012-10-01 13:42:43 -04:00
Justin Ruggles
9af4eaa8ea
atrac3: use float planar sample format
2012-10-01 13:42:43 -04:00
Justin Ruggles
461ba7e97a
apedec: output in planar sample format
2012-10-01 13:42:43 -04:00
Justin Ruggles
cf8c93ada4
8svx: use planar sample format
2012-10-01 13:42:43 -04:00
Justin Ruggles
fd41cb4370
avconv: improve sample format negotiation for decoder request
...
This takes into account planar vs. packed when comparing to find the closest
sample format match.
2012-10-01 13:42:43 -04:00
Justin Ruggles
56b6a43056
ac3dec: ensure get_buffer() gets a buffer for the correct number of channels
...
If there is an error during frame parsing, but AVCodecContext.channels was
changed and AC3DecodeContext.out_channels was set previously, the two may not
match.
Fixes CVE-2012-2802
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-10-01 00:10:59 -04:00
Justin Ruggles
0ccf051a9d
avcodec: fix memleak in avcodec_encode_audio2()
...
Ensure that padded_frame is freed before returning when needed.
2012-09-22 09:24:24 -04:00
Justin Ruggles
ee90119e9e
binkaudio: remove unneeded GET_BITS_SAFE macro
...
Normal get_bits() already has overread protection.
2012-09-18 09:27:23 -04:00
Justin Ruggles
7bfd1766d1
binkaudio: use float sample format
...
Use planar for DCT codec, interleaved for RDFT codec.
2012-09-18 09:27:23 -04:00
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.
2012-09-18 09:26:56 -04:00
Justin Ruggles
7327525997
x86: float_dsp: fix ff_vector_fmac_scalar_avx() on Win64
...
The SWAP macro does not work for explicit xmm/ymm usage, so instead just move
the scalar value from xmm2 to xmm0.
2012-09-07 14:49:10 -04:00
Justin Ruggles
06e751a40f
lavr: x86: optimized 6-channel flt to fltp conversion
2012-08-23 20:10:57 -04:00
Justin Ruggles
e07c9705c8
lavr: x86: optimized 2-channel flt to fltp conversion
2012-08-23 20:10:57 -04:00
Justin Ruggles
5245c9f3ad
lavr: x86: optimized 6-channel flt to s16p conversion
2012-08-23 20:10:57 -04:00
Justin Ruggles
31d0d7181d
lavr: x86: optimized 2-channel flt to s16p conversion
2012-08-23 20:10:57 -04:00
Justin Ruggles
6092dafb5a
lavr: x86: optimized 6-channel s16 to fltp conversion
2012-08-23 20:10:57 -04:00
Justin Ruggles
91851a7b37
lavr: x86: optimized 2-channel s16 to fltp conversion
2012-08-23 20:10:57 -04:00
Justin Ruggles
205ace8843
lavr: x86: optimized 6-channel s16 to s16p conversion
2012-08-23 20:10:57 -04:00
Justin Ruggles
8eeffa8ada
lavr: x86: optimized 2-channel s16 to s16p conversion
2012-08-23 20:10:57 -04:00
Justin Ruggles
b66e20d2aa
lavr: x86: optimized 2-channel fltp to flt conversion
2012-08-23 20:10:56 -04:00
Justin Ruggles
d5b4e50c47
lavr: x86: optimized 6-channel fltp to s16 conversion
2012-08-23 20:10:56 -04:00
Justin Ruggles
a58a013980
lavr: x86: optimized 2-channel fltp to s16 conversion
2012-08-23 20:10:56 -04:00
Justin Ruggles
90cc27f813
lavr: x86: optimized 6-channel s16p to flt conversion
2012-08-23 20:10:56 -04:00
Justin Ruggles
46f929adad
lavr: x86: optimized 2-channel s16p to flt conversion
2012-08-23 20:10:56 -04:00
Justin Ruggles
13df7d2d40
lavr: x86: optimized 6-channel s16p to s16 conversion
2012-08-23 20:10:56 -04:00
Justin Ruggles
c0e12535aa
lavr: x86: optimized 2-channel s16p to s16 conversion
2012-08-23 20:10:56 -04:00
Justin Ruggles
a0a5fed908
vorbisenc: set AVCodecContext.bit_rate to 0
...
The Vorbis encoder is always VBR.
2012-08-22 19:58:46 -04:00
Justin Ruggles
890fddd0ea
vorbisenc: fix quality parameter
...
This generates output with bitrates similar to libvorbis for a given quality
value.
2012-08-22 19:58:39 -04:00
Justin Ruggles
e981215944
FATE: add ALAC encoding tests
2012-08-22 16:41:57 -04:00
Justin Ruggles
4b0e0f31bf
lpc: fix alignment of windowed samples for odd maximum LPC order
...
Fixes crash on x86 due to alignment requirements for w_data in
lpc_apply_welch_window_sse2().
2012-08-22 16:41:50 -04:00