diff options
author | Russell Greene <russellgreene8@gmail.com> | 2025-06-20 11:15:59 +1200 |
---|---|---|
committer | Lynne <dev@lynne.ee> | 2025-08-05 23:53:58 +0900 |
commit | e0440eb3929d2ebcc33188f4b7c551a910852985 (patch) | |
tree | 7508c10bf396708b6c9808b8719e3e67c2c3d12c /libavcodec/mips/hevcdsp_init_mips.c | |
parent | cc126afc91dc3efb66659a33aec15e649d3a8a75 (diff) | |
download | ffmpeg-master.tar.gz |
Previously, it was assumed that `drmFormatModifierPlaneCount` was one
for all modifiers when exporting, which is not always the case, in
particular for AMD GPUs and maybe others.
Fetch the number of memory planes and fill the structs appropriately in this situation.
The encoded stream is still bad in the case whre modifers are involved,
but I think this patch still stands on its own and I suspect that may be a driver bug.
A potential improvement that could be make is to cache the format
information, so we can avoid the two GetPhysicalDeviceFormatProperties2
calls for each export, as well as the allocation. I doubt this is very
expensive, but seemed worth noting.
v2 changes: query the format properties with the test image created in
`vulkan_frames_init` to avoid allocating space for the query during
export
Signed-off-by: Russell Greene <russellgreene8@gmail.com>
Diffstat (limited to 'libavcodec/mips/hevcdsp_init_mips.c')
0 files changed, 0 insertions, 0 deletions