From patchwork Tue Nov 12 17:22:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 52704 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:612c:6704:20b0:4a6:637d:5226 with SMTP id mp4-n2csp449085vqb; Tue, 12 Nov 2024 09:23:05 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCV4YmrTYnJtp0WSXpZh00nkSeSULU4Fs70ODBFGYvKFtNNV+dp+uIDubTMKXn4DAPNZL5ImhDNvlVzJ/pmU6OIc@gmail.com X-Google-Smtp-Source: AGHT+IHTa8dELeoGSPbc24C214MtZbK4yc9CRs2ray2xPAWeRQYx6WNzixXiaDj47KPoQg2fDtWI X-Received: by 2002:a17:907:7243:b0:a9a:49a8:f1fa with SMTP id a640c23a62f3a-a9eefeed031mr1601483566b.23.1731432184722; Tue, 12 Nov 2024 09:23:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1731432184; cv=none; d=google.com; s=arc-20240605; b=R6MLX7PU7xIWl0Ba1Y4YiSO7Yig2k0a3uHbANpxDZx3ADVC2QuBS4vwmycNP3XYO05 p5NExmRX/kt4u1VNJBNeYO5Vrb9pyoVDYb1cBt29HDwRpzKkxHOM2mgCjdF6t1X5Xvkv 0vq0XvHfikQnR+sbgdp19MJuHMSMEY5nrTcHc9pi/qAp+KQlylZyaxTj2iSK9l/UhxYe g9LZ3s83Tf59aMWe+ZQiU47bfMw7sa7P1cmXKFY+RMYPdYdVKLi8DDFSkVubFh6lavqM qnAjD/5fOoYWFr5Z9qG/rOhBLPUGdQIiY8PFa8ZyB/JeiTNHJlhw03+1WA6bOwRBiFQL eKPQ== 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=QpvsWoffhruJRHk/1Zhnb9v3vCF3o+V4v2abSYcPF70=; fh=YOA8vD9MJZuwZ71F/05pj6KdCjf6jQRmzLS+CATXUQk=; b=MQqlsMHmuE6tBykc4LI5TTL2eTI3F8bjU6NJCNN4Uu6nXye37pmwkQvyWJbGMvNxzY rO81WchFwwFJJfnnHJJYVP0v4Ab5UrLX8cWqgThV0p4kr597k/2XTb6wmHjvRxCiYkni rfLevVyoFLtPL1rx8pU+PyrVIgaCMUuXIx66ickRNxdmRe4z/8gXJ+uKtvVPjtXtuZXC Qe7jOqe/iftWRmtMWVXDOtsdqhW7uQ9nj7EFUpOKEk1yJl8ghHYv1r8c0WSP+NOxad+2 Sj383ekL7DM+hr23tNAK/fhM9ukMLwzouxa5sKTiBu9AhbrhTKAotts9hwx1QwrBxPWk orDA==; 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=jFRG+Jep; 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 ESMTPS id a640c23a62f3a-a9ee0dc2502si856288266b.274.2024.11.12.09.23.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Nov 2024 09:23:04 -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=@gmail.com header.s=20230601 header.b=jFRG+Jep; 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 285FF68DDB2; Tue, 12 Nov 2024 19:22:59 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pl1-f176.google.com (mail-pl1-f176.google.com [209.85.214.176]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id F3F2B68DB6F for ; Tue, 12 Nov 2024 19:22:51 +0200 (EET) Received: by mail-pl1-f176.google.com with SMTP id d9443c01a7336-20c693b68f5so61866775ad.1 for ; Tue, 12 Nov 2024 09:22:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1731432169; x=1732036969; 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=r5hDplDHZuzprPcmZIuA57hb0H6497Znr7u30wGizyM=; b=jFRG+Jep6SW8j25fpD14Z2M0aRyrR5e765YUw4VImqo4pCjXENpxdRGRnZKCvdMMp5 ojneE1l9kOGyVK5c30HfhTrgM5vr6qk5KvANIeVjxFbJzOyfGJI8j6AWxlq1LanK04CV OHsxNe1tey4uZV64RwAflseCrMDFC4S9xRM5Q8wlNovWbZXPJfQdxgffguAqLk7MwQpw 6LzXjmv/JE6dd/44GJI1Mjz4UJ2gXcglsVo869PtPg0cNQ58Q72rOR/kJxgi3x4YVxf1 p+OrOFNAEKoJNhOVg7kBs+gP2y898B5/GFFjAtKHCPgliZEl8Hk8I8nhr8ozFxuRtdug JRfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731432169; x=1732036969; 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=r5hDplDHZuzprPcmZIuA57hb0H6497Znr7u30wGizyM=; b=IVsT7yvcADtJnAep5+DX5+FW0hQRNQK6T0fL++bIGOw8vDkoL7QDUeeTHxlRRS20+q 7y5qkNY07ADdK1wCtU8o7jm3PBnSZRTnkQlgMOs81HudbV3hRAPVH23os3GFmqwv0iKi 3dmzM3Kgpi8LZC/WomlDdDPEL73+K2tZ0GspPhpA1KMbSBnncrkHWjWazVvZvsoXewiY E3bd8QU04kv6BBSll5JlhuvQu1UEyMgYDQj/0xXVL29eJ/wT6nxyetqZs0W79fu1n7cD 17L8fU//1NqWqmN139hhXO2Y4fLScTuk1RgEfzHvzOvU3K3laqXSAKZW0l8dVE61DPRu 4txA== X-Gm-Message-State: AOJu0Yw+gMhU0g2mX+OIv6Xwj6cP2IcA1P2TgjSWT95rQOMhvCvie6Qd re1Gj8hEWb5fK4bOoSM4HnPqC/+uu3eRnNCngf4XsjCcGFhFn1XFK4LkfA== X-Received: by 2002:a17:902:dad0:b0:20c:7eaf:8945 with SMTP id d9443c01a7336-21183552135mr243043595ad.28.1731432168791; Tue, 12 Nov 2024 09:22:48 -0800 (PST) Received: from localhost.localdomain ([181.92.233.116]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-21177dc9f17sm96354265ad.20.2024.11.12.09.22.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Nov 2024 09:22:48 -0800 (PST) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Tue, 12 Nov 2024 14:22:42 -0300 Message-ID: <20241112172244.1528-1-jamrial@gmail.com> X-Mailer: git-send-email 2.47.0 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 1/3] avcodec/h2645_sei: move some common SEI syncing code to ff_h2645_sei_ctx_replace() 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: ndnCTpOuCRkg Instead of duplicating it across all supported decoders. Signed-off-by: James Almer --- libavcodec/h2645_sei.c | 3 +++ libavcodec/h264_slice.c | 2 -- libavcodec/hevc/hevcdec.c | 2 -- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/libavcodec/h2645_sei.c b/libavcodec/h2645_sei.c index 62369dd37f..986d1d250a 100644 --- a/libavcodec/h2645_sei.c +++ b/libavcodec/h2645_sei.c @@ -556,6 +556,9 @@ int ff_h2645_sei_ctx_replace(H2645SEI *dst, const H2645SEI *src) } dst->aom_film_grain.enable = src->aom_film_grain.enable; + dst->mastering_display = src->mastering_display; + dst->content_light = src->content_light; + ff_refstruct_replace(&dst->film_grain_characteristics, src->film_grain_characteristics); diff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c index 84595b1a8b..08376ffa6d 100644 --- a/libavcodec/h264_slice.c +++ b/libavcodec/h264_slice.c @@ -442,8 +442,6 @@ int ff_h264_update_thread_context(AVCodecContext *dst, return ret; h->sei.common.unregistered.x264_build = h1->sei.common.unregistered.x264_build; - h->sei.common.mastering_display = h1->sei.common.mastering_display; - h->sei.common.content_light = h1->sei.common.content_light; if (!h->cur_pic_ptr) return 0; diff --git a/libavcodec/hevc/hevcdec.c b/libavcodec/hevc/hevcdec.c index 19080255cb..fe8897fb6e 100644 --- a/libavcodec/hevc/hevcdec.c +++ b/libavcodec/hevc/hevcdec.c @@ -4003,8 +4003,6 @@ static int hevc_update_thread_context(AVCodecContext *dst, s->sei.common.frame_packing = s0->sei.common.frame_packing; s->sei.common.display_orientation = s0->sei.common.display_orientation; s->sei.common.alternative_transfer = s0->sei.common.alternative_transfer; - s->sei.common.mastering_display = s0->sei.common.mastering_display; - s->sei.common.content_light = s0->sei.common.content_light; s->sei.tdrdi = s0->sei.tdrdi; return 0;