aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLynne <dev@lynne.ee>2020-11-23 22:07:25 +0100
committerLynne <dev@lynne.ee>2020-11-25 23:14:46 +0100
commit48b35321831d68d936fd75cea5d84764f07829ac (patch)
tree0e8ca14e202352d4132b9e8f7656ad6dc23a7217
parent3aa8de12ab567cf2d39a65161e2bb30ccc8d8a63 (diff)
downloadffmpeg-48b35321831d68d936fd75cea5d84764f07829ac.tar.gz
hwcontext_vulkan: fix incorrect A/0BGR mapping
Vulkan formats with a PACK suffix define native endianess. Vulkan formats without a PACK suffix are in bytestream order. Pixel formats with a LE/BE suffix define endianess. Pixel formats without LE/BE suffix are in bytestream order.
-rw-r--r--libavutil/hwcontext_vulkan.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavutil/hwcontext_vulkan.c b/libavutil/hwcontext_vulkan.c
index 8e1876ace8..7cbe0a7cd3 100644
--- a/libavutil/hwcontext_vulkan.c
+++ b/libavutil/hwcontext_vulkan.c
@@ -156,7 +156,7 @@ static const struct {
{ AV_PIX_FMT_YUV422P16, { VK_FORMAT_R16_UNORM, VK_FORMAT_R16_UNORM, VK_FORMAT_R16_UNORM } },
{ AV_PIX_FMT_YUV444P16, { VK_FORMAT_R16_UNORM, VK_FORMAT_R16_UNORM, VK_FORMAT_R16_UNORM } },
- { AV_PIX_FMT_ABGR, { VK_FORMAT_A8B8G8R8_UNORM_PACK32 } },
+ { AV_PIX_FMT_BGR32, { VK_FORMAT_A8B8G8R8_UNORM_PACK32 } },
{ AV_PIX_FMT_BGRA, { VK_FORMAT_B8G8R8A8_UNORM } },
{ AV_PIX_FMT_RGBA, { VK_FORMAT_R8G8B8A8_UNORM } },
{ AV_PIX_FMT_RGB24, { VK_FORMAT_R8G8B8_UNORM } },
@@ -166,7 +166,7 @@ static const struct {
{ AV_PIX_FMT_RGB565, { VK_FORMAT_R5G6B5_UNORM_PACK16 } },
{ AV_PIX_FMT_BGR565, { VK_FORMAT_B5G6R5_UNORM_PACK16 } },
{ AV_PIX_FMT_BGR0, { VK_FORMAT_B8G8R8A8_UNORM } },
- { AV_PIX_FMT_0BGR, { VK_FORMAT_A8B8G8R8_UNORM_PACK32 } },
+ { AV_PIX_FMT_0BGR32, { VK_FORMAT_A8B8G8R8_UNORM_PACK32 } },
{ AV_PIX_FMT_RGB0, { VK_FORMAT_R8G8B8A8_UNORM } },
{ AV_PIX_FMT_GBRPF32, { VK_FORMAT_R32_SFLOAT, VK_FORMAT_R32_SFLOAT, VK_FORMAT_R32_SFLOAT } },