static int scale_vector(int16_t *vector, int length)

{

    int bits, max = 0;

    int64_t scale;

    int i;





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

        max = FFMAX(max, FFABS(vector[i]));



    max   = FFMIN(max, 0x7FFF);

    bits  = normalize_bits(max, 15);

    scale = (bits == 15) ? 0x7FFF : (1 << bits);



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

        vector[i] = av_clipl_int32(vector[i] * scale << 1) >> 4;



    return bits - 3;

}

static int scale_vector(int16_t *vector, int length)

{

    int bits, max = 0;

    int64_t scale;

    int i;





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

        max = FFMAX(max, FFABS(vector[i]));



    max   = FFMIN(max, 0x7FFF);

    bits  = normalize_bits(max, 15);

    scale = (bits == 15) ? 0x7FFF : (1 << bits);



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

        vector[i] = av_clipl_int32(vector[i] * scale << 1) >> 4;



    return bits - 3;

}

    int64_t scale;         max = FFMAX(max, FFABS(vector[i]));     scale = (bits == 15) ? 0x7FFF : (1 << bits);     for (i = 0; i < length; i++)         vector[i] = av_clipl_int32(vector[i] * scale << 1) >> 4;
static int FUNC_0(int16_t *VAR_0, int VAR_1)

{

    int VAR_2, VAR_3 = 0;

    int64_t scale;

    int VAR_4;





    for (VAR_4 = 0; VAR_4 < VAR_1; VAR_4++)

        VAR_3 = FFMAX(VAR_3, FFABS(VAR_0[VAR_4]));



    VAR_3   = FFMIN(VAR_3, 0x7FFF);

    VAR_2  = normalize_bits(VAR_3, 15);

    scale = (VAR_2 == 15) ? 0x7FFF : (1 << VAR_2);



    for (VAR_4 = 0; VAR_4 < VAR_1; VAR_4++)

        VAR_0[VAR_4] = av_clipl_int32(VAR_0[VAR_4] * scale << 1) >> 4;



    return VAR_2 - 3;

}

static int FUNC_0(int16_t *VAR_0, int VAR_1)
{ int VAR_2, VAR_3 = 0; int64_t scale; int VAR_4; for (VAR_4 = 0; VAR_4 < VAR_1; VAR_4++) VAR_3 = FFMAX(VAR_3, FFABS(VAR_0[VAR_4])); VAR_3   = FFMIN(VAR_3, 0x7FFF); VAR_2  = normalize_bits(VAR_3, 15); scale = (VAR_2 == 15) ? 0x7FFF : (1 << VAR_2); for (VAR_4 = 0; VAR_4 < VAR_1; VAR_4++) VAR_0[VAR_4] = av_clipl_int32(VAR_0[VAR_4] * scale << 1) >> 4; return VAR_2 - 3; }