Am 19.10.2013 13:57, schrieb Luca Barbato:
On 19/10/13 13:49, Maxim Polijakowski wrote:
Am 19.10.2013 01:45, schrieb Luca Barbato:
On 19/10/13 00:37, Maxim Polijakowski wrote:
--> VLC tables have been made static. There is no dynamic allocation and
deallocation anymore
To initialize static data you might use the init_static_data callback,
the rest seems ok to go to me.
IIRC, init_static_data is called form avcodec_register(), is it?
Then it would allocate and initialize >600k memory without be sure
ATRAC3+ decoder will be ever used!
Fix me if I'm wrong here...

The tables are static so will be there anyway or I'm missing something?

No, you're right - the tables memory is already there but it's uninitialized first. Please keep in mind that we're about to initialize >600k of memory at avcodec_register(), i.e. at startup. 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.

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


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?

Best regards
Maxim
_______________________________________________
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to