[FFmpeg-cvslog] aacenc: disable bandtype modifying extensions when coder != twoloop

Rostislav Pehlivanov git at videolan.org
Tue Sep 1 13:11:30 CEST 2015


ffmpeg | branch: master | Rostislav Pehlivanov <atomnuker at gmail.com> | Tue Sep  1 12:07:00 2015 +0100| [8ffe1cb4d7d457fdd216f42fec068fbd0cbc7ade] | committer: Rostislav Pehlivanov

aacenc: disable bandtype modifying extensions when coder != twoloop

If the selected coder isn't twoloop, this commit temporarily
disables IS and PNS.
The problem is in the encode_window_bands_info() being confused
and setting invalid band_types for non-marked (normal) bands.

Signed-off-by: Rostislav Pehlivanov <atomnuker at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8ffe1cb4d7d457fdd216f42fec068fbd0cbc7ade
---

 libavcodec/aacenc.c |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/libavcodec/aacenc.c b/libavcodec/aacenc.c
index 899111b..444ca0e 100644
--- a/libavcodec/aacenc.c
+++ b/libavcodec/aacenc.c
@@ -797,6 +797,11 @@ static av_cold int aac_encode_init(AVCodecContext *avctx)
         ERROR_IF(1, "Unsupported profile %d\n", avctx->profile);
     }
 
+    if (s->options.aac_coder != AAC_CODER_TWOLOOP) {
+        s->options.intensity_stereo = 0;
+        s->options.pns = 0;
+    }
+
     avctx->bit_rate = (int)FFMIN(
         6144 * s->channels / 1024.0 * avctx->sample_rate,
         avctx->bit_rate);



More information about the ffmpeg-cvslog mailing list