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

FFmpeg trac at avcodec.org
Thu Sep 17 18:07:48 CEST 2015


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

Comment (by klaussfreire):

 Replying to [comment:420 Kamedo2]:
 > libavcodec / aaccoder_twoloop.h line 172: {{{60 - qstep}}}
 > {{{
 >  166             if (tbits > destbits) {
 >  167                 for (i = 0; i < 128; i++)
 >  168                     if (sce->sf_idx[i] < 218 - qstep)
 >  169                         sce->sf_idx[i] += qstep;
 >  170             } else {
 >  171                 for (i = 0; i < 128; i++)
 >  172                     if (sce->sf_idx[i] > 60 - qstep)
 >  173                         sce->sf_idx[i] -= qstep;
 >  174             }
 > }}}
 > might meant
 > {{{
 >  166             if (tbits > destbits) {
 >  167                 for (i = 0; i < 128; i++)
 >  168                     if (sce->sf_idx[i] < 218 - qstep)
 >  169                         sce->sf_idx[i] += qstep;
 >  170             } else {
 >  171                 for (i = 0; i < 128; i++)
 >  172                     if (sce->sf_idx[i] > 60 + qstep)
 >  173                         sce->sf_idx[i] -= qstep;
 >  174             }
 > }}}
 > or
 > {{{
 >  166             if (tbits > destbits) {
 >  167                 for (i = 0; i < 128; i++)
 >  168                     sce->sf_idx[i] = FFMIN(sce->sf_idx[i]+qstep,
 217);
 >  169             } else if (destbits > tbits){
 >  170                 for (i = 0; i < 128; i++)
 >  171                     sce->sf_idx[i] = FFMAX(sce->sf_idx[i]-qstep,
 61);
 >  172             } else{
 >  173                 break;
 >  174             }
 > }}}

 you're right, v9c has it fixed (probably earlier versions too).

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


More information about the FFmpeg-trac mailing list