Re: [FFmpeg-devel] [PATCH] Don't needlessly reinitialize ff_cos_## tables.

2015-10-25 Thread Ronald S. Bultje
Hi, On Sun, Oct 25, 2015 at 8:11 AM, wm4 wrote: > On Sat, 24 Oct 2015 19:30:26 -0400 > "Ronald S. Bultje" wrote: > > > On Sat, Oct 24, 2015 at 6:45 PM, Michael Niedermayer > > > wrote: > > > > > either way, this subject is rather uninterresting ill try to do > > > something more usefull for FF

Re: [FFmpeg-devel] [PATCH] Don't needlessly reinitialize ff_cos_## tables.

2015-10-25 Thread wm4
On Sat, 24 Oct 2015 19:30:26 -0400 "Ronald S. Bultje" wrote: > On Sat, Oct 24, 2015 at 6:45 PM, Michael Niedermayer > wrote: > > > either way, this subject is rather uninterresting ill try to do > > something more usefull for FFmpeg than arguing about these > > hypothetical cases ... > >

Re: [FFmpeg-devel] [PATCH] Don't needlessly reinitialize ff_cos_## tables.

2015-10-24 Thread Ronald S. Bultje
On Sat, Oct 24, 2015 at 6:45 PM, Michael Niedermayer wrote: > either way, this subject is rather uninterresting ill try to do > something more usefull for FFmpeg than arguing about these > hypothetical cases ... +100. Many of these tools are like -Wpedantic. Reminds me of my rants about helgri

Re: [FFmpeg-devel] [PATCH] Don't needlessly reinitialize ff_cos_## tables.

2015-10-24 Thread Michael Niedermayer
On Sat, Oct 24, 2015 at 03:10:58PM +0200, wm4 wrote: > On Sat, 24 Oct 2015 04:13:18 +0200 > Michael Niedermayer wrote: > > > On Thu, Oct 22, 2015 at 09:48:30PM -0700, Dale Curtis wrote: > > > On Wed, Oct 21, 2015 at 6:52 PM, Dale Curtis > > > wrote: > > > > > > > On Tue, Oct 20, 2015 at 11:50

Re: [FFmpeg-devel] [PATCH] Don't needlessly reinitialize ff_cos_## tables.

2015-10-24 Thread wm4
On Sat, 24 Oct 2015 04:13:18 +0200 Michael Niedermayer wrote: > On Thu, Oct 22, 2015 at 09:48:30PM -0700, Dale Curtis wrote: > > On Wed, Oct 21, 2015 at 6:52 PM, Dale Curtis > > wrote: > > > > > On Tue, Oct 20, 2015 at 11:50 PM, Michael Niedermayer < > > > mich...@niedermayer.cc> wrote: > >

Re: [FFmpeg-devel] [PATCH] Don't needlessly reinitialize ff_cos_## tables.

2015-10-23 Thread Michael Niedermayer
On Thu, Oct 22, 2015 at 09:48:30PM -0700, Dale Curtis wrote: > On Wed, Oct 21, 2015 at 6:52 PM, Dale Curtis > wrote: > > > On Tue, Oct 20, 2015 at 11:50 PM, Michael Niedermayer < > > mich...@niedermayer.cc> wrote: > >> > >> the last element to be written should be checked, so that if > >> initial

Re: [FFmpeg-devel] [PATCH] Don't needlessly reinitialize ff_cos_## tables.

2015-10-23 Thread Dale Curtis
http://ffmpeg.org/pipermail/ffmpeg-devel/2015-October/181938.html makes the changes to use ff_thread_once; this review may be abandoned. On Fri, Oct 23, 2015 at 5:15 AM, Derek Buitenhuis wrote: > On 10/23/2015 12:35 PM, wm4 wrote: >> There are 2 possibilities: >> 1. Using ff_thread_once() >> 2. N

Re: [FFmpeg-devel] [PATCH] Don't needlessly reinitialize ff_cos_## tables.

2015-10-23 Thread Derek Buitenhuis
On 10/23/2015 12:35 PM, wm4 wrote: > There are 2 possibilities: > 1. Using ff_thread_once() > 2. Not using global tables, but moving them to per-instance contexts > > Both should be fine, but I think 2. is preferred. I think 1 makes more sense in this case, since sin and cos are widely used, and

Re: [FFmpeg-devel] [PATCH] Don't needlessly reinitialize ff_cos_## tables.

2015-10-23 Thread wm4
On Fri, 23 Oct 2015 06:40:29 -0400 "Ronald S. Bultje" wrote: > Hi, > > On Fri, Oct 23, 2015 at 12:48 AM, Dale Curtis > wrote: > > > On Wed, Oct 21, 2015 at 6:52 PM, Dale Curtis > > wrote: > > > > > On Tue, Oct 20, 2015 at 11:50 PM, Michael Niedermayer < > > > mich...@niedermayer.cc> wrote

Re: [FFmpeg-devel] [PATCH] Don't needlessly reinitialize ff_cos_## tables.

2015-10-23 Thread Ronald S. Bultje
Hi, On Fri, Oct 23, 2015 at 12:48 AM, Dale Curtis wrote: > On Wed, Oct 21, 2015 at 6:52 PM, Dale Curtis > wrote: > > > On Tue, Oct 20, 2015 at 11:50 PM, Michael Niedermayer < > > mich...@niedermayer.cc> wrote: > >> > >> the last element to be written should be checked, so that if > >> initializ

Re: [FFmpeg-devel] [PATCH] Don't needlessly reinitialize ff_cos_## tables.

2015-10-22 Thread Dale Curtis
On Wed, Oct 21, 2015 at 6:52 PM, Dale Curtis wrote: > On Tue, Oct 20, 2015 at 11:50 PM, Michael Niedermayer < > mich...@niedermayer.cc> wrote: >> >> the last element to be written should be checked, so that if >> initialization is done by 2 threads at the same time, neither can >> return from thi

Re: [FFmpeg-devel] [PATCH] Don't needlessly reinitialize ff_cos_## tables.

2015-10-21 Thread Dale Curtis
On Tue, Oct 20, 2015 at 11:50 PM, Michael Niedermayer < mich...@niedermayer.cc> wrote: > > the last element to be written should be checked, so that if > initialization is done by 2 threads at the same time, neither can > return from this function without initialization having finished > > also the

Re: [FFmpeg-devel] [PATCH] Don't needlessly reinitialize ff_cos_## tables.

2015-10-21 Thread wm4
On Tue, 20 Oct 2015 16:57:49 -0700 Dale Curtis wrote: > Minor waste and more annoyingly triggers race detectors when the > re-initialization happens across multiple threads. cos(0) == 1 and by > default statics initialize to 0, so this check is safe. > > Signed-off-by: Dale Curtis > --- > liba

Re: [FFmpeg-devel] [PATCH] Don't needlessly reinitialize ff_cos_## tables.

2015-10-20 Thread Michael Niedermayer
On Tue, Oct 20, 2015 at 04:57:49PM -0700, Dale Curtis wrote: > Minor waste and more annoyingly triggers race detectors when the > re-initialization happens across multiple threads. cos(0) == 1 and by > default statics initialize to 0, so this check is safe. > > Signed-off-by: Dale Curtis > --- >

[FFmpeg-devel] [PATCH] Don't needlessly reinitialize ff_cos_## tables.

2015-10-20 Thread Dale Curtis
Minor waste and more annoyingly triggers race detectors when the re-initialization happens across multiple threads. cos(0) == 1 and by default statics initialize to 0, so this check is safe. Signed-off-by: Dale Curtis --- libavcodec/fft_template.c | 2 ++ 1 file changed, 2 insertions(+) diff --