From patchwork Thu Oct 26 12:18:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Niklas Haas X-Patchwork-Id: 44358 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:bf16:b0:15d:8365:d4b8 with SMTP id gc22csp586140pzb; Thu, 26 Oct 2023 05:19:19 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHrOTbPJ2Yog/ZrdRCr2R0zIbRiMdi+azSVwC5CYQLZ9/Ohf//2qsc7YcSGt4KnnjsEmvnJ X-Received: by 2002:a17:907:d86:b0:9a1:b528:d0f6 with SMTP id go6-20020a1709070d8600b009a1b528d0f6mr2692136ejc.27.1698322758877; Thu, 26 Oct 2023 05:19:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698322758; cv=none; d=google.com; s=arc-20160816; b=wRduUGAzOMXiXS4si0utwwXX3+G+PaUtvuq7JaTlOB2ULaUCJlD88DYC9bJQafjt6C staGKVu4gt+8yQe8KqCIt0YfiFOiNpX27UgUxVXm91q5Ep6TYMfNO4znDtbQz/KHn8K1 m3HSbY5zDlq+BGOzz2CypsZa5OWZNgBWUtIv/rsIPQq34ExwMRWX6iuul6u+OPb5hKtI ryNve4s1PhsPI7SUru7+D26DOJQavw6CCHBo1H4YaoIREfFkKciYqzIY+URaZK0eV4kc FD4HvWrK/6YvS4idP2t3drFzIfwfeNpb/M3edMsT5RBjIpTZFqEYX41arVuXd11sCYgC 7uCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:mime-version:message-id:date:to:from :dkim-signature:delivered-to; bh=Ht4qd6w3Zh+zmAK9LkZ8GL2gZYFMZ1OxasQK3PtCGDk=; fh=xmAeKtysnShNOmkhiJmYkS30uw4Fu2hvBJ7qlIwukxQ=; b=Im0yTUljC3x37YhFxXZOpOpiFd5TU/migM/wY0PjiEaJgyk7QiFLmYBtYVLFvPJwjG jjpCdgf429tVRDQ3w9wKTGZzZa9TlyBN0/G3FCq/76BY8jNUExjh/Wgv8qRmQwsbRF0G yFkRuDDJbQy1sxpoCCTUPoDZwK8IlUYiVqI1d+nG7ymqnZ4JetN/43u1Ax8Rlvmz3gf7 JN5njMKYF+VjfyxHdE6nZyf1oZagSt4527BCwb7Ooz+m/oKWpX52+ACa7INBk3a0acwo 1kqGE9LVjWxyEnFIM4HvoTUFz+dGYM+73Z6XNS81lExz/gxcBNBd1ikpAAvEXkYfIeam D8Zg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@haasn.xyz header.s=mail header.b="OnBZK/oK"; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id dn9-20020a17090794c900b009b2b7f68d16si7105161ejc.277.2023.10.26.05.19.18; Thu, 26 Oct 2023 05:19:18 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@haasn.xyz header.s=mail header.b="OnBZK/oK"; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id E75A168CADD; Thu, 26 Oct 2023 15:19:14 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from haasn.dev (haasn.dev [78.46.187.166]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 039B468C9DD for ; Thu, 26 Oct 2023 15:19:07 +0300 (EEST) Received: from haasn.dev (unknown [10.30.0.2]) by haasn.dev (Postfix) with ESMTP id 46BEB49516; Thu, 26 Oct 2023 14:19:07 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=haasn.xyz; s=mail; t=1698322747; bh=tdHENaAQPsesHE0arvYeAxy+sjmGihDdV8lH02qIzVQ=; h=From:To:Cc:Subject:Date:From; b=OnBZK/oKFI+Z+OyDJAxR+paWs47bMbPmUv6QV/zOal1cCrDaeFll6uWgfw0mlCpLV cXR+F+Vy/0yPpbQAo5zrw4/vsaUwVsoTKhdzo/7Irq2Jxo2CQ1N4rcJoVHYxU9zKwU g5ujgvb9c6DmVim7ZzcIhlnZNBoXabbc0+DT74GQ= From: Niklas Haas To: ffmpeg-devel@ffmpeg.org Date: Thu, 26 Oct 2023 14:18:57 +0200 Message-ID: <20231026121901.68926-1-ffmpeg@haasn.xyz> X-Mailer: git-send-email 2.42.0 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 1/5] avfilter/drawutils: ban XYZ formats X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: Niklas Haas Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: W93KOxXfnL8j From: Niklas Haas These are not supported by the drawing functions at all, and were incorrectly advertised as supported in the past. --- 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 #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