summaryrefslogtreecommitdiff
path: root/libavcodec/g723_1.c
Commit message (Collapse)AuthorAge
* g723.1: remove useless uses of MUL64()Mans Rullgard2012-08-13
| | | | | | | | The operands in both cases are 16-bit so cannot overflow a 32-bit destination. In gain_scale() the inputs are reduced to 14-bit, so even the shift cannot overflow. Signed-off-by: Mans Rullgard <mans@mansr.com>
* g723.1: remove unnecessary argument 'shift' from dot_product()Mans Rullgard2012-08-13
| | | | | | | The 'shift' argument is always 1 so there is no need to pass it explicitly in every call. Signed-off-by: Mans Rullgard <mans@mansr.com>
* g723.1: deobfuscate "(x << 4) - x" to "15 * x"Mans Rullgard2012-08-13
| | | | | | The compiler performs this optimisation. Signed-off-by: Mans Rullgard <mans@mansr.com>
* g723.1: fix addition overflowMans Rullgard2012-08-10
| | | | | | | This addition must be done as 64-bit to avoid overflow and for the subsequent clipping to be meaningful. Signed-off-by: Mans Rullgard <mans@mansr.com>
* g723.1: simplify and fix multiplication overflowMans Rullgard2012-08-10
| | | | | | | | | | In 16-bit arithmetic, x * 0xffffc is simply x * -4 with extra overflows, (and the constant was probably meant to be 0xfffc). Combined with the shift, this simplifies to -x >> 1. Finally, clearing the low two bits with a 32-bit mask and switching to a 32-bit type allows more efficient code on 32-bit machines. Signed-off-by: Mans Rullgard <mans@mansr.com>
* g723.1: deobfuscate an expressionMans Rullgard2012-08-10
| | | | | | | (x << 2) - x is just an optimisation of 3 * x the compiler is perfectly capable of doing on its own. Signed-off-by: Mans Rullgard <mans@mansr.com>
* g723.1: remove unused #includesMans Rullgard2012-08-10
| | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
* g723_1: clip argument for 15-bit version of normalize_bits()Kostya Shishkov2012-08-08
| | | | | | It expects maximum value to be 32767 but calculations in scale_vector() which uses this function can give it ABS(-32768) which leads to wrong result and thus clipping is needed.
* g723_1: use all LPC vectors in formant postfilterKostya Shishkov2012-08-08
| | | | | Due to some mistake LPC vector for the first subframe was used for all subframes instead of their own LPC vectors.
* Replace all CODEC_ID_* with AV_CODEC_ID_*Anton Khirnov2012-08-07
|
* g723_1: scale output as supposed for the case with postfilter disabledKostya Shishkov2012-08-03
|
* g723_1: increase excitation storage by 4Kostya Shishkov2012-08-03
| | | | | | Fixed codebook mode in 5300 rate may write up to SUBFRAME_LEN + 4 and that is considered normal by the reference decoder. Without that additional padding it might overwrite first elements of LPC history.
* g723_1: fix upper bound parameter from inverse maximum autocorrelationKostya Shishkov2012-08-03
|
* g723_1: make scale_vector() behave like the referenceKostya Shishkov2012-08-03
|
* g723_1: fix off-by-one error in normalize_bits()Kostya Shishkov2012-08-03
|
* g723_1: save/restore excitation with offset to store LPC historyKostya Shishkov2012-08-03
| | | | | The same buffer with saved data is used later in LPC reconstruction, so it should have some head space for LPC history.
* G.723.1 demuxer and decoderMohamed Naufal Basheer2012-07-22
Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>