From patchwork Thu Nov 9 12:19:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Niklas Haas X-Patchwork-Id: 35009 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:4fa4:b0:181:818d:5e7f with SMTP id gh36csp443927pzb; Thu, 9 Nov 2023 04:25:56 -0800 (PST) X-Google-Smtp-Source: AGHT+IHYU3RzdnGWoCLd9FVmFyKBgeYOCO9BpwREj9uHX+qKB+qdiKqM4QNA9CzFESr5F7dtKn/l X-Received: by 2002:a17:906:dacb:b0:9e0:4910:166a with SMTP id xi11-20020a170906dacb00b009e04910166amr3794393ejb.32.1699532756710; Thu, 09 Nov 2023 04:25:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699532756; cv=none; d=google.com; s=arc-20160816; b=OGS935x6YbtXzRLYNxOvmi3HS0i9IVXut9Xe1rOKGOqRaj/H/cN7lcV2+Hdu83gDJH SlFeT6XYSF0XbkM0STqrdJsBpzmorY3S06JC9moXNybwwXKZrWRnb4YAMbpcg+y98x8a fU1iCAAYJORERqEoBNowZdrcqSHCgLNz67aF+N4FGUB2467Fhj8Gopz8zvEBo04Vu51y kRJpGFSbKniv+cwEjmZsdllQ2dMPEaJTM6mdp2m71iMjeYD885+9SvJZcpPdwmXGctym 0yl5LjqoOWr8QZLMQDTmKOdzrRmzn3QgpRHKZy2WL/J3nwBePF1S9ri9zBDuuQq3cfzY kWXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding: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=MSHJhkukKN9ZgCcjY/192Cd/ysGTXq/4ZwaQ7giOFTk=; fh=YOA8vD9MJZuwZ71F/05pj6KdCjf6jQRmzLS+CATXUQk=; b=aAj79BlyVnvNTh/g9cOupbgkr4x+jekKCqe3s2UBQWqR/M5ZzjqmLGvQ8O78cX2Saq fmOMhDLUzlJZQdPHUIlQTcZlZlXm9w5exB3qpS8adWqL4PdpdZ9MGYw/dSXML7uDWcSX pnj3hjwtlVYenVB6+TNAMAdDTK70dIYYkeYTFghDDRV8UuNaMPwPQWSHlvgV4y5UOcnz 1RurPREgJKIiZlZNLeghmadKzrR++z034v5CicB+HYQA246JRFMFEMbvEsy2uuS/vk7V apoMV9K/Gt2Kh46gILYT1NTTYrroy5lifH3SjydqaUcuMVRxXp9Z4PTCclBknVQInz+7 hIYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@haasn.xyz header.s=mail header.b=E5w2XOdb; 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 mm9-20020a170906cc4900b009ad84cca656si3222450ejb.735.2023.11.09.04.25.55; Thu, 09 Nov 2023 04:25:56 -0800 (PST) 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=E5w2XOdb; 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 ED34368CBCC; Thu, 9 Nov 2023 14:25:44 +0200 (EET) 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 B3FF968CBAB for ; Thu, 9 Nov 2023 14:25:36 +0200 (EET) Received: from haasn.dev (unknown [10.30.0.2]) by haasn.dev (Postfix) with ESMTP id 9B3424151A for ; Thu, 9 Nov 2023 13:25:35 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=haasn.xyz; s=mail; t=1699532735; bh=MYtk71I8583tUNvB7yGTOAdw/h5g5T5op7Pnm4LEA1I=; h=From:To:Subject:Date:From; b=E5w2XOdbdhJ4os1njSCsUoG4BwpxQ+TR2naUlKHzrOPT2t5eMp3Hyalidlz27M9rg EdUiI8KMSFIaeIwrwaWh1aJ1qLd8EALDnHuIZgnE1fjQ94yLRcoa6kMh/P2x2VhOxi CH/8Lj96iC6n0EiltpzVb2sDgyr9wC0vm1nhYZ08= From: Niklas Haas To: ffmpeg-devel@ffmpeg.org Date: Thu, 9 Nov 2023 13:19:32 +0100 Message-ID: <20231109122534.124157-1-ffmpeg@haasn.xyz> X-Mailer: git-send-email 2.42.0 MIME-Version: 1.0 Subject: [FFmpeg-devel] [RFC PATCH 00/25] YUVJ removal + filter negotiation 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: 8OlBmKE0H/AX Following up on the previous attempts at YUVJ removal, this series implements full filter negotiation. It is WIP because I still need to go through the remaining AVCodec (which are not covered by FATE) and properly tag their colorspace and color range support. (See patch 19/25) The rest should be good, though, so please feel free to review them with scrutiny. I decided to combine YUV range negotiation with YUV colorspace negotiation. Several important points: 1. We now explicitly ignore YUV metadata for non-YUV (RGB/XYZ/PAL) formats, as these have no hope of being useful. In particular, we force the colorspace to AVCOL_SPC_RGB, mostly for sanity/consistency. 2. We currently continue treating GRAY formats as forced full range, which is the swscale status quo. I have a separate series that adds full range negotiation to grayscale formats, but it is out of scope of this already ominous series. It was a delicate balancing act to get the new filter negotiation API integrated into all core filters (in particular vf_scale and vf_buffersrc) while maintaining forward and backward compatibility and not breaking FATE, but I managed to find an order that works, by first adding support to vf_buffersrc to make sure accurate metadata is available downstream _before_ we insert any conversion filters.