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
Justin Ruggles
f24cc1b2f1
alacenc: use s16p sample format as input
2012-08-22 16:41:41 -04:00
Justin Ruggles
358078d9bb
alacenc: remove unneeded sample_fmt check
2012-08-22 16:41:33 -04:00
Justin Ruggles
ec7a212f9f
alacenc: fix max_frame_size calculation for the final frame
2012-08-22 16:41:23 -04:00
Justin Ruggles
5d4ef004bf
adpcm_swf: Use correct sample offsets when using trellis.
...
Fixes invalid reads when encoding mono streams when trellis is used.
2012-08-22 12:43:51 -04:00
Justin Ruggles
fdbeae4490
mpc8: add a flush function
...
Ensures that the next frame decoded after seeking will be decoded as a
keyframe.
2012-08-06 14:39:21 -04:00
Justin Ruggles
2fa57c9daf
mpc8: set packet duration and stream start time instead of tracking frames
...
Fixes mpc8 timestamps.
2012-08-06 14:39:21 -04:00
Justin Ruggles
8821ae649e
lavr: fix handling of custom mix matrices
...
Adds some validation for changing parameters after setting the matrix and
fixes a bug in the conversion path setup.
2012-08-04 10:28:22 -04:00
Justin Ruggles
be51e589cd
af_asyncts: avoid overflow in out_size with large delta values
2012-07-29 14:31:54 -04:00
Justin Ruggles
70d71b5801
af_asyncts: add first_pts option
...
This allows for padding/trimming at the start of stream. By default, no
assumption is made about the first frame's expected pts, so no padding or
trimming is done.
2012-07-29 14:31:54 -04:00
Justin Ruggles
e9da9a3111
lavr: x86: improve non-SSE4 version of S16_TO_S32_SX macro
...
Removes a false dependency on existing contents of the 2nd dst register,
giving better performance for OOE.
2012-07-27 14:21:32 -04:00
Justin Ruggles
743f07062a
lavfi: better channel layout negotiation
...
Allow substitution of channel pairs in the input for nearby channel pairs in
the output in order to get a closer match. Also weigh LFE channel mismatch
differently to favor matching the same layout without LFE over one less
channel with LFE.
2012-07-27 14:15:33 -04:00
Justin Ruggles
81f548de57
alac: check for truncated packets
...
This will give a clearer error message when the error is caused by a
truncated packet.
2012-07-27 13:52:20 -04:00
Justin Ruggles
fb57e913e1
alac: reverse lpc coeff order, simplify filter
...
Reversing the lpc coefficient order simplifies indexing in the filter.
2012-07-27 13:52:19 -04:00
Justin Ruggles
2f096bb10e
lavr: add x86-optimized mixing functions
...
Adds optimized functions for mixing 3 through 8 input channels to 1 and 2
output channels in fltp or s16p format with flt coeffs.
2012-07-27 11:25:48 -04:00
Justin Ruggles
79687079a9
x86: add support for fmaddps fma4 instruction with abstraction to avx/sse
2012-07-27 11:25:48 -04:00
Justin Ruggles
0dadf9d1e9
lavr: x86: add missing vzeroupper in ff_mix_1_to_2_fltp_flt()
2012-07-25 15:41:25 -04:00
Justin Ruggles
a35738f424
dsputil: ppc: cosmetics: pretty-print
2012-07-22 17:38:55 -04:00