/* * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source * tree. An additional intellectual property rights grant can be found * in the file PATENTS. All contributing project authors may * be found in the AUTHORS file in the root of the source tree. */ /****************************************************************** iLBC Speech Coder ANSI-C Source Code WebRtcIlbcfix_GetCbVec.c ******************************************************************/ #include "defines.h" #include "constants.h" #include "create_augmented_vec.h" /*----------------------------------------------------------------* * Construct codebook vector for given index. *---------------------------------------------------------------*/ void WebRtcIlbcfix_GetCbVec( int16_t *cbvec, /* (o) Constructed codebook vector */ int16_t *mem, /* (i) Codebook buffer */ int16_t index, /* (i) Codebook index */ int16_t lMem, /* (i) Length of codebook buffer */ int16_t cbveclen /* (i) Codebook vector length */ ){ int16_t k, base_size; int16_t lag; /* Stack based */ int16_t tempbuff2[SUBL+5]; /* Determine size of codebook sections */ base_size=lMem-cbveclen+1; if (cbveclen==SUBL) { base_size += cbveclen / 2; } /* No filter -> First codebook section */ if (index