summaryrefslogtreecommitdiff
path: root/libavcodec/dcadec.c
Commit message (Collapse)AuthorAge
* 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>
* dcadec: simplify an expressionTim Walker2013-11-19
| | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* cosmetics: Group .name and .long_name together in codec/format declarationsDiego Biurrun2013-10-03
|
* dcadec: Validate the lfe parameterMartin Storsjö2013-09-20
| | | | | | Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org Signed-off-by: Martin Storsjö <martin@martin.st>
* dcadsp: Add a new method, qmf_32_subbandsBen Avison2013-07-22
| | | | | | | 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>
* dcadec: Use int32_to_float_fmul_array8Ben Avison2013-07-22
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* fmtconvert: Explicitly use int32_t instead of intChristophe Gisquet2013-07-17
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* dca: Respect the current limits in the downmixing capabilitiesLuca Barbato2013-07-12
| | | | | Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org
* dca: Error out on missing DSYNCLuca Barbato2013-07-12
| | | | | Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org
* dca: Move ff_dca_convert_bitstream() to the DCA common codeDiego Biurrun2013-03-27
| | | | This makes the DCA parser and decoder independent.
* avcodec: av_log_ask_for_sample() ---> avpriv_request_sample()Diego Biurrun2013-03-13
|
* lavc decoders: work with refcounted frames.Anton Khirnov2013-03-08
|
* Fix a number of incorrect intmath.h #includes.Diego Biurrun2013-02-26
|
* dca: decode directly to the user-provided AVFrameJustin Ruggles2013-02-12
|
* dsputil: Move LOCAL_ALIGNED macros to libavutilDiego Biurrun2013-02-08
|
* lavc: add a wrapper for AVCodecContext.get_buffer().Anton Khirnov2012-12-04
| | | | It will be useful in the upcoming transition to refcounted AVFrames.
* dcadec: skip QMF on unused channelsMichael Niedermayer2012-11-26
| | | | | | | | | | 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>
* Include libavutil/channel_layout.h instead of libavutil/audioconvert.hJustin Ruggles2012-11-11
| | | | Also reorder some other #include when applicable.
* dcadec: allow the decoder to change the channel layout mid-streamJustin Ruggles2012-11-01
|
* dca: allocate a secondary buffer for extra channels when downmixingJustin Ruggles2012-10-13
| | | | | The output AVFrame buffer only has data for the downmix channels. Fixes a segfault when decoding dca with request_channels == 2.
* dcadec: use float planar sample formatJustin Ruggles2012-10-01
|
* avcodec: Convert some commented-out printf/av_log instances to av_dlogDiego Biurrun2012-10-01
|
* Replace all CODEC_ID_* with AV_CODEC_ID_*Anton Khirnov2012-08-07
|
* dca: Switch dca_sample_rates to avpriv_ prefix; it is used across libsDiego Biurrun2012-08-01
|
* dca: Move tables used outside of dcadec.c to a separate file.Diego Biurrun2012-08-01
|
* dca: Rename dca.c ---> dcadec.cDiego Biurrun2012-08-01
This will allow adding dca.c with tables used from other files.