Please sign in to comment.
VDPAU: Dynamically optimise video buffer size.
This builds upon Taylor Ralph's video buffering fix for H.264 streams with multiple reference frames. Firstly we make a notional distinction between the number of VDPAU buffers required to keep the decoder happy (the number of reference frames) and the number of video buffers required to allow for smooth video processing and presentation. For software based decoding, we default to the worst case for the number of reference frames (16) which, in combination with the default process queue size of 12, gives a total of 28. This should happily deal with any H.264 stream and is marginally less than the XVideo/OpenGL equivalent (which makes sense given the lower expected deinterlacing overhead). For hardware based decoding, we default to 2 reference frames. When the decoder is created, and the actual number of reference frames is known for H.264 streams, additional video buffers are created as needed. The vdpaubuffersize 'filter' option is retained but now overrides the number of buffers needed for video processing and presentation. The default 'processing' size of 12 is based upon extensive testing on a first generation NVidia Ion system with a range of test clips - the overwhelming majority of streams are happy with something in the range of 4-8 but several require 10-12. The vast majority of VDPAU systems should now play any H.264 stream without issue with these settings and in most cases with a small memory saving over the previous code. I expect the only case in which anyone will want/need to override the buffer size is for systems with lower video memory (e.g. 256Mb).
- Loading branch information...
Showing with 58 additions and 14 deletions.