static void create_map(vorbis_context *vc, unsigned floor_number)

{

    vorbis_floor *floors = vc->floors;

    vorbis_floor0 *vf;

    int idx;

    int blockflag, n;

    int32_t *map;



    for (blockflag = 0; blockflag < 2; ++blockflag) {

        n = vc->blocksize[blockflag] / 2;

        floors[floor_number].data.t0.map[blockflag] =

            av_malloc((n + 1) * sizeof(int32_t)); // n + sentinel



        map =  floors[floor_number].data.t0.map[blockflag];

        vf  = &floors[floor_number].data.t0;



        for (idx = 0; idx < n; ++idx) {

            map[idx] = floor(BARK((vf->rate * idx) / (2.0f * n)) *

                             (vf->bark_map_size / BARK(vf->rate / 2.0f)));

            if (vf->bark_map_size-1 < map[idx])

                map[idx] = vf->bark_map_size - 1;

        }

        map[n] = -1;

        vf->map_size[blockflag] = n;

    }



    for (idx = 0; idx <= n; ++idx) {

        av_dlog(NULL, "floor0 map: map at pos %d is %d\n", idx, map[idx]);

    }

}

static void create_map(vorbis_context *vc, unsigned floor_number)

{

    vorbis_floor *floors = vc->floors;

    vorbis_floor0 *vf;

    int idx;

    int blockflag, n;

    int32_t *map;



    for (blockflag = 0; blockflag < 2; ++blockflag) {

        n = vc->blocksize[blockflag] / 2;

        floors[floor_number].data.t0.map[blockflag] =

            av_malloc((n + 1) * sizeof(int32_t)); 



        map =  floors[floor_number].data.t0.map[blockflag];

        vf  = &floors[floor_number].data.t0;



        for (idx = 0; idx < n; ++idx) {

            map[idx] = floor(BARK((vf->rate * idx) / (2.0f * n)) *

                             (vf->bark_map_size / BARK(vf->rate / 2.0f)));

            if (vf->bark_map_size-1 < map[idx])

                map[idx] = vf->bark_map_size - 1;

        }

        map[n] = -1;

        vf->map_size[blockflag] = n;

    }



    for (idx = 0; idx <= n; ++idx) {

        av_dlog(NULL, "floor0 map: map at pos %d is %d\n", idx, map[idx]);

    }

}

static void FUNC_0(vorbis_context *VAR_0, unsigned VAR_1)

{

    vorbis_floor *floors = VAR_0->floors;

    vorbis_floor0 *vf;

    int VAR_2;

    int VAR_3, VAR_4;

    int32_t *map;



    for (VAR_3 = 0; VAR_3 < 2; ++VAR_3) {

        VAR_4 = VAR_0->blocksize[VAR_3] / 2;

        floors[VAR_1].data.t0.map[VAR_3] =

            av_malloc((VAR_4 + 1) * sizeof(int32_t)); 



        map =  floors[VAR_1].data.t0.map[VAR_3];

        vf  = &floors[VAR_1].data.t0;



        for (VAR_2 = 0; VAR_2 < VAR_4; ++VAR_2) {

            map[VAR_2] = floor(BARK((vf->rate * VAR_2) / (2.0f * VAR_4)) *

                             (vf->bark_map_size / BARK(vf->rate / 2.0f)));

            if (vf->bark_map_size-1 < map[VAR_2])

                map[VAR_2] = vf->bark_map_size - 1;

        }

        map[VAR_4] = -1;

        vf->map_size[VAR_3] = VAR_4;

    }



    for (VAR_2 = 0; VAR_2 <= VAR_4; ++VAR_2) {

        av_dlog(NULL, "floor0 map: map at pos %d is %d\VAR_4", VAR_2, map[VAR_2]);

    }

}

static void FUNC_0(vorbis_context *VAR_0, unsigned VAR_1)
{ vorbis_floor *floors = VAR_0->floors; vorbis_floor0 *vf; int VAR_2; int VAR_3, VAR_4; int32_t *map; for (VAR_3 = 0; VAR_3 < 2; ++VAR_3) { VAR_4 = VAR_0->blocksize[VAR_3] / 2; floors[VAR_1].data.t0.map[VAR_3] =
av_malloc((VAR_4 + 1) * sizeof(int32_t)); map =  floors[VAR_1].data.t0.map[VAR_3]; vf  = &floors[VAR_1].data.t0; for (VAR_2 = 0; VAR_2 < VAR_4; ++VAR_2) { map[VAR_2] = floor(BARK((vf->rate * VAR_2) / (2.0f * VAR_4)) *
(vf->bark_map_size / BARK(vf->rate / 2.0f))); if (vf->bark_map_size-1 < map[VAR_2])
map[VAR_2] = vf->bark_map_size - 1; } map[VAR_4] = -1; vf->map_size[VAR_3] = VAR_4; } for (VAR_2 = 0; VAR_2 <= VAR_4; ++VAR_2) { av_dlog(NULL, "floor0 map: map at pos %d is %d\VAR_4", VAR_2, map[VAR_2]); } }