[FFmpeg-devel] [FFmpeg-cvslog] avcodec/aacsbr: Replace a noise_facs_q check by an av_assert0

Michael Niedermayer michaelni at gmx.at
Fri Nov 20 03:40:36 CET 2015


On Fri, Nov 20, 2015 at 12:35:29AM +0100, Andreas Cadhalpun wrote:
> On 19.11.2015 13:55, Michael Niedermayer wrote:
> > ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Thu Nov 19 13:32:40 2015 +0100| [58fba4b02f65e8f9878cd5e41d24bb8e452f6631] | committer: Michael Niedermayer
> > 
> > avcodec/aacsbr: Replace a noise_facs_q check by an av_assert0
> > 
> > The replaced check should have become redundant
> > 
> > Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> > 
> >> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=58fba4b02f65e8f9878cd5e41d24bb8e452f6631
> > ---
> > 
> >  libavcodec/aacsbr.c |    5 +----
> >  1 file changed, 1 insertion(+), 4 deletions(-)
> > 
> > diff --git a/libavcodec/aacsbr.c b/libavcodec/aacsbr.c
> > index 7fb21cc..f7c9b22 100644
> > --- a/libavcodec/aacsbr.c
> > +++ b/libavcodec/aacsbr.c
> > @@ -96,10 +96,7 @@ static void sbr_dequant(SpectralBandReplication *sbr, int id_aac)
> >                  float temp1 = exp2f(NOISE_FLOOR_OFFSET - sbr->data[0].noise_facs_q[e][k] + 1);
> >                  float temp2 = exp2f(12 - sbr->data[1].noise_facs_q[e][k]);
> >                  float fac;
> > -                if (temp1 > 1E20) {
> > -                    av_log(NULL, AV_LOG_ERROR, "envelope scalefactor overflow in dequant\n");
> > -                    temp1 = 1;
> > -                }
> > +                av_assert0(temp1 <= 1E20);
> >                  fac = temp1 / (1.0f + temp2);
> >                  sbr->data[0].noise_facs[e][k] = fac;
> >                  sbr->data[1].noise_facs[e][k] = fac * temp2;
> > 
> 
> Is there a reason why you didn't do the same change in aacsbr_fixed.c?

i remember looking in aacsbr_fixed.c, i somehow must have messed up
searching for this

fixed

thx

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

No human being will ever know the Truth, for even if they happen to say it
by chance, they would not even known they had done so. -- Xenophanes
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20151120/ffdb4d37/attachment.sig>


More information about the ffmpeg-devel mailing list