On Fri, Jul 29, 2011 at 8:39 PM, Nathan Caldwell <[email protected]> wrote: > On Fri, Jul 29, 2011 at 3:30 PM, Alex Converse <[email protected]> > wrote: >> On Fri, Jul 29, 2011 at 1:58 PM, Nathan Caldwell <[email protected]> wrote: >>> The spec states: >>> >>> * Only the lowest 12 spectral coefficients of any LFE may be non-zero >>> >>> We were using the 12 lowest *bands*. >>> --- >>> libavcodec/aacenc.c | 10 +++++++++- >>> 1 files changed, 9 insertions(+), 1 deletions(-) >>> >>> diff --git a/libavcodec/aacenc.c b/libavcodec/aacenc.c >>> index e74af0b..7b3794f 100644 >>> --- a/libavcodec/aacenc.c >>> +++ b/libavcodec/aacenc.c >>> @@ -540,6 +540,14 @@ static int aac_encode_frame(AVCodecContext *avctx, >>> wi[ch].window_shape = 0; >>> wi[ch].num_windows = 1; >>> wi[ch].grouping[0] = 1; >>> + >>> + /* Only the lowest 12 coefficients are used in a LFE >>> channel */ >>> + if (s->sample_rate_index >= 11) >>> + ics->num_swb = 1; >>> + else if (s->sample_rate_index >= 8) >>> + ics->num_swb = 2; /* This actually results in 16 >>> coefficients */ >> >> Should we play it safe and only use 8 here? Can we zero out 13-16 >> after the fact? > > I like using 8, if only because it simplifies the logic. That still > gives us up to 112Hz on the high end and 77Hz on the low end at those > sample rates. Not ideal, but should be fine. > > Attached.
Ping? -- -Nathan Caldwell _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
