swscale/format: reject XYZ<->RGB conversions

Fixes: 2ed5830108
Signed-off-by: Niklas Haas <git@haasn.dev>
This commit is contained in:
Niklas Haas authored and Niklas Haas committed 2026-10-10 00:02:07 +00:00
1 parent 60c8273b35
commit a20ae16999
2 files changed
+6 -1

No files matched your search

+5
View File
@@ -1837,6 +1837,11 @@ int ff_sws_op_list_generate(SwsContext *ctx, const SwsFormat *src,
ctx->alpha_blend != SWS_ALPHA_BLEND_NONE)
return AVERROR(ENOTSUP);
/* XYZ<->RGB conversion requires application of a gamma function which
* are not currently implemented */
if ((src->desc->flags ^ dst->desc->flags) & AV_PIX_FMT_FLAG_XYZ)
return AVERROR(ENOTSUP);
SwsOpList *ops = ff_sws_op_list_alloc();
if (!ops)
return AVERROR(ENOMEM);
+1 -1
View File
@@ -1 +1 @@
1f03295f230be02367e812f3670230cc
c49b616409175c41ccc5d786c5097f96