Re: [FFmpeg-devel] [PATCH] avcodec/aac_tablegen: speed up table initialization

2015-11-27 Thread Ganesh Ajjanagadde
On Fri, Nov 27, 2015 at 4:33 PM, Rostislav Pehlivanov wrote: > On Fri, 2015-11-27 at 15:59 -0500, Ganesh Ajjanagadde wrote: >> I get build failures starting with commit >> 3d62e7a30fa552be52d12b31e3e0f79153aff891 under >> --enable-hardcoded-tables. >> @Rostislav: can you check, reproduce, and reso

Re: [FFmpeg-devel] [PATCH] avcodec/aac_tablegen: speed up table initialization

2015-11-27 Thread Rostislav Pehlivanov
On Fri, 2015-11-27 at 15:59 -0500, Ganesh Ajjanagadde wrote: > I get build failures starting with commit > 3d62e7a30fa552be52d12b31e3e0f79153aff891 under > --enable-hardcoded-tables. > @Rostislav: can you check, reproduce, and resolve this? Fixed, thanks for reporting it quickly. Problem was that 

Re: [FFmpeg-devel] [PATCH] avcodec/aac_tablegen: speed up table initialization

2015-11-27 Thread Ganesh Ajjanagadde
On Fri, Nov 27, 2015 at 1:00 PM, Rostislav Pehlivanov wrote: > On Fri, 2015-11-27 at 18:50 +0100, Hendrik Leppkes wrote: >> Note that the init is wrong for float as well. You use the same >> condition for aacenc and aacdec, but they init different things. >> aacdec inits much more, and if aacenc w

Re: [FFmpeg-devel] [PATCH] avcodec/aac_tablegen: speed up table initialization

2015-11-27 Thread Rostislav Pehlivanov
On Fri, 2015-11-27 at 18:50 +0100, Hendrik Leppkes wrote: > Note that the init is wrong for float as well. You use the same > condition for aacenc and aacdec, but they init different things. > aacdec inits much more, and if aacenc would init first for some > reason, it would leave aacdec without ha

Re: [FFmpeg-devel] [PATCH] avcodec/aac_tablegen: speed up table initialization

2015-11-27 Thread Hendrik Leppkes
On Fri, Nov 27, 2015 at 6:40 PM, Rostislav Pehlivanov wrote: > On Fri, 2015-11-27 at 09:08 -0800, Timothy Gu wrote: >> On Fri, Nov 27, 2015 at 03:08:05PM +, Rostislav Pehlivanov wrote: >> > I've just pushed a patch which makes the AAC encoder threadsafe, so >> > now >> > it should be safe to a

Re: [FFmpeg-devel] [PATCH] avcodec/aac_tablegen: speed up table initialization

2015-11-27 Thread Rostislav Pehlivanov
On Fri, 2015-11-27 at 09:08 -0800, Timothy Gu wrote: > On Fri, Nov 27, 2015 at 03:08:05PM +, Rostislav Pehlivanov wrote: > > I've just pushed a patch which makes the AAC encoder threadsafe, so > > now > > it should be safe to always generate that table at runtime. > > This commit seems to brea

Re: [FFmpeg-devel] [PATCH] avcodec/aac_tablegen: speed up table initialization

2015-11-27 Thread wm4
On Fri, 27 Nov 2015 09:08:38 -0800 Timothy Gu wrote: > On Fri, Nov 27, 2015 at 03:08:05PM +, Rostislav Pehlivanov wrote: > > I've just pushed a patch which makes the AAC encoder threadsafe, so now > > it should be safe to always generate that table at runtime. > > This commit seems to brea

Re: [FFmpeg-devel] [PATCH] avcodec/aac_tablegen: speed up table initialization

2015-11-27 Thread Ganesh Ajjanagadde
On Fri, Nov 27, 2015 at 12:08 PM, Timothy Gu wrote: > On Fri, Nov 27, 2015 at 03:08:05PM +, Rostislav Pehlivanov wrote: >> I've just pushed a patch which makes the AAC encoder threadsafe, so now >> it should be safe to always generate that table at runtime. > > This commit seems to break FATE

Re: [FFmpeg-devel] [PATCH] avcodec/aac_tablegen: speed up table initialization

2015-11-27 Thread Timothy Gu
On Fri, Nov 27, 2015 at 03:08:05PM +, Rostislav Pehlivanov wrote: > I've just pushed a patch which makes the AAC encoder threadsafe, so now > it should be safe to always generate that table at runtime. This commit seems to break FATE on a couple of platforms (not sure about Linux yet but proba

Re: [FFmpeg-devel] [PATCH] avcodec/aac_tablegen: speed up table initialization

2015-11-27 Thread Rostislav Pehlivanov
On Fri, 2015-11-27 at 09:16 -0500, Ganesh Ajjanagadde wrote: > Ok, good. Let us proceed with this one step at a time. Here, I guess > it really does not matter since the net size is ~ 3 kB. Nevertheless, > it seems unnecessary now to do it at compile time, so unless AAC > maintainers object, I will

Re: [FFmpeg-devel] [PATCH] avcodec/aac_tablegen: speed up table initialization

2015-11-27 Thread Ganesh Ajjanagadde
On Fri, Nov 27, 2015 at 8:10 AM, wm4 wrote: > On Fri, 27 Nov 2015 13:51:57 +0100 > Hendrik Leppkes wrote: > >> On Fri, Nov 27, 2015 at 1:48 PM, Ganesh Ajjanagadde wrote: >> > On Fri, Nov 27, 2015 at 7:05 AM, wm4 wrote: >> >> On Fri, 27 Nov 2015 06:42:21 -0500 >> >> Ganesh Ajjanagadde wrote: >>

Re: [FFmpeg-devel] [PATCH] avcodec/aac_tablegen: speed up table initialization

2015-11-27 Thread Hendrik Leppkes
On Fri, Nov 27, 2015 at 2:10 PM, wm4 wrote: > On Fri, 27 Nov 2015 13:51:57 +0100 > Hendrik Leppkes wrote: > >> On Fri, Nov 27, 2015 at 1:48 PM, Ganesh Ajjanagadde wrote: >> > On Fri, Nov 27, 2015 at 7:05 AM, wm4 wrote: >> >> On Fri, 27 Nov 2015 06:42:21 -0500 >> >> Ganesh Ajjanagadde wrote: >>

Re: [FFmpeg-devel] [PATCH] avcodec/aac_tablegen: speed up table initialization

2015-11-27 Thread wm4
On Fri, 27 Nov 2015 13:51:57 +0100 Hendrik Leppkes wrote: > On Fri, Nov 27, 2015 at 1:48 PM, Ganesh Ajjanagadde wrote: > > On Fri, Nov 27, 2015 at 7:05 AM, wm4 wrote: > >> On Fri, 27 Nov 2015 06:42:21 -0500 > >> Ganesh Ajjanagadde wrote: > >> > >>> On Fri, Nov 27, 2015 at 5:35 AM, Rostisla

Re: [FFmpeg-devel] [PATCH] avcodec/aac_tablegen: speed up table initialization

2015-11-27 Thread Nicolas George
Le septidi 7 frimaire, an CCXXIV, Ganesh Ajjanagadde a écrit : > However, for this to be valid, at least some basic tests need to be > done, e.g what is the library size before and after > --enable-hardcoded-tables? That is not terribly difficult to do: -rwxr-xr-x 1 cigaes cigaes 15732448 Nov 27

Re: [FFmpeg-devel] [PATCH] avcodec/aac_tablegen: speed up table initialization

2015-11-27 Thread Hendrik Leppkes
On Fri, Nov 27, 2015 at 1:48 PM, Ganesh Ajjanagadde wrote: > On Fri, Nov 27, 2015 at 7:05 AM, wm4 wrote: >> On Fri, 27 Nov 2015 06:42:21 -0500 >> Ganesh Ajjanagadde wrote: >> >>> On Fri, Nov 27, 2015 at 5:35 AM, Rostislav Pehlivanov >>> wrote: >>> > LGTM, but could you leave (just comment it ou

Re: [FFmpeg-devel] [PATCH] avcodec/aac_tablegen: speed up table initialization

2015-11-27 Thread Ganesh Ajjanagadde
On Fri, Nov 27, 2015 at 7:05 AM, wm4 wrote: > On Fri, 27 Nov 2015 06:42:21 -0500 > Ganesh Ajjanagadde wrote: > >> On Fri, Nov 27, 2015 at 5:35 AM, Rostislav Pehlivanov >> wrote: >> > LGTM, but could you leave (just comment it out) the old code in there >> > so it's a little easier to follow? >>

Re: [FFmpeg-devel] [PATCH] avcodec/aac_tablegen: speed up table initialization

2015-11-27 Thread wm4
On Fri, 27 Nov 2015 06:42:21 -0500 Ganesh Ajjanagadde wrote: > On Fri, Nov 27, 2015 at 5:35 AM, Rostislav Pehlivanov > wrote: > > LGTM, but could you leave (just comment it out) the old code in there > > so it's a little easier to follow? > >> //ff_aac_pow2sf_tab[i] = pow(2, (i - POW_S

Re: [FFmpeg-devel] [PATCH] avcodec/aac_tablegen: speed up table initialization

2015-11-27 Thread Ganesh Ajjanagadde
On Fri, Nov 27, 2015 at 5:35 AM, Rostislav Pehlivanov wrote: > LGTM, but could you leave (just comment it out) the old code in there > so it's a little easier to follow? >> //ff_aac_pow2sf_tab[i] = pow(2, (i - POW_SF2_ZERO) / 4.0); >> //ff_aac_pow34sf_tab[i] = pow(ff_aac_pow2sf_tab

Re: [FFmpeg-devel] [PATCH] avcodec/aac_tablegen: speed up table initialization

2015-11-27 Thread Rostislav Pehlivanov
LGTM, but could you leave (just comment it out) the old code in there so it's a little easier to follow? >         //ff_aac_pow2sf_tab[i] = pow(2, (i - POW_SF2_ZERO) / 4.0); >         //ff_aac_pow34sf_tab[i] = pow(ff_aac_pow2sf_tab[i], 3.0/4.0); The accuracy increase is always nice. On Thu, 2015-

Re: [FFmpeg-devel] [PATCH] avcodec/aac_tablegen: speed up table initialization

2015-11-26 Thread Ganesh Ajjanagadde
On Thu, Nov 26, 2015 at 4:31 PM, Ganesh Ajjanagadde wrote: > This speeds up aac_tablegen to a ludicruous degree (~97%), i.e to the point > where it can be argued that runtime initialization can always be done instead > of > hard-coded tables. The only cost is essentially a trivial increase in > t