Re: [FFmpeg-devel] [PATCH 1/3] aacsbr_fixed: avoid division by zero in sbr_gain_calc

2015-11-20 Thread Michael Niedermayer
On Fri, Nov 20, 2015 at 12:16:09AM +0100, Andreas Cadhalpun wrote: > On 19.11.2015 01:31, Michael Niedermayer wrote: > > On Thu, Nov 19, 2015 at 12:31:17AM +0100, Andreas Cadhalpun wrote: > >> So far so good. However, the next time sbr_dequant is called this breaks: > >> noise_facs[1][0].exp = 6 -

Re: [FFmpeg-devel] [PATCH 1/3] aacsbr_fixed: avoid division by zero in sbr_gain_calc

2015-11-20 Thread Andreas Cadhalpun
On 20.11.2015 10:51, Michael Niedermayer wrote: > On Fri, Nov 20, 2015 at 12:16:09AM +0100, Andreas Cadhalpun wrote: >> aacsbr_template.c |8 >> 1 file changed, 8 insertions(+) >> 43ace0364265ef16eecd6ca2d9564cc9585847f7 >>

Re: [FFmpeg-devel] [PATCH 1/3] aacsbr_fixed: avoid division by zero in sbr_gain_calc

2015-11-20 Thread Michael Niedermayer
On Fri, Nov 20, 2015 at 08:42:09PM +0100, Andreas Cadhalpun wrote: > On 20.11.2015 10:51, Michael Niedermayer wrote: > > On Fri, Nov 20, 2015 at 12:16:09AM +0100, Andreas Cadhalpun wrote: > >> aacsbr_template.c |8 > >> 1 file changed, 8 insertions(+) > >>

Re: [FFmpeg-devel] [PATCH 1/3] aacsbr_fixed: avoid division by zero in sbr_gain_calc

2015-11-20 Thread Andreas Cadhalpun
On 20.11.2015 21:51, Michael Niedermayer wrote: > On Fri, Nov 20, 2015 at 08:42:09PM +0100, Andreas Cadhalpun wrote: >> On 20.11.2015 10:51, Michael Niedermayer wrote: >>> On Fri, Nov 20, 2015 at 12:16:09AM +0100, Andreas Cadhalpun wrote: aacsbr_template.c |8 1 file

Re: [FFmpeg-devel] [PATCH 1/3] aacsbr_fixed: avoid division by zero in sbr_gain_calc

2015-11-19 Thread Andreas Cadhalpun
On 19.11.2015 01:31, Michael Niedermayer wrote: > On Thu, Nov 19, 2015 at 12:31:17AM +0100, Andreas Cadhalpun wrote: >> So far so good. However, the next time sbr_dequant is called this breaks: >> noise_facs[1][0].exp = 6 - 536870912 + 1 = -536870905; >> > >> This is obviously completely bogus. >

Re: [FFmpeg-devel] [PATCH 1/3] aacsbr_fixed: avoid division by zero in sbr_gain_calc

2015-11-19 Thread Michael Niedermayer
On Thu, Nov 19, 2015 at 01:31:19AM +0100, Michael Niedermayer wrote: > On Thu, Nov 19, 2015 at 12:31:17AM +0100, Andreas Cadhalpun wrote: > > On 16.11.2015 13:46, Michael Niedermayer wrote: > > > On Fri, Nov 13, 2015 at 11:19:44PM +0100, Andreas Cadhalpun wrote: > > >> Well, unfortunately just

Re: [FFmpeg-devel] [PATCH 1/3] aacsbr_fixed: avoid division by zero in sbr_gain_calc

2015-11-18 Thread Michael Niedermayer
On Thu, Nov 19, 2015 at 12:31:17AM +0100, Andreas Cadhalpun wrote: > On 16.11.2015 13:46, Michael Niedermayer wrote: > > On Fri, Nov 13, 2015 at 11:19:44PM +0100, Andreas Cadhalpun wrote: > >> Well, unfortunately just rejecting 0 in sbr_dequant is no solution, > >> because, as you noticed, that

Re: [FFmpeg-devel] [PATCH 1/3] aacsbr_fixed: avoid division by zero in sbr_gain_calc

2015-11-18 Thread Andreas Cadhalpun
On 16.11.2015 13:46, Michael Niedermayer wrote: > On Fri, Nov 13, 2015 at 11:19:44PM +0100, Andreas Cadhalpun wrote: >> Well, unfortunately just rejecting 0 in sbr_dequant is no solution, >> because, as you noticed, that only happens via underflow. > > a value that has underflowed should be 0, so

Re: [FFmpeg-devel] [PATCH 1/3] aacsbr_fixed: avoid division by zero in sbr_gain_calc

2015-11-16 Thread Michael Niedermayer
On Fri, Nov 13, 2015 at 11:19:44PM +0100, Andreas Cadhalpun wrote: > On 13.11.2015 04:21, Michael Niedermayer wrote: > > On Thu, Nov 12, 2015 at 08:51:28PM +0100, Andreas Cadhalpun wrote: > >> On 11.11.2015 23:19, Michael Niedermayer wrote: > >>> On Wed, Nov 11, 2015 at 09:31:18PM +0100, Andreas

Re: [FFmpeg-devel] [PATCH 1/3] aacsbr_fixed: avoid division by zero in sbr_gain_calc

2015-11-12 Thread Andreas Cadhalpun
On 11.11.2015 23:19, Michael Niedermayer wrote: > On Wed, Nov 11, 2015 at 09:31:18PM +0100, Andreas Cadhalpun wrote: >> On 11.11.2015 14:55, Michael Niedermayer wrote: >>> On Sun, Nov 08, 2015 at 10:02:56PM +0100, Andreas Cadhalpun wrote: This fixes a SIGFPE crash in the aac_fixed decoder.

Re: [FFmpeg-devel] [PATCH 1/3] aacsbr_fixed: avoid division by zero in sbr_gain_calc

2015-11-12 Thread Michael Niedermayer
On Thu, Nov 12, 2015 at 08:51:28PM +0100, Andreas Cadhalpun wrote: > On 11.11.2015 23:19, Michael Niedermayer wrote: > > On Wed, Nov 11, 2015 at 09:31:18PM +0100, Andreas Cadhalpun wrote: > >> On 11.11.2015 14:55, Michael Niedermayer wrote: > >>> On Sun, Nov 08, 2015 at 10:02:56PM +0100, Andreas

Re: [FFmpeg-devel] [PATCH 1/3] aacsbr_fixed: avoid division by zero in sbr_gain_calc

2015-11-11 Thread Michael Niedermayer
On Sun, Nov 08, 2015 at 10:02:56PM +0100, Andreas Cadhalpun wrote: > This fixes a SIGFPE crash in the aac_fixed decoder. > > Signed-off-by: Andreas Cadhalpun > --- > libavcodec/aacsbr_fixed.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff

Re: [FFmpeg-devel] [PATCH 1/3] aacsbr_fixed: avoid division by zero in sbr_gain_calc

2015-11-11 Thread Andreas Cadhalpun
On 11.11.2015 14:55, Michael Niedermayer wrote: > On Sun, Nov 08, 2015 at 10:02:56PM +0100, Andreas Cadhalpun wrote: >> This fixes a SIGFPE crash in the aac_fixed decoder. >> >> Signed-off-by: Andreas Cadhalpun >> --- >> libavcodec/aacsbr_fixed.c | 4 ++-- >> 1

Re: [FFmpeg-devel] [PATCH 1/3] aacsbr_fixed: avoid division by zero in sbr_gain_calc

2015-11-11 Thread Michael Niedermayer
On Wed, Nov 11, 2015 at 09:31:18PM +0100, Andreas Cadhalpun wrote: > On 11.11.2015 14:55, Michael Niedermayer wrote: > > On Sun, Nov 08, 2015 at 10:02:56PM +0100, Andreas Cadhalpun wrote: > >> This fixes a SIGFPE crash in the aac_fixed decoder. > >> > >> Signed-off-by: Andreas Cadhalpun

[FFmpeg-devel] [PATCH 1/3] aacsbr_fixed: avoid division by zero in sbr_gain_calc

2015-11-08 Thread Andreas Cadhalpun
This fixes a SIGFPE crash in the aac_fixed decoder. Signed-off-by: Andreas Cadhalpun --- libavcodec/aacsbr_fixed.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/aacsbr_fixed.c b/libavcodec/aacsbr_fixed.c index