Justin Ruggles
30f3e7b524
alacdec: remove unneeded NULL or zero-size packet checks.
...
This is already done in avcodec_decode_audio3()
13 years ago
Justin Ruggles
68f7e9cd8e
alacdec: simplify buffer allocation by using FF_ALLOC_OR_GOTO()
13 years ago
Justin Ruggles
b316af7a7c
alacdec: ask for a sample for unsupported sample depths.
...
Also return AVERROR_PATCHWELCOME.
13 years ago
Justin Ruggles
63cf54df7a
alacdec: cosmetics: use 'ch' instead of 'chan' to iterate channels
13 years ago
Justin Ruggles
01200f1283
alacdec: move some declarations to the top of the function
13 years ago
Justin Ruggles
c3a92412c0
alacdec: always use get_sbits_long() for uncompressed samples
13 years ago
Justin Ruggles
b46e58f741
alacdec: remove unneeded local variable
13 years ago
Justin Ruggles
7080533cda
alacdec: remove the numchannels parameter from several functions.
...
They only operate on stereo content, so the extra param is not necessary and
also allows for simplifying the code.
13 years ago
Justin Ruggles
cb50329fc5
alacdec: rename 2 functions.
...
Now they only do stereo interleaving.
13 years ago
Justin Ruggles
c39bddd392
alacdec: move appending of extra_bits to a separate function.
...
This should also fix decoding of mono 24-bit.
13 years ago
Justin Ruggles
e739d35156
alacdec: split stereo decorrelation into a separate function.
...
It is identical for 16-bit and 24-bit, so there is no need to have duplicate
code.
13 years ago
Justin Ruggles
d251c85dce
alacdec: cosmetics: rename 'wasted_bits' to 'extra_bits'.
...
The bits are not wasted, they are additional low bits that are added to the
16-bit decompressed samples to increase the output sample depth.
13 years ago
Justin Ruggles
dbbb9262ca
alacdec: remove unneeded numsamples checks
13 years ago
Justin Ruggles
53df079a73
alacdec: check for buffer allocation failure.
...
Also rearranges some functions for easier cleanup on failure.
13 years ago
Justin Ruggles
e5e4f92b5c
alacdec: allocate per-channel buffers based on channel count.
...
reduces memory usage when the stream has fewer than MAX_CHANNELS
13 years ago
Justin Ruggles
dcaa83a0fc
alacdec: read/validate number of channels from the extradata.
...
check frame header channel count against header/container channel count.
13 years ago
Justin Ruggles
47e9c75b36
alacdec: remove unneeded validation of setinfo_sample_size.
...
It is already done when using it to set sample_fmt.
13 years ago
Justin Ruggles
0f26f3d5c4
alacdec: set sample_fmt in alac_decode_init()
13 years ago
Justin Ruggles
aec8383348
alacdec: set bytespersample using av_get_bytes_per_sample()
13 years ago
Janne Grunau
d6174bfe5f
threads: restore has_b_frames in frame_thread_free
...
Otherwise the delay expressed in has_b_frames increases with every
avcodec_close/avcodec_open.
Fixes fate-ea-dct with more than 1 thread.
13 years ago
Michael Niedermayer
4416931fc0
snow: emu edge support
...
Fixes Ticket592
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Daniel Kang
ded3e9f054
H.264: Cometics to dsputil_mmx.c
...
Add whitespace.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
13 years ago
Michael Niedermayer
c881df330d
h264: Guess receovery points.
...
Fixes Ticket561
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
e403a97aac
h264: 10l fix, missing () after replacing % by &
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Justin Ruggles
a3a8572165
g722dec: check output buffer size before decoding
13 years ago
Justin Ruggles
4e41973794
g722dec: cosmetics: reindent/linewrap
13 years ago
Justin Ruggles
d0a196962a
g722dec: remove the use of lowres for half-rate decoding.
...
It is broken because an AVCodecContext can be opened/closed multiple
times, and sample_rate is getting divided by 2 each time that happens.
This removes the only use of lowres for audio.
13 years ago
Justin Ruggles
2f1d212fd0
tta: check for allocation failure of decode_buffer
13 years ago
Justin Ruggles
b5050539c9
tta: use correct frame_length calculation.
...
using a floating-point calculation is not necessary.
13 years ago
Justin Ruggles
c6056d4004
tta: add support for decoding 24-bit sample format
...
Note that this will not work in most cases with avconv and avplay due to the
AVCODEC_MAX_AUDIO_FRAME_SIZE limit, but it will decode correctly if given a
large enough output buffer.
13 years ago
Justin Ruggles
8664682d0e
cosmetics: indentation
13 years ago
Justin Ruggles
7b7a74a150
tta: remove pointless braces
13 years ago
Justin Ruggles
e6923f683c
tta: check output buffer size after adjusting frame length for last frame
13 years ago
Justin Ruggles
b16960a8a5
tta: fix reading of format in TTA header.
...
TTA does not support float at all, and format 2 is encrypted TTA.
13 years ago
Justin Ruggles
4d3e7a7516
tta: remove useless commented-out lines
13 years ago
Justin Ruggles
35f9d8c20a
tta: check remaining bitstream size while reading unary value
13 years ago
Nicolas George
cf88cf17d0
Remove CELT / Opus confusion in labels, doc and comments.
...
The situation was not clear when support was added but it is now:
CELT and Opus are really two different codecs.
The current code supports CELT via libcelt, not Opus.
Signed-off-by: Nicolas George <nicolas.george@normalesup.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Janne Grunau
28287045ca
cosmetics: simplify latm_decode_init
13 years ago
Janne Grunau
785f876cee
latm: avoid unnecessary reinit of the aac decoder
13 years ago
Janne Grunau
80e36425fb
aacdec: initialize sbr context only in new channel elements
13 years ago
Janne Grunau
b2e56e08c9
resample: reject unhandled conversions
...
audio_resample can not reduce the number of channels
13 years ago
Janne Grunau
ec1ce86e7f
resample: remove unused #define
13 years ago
Nicolas George
02ac6a6544
libcelt_dec: whitespace cosmetics.
13 years ago
Nicolas George
f44c816566
libcelt_dec: set sample_fmt.
...
This fixes a regression introduced by the merging of patch fc2dd2c
.
Signed-off-by: Nicolas George <nicolas.george@normalesup.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Hendrik Leppkes
138d10969d
avcodec: add YCgCo color space.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Hendrik Leppkes
84e0553c1c
pcm_bluray: set bits_per_raw_sample for > 16-bit
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Mans Rullgard
c8477df019
adpcm: use sign_extend()
...
This avoids warnings from the overflow checker and simplifies the code.
Signed-off-by: Mans Rullgard <mans@mansr.com>
13 years ago
Andreas Öman
123b1fac5c
wmall: Working bitstream parser
...
(cherry picked from commit 929822111bc10fdf19ca66b7ed09e0ebf802878b)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
35075dc650
h264: Calculate a tighter recovery_frame.
...
Reduces delay with mplayers TS demuxer.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
63f0708478
h264: Support invalid output by mplayers TS demuxer.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago