hwcontext_vulkan: fix planar 10 and 12-bit RGB formats using the new MSB formats

This commit is contained in:
Lynne
2025-10-27 20:24:00 +01:00
committed by James Almer
parent 41ecb203c5
commit 98ee3f6718
5 changed files with 13 additions and 12 deletions

View File

@@ -242,8 +242,8 @@ static int run_rct_search(AVCodecContext *avctx, FFVkExecContext *exec,
.micro_version = f->micro_version,
};
if (avctx->sw_pix_fmt == AV_PIX_FMT_GBRP10 ||
avctx->sw_pix_fmt == AV_PIX_FMT_GBRP12 ||
if (avctx->sw_pix_fmt == AV_PIX_FMT_GBRP10MSB ||
avctx->sw_pix_fmt == AV_PIX_FMT_GBRP12MSB ||
avctx->sw_pix_fmt == AV_PIX_FMT_GBRP14)
memcpy(pd.fmt_lut, (int [4]) { 2, 1, 0, 3 }, 4*sizeof(int));
else
@@ -503,8 +503,8 @@ static int vulkan_encode_ffv1_submit_frame(AVCodecContext *avctx,
};
/* For some reason the C FFv1 encoder/decoder treats these differently */
if (avctx->sw_pix_fmt == AV_PIX_FMT_GBRP10 ||
avctx->sw_pix_fmt == AV_PIX_FMT_GBRP12 ||
if (avctx->sw_pix_fmt == AV_PIX_FMT_GBRP10MSB ||
avctx->sw_pix_fmt == AV_PIX_FMT_GBRP12MSB ||
avctx->sw_pix_fmt == AV_PIX_FMT_GBRP14)
memcpy(pd.fmt_lut, (int [4]) { 2, 1, 0, 3 }, 4*sizeof(int));
else