From patchwork Fri Oct 27 17:04:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Niklas Haas X-Patchwork-Id: 44382 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a17:907:11d0:b0:9b2:d3d7:e340 with SMTP id va16csp2130ejb; Fri, 27 Oct 2023 10:05:51 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEGolbjuSDfTyyiS+5u7NAzNoHMgI9CDJ5Qal1wG/94iJDd4e8Fe054sQZlbD3FMPQhR828 X-Received: by 2002:a50:e70f:0:b0:53e:6da7:72ba with SMTP id a15-20020a50e70f000000b0053e6da772bamr3004955edn.38.1698426337781; Fri, 27 Oct 2023 10:05:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698426337; cv=none; d=google.com; s=arc-20160816; b=LAx36+oI52zYwAvY/nJUK6drZIEqI0pHfr8dw9uxxwb6ixpZOmpli1X0RNErXIgsoK wXYbRHZHCbDO+HWNjwLho5xT81v11V9Le7J8MD/KYqf/xCoA5Q6yz9Ig6AfMQn3Kv0CZ o6BJjeZ0bHxZvkpobW68EgrwiuS18RTqJH3K6mNfNJEBkdra9Uj+0ShvknQjO8ZpcOwg YPx6Ne0nEZrQVCseSHxL979mipsdMeeP2Gib63TcdnDwgiT8nkAkaF4tNwbbsQUNcHDb 29bnB2vSsoGDjybk8ONBEZX8pC36kyXax0qzea4gJ1HDo4lKE2rMfGmlZ51BqYoBpx+f ptIA== 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:references:in-reply-to :message-id:date:to:from:dkim-signature:delivered-to; bh=/9JyU1jyTheEED2JV7VTS2rg8GV1Ol7QIwDOVNsR9ow=; fh=xmAeKtysnShNOmkhiJmYkS30uw4Fu2hvBJ7qlIwukxQ=; b=MXbfrXI/2N95FAxe4FQvLYlV2llp6pj6h/UXb25+JKR5G6H25IsmM/2lWRk/3K1IZX 7NSs/kOQytahTTJJq6f1GIdtJ7OOPx58gxmSN0hPl7C4NY7Ja1bexmHMWcmpiruegMN+ ozxAlo7PFbJ2KCo73+v0o1H7/IpHpWoXcZowGHR2yKqHNc16rtQT4dl2/BcV2RPOhRBf teA3+DEnMHeZ7+uxp2NniZiYbt3pWM0NSe46f/Yj716/IZTE8Xdk8+Uwl18NqAqDQAht IoSbe3T4wJZpKJflVEMptdP5+cMgX7jwVLDfirQ06yBiDbmxq58QK1owDGKrB7TKuEbF +r6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@haasn.xyz header.s=mail header.b=r23kdh4K; 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 v25-20020a50d599000000b0053eb907770asi995495edi.398.2023.10.27.10.05.13; Fri, 27 Oct 2023 10:05:37 -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=r23kdh4K; 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 CE10E68CAE1; Fri, 27 Oct 2023 20:04:58 +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 6CA1868C9DD for ; Fri, 27 Oct 2023 20:04:50 +0300 (EEST) Received: from haasn.dev (unknown [10.30.0.2]) by haasn.dev (Postfix) with ESMTP id 2E102476BC; Fri, 27 Oct 2023 19:04:50 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=haasn.xyz; s=mail; t=1698426290; bh=TJLLbg8QaRC7CGgBaIsUa29dvus71ZQ4aaTY6q0nvIc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=r23kdh4KypR2UEoLkvoNkwKk1v9Krv63v5jEbVeXN6P4dkrln+/ei5TE+SjGfzSaz dEwKu+PsjcEZ2tgxNsvIaUVu6ulvSN6MnfT7uVm7JP1Py79vLVY8OmRuVw4G8nouNT iPpjCzUVNPWsFnxLCNbFg6anrj+n4yK12t2GNIPw= From: Niklas Haas To: ffmpeg-devel@ffmpeg.org Date: Fri, 27 Oct 2023 19:04:40 +0200 Message-ID: <20231027170446.63684-2-ffmpeg@haasn.xyz> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231027170446.63684-1-ffmpeg@haasn.xyz> References: <20231027170446.63684-1-ffmpeg@haasn.xyz> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 2/8] avfilter/vf_extractplanes: tag alpha plane as full range 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: NizlqFQi86s3 From: Niklas Haas Alpha planes are explicitly full range, even for limited range YUVA formats. Mark them as such. --- libavfilter/vf_extractplanes.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavfilter/vf_extractplanes.c b/libavfilter/vf_extractplanes.c index 7b7149ab24..ca406ff323 100644 --- a/libavfilter/vf_extractplanes.c +++ b/libavfilter/vf_extractplanes.c @@ -312,6 +312,8 @@ static int extract_plane(AVFilterLink *outlink, AVFrame *frame) if (!out) return AVERROR(ENOMEM); av_frame_copy_props(out, frame); + if (idx == 3 /* alpha */) + out->color_range = AVCOL_RANGE_JPEG; if (s->is_packed) { extract_from_packed(out->data[0], out->linesize[0],