Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
* [FFmpeg-devel] [PATCH v2 1/5] avfilter/drawutils: ban XYZ formats
@ 2023-10-26 14:23 Niklas Haas
  2023-10-26 14:23 ` [FFmpeg-devel] [PATCH v2 2/5] avutil/pixdesc: add AV_PIX_FMT_FLAG_XYZ Niklas Haas
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Niklas Haas @ 2023-10-26 14:23 UTC (permalink / raw)
  To: ffmpeg-devel; +Cc: Niklas Haas

From: Niklas Haas <git@haasn.dev>

These are not supported by the drawing functions at all, and were
incorrectly advertised as supported in the past.

Note: This check is added only to separate the logic change from the API
change in the following commit, and will be removed again after it
becomes redundant.
---
 libavfilter/drawutils.c           | 3 +++
 tests/ref/fate/filter-pixfmts-pad | 1 -
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/libavfilter/drawutils.c b/libavfilter/drawutils.c
index 1081938d86..c31ab6bd5a 100644
--- a/libavfilter/drawutils.c
+++ b/libavfilter/drawutils.c
@@ -22,6 +22,7 @@
 #include <string.h>
 
 #include "libavutil/avassert.h"
+#include "libavutil/avstring.h"
 #include "libavutil/avutil.h"
 #include "libavutil/csp.h"
 #include "libavutil/intreadwrite.h"
@@ -93,6 +94,8 @@ int ff_draw_init2(FFDrawContext *draw, enum AVPixelFormat format, enum AVColorSp
         return AVERROR(ENOSYS);
     if (desc->flags & ~(AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_ALPHA))
         return AVERROR(ENOSYS);
+    if (av_strstart(desc->name, "xyz", NULL))
+        return AVERROR(ENOSYS);
     if (csp == AVCOL_SPC_UNSPECIFIED)
         csp = (desc->flags & AV_PIX_FMT_FLAG_RGB) ? AVCOL_SPC_RGB : AVCOL_SPC_SMPTE170M;
     if (!(desc->flags & AV_PIX_FMT_FLAG_RGB) && !(luma = av_csp_luma_coeffs_from_avcsp(csp)))
diff --git a/tests/ref/fate/filter-pixfmts-pad b/tests/ref/fate/filter-pixfmts-pad
index dd01059c59..b4d236d408 100644
--- a/tests/ref/fate/filter-pixfmts-pad
+++ b/tests/ref/fate/filter-pixfmts-pad
@@ -43,7 +43,6 @@ rgb48le             ed08db9b1aa50d69b8c3d73db93e390e
 rgba                b157c90191463d34fb3ce77b36c96386
 vuya                44368c0a758ee68e24ce976e3b1b8535
 vuyx                bc7c4f693a22cd1ac95e33d473086474
-xyz12le             23dadbbba70b2925ce75fb8ba8080ba3
 ya16le              8dbfcb586abf626da7d1aca887a581b9
 ya8                 495daaca2dcb4f7aeba7652768b41ced
 yuv410p             cb871dcc1e84a7ef1d21f9237b88cf6e
-- 
2.42.0

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-10-30 14:23 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-26 14:23 [FFmpeg-devel] [PATCH v2 1/5] avfilter/drawutils: ban XYZ formats Niklas Haas
2023-10-26 14:23 ` [FFmpeg-devel] [PATCH v2 2/5] avutil/pixdesc: add AV_PIX_FMT_FLAG_XYZ Niklas Haas
2023-10-26 14:23 ` [FFmpeg-devel] [PATCH v2 3/5] avfilter/drawutils: remove redundant xyz format check Niklas Haas
2023-10-26 14:23 ` [FFmpeg-devel] [PATCH v2 4/5] avutil/pixdesc: simplify xyz pixfmt check Niklas Haas
2023-10-26 14:23 ` [FFmpeg-devel] [PATCH v2 5/5] avformat/vf_vapoursynth: simplify xyz format check Niklas Haas
2023-10-30 14:23 ` [FFmpeg-devel] [PATCH v2 1/5] avfilter/drawutils: ban XYZ formats Niklas Haas

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git