avutil/hwcontext_vulkan: copy only the bytes of the visible rows #25249
No reviewers
Labels
No labels
avcodec
avdevice
avfilter
avformat
avutil
backport/release/4.3
backport/release/4.4
backport/release/5.0
backport/release/5.1
backport/release/6.0
backport/release/6.1
backport/release/7.0
backport/release/7.1
backport/release/8.0
backport/release/8.1
backport/release/9.0
backport/release/9.1
CLI
doc
Forgejo Fairy
swresample
swscale
vulkan
API
API major
bug
enhancement
fix/bug
fix/regression
GSoC
GSoC-Qualification
help wanted
important
LGTM
meta
needs backport
needs docs
needs fate test
needs info
needs sample
needs testing
new
question
regression
repro
flaky
repro
no
repro
no(env)
repro
yes
resolution
duplicate
resolution
external
resolution
fixed
resolution
invalid
resolution
wontfix
security
small
No milestone
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
FFmpeg/FFmpeg!25249
Loading…
Reference in a new issue
No description provided.
Delete branch "prasanna8585/FFmpeg:hwcontext-vulkan-visible-rows"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
copy_buffer_data()copiedFFABS(linesize)bytes per row between the software frame and the staging buffer. The last row of a plane does not have to extend to the full linesize, so this reads past the end of the software frame on upload and writes past it on download. Same issue as fixed for hwcontext_cuda inf07f02abb8.The staging path is always used for frames with a negative linesize, and by default for multi-plane formats (NV12, P010, ...) on the NVIDIA proprietary driver, where host image copies are disabled and
avoid_host_importis on.Reproduced through the API (
av_hwframe_transfer_data()) with ASan on Mesa lavapipe, using a GRAY8 100x16 frame with linesize 128 whose last row holds only the visible 100 bytes:With the patch both are clean, fully padded frames are unaffected, and an upload/download round trip through the staging path reproduces all visible bytes.