Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-11-17 23:37:21 +0300
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-12-08 19:51:47 +0300
commitb9d475393e837d757195039b39302026cba1128c (patch)
tree5542533e746b083086d598562c950553c18bdc7a /libavcodec/mpegaudiodec_template.c
parentc778f2266dcea9c462006a63a43598ec655060d6 (diff)
avcodec/mpegaudiodec_template: Apply shift during init
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Diffstat (limited to 'libavcodec/mpegaudiodec_template.c')
-rw-r--r--libavcodec/mpegaudiodec_template.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/mpegaudiodec_template.c b/libavcodec/mpegaudiodec_template.c
index 1faaa0ae52..3fb09511bc 100644
--- a/libavcodec/mpegaudiodec_template.c
+++ b/libavcodec/mpegaudiodec_template.c
@@ -174,10 +174,10 @@ static void init_long_region(MPADecodeContext *s, GranuleDef *g,
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);
- 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)
@@ -327,7 +327,7 @@ static av_cold void decode_init_static(void)
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;
}