summaryrefslogtreecommitdiffstats
path: root/video
diff options
context:
space:
mode:
authorPhilip Langdale <philipl@overt.org>2022-03-25 11:16:21 -0700
committerPhilip Langdale <github.philipl@overt.org>2022-09-21 09:39:34 -0700
commit7b84e6fa8988f31e297cbc3adcd8a81e18e63bc8 (patch)
tree82ce8166502b8b9d886c013315d3cd8a0f418b39 /video
parent989d873d6ec57171a55f432d6f87a9e5a61a706c (diff)
downloadmpv-7b84e6fa8988f31e297cbc3adcd8a81e18e63bc8.tar.bz2
mpv-7b84e6fa8988f31e297cbc3adcd8a81e18e63bc8.tar.xz
f_autoconvert: f_hwtransfer: support HW -> HW uploads
Historically, HW -> HW uploads did not exist, so the current code assumes they will never happen. But as part of introducing Vulkan support into ffmpeg, we added HW -> HW support to enable transfers between Vulkan and CUDA. Today, that means you can use the lavfi hwupload filter with the correct configuration (and previous changes in this series) but it would be more convenient to enable HW -> HW in the format filter so that the transfers can be done more intuitively: ``` --vf=format=fmt=cuda ``` and ``` --vf=format=fmt=vulkan ``` Most of the work here is skipping logic that is specific to SW -> HW uploads doing format conversion. There is no ability to do inline conversion when moving between HW formats, so the format must be mutually understood to begin with. Additional work needs to be done to enable transfers between VAAPI and Vulkan which uses mapping, rather than uploads. I'll tackle that in the next change.
Diffstat (limited to 'video')
-rw-r--r--video/mp_image_pool.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/video/mp_image_pool.c b/video/mp_image_pool.c
index 8aa584b33e..2a4a8940c0 100644
--- a/video/mp_image_pool.c
+++ b/video/mp_image_pool.c
@@ -325,7 +325,7 @@ bool mp_image_hw_upload(struct mp_image *hw_img, struct mp_image *src)
if (hw_img->w != src->w || hw_img->h != src->h)
return false;
- if (!hw_img->hwctx || src->hwctx)
+ if (!hw_img->hwctx)
return false;
bool ok = false;