summaryrefslogtreecommitdiff
path: root/libavcodec/dcadec.c
Commit message (Collapse)AuthorAge
* cosmetics: Fix spelling mistakesVittorio Giovara2016-05-04
| | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* dca: use defines for subband related constantsAlexandra Hájková2015-12-31
| | | | Signed-off-by: Janne Grunau <janne-libav@jannau.net>
* dca: remove unused decode_hf function and quant_d tablesAlexandra Hájková2015-12-24
| | | | | They were superseded with their integer equivalents. Rename integer decode_hf to decode_hf.
* dca: change the core to work with integer coefficients.Alexandra Hájková2015-12-23
| | | | | | | | | | | | 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.
* lavc: add profiles to AVCodecDescriptorAnton Khirnov2015-12-12
| | | | | The profiles are a property of the codec, so it makes sense to export them through AVCodecDescriptors, not just the codec implementations.
* dcadec: Do not check for overreads in auxiliary dataTim Walker2015-11-23
| | | | | | | | 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>
* dcadec: reorganise context dataAlexandra Khirnova2015-10-07
| | | | | | | | | 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>
* dcadec: Always initialize return variableVittorio Giovara2015-10-04
| | | | Silence an uninitialized warning from clang.
* dcadec: make a number of samples per subband per subsubframe a named constantAlexandra Khirnova2015-10-01
| | | | Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* dcadec: set channel layout in a separate functionAlexandra Hájková2015-09-16
| | | | Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* dcadec: scan for extensions in a separate functionAlexandra Hájková2015-09-16
| | | | | | to make dca_decode_frame more readable Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* lavc: Drop deprecated request_channels related functionsVittorio Giovara2015-08-28
| | | | Deprecated in 04/2011.
* lavc: AV-prefix all codec capabilitiesVittorio Giovara2015-07-27
| | | | | | Express bitfields more simply. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* lavc: AV-prefix all codec flagsVittorio Giovara2015-07-27
| | | | | | Convert doxygen to multiline and express bitfields more simply. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* lavc: Replace av_dlog and tprintf with internal macrosVittorio Giovara2015-04-19
|
* dca: Support for XLL (lossless extension)Niels Möller2015-03-15
| | | | | | Cleanup and integration by Diego Biurrun. Signed-off-by: Diego Biurrun <diego@biurrun.de>
* dca: Move syncword definitions to a separate headerDiego Biurrun2015-03-04
|
* dca: Remove separate header for DCA ExSSDiego Biurrun2015-02-16
| | | | There is no point in having a separate header for a single declaration.
* dca: Move data tables from a header to an object fileDiego Biurrun2015-02-15
| | | | This allows sharing them with the DCA XLL extension w/o duplication.
* dca: Move all tables into dcadata.hDiego Biurrun2015-02-14
|
* dca: Remove trace debugging codeDiego Biurrun2015-02-14
|
* dca: Split code for handling the EXSS extension off into a separate fileDiego Biurrun2015-02-14
|
* avcodec: Don't anonymously typedef structsDiego Biurrun2015-02-14
|
* dcadec: initialize variables before useVittorio Giovara2014-11-13
| | | | | CC: libav-stable@libav.org Bug-Id: CID 700751 / CID 700752
* dca: Remove some commented-out cruftDiego Biurrun2014-09-20
|
* dca: K&R formatting cosmeticsGabriel Dume2014-09-16
| | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* dcadec: replace ldexpf with a multiplication by a constantNiels Möller2014-06-18
| | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
* dca: Convert dca_dmixtable to integersNiels Möller2014-05-23
| | | | | | | | Also include zero in the table, eliminating a special case in the decoder. Signed-off-by: Niels Möller <nisse@southpole.se> Signed-off-by: Anton Khirnov <anton@khirnov.net>
* dcadec: Delete redundant init_get_bits callNiels Möller2014-04-14
| | | | | | | | No initialization is needed in dca_decode_frame, because the next thing it does is calling dca_parse_frame_header, which takes care of the needed initialization. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* dcadec: Use correct channel count in stereo downmix checkTim Walker2014-04-12
| | | | | | | s->prim_channels is greater than num_core_channels when an XCh extension is present in the bitstream. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* dcadec: Do not decode the XCh extension when downmixing to stereoTim Walker2014-04-12
| | | | | | This is neither necessary nor currently supported. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* dcadec: simplify decoding of VQ high frequenciesChristophe Gisquet2014-02-28
| | | | | | | | | | | | | | | | | | | The vector dequantization has a test in a loop preventing effective SIMD implementation. By moving it out of the loop, this loop can be DSPized. Therefore, modify the current DSP implementation. In particular, the DSP implementation no longer has to handle null loop sizes. The decode_hf implementations have following timings: For x86 Arrandale: C SSE SSE2 SSE4 win32: 260 162 119 104 win64: 242 N/A 89 72 The arm NEON optimizations follow in a later patch as external asm. The now unused check for the y modifier in arm inline asm is removed from configure.
* dca: factorize scaling in inverse ADPCMJanne Grunau2014-02-28
| | | | | | | | | Based on a patch from Christophe Gisquet. Unrolling of the m == 0 case avoids a possible use of the uninitilized value sum when s->predictor_history is not set. I failed to find a sample for it. It also reduced the cycle count from 220 to 150 on sandy bridge, x86_64 linux, gcc 4.8.2 compared to his patch.
* dcadec: remove scaling in lfe_interpolation_firChristophe Gisquet2014-02-28
| | | | | | | The scaling factor is constant so it is faster to scale the FIR coefficients in the tables during compilation. Signed-off-by: Janne Grunau <janne-libav@jannau.net>
* dca: replace some memcpy by AV_COPY128Christophe Gisquet2014-02-20
| | | | Signed-off-by: Janne Grunau <janne-libav@jannau.net>
* dcadsp: split lfe_dir casesChristophe Gisquet2014-02-07
| | | | | | | | | The x86 runs short on registers because numerous elements are not static. In addition, splitting them allows more optimized code, at least for x86. Arm asm changes by Janne Grunau. Signed-off-by: Janne Grunau <janne-libav@jannau.net>
* x86: dcadsp: implement int8x8_fmul_int32Christophe Gisquet2014-02-07
| | | | | | | | | | | For the callable function (as opposed to the inline one): C SSE SSE2 SSE4 Win32: 47 42 29 26 Win64: 30 33 25 23 The SSE version is neither compiled nor set for ARCH_X86_64, as the inlinable function takes over. Signed-off-by: Janne Grunau <janne-libav@jannau.net>
* dcadsp: add int8x8_fmul_int32 to dsp contextChristophe Gisquet2014-02-07
| | | | | | | | | | | | | | It is currently declared as a macro who is set to inlinable functions, among which a Neon and a default C implementations. Add a DSP parameter to each inline function, unused except by the default C implementation which calls a function from the DSP context. On an Arrandale CPU, gain for an inlined SSE2 function vs. a call: - Win32: 29 to 26 cycles - Win64: 25 to 23 cycles Signed-off-by: Janne Grunau <janne-libav@jannau.net>
* dcadec: set AV_FRAME_DATA_MATRIXENCODING side data.Tim Walker2014-01-05
|
* dcadec: set the output channel mode more accurately.Tim Walker2014-01-05
| | | | | | When downmixing 2.1 to 2-channel, if the 2.0 portion is Lt/Rt, sum-difference or dual mono, the actual output will be the same (with the LFE either mixed-in or discarded). Also, when downmixing an arbitrary layout to 2-channel, if the bitstream contains custom downmix coefficients targeting Lt/Rt, then the output will be Lt/Rt rather than regular Stereo.
* dcadec: Decode LFE to avoid adding random data when downmixing with LFEMichael Niedermayer2013-12-06
| | | | | Signed-off-by: Tim Walker <tdskywalker@gmail.com> Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* dcadec: Add some logging before returning on errorTim Walker2013-11-30
| | | | | | Based on a patch by Michael Niedermayer. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* dcadec: add disable_xch private option.Tim Walker2013-11-28
| | | | | | This supplements the deprecated request_channels-based control of XCh decoding. Signed-off-by: Anton Khirnov <anton@khirnov.net>
* dcadec: treat all 2-channel modes as Stereo in dca_downmix.Tim Walker2013-11-28
| | | | | | | | | The check for (prim_channels > 2) before calling dca_downmix made these cases unreachable, but now 2.1 layouts will go through the downmix code. Having dual mono, Lt/Rt and sum-difference layouts print errors when regular Stereo doesn't seems pointless. Signed-off-by: Anton Khirnov <anton@khirnov.net>
* dca: support mixing LFE in dca_downmix.Tim Walker2013-11-28
| | | | | | Embedded downmix coefficients can use this. Signed-off-by: Anton Khirnov <anton@khirnov.net>
* dca: extract core substream's embedded downmix coeffcient codes, if present.Tim Walker2013-11-28
| | | | | | As per ETSI TS 102 114 V1.4.1 specification. Signed-off-by: Anton Khirnov <anton@khirnov.net>
* dca: remove embedded downmix coefficient extraction.Tim Walker2013-11-28
| | | | | | | It was based on an old, seemingly incorrect specification, so default coefficients were always used anyway. Signed-off-by: Anton Khirnov <anton@khirnov.net>
* dca: convert dca_default_coeffs to float.Tim Walker2013-11-28
| | | | | | Easier to read, modify, and avoids relying on an outdated table. Signed-off-by: Anton Khirnov <anton@khirnov.net>
* dcadec: store the stereo downmix coefficients as float in the DCAContext.Tim Walker2013-11-28
| | | | | | 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>
* dcadec: implement request_channel_layout.Tim Walker2013-11-28
| | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>