Tim Walker
44b17d794a
dca: extract core substream's embedded downmix coeffcient codes, if present.
...
As per ETSI TS 102 114 V1.4.1 specification.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
11 years ago
Tim Walker
27245b4e1b
dca: remove embedded downmix coefficient extraction.
...
It was based on an old, seemingly incorrect specification, so default
coefficients were always used anyway.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
11 years ago
Tim Walker
b6d5e6aa10
dca: convert dca_default_coeffs to float.
...
Easier to read, modify, and avoids relying on an outdated table.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
11 years ago
Tim Walker
25609b63d2
dcadec: store the stereo downmix coefficients as float in the DCAContext.
...
The 7-bit codes previously used are absent from the ETSI 102 114 V1.4.1 spec.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
11 years ago
Tim Walker
89de5157b1
dcadec: implement request_channel_layout.
...
Signed-off-by: Anton Khirnov <anton@khirnov.net>
11 years ago
Tim Walker
37a3cac78c
dcadec: simplify an expression
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
11 years ago
Diego Biurrun
b2bed9325d
cosmetics: Group .name and .long_name together in codec/format declarations
11 years ago
Martin Storsjö
a9d50bb578
dcadec: Validate the lfe parameter
...
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
11 years ago
Ben Avison
800ffab48a
dcadsp: Add a new method, qmf_32_subbands
...
This does most of the work formerly carried out by
the static function qmf_32_subbands() in dcadec.c.
Signed-off-by: Martin Storsjö <martin@martin.st>
11 years ago
Ben Avison
26ffcc7de1
dcadec: Use int32_to_float_fmul_array8
...
Signed-off-by: Martin Storsjö <martin@martin.st>
11 years ago
Christophe Gisquet
b6293e2798
fmtconvert: Explicitly use int32_t instead of int
...
Signed-off-by: Martin Storsjö <martin@martin.st>
12 years ago
Luca Barbato
3802833bc1
dca: Respect the current limits in the downmixing capabilities
...
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
12 years ago
Luca Barbato
f261e50845
dca: Error out on missing DSYNC
...
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
12 years ago
Diego Biurrun
1db6a080bd
dca: Move ff_dca_convert_bitstream() to the DCA common code
...
This makes the DCA parser and decoder independent.
12 years ago
Diego Biurrun
6d97484d72
avcodec: av_log_ask_for_sample() ---> avpriv_request_sample()
12 years ago
Anton Khirnov
759001c534
lavc decoders: work with refcounted frames.
12 years ago
Diego Biurrun
76b19a3984
Fix a number of incorrect intmath.h #includes.
12 years ago
Justin Ruggles
182821cff4
dca: decode directly to the user-provided AVFrame
12 years ago
Diego Biurrun
218aefce44
dsputil: Move LOCAL_ALIGNED macros to libavutil
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
Michael Niedermayer
5d47850bbd
dcadec: skip QMF on unused channels
...
When the extra rear channel is present but unused, the
s->channel_order_tab[] value for that channel is -1. The QMF can be
skipped for the extra channel, and doing so avoids an out-of-array read
on s->samples_chanptr[].
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
12 years ago
Justin Ruggles
a903f8f087
Include libavutil/channel_layout.h instead of libavutil/audioconvert.h
...
Also reorder some other #include when applicable.
12 years ago
Justin Ruggles
8ac0f6767b
dcadec: allow the decoder to change the channel layout mid-stream
12 years ago
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.
12 years ago
Justin Ruggles
64c312aa29
dcadec: use float planar sample format
12 years ago
Diego Biurrun
1218777ffd
avcodec: Convert some commented-out printf/av_log instances to av_dlog
12 years ago
Anton Khirnov
36ef5369ee
Replace all CODEC_ID_* with AV_CODEC_ID_*
12 years ago
Diego Biurrun
19cf7163c1
dca: Switch dca_sample_rates to avpriv_ prefix; it is used across libs
12 years ago
Diego Biurrun
9e4bca16f8
dca: Move tables used outside of dcadec.c to a separate file.
12 years ago
Diego Biurrun
13a79cf84e
dca: Rename dca.c ---> dcadec.c
...
This will allow adding dca.c with tables used from other files.
12 years ago
Justin Ruggles
cb5042d02c
float_dsp: Move vector_fmac_scalar() from libavcodec to libavutil
13 years ago
Kostya Shishkov
681e726865
dca: include libavutil/mathematics.h for possibly missing M_SQRT1_2
13 years ago
Ronald S. Bultje
93b53ffb1a
dca: don't use av_clip_uintp2().
...
The argument is not a literal, thus causing the ARM v6 or later
builds to break.
13 years ago
Ronald S. Bultje
e6ffd997cb
dca: prevent accessing static arrays with invalid indexes.
...
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
13 years ago
Justin Ruggles
11ac796f7a
dca_parser: parse the sample rate and frame durations
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
Shitiz Garg
f37b4efe03
dca: K&R formatting cosmetics
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
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
Alex Converse
999e7ebd23
dca: Replace oversized unused get_bits() with skip_bits_long().
13 years ago
Mans Rullgard
cc276c85d1
Make channel layout masks unsigned
...
It makes more sense for a bit mask to use an unsigned type.
The change should be source and binary compatible on all
supported systems, hence micro version bump.
Fixes a few invalid shifts.
Signed-off-by: Mans Rullgard <mans@mansr.com>
13 years ago
Mans Rullgard
00a856e3f9
dca: ARMv6 optimised decode_blockcode()
...
This is a hand-tuned version of the code with impossible parts of
the FASTDIV function ommitted.
2-5% faster overall on Cortex-A8.
Signed-off-by: Mans Rullgard <mans@mansr.com>
13 years ago
Justin Ruggles
272fcc32bb
dca: handle errors from dca_decode_block()
...
Return error if core block decoding fails.
Do not enable XCh if XCh extension block decoding fails.
13 years ago
Justin Ruggles
aae6eead6a
dca: return error if the frame header is invalid
13 years ago
Justin Ruggles
f44059d260
dca: return proper error codes instead of -1
13 years ago
Mans Rullgard
559c244d42
dca: fix signed overflow in shift
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
13 years ago
Mans Rullgard
bf5d46d8e6
dca: NEON optimised high freq VQ decoding
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
13 years ago
Mans Rullgard
bf00a73ace
dca: clear inactive subbands only once in qmf_32_subbands()
...
Writing zeros to the high entries in the array need only be
done once as the cutoff position is constant throughout the
loop.
Signed-off-by: Mans Rullgard <mans@mansr.com>
13 years ago
Mans Rullgard
a92a1b93b4
dca: use vector_fmac_scalar from dsputil
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
13 years ago
John Stebbins
49c7006c7e
dca: set AVCodecContext frame_size for DTS audio
...
Set the frame size when decoding DTS audio.
This has the side effect of fixing the computation of timestamps for DTS-HD in compute_pkt_fields. Since frame_size is
not currently set, the duration of a frame is being guessed based on the streams bitrate. But for DTS-HD, the bitrate
currently used is the rate of the DTS core which is much different than the whole DTS-HD stream and leads to a wildly
inaccurate frame duration estimate.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
14 years ago
Diego Biurrun
be73d76b34
cosmetics: fix some then/than typos
14 years ago