From patchwork Wed Sep 25 22:52:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 51856 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:b66f:0:b0:48e:c0f8:d0de with SMTP id o15csp148260vqw; Wed, 25 Sep 2024 22:59:20 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCX6zcHL5sjEQKDi68hqmFBU0nJXCWZzack8e+2BJYoqe1QGhmOfy1zjC3O1rGklvWbhjytjJkvJMKhPjHtx+U30@gmail.com X-Google-Smtp-Source: AGHT+IHFoHJMMDUVKFmd1My7r+owaLQcNI/ayrOh0KPByTDj56janoF0mKVju8fCSSBsIwEamf/e X-Received: by 2002:a17:907:3f9d:b0:a8a:6e35:31ef with SMTP id a640c23a62f3a-a93a0617d04mr497580766b.49.1727330360197; Wed, 25 Sep 2024 22:59:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1727330360; cv=none; d=google.com; s=arc-20240605; b=IpBXqUqcMjjPJGP/NWbVcl7rzahpf+I2TmDUcoeDNRDTMfUQfdtKzW5PFGsgxu7GpP uWInsNgZxTayoIvp3GW28+o6X5WGLNMFB/tl3I+S4vFbCE9apYXDpT3JePpWcl30KTN5 /daRJObgw1/O0sYr7LFJmcccOzDDgr4mfxTQoI8Lose+R1yUVvO2B741FXj8PeeIpRaZ ZjQtPPPXoBGOyItKMlzcLnbD/YRm6+aGtjRviD3PBzNYbI0eXeqDB3d+V5i+7RgtziWQ qfTBRKM/j2+u12XhnAG1WdXuMacGuU/mKVut+RJ/zhcmlFzHpn6rScM5jwo6ppXgeBza TJSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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=NEO7PDCOH4rS0bX1XGlYS4axMLl5HpHYAS2XaX5h4QY=; fh=YOA8vD9MJZuwZ71F/05pj6KdCjf6jQRmzLS+CATXUQk=; b=ctQonCynJCryFzwB19tQMmSM8idi8S2h1t7IoUwnob8aaIeVeRFmab6gFjL8vl+swa 1WS0Pjnl8sodg8tGajxVcA/+H49roJ9sJxqib4nYQaQ8z4RKEM2GNFiE9KDnxzQPXAvD 2b25rpysE/3GXuo73NIIGzwOvbEr18B8/Aqy9guoFvmv5ZAohypvdfekOhocvlQ980xC cKjbCDw2io9DX1GfzQgC9Y3DvppL2KJq+/m9oNIxBW1iB9F0JedEaAZLQzehb4XJF/V+ YYtoCfGOZIC1qC44YvhLDAyi+CIRZp54tphSjDJNLxX9WC0I7drB1nzxMlsiCPEjKATY 9Q3Q==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=C3F0AdhT; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id a640c23a62f3a-a9392f2ba7dsi339304066b.24.2024.09.25.22.59.19; Wed, 25 Sep 2024 22:59: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=@gmail.com header.s=20230601 header.b=C3F0AdhT; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 6A77A68DADA; Thu, 26 Sep 2024 01:52:19 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-vs1-f48.google.com (mail-vs1-f48.google.com [209.85.217.48]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id A9B6F68DA44 for ; Thu, 26 Sep 2024 01:52:13 +0300 (EEST) Received: by mail-vs1-f48.google.com with SMTP id ada2fe7eead31-49bddfd1edeso150872137.0 for ; Wed, 25 Sep 2024 15:52:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1727304732; x=1727909532; darn=ffmpeg.org; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=kueDz1dF+wGxPMW5GUVcYmEub3wqxP5lck+gwlU+ilc=; b=C3F0AdhTb87C1v9j0D99HTAm7bGLJ6O9bLy0DGpodQgUhNAtpJuIMLujh9HB8AP1MJ bFCy53NTR6ql/8CH5jVZHU3fNI37SqRsByxKnXQatdlF7b8UgMXB4m3L/4ZUtA5FlhvD FldCzD1Ca8NOeaUS81lr2lfFf7gOSzzMXnM4GKp17TTaFm3g1V7XgTQs6mR/O6sG3Iak 5oevkD2Rij/t8N5h964YLLa/lwo45ZQ366jqC8SEtV/oaiSEMz+0WLaqb2+Zl9lU8xWr usBldNL41vK+WvdBe698YE/p3O2l/PdTh4wyha9PjXLVxff7PQM7lqvxogWaJIqHA52c IFNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727304732; x=1727909532; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=kueDz1dF+wGxPMW5GUVcYmEub3wqxP5lck+gwlU+ilc=; b=NqCmI1xdIgKVRUfTyU8BnPSNPiOi056shhH167qEGcDs3OCVLmzq+pqJZ/tFacTnQ+ yXsUtcBVOKfoQrhhIx7nQQmQ1hxB1LG/wDEOwVNnKHY9eZu8xbQ0XoPqBQWzktb4BX28 L1Tca/OgyaLBb9MIFdyb30AEYq0Phug7KCxv8wK3BFCthl1YoMamXXaYXUESURKT5Ktj HITfQ7AdeZ288UqxfwyfDbE/o3/ZK19OI253c8UE8Lh3GdOOoyqts6IX7qXl4AFwTLg8 T/f14HmOVcCCSEoUrqvpwjXrRa69cCBlMzY8XohZsbRAakHQe3mLiAjlKh5LSg8WDwTJ qcbg== X-Gm-Message-State: AOJu0YyLtITOXB7XOw70eZWyf6Bc1/5vJNjxyIZQmtvuxyBLiHP4IPF5 WgfIjq5JohI7kXBPjo/AtDmQatZBayqaXlfiIk67YP1O+P7udqTdBARVJg== X-Received: by 2002:a05:6102:32c5:b0:493:c3b2:b5ba with SMTP id ada2fe7eead31-4a15dc656c2mr5067182137.6.1727304731618; Wed, 25 Sep 2024 15:52:11 -0700 (PDT) Received: from localhost.localdomain ([181.92.233.116]) by smtp.gmail.com with ESMTPSA id ada2fe7eead31-4a1517c0e44sm2848945137.16.2024.09.25.15.52.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Sep 2024 15:52:10 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Wed, 25 Sep 2024 19:52:16 -0300 Message-ID: <20240925225219.3060-1-jamrial@gmail.com> X-Mailer: git-send-email 2.46.0 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 1/4] avformat/avformat: add a new disposition to signal the stream is an HDR gainmap 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: +rC4g1LVT2c2 HDR images photos taken by certain cameras split this as a separate image. Signed-off-by: James Almer --- libavformat/avformat.h | 5 +++++ libavformat/dump.c | 2 ++ 2 files changed, 7 insertions(+) diff --git a/libavformat/avformat.h b/libavformat/avformat.h index 56c1c80289..6d9f5c4399 100644 --- a/libavformat/avformat.h +++ b/libavformat/avformat.h @@ -718,6 +718,11 @@ typedef struct AVIndexEntry { * Annex G/H, or HEVC Annex F). */ #define AV_DISPOSITION_MULTILAYER (1 << 21) +/** + * The video stream contains an HDR gainmap. Only ever used with + * AV_DISPOSITION_DEPENDENT. + */ +#define AV_DISPOSITION_GAINMAP (1 << 22) /** * @return The AV_DISPOSITION_* flag corresponding to disp or a negative error diff --git a/libavformat/dump.c b/libavformat/dump.c index f20c2c4953..5178f19685 100644 --- a/libavformat/dump.c +++ b/libavformat/dump.c @@ -589,6 +589,8 @@ static void dump_disposition(int disposition, int log_level) av_log(NULL, log_level, " (non-diegetic)"); if (disposition & AV_DISPOSITION_MULTILAYER) av_log(NULL, log_level, " (multilayer)"); + if (disposition & AV_DISPOSITION_GAINMAP) + av_log(NULL, log_level, " (hdr gainmap)"); } /* "user interface" functions */