On 19/10/13 14:08, Maxim Polijakowski wrote:
> Please keep in mind that we're about to initialize >600k of memory at
> avcodec_register(), i.e. at startup.

startup is a slowpath so it is fine.

> I don't know how fast the code is - moreover, I spent zero time to
> optimize it, so running it always in background will slow down the
> startup process by an unknown amount of time.

A time linear to 600k, I'm fine with that for now =)

> Another question: how many codecs actually use this feature?
> To my knowledge there is only a few: atrac3, jpeg2000, x264 and TAK.

Yes.

>> That part can be fixed later by adding lazy loading (and that involves
>> adding a lock in the avcodec structure).
> 
> Lazy loading? What is it?

Loading it before you are going to use it. It might or might not be better.

Once I have the time to make sure we do lock properly I'd decouple
better the two items.

People concerned get already a mean to not have additional load time for
something they won't use at all by calling avcodec_register directly
(not advised though) or disable the components they do not need.

In general moving something to the static initializer isn't a bad idea
already and we can make it nicer with a small change.

lu
_______________________________________________
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to