[FFmpeg-devel] [PATCH 2/3] avcodec/aacsbr: Add comment about possibly optimization in sbr_dequant()

Ganesh Ajjanagadde gajjanag at mit.edu
Thu Nov 19 15:21:49 CET 2015


On Thu, Nov 19, 2015 at 9:18 AM, Michael Niedermayer <michaelni at gmx.at> wrote:
> On Thu, Nov 19, 2015 at 09:03:03AM -0500, Ganesh Ajjanagadde wrote:
>> On Thu, Nov 19, 2015 at 8:17 AM, Michael Niedermayer <michaelni at gmx.at> wrote:
>> > From: Michael Niedermayer <michael at niedermayer.cc>
>> >
>> > Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
>> > ---
>> >  libavcodec/aacsbr.c |    1 +
>> >  1 file changed, 1 insertion(+)
>> >
>> > diff --git a/libavcodec/aacsbr.c b/libavcodec/aacsbr.c
>> > index d1e3a91..e014646 100644
>> > --- a/libavcodec/aacsbr.c
>> > +++ b/libavcodec/aacsbr.c
>> > @@ -73,6 +73,7 @@ static void sbr_dequant(SpectralBandReplication *sbr, int id_aac)
>> >  {
>> >      int k, e;
>> >      int ch;
>> > +    //TODO: Replace exp2f(0.5*x) by a LUT, the inputs are all integer and have a small range
>>
>> Entirely possible I missed something, but exp2 gives 2^x, so if inputs
>> are integers, can't one simply do the necessary bit shifts and cast
>> implicitly to float?
>> I think what you meant was all inputs are half-integers or integers.
>
> i meant all arguments to function f(x) are integers, f(x) = exp2(0.5*x)

Since we had this back and forth, suggested clarifying reword:

//TODO: Replace exp2f(0.5*x) by a LUT, the inputs are all integer and
have a small range ->
//TODO: Replace exp2f(0.5*x) by a LUT, the inputs x are all integer
and have a small range

>
> [...]
> --
> Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
>
> Let us carefully observe those good qualities wherein our enemies excel us
> and endeavor to excel them, by avoiding what is faulty, and imitating what
> is excellent in them. -- Plutarch
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>


More information about the ffmpeg-devel mailing list