static int scale_vector(int16_t *dst, const int16_t *vector, int length)

{

    int bits, max = 0;

    int i;



    for (i = 0; i < length; i++)

        max |= FFABS(vector[i]);



    bits  = normalize_bits(max, 15);



    if (bits == 15)

        for (i = 0; i < length; i++)

            dst[i] = vector[i] * 0x7fff >> 3;

    else

        for (i = 0; i < length; i++)

            dst[i] = vector[i] << bits >> 3;



    return bits - 3;

}

static int scale_vector(int16_t *dst, const int16_t *vector, int length)

{

    int bits, max = 0;

    int i;



    for (i = 0; i < length; i++)

        max |= FFABS(vector[i]);



    bits  = normalize_bits(max, 15);



    if (bits == 15)

        for (i = 0; i < length; i++)

            dst[i] = vector[i] * 0x7fff >> 3;

    else

        for (i = 0; i < length; i++)

            dst[i] = vector[i] << bits >> 3;



    return bits - 3;

}

    if (bits == 15)         for (i = 0; i < length; i++)             dst[i] = vector[i] * 0x7fff >> 3;         for (i = 0; i < length; i++)             dst[i] = vector[i] << bits >> 3;
static int FUNC_0(int16_t *VAR_0, const int16_t *VAR_1, int VAR_2)

{

    int VAR_3, VAR_4 = 0;

    int VAR_5;



    for (VAR_5 = 0; VAR_5 < VAR_2; VAR_5++)

        VAR_4 |= FFABS(VAR_1[VAR_5]);



    VAR_3  = normalize_bits(VAR_4, 15);



    if (VAR_3 == 15)

        for (VAR_5 = 0; VAR_5 < VAR_2; VAR_5++)

            VAR_0[VAR_5] = VAR_1[VAR_5] * 0x7fff >> 3;

    else

        for (VAR_5 = 0; VAR_5 < VAR_2; VAR_5++)

            VAR_0[VAR_5] = VAR_1[VAR_5] << VAR_3 >> 3;



    return VAR_3 - 3;

}

static int FUNC_0(int16_t *VAR_0, const int16_t *VAR_1, int VAR_2)
{ int VAR_3, VAR_4 = 0; int VAR_5; for (VAR_5 = 0; VAR_5 < VAR_2; VAR_5++) VAR_4 |= FFABS(VAR_1[VAR_5]); VAR_3  = normalize_bits(VAR_4, 15); if (VAR_3 == 15)
for (VAR_5 = 0; VAR_5 < VAR_2; VAR_5++) VAR_0[VAR_5] = VAR_1[VAR_5] * 0x7fff >> 3; else
for (VAR_5 = 0; VAR_5 < VAR_2; VAR_5++) VAR_0[VAR_5] = VAR_1[VAR_5] << VAR_3 >> 3; return VAR_3 - 3; }