-/* (C) 2007-2008 Jean-Marc Valin, CSIRO
-*/
+/* Copyright (c) 2007-2008 CSIRO
+ Copyright (c) 2007-2009 Xiph.Org Foundation
+ Written by Jean-Marc Valin */
/**
@file pitch.h
@brief Pitch analysis
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
- - Neither the name of the Xiph.org Foundation nor the names of its
- contributors may be used to endorse or promote products derived from
- this software without specific prior written permission.
-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
#ifndef _PITCH_H
#define _PITCH_H
-#include "kiss_fftr.h"
-#include "psy.h"
+#include "modes.h"
+
+void pitch_downsample(celt_sig * restrict x[], celt_word16 * restrict x_lp,
+ int len, int _C);
+
+void pitch_search(const celt_word16 * restrict x_lp, celt_word16 * restrict y,
+ int len, int max_pitch, int *pitch);
-/** Find the optimal delay for the pitch prediction. Computation is
- done in the frequency domain, both to save time and to make it
- easier to apply psychoacoustic weighting */
-void find_spectral_pitch(kiss_fftr_cfg fft, struct PsyDecay *decay, float *x, float *y, int lag, int len, int C, int *pitch);
+celt_word16 remove_doubling(celt_word16 *x, int maxperiod, int minperiod,
+ int N, int *T0, int prev_period, celt_word16 prev_gain);
#endif