diff options
Diffstat (limited to 'libavcodec/lsp.c')
-rw-r--r-- | libavcodec/lsp.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/libavcodec/lsp.c b/libavcodec/lsp.c index 2adc9cfa39..a5a86c87e4 100644 --- a/libavcodec/lsp.c +++ b/libavcodec/lsp.c @@ -4,20 +4,20 @@ * Copyright (c) 2007 Reynaldo H. Verdejo Pinochet (QCELP decoder) * Copyright (c) 2008 Vladimir Voroshilov * - * This file is part of Libav. + * This file is part of FFmpeg. * - * Libav is free software; you can redistribute it and/or + * FFmpeg is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * - * Libav is distributed in the hope that it will be useful, + * FFmpeg is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with Libav; if not, write to the Free Software + * License along with FFmpeg; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ @@ -28,6 +28,8 @@ #include "mathops.h" #include "lsp.h" #include "celp_math.h" +#include "libavcodec/mips/lsp_mips.h" + void ff_acelp_reorder_lsf(int16_t* lsfq, int lsfq_min_distance, int lsfq_min, int lsfq_max, int lp_order) { @@ -150,7 +152,11 @@ void ff_acelp_lp_decode(int16_t* lp_1st, int16_t* lp_2nd, const int16_t* lsp_2nd /* LSP values for first subframe (3.2.5 of G.729, Equation 24)*/ for(i=0; i<lp_order; i++) +#ifdef G729_BITEXACT + lsp_1st[i] = (lsp_2nd[i] >> 1) + (lsp_prev[i] >> 1); +#else lsp_1st[i] = (lsp_2nd[i] + lsp_prev[i]) >> 1; +#endif ff_acelp_lsp2lpc(lp_1st, lsp_1st, lp_order >> 1); @@ -158,6 +164,7 @@ void ff_acelp_lp_decode(int16_t* lp_1st, int16_t* lp_2nd, const int16_t* lsp_2nd ff_acelp_lsp2lpc(lp_2nd, lsp_2nd, lp_order >> 1); } +#ifndef ff_lsp2polyf void ff_lsp2polyf(const double *lsp, double *f, int lp_half_order) { int i, j; @@ -174,6 +181,7 @@ void ff_lsp2polyf(const double *lsp, double *f, int lp_half_order) f[1] += val; } } +#endif /* ff_lsp2polyf */ void ff_acelp_lspd2lpc(const double *lsp, float *lpc, int lp_half_order) { |