[FFmpeg-trac] #2686(avcodec:open): Native AAC encoder collapses at high bitrates on some samples
FFmpeg
trac at avcodec.org
Sat Jul 20 20:15:04 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 klaussfreire):
Replying to [comment:57 Kamedo2]:
> psymodel.h line 32:
> {{{
> #define AAC_CUTOFF(s) (s->bit_rate ?
FFMIN3(FFMIN3(s->bit_rate/s->channels/2, 3000 + s->bit_rate/s->channels/4,
12000 + s->bit_rate/s->channels/16), 20000, s->sample_rate / 2):
(s->sample_rate / 2))
> }}}
> The LPF is not applied in VBR now, resulting in noticeably poor quality.
Try this cutoff:
{{{
#define _AAC_CUTOFF(bit_rate,channels,sample_rate) (bit_rate ?
FFMIN3(FFMIN3( \
bit_rate/channels, \
3000 + bit_rate/channels/2, \
16000 + bit_rate/channels/8), \
20000, \
sample_rate / 2): (sample_rate / 2))
#define AAC_CUTOFF(s) ( \
(s->flags & CODEC_FLAG_QSCALE) \
? _AAC_CUTOFF(s->bit_rate, s->channels, s->sample_rate) \
: _AAC_CUTOFF((int)(s->bit_rate * (s->global_quality ?
s->global_quality : 120) / 120.0), 2, s->sample_rate) \
)
}}}
I find it works better, the other was was pretty dull for 64k/ch, which
ought to be transparent for AAC. This one also works on VBR.
--
Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/2686#comment:60>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list