]> git.sesse.net Git - nageru/commit
Make QuickSync surfaces be allocated dynamically.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 26 Feb 2017 22:24:01 +0000 (23:24 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 26 Feb 2017 22:24:01 +0000 (23:24 +0100)
commit05b1179f6cf3f34afa24ab1a372f90c9813c8a20
treeea121b46df39370d66b3bd153f4ea1c3390e39a0
parent8cccc730cdc33dd76240389b0c92e9a2de49b026
Make QuickSync surfaces be allocated dynamically.

Instead of specifying that frame N always uses surface N % 16,
we allocate dynamically from a pool. This both makes a lot more
sense, and also allows us to hold onto surfaces for other reasons
(like that we want to render _from_ them) in a future patch.

This also necessitated explicit usage tracking of reference frames
in order to avoid display corruption (you can't reuse a surface
before its dependent frames are also done rendering); I'm unsure
if this actually was correct before, but it's possible that the
implicit serialization made sure it actually was, because I've
run the existing code pretty hard before without seeing reference
frame corruption.
quicksync_encoder.cpp
quicksync_encoder_impl.h