diff options
author | Lynne <dev@lynne.ee> | 2021-08-10 12:38:49 +0200 |
---|---|---|
committer | Lynne <dev@lynne.ee> | 2021-08-14 00:27:43 +0200 |
commit | d5de9965ef680dad76ffca162afb20ddd9fd35d3 (patch) | |
tree | 1b12d1098c1ff7d5aa8c681f6a22cb6e4862c9c7 /libavutil/imgutils.c | |
parent | c44c03221d760ef8caec9e13b07251b90a6a1c8e (diff) |
imgutils: expose av_image_copy_plane_uc_from()
The reason why the generic av_image_copy_uc_from() doesn't really
fit in the case for Vulkan is because some planes may be copied via
other methods (such as mapping GPU memory), and if they don't satisfy
the strict alignment requirements, a gpu image->gpu buffer->cpu ram
copy is performed.
We need this for hwcontext_vulkan, and I think this will also be
useful to API users like libplacebo who would rather not write
a custom SIMD memcpy.
Diffstat (limited to 'libavutil/imgutils.c')
-rw-r--r-- | libavutil/imgutils.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libavutil/imgutils.c b/libavutil/imgutils.c index 6c32a71cc5..9ab5757cf6 100644 --- a/libavutil/imgutils.c +++ b/libavutil/imgutils.c @@ -356,9 +356,9 @@ static void image_copy_plane(uint8_t *dst, ptrdiff_t dst_linesize, } } -static void image_copy_plane_uc_from(uint8_t *dst, ptrdiff_t dst_linesize, - const uint8_t *src, ptrdiff_t src_linesize, - ptrdiff_t bytewidth, int height) +void av_image_copy_plane_uc_from(uint8_t *dst, ptrdiff_t dst_linesize, + const uint8_t *src, ptrdiff_t src_linesize, + ptrdiff_t bytewidth, int height) { int ret = -1; @@ -440,7 +440,7 @@ void av_image_copy_uc_from(uint8_t *dst_data[4], const ptrdiff_t dst_linesizes[4 enum AVPixelFormat pix_fmt, int width, int height) { image_copy(dst_data, dst_linesizes, src_data, src_linesizes, pix_fmt, - width, height, image_copy_plane_uc_from); + width, height, av_image_copy_plane_uc_from); } int av_image_fill_arrays(uint8_t *dst_data[4], int dst_linesize[4], |