Anton Khirnov
3889dfde9c
dca: Move the downmix request check outside the loop
8 years ago
Luca Barbato
5352802da8
dca: Account for lfe when checking for the channel count
...
Bug-Id: 1037
CC: libav-stable@libav.org
8 years ago
Anton Khirnov
6a9e331d79
dcadec: remove extra indirection
...
num_core_channels is always equal to s->audio_header.prim_channels,
neither one of those variables ever get changed.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
8 years ago
Luca Barbato
a46a4f722d
dca: Refactor dca_filter_channels() a little
...
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
8 years ago
Luca Barbato
e245d4f45c
dca: Validate the channel map
...
Having a mismatch between the number of channels in the stream and those
in the channel map will lead to a segfault or worse.
Bug-Id: 1016
CC: libav-stable@libav.org
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
8 years ago
foo86
d1f558b362
avcodec/dca: require checked bitstream reader
...
Remove half-working attempt at supporting unchecked bitstream reader by
always copying input data into intermediate buffer with large amount of
padding at the end.
Convert LBR decoder to checked bitstream reader. Convert
dcadec_decode_frame() to parse input data directly if possible.
Signed-off-by: James Almer <jamrial@gmail.com>
9 years ago
foo86
801dbf0269
avcodec/dca: simplify 'residual ok' flag tracking
...
Move this from separate structure field to a packet flag.
Behavior should be equivalent, except that residual flag is now properly
cleared when packet has no core frame at all.
Also print a message when forcing recovery mode due to invalid residual
to make debugging easier.
Signed-off-by: James Almer <jamrial@gmail.com>
9 years ago
foo86
39f7620d76
avcodec/dca: don't set initial sample_fmt
...
Valid sample_fmt will be set by dcadec_decode_frame() based on stream type.
Signed-off-by: James Almer <jamrial@gmail.com>
9 years ago
foo86
365b0c13e4
avcodec/dca: print error message when no frame is found in packet
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
foo86
6c44696b3d
avcodec/dca: add DTS Express (LBR) decoder
...
Signed-off-by: James Almer <jamrial@gmail.com>
9 years ago
Vittorio Giovara
41ed7ab45f
cosmetics: Fix spelling mistakes
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
9 years ago
foo86
b7d267399b
avcodec/dca: convert to AVCRC
...
Signed-off-by: James Almer <jamrial@gmail.com>
9 years ago
foo86
2df7d4fa45
avcodec/dca: move huffman data into separate object file
...
Signed-off-by: James Almer <jamrial@gmail.com>
9 years ago
foo86
ae5b2c5250
avcodec/dca: add new decoder based on libdcadec
9 years ago
foo86
4608996772
avcodec/dca: remove old decoder
...
Remove all files and functions which are not going to be reused,
and disable all functions and FATE tests temporarily which will be.
9 years ago
Hendrik Leppkes
51da00e24c
dca: adjust decoding of the XBR extension for integer core decoding
9 years ago
Alexandra Hájková
40d9496773
dca: use defines for subband related constants
...
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
9 years ago
Alexandra Hájková
2008f76054
dca: remove unused decode_hf function and quant_d tables
...
They were superseded with their integer equivalents. Rename integer
decode_hf to decode_hf.
9 years ago
Alexandra Hájková
aebf07075f
dca: change the core to work with integer coefficients.
...
The DCA core decoder converts integer coefficients read from the
bitstream to floats just after reading them (along with dequantization).
All the other steps of the audio reconstruction are done with floats
which makes the output for the DTS lossless extension (XLL)
actually lossy.
This patch changes the DCA core to work with integer coefficients
until QMF. At this point the integer coefficients are converted to floats.
The coefficients for the LFE channel (lfe_data) are not touched.
This is the first step for the really lossless XLL decoding.
9 years ago
Anton Khirnov
2c6811397b
lavc: add profiles to AVCodecDescriptor
...
The profiles are a property of the codec, so it makes sense to export
them through AVCodecDescriptors, not just the codec implementations.
9 years ago
Clément Bœsch
fb99ef0bd3
avcodec: use AV_OPT_TYPE_BOOL in a bunch of places
9 years ago
Tim Walker
c12c085be7
dcadec: Do not check for overreads in auxiliary data
...
The auxiliary data length field is not reliable,
and incorrect overread errors could be returned
for valid, real-world bitstreams.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
9 years ago
Alexandra Khirnova
58b42345b3
dcadec: reorganise context data
...
place primary audio coding header data into DCAAudioHeader
structure to make DCAContext clearer
and move channel related data to DCAChan structure to make
them easier to use by extensions
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
9 years ago
Vittorio Giovara
4c160fa239
dcadec: Always initialize return variable
...
Silence an uninitialized warning from clang.
9 years ago
Alexandra Khirnova
d0a3e89d41
dcadec: make a number of samples per subband per subsubframe a named constant
...
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
9 years ago
Ganesh Ajjanagadde
9db6c8815d
avcodec/dcadec: fix a -Wsometimes-unitialized on clang
...
This fixes a genuine -Wsometimes-unitialized reported on clang, e.g
http://fate.ffmpeg.org/log.cgi?time=20150918181527&log=compile&slot=x86_64-darwin-clang-polly-vectorize-stripmine-3.7 .
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Alexandra Hájková
7778859835
dcadec: set channel layout in a separate function
...
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
9 years ago
Alexandra Hájková
971177f751
dcadec: scan for extensions in a separate function
...
to make dca_decode_frame more readable
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
9 years ago
Vittorio Giovara
dc70c19476
lavc: Drop deprecated request_channels related functions
...
Deprecated in 04/2011.
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>
10 years ago
Vittorio Giovara
7c6eb0a1b7
lavc: AV-prefix all codec flags
...
Convert doxygen to multiline and express bitfields more simply.
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
10 years ago
James Almer
a3b721d10d
avcodec/dcadec: silence request_channels deprecation warnings
...
This also prevents an eventual compilation failure once request_channels
is removed.
Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: James Almer <jamrial@gmail.com>
10 years ago
Michael Niedermayer
4ae15605f6
avcodec/dcadec: Search and decode frame in case it starts later in a packet
...
This fixes decoding the first frame of some dts files
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
fc624ec9ba
avcodec/dcadec: Check active_bands
...
Fixes CID1297594 part2
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
0f3e6959bf
avcodec/dcadec: Check scale table index
...
Fixes CID1297594 part 1
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
a9bf628bfd
avcodec/dcadec: Check subsubframes
...
Fixes: CID1239152
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
a6a45774d0
avcodec/dcadec: Check nchans
...
Fixes CID1239110
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Vittorio Giovara
6a85dfc830
lavc: Replace av_dlog and tprintf with internal macros
10 years ago
Carl Eugen Hoyos
7f1ea38868
lavc/dts: Do not set bitrate for DTS-HD Master and High Resolution.
...
Fixes ticket #4375 .
Reviewed-by: Hendrik Leppkes
10 years ago
Michael Niedermayer
e802abd6e3
avcodec/dcadec: if XLL is enabled use xll channels
...
Fixes outputting 14 channels instead of 7
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
21d25441c6
avcodec/dcadec: Only upsample as much data as is there
...
Found-by: carl
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Niels Möller
217e4ff4d1
dca: Support for XLL (lossless extension)
...
Cleanup and integration by Diego Biurrun.
Signed-off-by: Diego Biurrun <diego@biurrun.de>
10 years ago
Diego Biurrun
25f613f8be
dca: Move syncword definitions to a separate header
10 years ago
Michael Niedermayer
588361dd26
avcodec/dca: move remaining tables to dcadata
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Diego Biurrun
f8c1719771
dca: Remove separate header for DCA ExSS
...
There is no point in having a separate header for a single declaration.
10 years ago
Diego Biurrun
3a651f599a
dca: Move data tables from a header to an object file
...
This allows sharing them with the DCA XLL extension w/o duplication.
10 years ago
Michael Niedermayer
8123e19e61
avcodec/dcadec: Move remaining tables to dcadata.h
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Diego Biurrun
2a9c6fae92
dca: Move all tables into dcadata.h
10 years ago
Diego Biurrun
8a213179af
dca: Remove trace debugging code
10 years ago
Diego Biurrun
b339019de4
dca: Split code for handling the EXSS extension off into a separate file
10 years ago