Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
int ra1, int ra2)
{
int l;
int ra1, int ra2)
{
int l;
- g->region_size[0] = band_index_long[s->sample_rate_index][ra1 + 1] >> 1;
+ g->region_size[0] = band_index_long[s->sample_rate_index][ra1 + 1];
/* should not overflow */
l = FFMIN(ra1 + ra2 + 2, 22);
/* should not overflow */
l = FFMIN(ra1 + ra2 + 2, 22);
- g->region_size[1] = band_index_long[s->sample_rate_index][ l] >> 1;
+ g->region_size[1] = band_index_long[s->sample_rate_index][ l];
}
static void compute_band_indexes(MPADecodeContext *s, GranuleDef *g)
}
static void compute_band_indexes(MPADecodeContext *s, GranuleDef *g)
k = 0;
for (j = 0; j < 22; j++) {
band_index_long[i][j] = k;
k = 0;
for (j = 0; j < 22; j++) {
band_index_long[i][j] = k;
- k += band_size_long[i][j];
+ k += band_size_long[i][j] >> 1;
}
band_index_long[i][22] = k;
}
}
band_index_long[i][22] = k;
}