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:
Diffstat (limited to 'libavcodec/aacenc.c')
-rw-r--r--libavcodec/aacenc.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libavcodec/aacenc.c b/libavcodec/aacenc.c
index 897c3a10df..3a512ffeee 100644
--- a/libavcodec/aacenc.c
+++ b/libavcodec/aacenc.c
@@ -389,7 +389,7 @@ static void encode_scale_factors(AVCodecContext *avctx, AACEncContext *s,
SingleChannelElement *sce)
{
int diff, off_sf = sce->sf_idx[0], off_pns = sce->sf_idx[0] - NOISE_OFFSET;
- int noise_flag = 1;
+ int off_is = 0, noise_flag = 1;
int i, w;
for (w = 0; w < sce->ics.num_windows; w += sce->ics.group_len[w]) {
@@ -402,6 +402,10 @@ static void encode_scale_factors(AVCodecContext *avctx, AACEncContext *s,
put_bits(&s->pb, NOISE_PRE_BITS, diff + NOISE_PRE);
continue;
}
+ } else if (sce->band_type[w*16 + i] == INTENSITY_BT ||
+ sce->band_type[w*16 + i] == INTENSITY_BT2) {
+ diff = sce->sf_idx[w*16 + i] - off_is;
+ off_is = sce->sf_idx[w*16 + i];
} else {
diff = sce->sf_idx[w*16 + i] - off_sf;
off_sf = sce->sf_idx[w*16 + i];