- return rE;
-}
-
-static void fold(const CELTMode *m, int N, const celt_norm_t * restrict Y, celt_norm_t * restrict P, int N0, int B)
-{
- int j;
- int id = N0 % B;
- /* Here, we assume that id will never be greater than N0, i.e. that
- no band is wider than N0. In the unlikely case it happens, we set
- everything to zero */
- /*{
- int offset = (N0*C - (id+C*N))/2;
- if (offset > C*N0/16)
- offset = C*N0/16;
- offset -= offset % (C*B);
- if (offset < 0)
- offset = 0;
- //printf ("%d\n", offset);
- id += offset;
- }*/
- if (id+N>N0)
- for (j=0;j<N;j++)
- P[j] = 0;
- else
- for (j=0;j<N;j++)
- P[j] = Y[id++];
-}
-
-void intra_fold(const CELTMode *m, int N, const celt_norm_t * restrict Y, celt_norm_t * restrict P, int N0, int B)
-{
- fold(m, N, Y, P, N0, B);
- renormalise_vector(P, Q15ONE, N, 1);