diff options
author | Philip Langdale <philipl@overt.org> | 2023-07-31 09:29:08 +0800 |
---|---|---|
committer | Philip Langdale <github.philipl@overt.org> | 2023-08-26 10:07:55 -0700 |
commit | 05a4f577039a34f9e390b46fe17735e55855b7c2 (patch) | |
tree | 3b49fd4a3aa93ee5fba9e7c6a7ef1b23f986d6c1 /video/hwdec.h | |
parent | 59478b0059f3af023eb3e9f9d3ac5fa537ce1caf (diff) | |
download | mpv-05a4f577039a34f9e390b46fe17735e55855b7c2.tar.bz2 mpv-05a4f577039a34f9e390b46fe17735e55855b7c2.tar.xz |
output_chain: don't reset autoconvert on changes to unrelated filters
This has been a standing behaviour for a long time, but I noticed it
while implementing the hw->hw autoconvert functionality. Today, the
output_chain will reset the autoconvert state when any output_chain
filter sees the input format change. This is wasteful as it leads to
the image converter having to be reinitialised each time it happens,
so we should only do it when the actual "convert" filter sees the
input format change. It doesn't matter if one of the other filters in
the chain sees a change (although in practice, a format change will
basically always propagate down the chain, so they all see a change
at the same time).
The practical effect of the old behaviour was that a format change
would always lead to the image converter being rebuilt twice - once
after the "convert" filter sees the format change, and then again
after the "out" filter (the end of the chain) sees the change.
In this commit, we check which filter is seeing the change, and only
reset the autoconvert state for the "convert" filter itself.
Diffstat (limited to 'video/hwdec.h')
0 files changed, 0 insertions, 0 deletions