#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 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             }
 }}}

--
Ticket URL: <https://trac.ffmpeg.org/ticket/2686#comment:420>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
_______________________________________________
FFmpeg-trac mailing list
FFmpeg-trac@avcodec.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-trac

Reply via email to