[x264-devel] Re: x264 initialization and threads

Laurent Aimar fenrir at via.ecp.fr
Thu Jul 15 02:03:12 CEST 2004


On Thu, Jul 15, 2004, Måns Rullgård wrote:
> Is there any initialization of global data in x264 that is not thread
> safe?  If yes, I suggest a separate initialization function to perform
> these things in order to simplify the locking requirements of
> applications using x264.
 There isn't any global data initialization in x264. All global datas
are constant.

> For the rate control I need a small table of static values to avoid
> some floating point calculations.  For now I can initialize it the
> first time an encoder instance is created.  It's not thread safe as
> such, but double initialization won't do any harm either.
 Do you really need to compute them at runtime ? Why a constant table
isn't suitable ?
 Else you can compute it per x264_t instance and store it in
x264_ratecontrol_t.

-- 
fenrir

-- 
This is the x264-devel mailing-list
If you are in trouble, please contact <postmaster at videolan.org>



More information about the x264-devel mailing list