]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/sipr.c
psymodel: Remove the single channel analysis function
[ffmpeg] / libavcodec / sipr.c
index dc84116f93e153785afad019d9677910b92f54a4..2e868617062c9a165df1cccb739cbfecab9874d4 100644 (file)
@@ -4,25 +4,26 @@
  * Copyright (c) 2008 Vladimir Voroshilov
  * Copyright (c) 2009 Vitor Sessak
  *
- * This file is part of FFmpeg.
+ * This file is part of Libav.
  *
- * FFmpeg is free software; you can redistribute it and/or
+ * Libav 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.
  *
- * FFmpeg is distributed in the hope that it will be useful,
+ * Libav 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 FFmpeg; if not, write to the Free Software
+ * License along with Libav; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
 #include <math.h>
 #include <stdint.h>
+#include <string.h>
 
 #include "libavutil/mathematics.h"
 #include "avcodec.h"
@@ -461,7 +462,7 @@ static void decode_frame(SiprContext *ctx, SiprParameters *params,
         memcpy(ctx->postfilter_syn5k0, ctx->postfilter_syn5k0 + frame_size,
                LP_FILTER_ORDER*sizeof(float));
     }
-    memcpy(ctx->excitation, excitation - PITCH_DELAY_MAX - L_INTERPOL,
+    memmove(ctx->excitation, excitation - PITCH_DELAY_MAX - L_INTERPOL,
            (PITCH_DELAY_MAX + L_INTERPOL) * sizeof(float));
 
     ff_acelp_apply_order_2_transfer_function(out_data, synth,
@@ -493,9 +494,7 @@ static av_cold int sipr_decoder_init(AVCodecContext * avctx)
     for (i = 0; i < 4; i++)
         ctx->energy_history[i] = -14;
 
-    avctx->sample_fmt = SAMPLE_FMT_FLT;
-
-    dsputil_init(&ctx->dsp, avctx);
+    avctx->sample_fmt = AV_SAMPLE_FMT_FLT;
 
     return 0;
 }
@@ -549,7 +548,7 @@ static int sipr_decode_frame(AVCodecContext *avctx, void *datap,
     return mode_par->bits_per_frame >> 3;
 }
 
-AVCodec sipr_decoder = {
+AVCodec ff_sipr_decoder = {
     "sipr",
     AVMEDIA_TYPE_AUDIO,
     CODEC_ID_SIPR,