From patchwork Fri Mar 15 11:58:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Niklas Haas X-Patchwork-Id: 47100 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:8c91:b0:1a3:31a3:7958 with SMTP id k17csp193639pzh; Fri, 15 Mar 2024 05:05:21 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCW022ANVdXI6ToGzWCo9MSZW4PwUaTG8ppuma4T2sh5ccFbrOJtavskrh7qR1Fys362rPmfb9urBbkFr50tiB7VZ/nee0MhBhgpag== X-Google-Smtp-Source: AGHT+IEwEQGtswxwhjgCoIY5YERx/TeWZgofHWeZBp1sql0wL7y0tH9Os8Dz9YgpfdGSDEBbloI+ X-Received: by 2002:a2e:7015:0:b0:2d4:71e8:5312 with SMTP id l21-20020a2e7015000000b002d471e85312mr3109818ljc.23.1710504321006; Fri, 15 Mar 2024 05:05:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1710504320; cv=none; d=google.com; s=arc-20160816; b=qB1bix/mNmCP6A2poYwsg7rLvfI2GvxRIX2msDElAsnNXplB6mZ5GI3ujb2SJlQwTX W9C1Al/j9Oh5Ehosf3jaLDkAFlPZFxg7k0nj5RyZ2th6w0WA3vrV80pJOWw/myM+1eEK WooPlOoQAgjbKOlbSER26fuHg9Ls9JuzKE4XmLuk/9RkWFWncBy4pVNofGJiDQ2TpLdk lcschaHIHH7Lr2qhS3GHzNPiMd/tJfnJMrLlKu6Fc8qS8eN5xZ7/w1EKIbF5jlzS/qPM m0D+M6oMM9+dJe8K6T9rwjBBlS0tskNeSr16/lhJq0MlaPRhu3YrDrjAzjzdvGTtHIi9 QjJA== 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=eAwA+kQ+pojPWilQmfF709Bos843hR40KSHZ7oAi5Q4=; fh=xmAeKtysnShNOmkhiJmYkS30uw4Fu2hvBJ7qlIwukxQ=; b=fXM759stOjDRP/zHbYhVki7Wf7fi1O8OTfF9pBzOarL+7k5rxU/oxA4YjxOAW4iwgj J93TuEq/x5y+n+1jLkaGyNEjw5qdCKoxBJwWEVzEW0hUOddPQkyeYboA1jBJ8XuLv/0/ vuieb1vbvSqr9n+s/euMPM/ZEzDB7YUbQKBTOirxl1Oq6vXICjnrIq4WGXF2yVNqGsrr sWOIQvsO6sKmwU60rQcI6qLPpbWP4N3oKkRHCbRsisEse9kNuI7UTbbhug35PzO3iDGZ QcwgqeWKmZJ2EjO/eJMJB8583FBOLgiLQDgSchwmHWFCP7fmqmdjiBaNXgB1smxWLbyI SZyA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@haasn.xyz header.s=mail header.b="hDluH/E6"; 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 h10-20020a0564020e0a00b005689f107675si1775511edh.475.2024.03.15.05.05.07; Fri, 15 Mar 2024 05:05:20 -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="hDluH/E6"; 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 5345C68D170; Fri, 15 Mar 2024 14:04:55 +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 8910F68CF9D for ; Fri, 15 Mar 2024 14:04:46 +0200 (EET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=haasn.xyz; s=mail; t=1710504286; bh=0PnNFfKMNC4Nbvt4v+GtVkE40zQYNcZ7xn2v2wPKMRA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hDluH/E6rsLGh9+V8EIJAgmPsT0tRKNHMZsrhA37G3QfguNTnRkuJec3eziYdK/vk f7k45+NSJRPf9vtkc1t49F+2KbpNlsjAMr5K2FTD23qEe9C4NElf46q/7EIXIC998I eVSQRX4CWbnQtPjZJ3PeX7BwxUyUTN+xJkCu0cKg= Received: from haasn.dev (unknown [10.30.0.2]) by haasn.dev (Postfix) with ESMTP id 4A5954223F; Fri, 15 Mar 2024 13:04:46 +0100 (CET) From: Niklas Haas To: ffmpeg-devel@ffmpeg.org Date: Fri, 15 Mar 2024 12:58:54 +0100 Message-ID: <20240315120442.73754-2-ffmpeg@haasn.xyz> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240315120442.73754-1-ffmpeg@haasn.xyz> References: <20240315120442.73754-1-ffmpeg@haasn.xyz> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v3 1/9] avutil/film_grain_params: add extra AFGS1 metadata 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: y27dgWvlS0J5 From: Niklas Haas In hindsight, it may have been better for this to be part of the common film grain struct, to avoid duplication of these fields between it and H274 (and to allow initialization by av_film_grain_params_alloc), but I can't add new fields before the union without breaking ABI, and having the union not be the last parameter will make future extensibility similarly difficult. --- doc/APIchanges | 4 ++++ libavutil/film_grain_params.h | 15 +++++++++++++++ libavutil/version.h | 2 +- 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/doc/APIchanges b/doc/APIchanges index cf58c8c5f0a..5a192b600af 100644 --- a/doc/APIchanges +++ b/doc/APIchanges @@ -2,6 +2,10 @@ The last version increases of all libraries were on 2024-03-07 API changes, most recent first: +2024-03-08 - xxxxxxxxxx - lavu 59.2.100 - film_grain_params.h + Add AVFilmGrainAOMParams.color_range, color_primaries, color_trc, + color_space, width, height, subx, suby and bit_depth. + 2024-03-08 - xxxxxxxxxx - lavc 61.1.100 - avcodec.h Add AVCodecContext.[nb_]side_data_prefer_packet. diff --git a/libavutil/film_grain_params.h b/libavutil/film_grain_params.h index f3bd0a4a6a3..17fefeb06c3 100644 --- a/libavutil/film_grain_params.h +++ b/libavutil/film_grain_params.h @@ -120,6 +120,21 @@ typedef struct AVFilmGrainAOMParams { * Signals to clip to limited color levels after film grain application. */ int limit_output_range; + + /** + * Video characteristics metadata, only for AFGS1 streams. + */ + enum AVColorRange color_range; + enum AVColorPrimaries color_primaries; + enum AVColorTransferCharacteristic color_trc; + enum AVColorSpace color_space; + + /** + * Intended display resolution and format, only for AFGS1 streams. + */ + int width, height; + int subx, suby; + int bit_depth; /* or 0 if unknown */ } AVFilmGrainAOMParams; /** diff --git a/libavutil/version.h b/libavutil/version.h index 09f8cdc2926..57cad02ec0a 100644 --- a/libavutil/version.h +++ b/libavutil/version.h @@ -79,7 +79,7 @@ */ #define LIBAVUTIL_VERSION_MAJOR 59 -#define LIBAVUTIL_VERSION_MINOR 1 +#define LIBAVUTIL_VERSION_MINOR 2 #define LIBAVUTIL_VERSION_MICRO 100 #define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \