From patchwork Wed Jul 12 18:32:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Jan_Ekstr=C3=B6m?= X-Patchwork-Id: 34955 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:6da1:b0:131:a7d0:bc6d with SMTP id gl33csp2382998pzb; Wed, 12 Jul 2023 11:33:16 -0700 (PDT) X-Google-Smtp-Source: APBJJlFvLg2uX+IH2+pQkJLRmoFnbCS4YWNDT3rYkaQsC8jEd+b3jVRfY3gpsUEofPr+ZQeTljYQ X-Received: by 2002:a17:906:77c7:b0:993:d7c1:7fd2 with SMTP id m7-20020a17090677c700b00993d7c17fd2mr15958050ejn.14.1689186795899; Wed, 12 Jul 2023 11:33:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689186795; cv=none; d=google.com; s=arc-20160816; b=wIcTBcsIKrfocOnqKTXe3NGxSXeY4Su0SinxMt8DB3JWMMJI8SsqTdAj6WgooABMPF yRuUOMbWbW+kIcK1V46gEHG/FAhzhMTNjcqeLHmeUNab7dRBJ7juVclB2BSgcYuBtiDW 3+yaRQrjPUyDuiH0hQrVPcYNoG0XQSaAvQ7f/VPeIYhn8PD0iwLEzrjXE984dEU5qtp8 6bC3GYzpzb/8Xzs3SLINLpI8pbBET6ifJD+5ZzqymWfv4FYK+ycDJrJEdG+H8lNNvjXO Tg6YOFHd0Pq72evMAMXvdtrifs9woHvjxRJf9H+kO58BVhxixVn9/6hmKF++E0raYWOG ma6A== 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=A9FdPogLIeGJ/FZGl3EKQ3DvsRiPc7E7VeD7Ie9K7ag=; fh=DpbP4OnC98Ct+zBdrpJgv1NgOvKTVLIsArQu/ER33Zc=; b=G/7ena19L0Ll1RrTPSYYVH9+ge0P39dJZyX7LqrBtBYB5XwG9HKBOwkfgkRv6JEapb mHdQbyW9rbuv9FoQC8OsoFUYsRS8IggYn0bzHPQrfIy8GLrUOYiER0z5gulPp+FmKRwi Y6FYU/9eH/44qqIJyzn+ig8AUMov+32bA12HhVPhhqqy/ZJMp/vYbF8qzBV270V7GgMg 3CEIr7iRZV59xGn9PRsT+WEi8YVuYU/2TozV2LXXVvAIxhaKixt1En9yGUwHh86D5vLM jtCrnDA/23jAfWSOUKcEkwJtOApnlRVc2/Us/uo+FuVG6g7P9lk7myoNz8lbdWHRWMQB FpzA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20221208 header.b="Tu//LmRl"; 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 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id ss2-20020a170907038200b00992f654b2d7si4812457ejb.723.2023.07.12.11.33.13; Wed, 12 Jul 2023 11:33:15 -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=20221208 header.b="Tu//LmRl"; 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 Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 95BF668C23A; Wed, 12 Jul 2023 21:33:08 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-lf1-f41.google.com (mail-lf1-f41.google.com [209.85.167.41]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 52B2D68C23A for ; Wed, 12 Jul 2023 21:33:02 +0300 (EEST) Received: by mail-lf1-f41.google.com with SMTP id 2adb3069b0e04-4fb761efa7aso11614469e87.0 for ; Wed, 12 Jul 2023 11:33:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1689186781; x=1691778781; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=I2es5iMGItrbIby/nFNR7TT6EuKIqfPXgIWEYYBT4Pc=; b=Tu//LmRlk1qGvN5/8FISvDP03DLBDWPY1L9CX3jghXUFgL7yJqVsU+z0hEUhMZG5zO EsETIxrgcGoWZBSRHbCebBYqAGFYEykszBbI15m0sytL/Q7K5kSl0aOz8eVC6AZVyfUL QhN8gk8yp3YG9pO5XNQTKxDxqR5Ygs+Em1YiEwjvZ1BKHBa7I3qIIK1gYHPuxZrz4M8S xFLFviIc4ZKaXxx4xua8Hq+TDi+NnHSHr4DnnlN4PesOf5nQ3bGqWbT+f7xAB1PG0TeC B4GD3vo4FMDkabKrSIaucXmxD+5KQmYPidvpWZ4TVkWQD0+c7Nk4fVDZ6tt3w5QBjh4t a7CQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689186781; x=1691778781; 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=I2es5iMGItrbIby/nFNR7TT6EuKIqfPXgIWEYYBT4Pc=; b=EJLE2sJWo5Td0330c7ozhv7Au79JVmkKzSYrQi3M3AfXCggZlKVehUEzxzGh7Vr+qm IpdaAVGNe8/G4Nh2WQ9Wo3eEs5iKEh6IPPjN6dekRFuNhFiiXjP0XtE67KVzkvlWKMvD HWhjJxlirh3I1L+4rifr76Nk15RJHm5/BuOPTMinypJqaOnD1ABuPkmAC95UzknX25Mh QdsjR1lhMJb0qQgqhRCmGA1wootDdb+B4KiffxPzIFpYMrxZRiocwhEwPUvWCaSYRrJj QQqdJqP+fWZ/Yc7E5eZUDKwDhL2TmwcYrx5Bzb35uBvAc7fUYOXvWKpiKPuaimC+UIzG Q8eQ== X-Gm-Message-State: ABy/qLY1eeg44Roj+FohEG3oT2r6D4jJtupZ+ZXx9yApuCGxrU3R7Rmi OatVEIOe37C1wGwxS+5gpPmkEwaHvBk= X-Received: by 2002:a19:655c:0:b0:4fb:8966:5720 with SMTP id c28-20020a19655c000000b004fb89665720mr16863929lfj.25.1689186781083; Wed, 12 Jul 2023 11:33:01 -0700 (PDT) Received: from localhost.localdomain (91-153-198-187.elisa-laajakaista.fi. [91.153.198.187]) by smtp.gmail.com with ESMTPSA id s14-20020ac25fae000000b004fba759bf44sm809953lfe.277.2023.07.12.11.33.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jul 2023 11:33:00 -0700 (PDT) From: =?utf-8?q?Jan_Ekstr=C3=B6m?= To: ffmpeg-devel@ffmpeg.org Date: Wed, 12 Jul 2023 21:32:44 +0300 Message-ID: <20230712183252.302971-1-jeebjp@gmail.com> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 0/3] avcodec: move HDR10 (MDCV/CLL) SEI handling to h2645_sei 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: z4xQerBoyPWo This allows parsing code to be re-utilized from H.264, as well as probably from VVC in the future. This additionally eases verification of the AVCodecContext side data patch set, which includes libx264 integration for HDR10 side data. Notes: * At least in ffprobe and FATE tests the code works even without the additional sync in "update_thread_context" in either HEVC or H.264 (as the viewing environment SEI patch set showed earlier). As the current HEVC code had such sync, I kept it and added a similar thing to the H.264 decoder. ** If this is required for all things, the sync should possibly be added to ff_h2645_sei_ctx_replace? As currently both the HEVC and H.264 decoders are synchronizing various structs by themselves in addition to calling ctx_replace. * I did not add a simlar decrementing logic to the H.264 decoder for now, as not sure how it should be handled exactly. Jan Jan Ekström (3): avcodec: move mastering display colour volume SEI handling to h2645_sei avcodec: move content light level SEI handling to h2645_sei avcodec/hevcdec: simplify decrementing of MDCV/CLL flags libavcodec/h2645_sei.c | 112 +++++++++++++++++++++++++ libavcodec/h2645_sei.h | 16 ++++ libavcodec/h264_slice.c | 2 + libavcodec/hevc_sei.c | 50 ----------- libavcodec/hevc_sei.h | 16 ---- libavcodec/hevcdec.c | 78 +++-------------- tests/ref/fate/hevc-hdr-vivid-metadata | 6 +- 7 files changed, 143 insertions(+), 137 deletions(-)