Postby erwan10 » 13 Jul 2013 14:08
Actually, very often, the decoder pool size amounts to 20 pictures (VOUT_MAX_PICTURES hardcoded parameter). Only demanding codecs are likely to increase this upper limit (dpb_size parameter).
In particular, the cache size (file-caching parameter and the likes) is not taken into account when sizing this decoder pool. When a user sets a high cache value,the bulk of the data is buffered but not decoded. Data is waiting in the decoder fifo, and the decoder is blocked waiting for a free picture from the decoder pool. Just increase the VOUT_MAX_PICTURES value and more pictures from the cache will be decoded ahead of time. Maybe seasoned users could be given the possibility to set this parameter ?
As a side note, I tested it for quite a different purpose. With powerful computers (cpu/gpu/memory), why not set this parameter to a high value and delay picture release till the decoder pool runs out of free pictures. This way, a history of past pictures can be retained. It can be used for a backward frame-by-frame mechanism similar to the forward one. For vout drivers like x11, this parameter is the only limit since it is system memory allocation. For others like Opengl, they may force their own upper limit (for instance, a max of 128 direct buffers is hardcoded for Opengl). These tests worked very fine with several seconds worth of history for backward frame-by-frame.