[FFmpeg-trac] #2686(avcodec:open): Native AAC encoder collapses at high bitrates on some samples

FFmpeg trac at avcodec.org
Wed Jul 17 21:57:37 CEST 2013


#2686: Native AAC encoder collapses at high bitrates on some samples
-------------------------------------+-------------------------------------
             Reporter:  Kamedo2      |                    Owner:
                 Type:  defect       |                   Status:  open
             Priority:  normal       |                Component:  avcodec
              Version:  git-master   |               Resolution:
             Keywords:  aac          |               Blocked By:
  regression                         |  Reproduced by developer:  1
             Blocking:               |
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------

Comment (by Kamedo2):

 from line 300:
 {{{
     const int chan_bitrate = ctx->avctx->bit_rate / ((ctx->avctx->flags &
 CODEC_FLAG_QSCALE) ? 2.0f : ctx->avctx->channels);
 }}}

 to:
 {{{
     const int chan_bitrate = FFMIN(ctx->avctx->bit_rate, 240000) /
 ((ctx->avctx->flags & CODEC_FLAG_QSCALE) ? 2.0 : ctx->avctx->channels);
 }}}
 significantly improves the quality. Bitrates remain relatively high in
 this change.
 I have not tested all cases, but it works on 256kbps, 320kbps, and 384kbps
 on many sounds.

-- 
Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/2686#comment:41>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list