From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <ffmpeg-devel-bounces@ffmpeg.org> Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTPS id 898F24BA87 for <ffmpegdev@gitmailbox.com>; Tue, 1 Apr 2025 17:17:48 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 823F2687D97; Tue, 1 Apr 2025 20:16:48 +0300 (EEST) Received: from mail-pl1-f175.google.com (mail-pl1-f175.google.com [209.85.214.175]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 36650687D87 for <ffmpeg-devel@ffmpeg.org>; Tue, 1 Apr 2025 20:16:45 +0300 (EEST) Received: by mail-pl1-f175.google.com with SMTP id d9443c01a7336-2295d78b433so21679815ad.2 for <ffmpeg-devel@ffmpeg.org>; Tue, 01 Apr 2025 10:16:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1743527803; x=1744132603; darn=ffmpeg.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=m1PUbXbrGQ3FAjhwRMSNfmDQuFVVxz5UFBEJcFRlcIM=; b=MaOReLfRC3notor/YEXBpwNqpranDyz6YHZmp8npYL3RUjm3NCzXNYJc9U4CQgXr2i 3qNbzg59dbfoI9PJOM1kmLrP8SC4nh7GKxVXvQ/ojdkiPpOOu4a8qnQpJj+glusaT8xn LVx2gyJHOyuc2H1uJ92d6K+ckYlhqsFW8YlyQ0XRIAee7J9DYb9p2ihavWGrOpRoAUdd hcBt/ZmiyK9LPvMWn+/aqXeei35uIPO9Vdh78vMplICNYbhsWGYD20GgQ9bBnBl+sIJE 8px34zlldK6Sg7HIlwRUj0JKkvTBHkiEPp5wUiIsREVvFMtDMjgQBHjLBnIzAPlmTwwp gAcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1743527803; x=1744132603; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=m1PUbXbrGQ3FAjhwRMSNfmDQuFVVxz5UFBEJcFRlcIM=; b=PJUKAfAfnpcKr04Shp/x/+t+Oxc96eTFrLRBOh1m/oj9OEnLv3LFvh8keprwkS8bJS /VwAirnVYnDiilTjqsxgPVWDcn3Jzb4bPCuCMYY7Vj3+2h3g70o2526iOdWkeUNcShvn l61ExnqNacr5iXOCLqzuk4CuswRW5WDOyxUfDDarX0PMvqLSMwhe86t/OBG8s+siRX+q mbIcjeUaIWo31NY8y7pEc1UnnRzpId3pohh/MqARMfSpwg4LfLF708Z+Q6fzDW0punJA QqvQbiYSE8w5zLo0zceILKhq/F8EdXBZ0inCPyTpTYCtOKBvszhBLVXfbkF7QNrYXMM+ Lr0g== X-Gm-Message-State: AOJu0YyJEWF4/0tN/EhDsJEdiZPCad/Dh9PWPg9NfR1POG0fCMvrfh4T gC3YrDpC1sD7gQI7LOhvdw9nDQedAvtm3NYRr14oTvX0eimJkUQ9JjZJJs1aiAQ= X-Gm-Gg: ASbGncu3hj1G+DyAys1NhH1wI9MfW1NjZnIJyWHK2c0z9sF5iR9S9OoTBgYf1rRnekG C30/LJxKSnwGICaPN9G3g2vh4IACWEkG2B6BuFCS93vmwqTPbWOYVswBOWNteasmVLZL2NuAy6b EPy6hU7IdcJoLCqiGLFofcfoxUhpfkbJmpXM/wp+bvYJ3MPuPK2HaayCHtnloAwJqvbPWoJ61Gc K09uPx7ON9NEoW7ncEIlMeRvkqIyJs4riaFVag6+harwAHFaW/WxzawQHCnXGLbrccFB7GPVcvI FwTq5ziyrxwdK78o6hzVL6/nLYrRTcg/nOnhhapjT2m1m7tcP/1/yTgQxwKZAnnnvA== X-Google-Smtp-Source: AGHT+IGpkOnNQ4ZqxQh7nZmD/Uzx7FYTJoiTwoMXDD3RsfqTtdMrQ4Q14XN8bpbSsVUUNd6LBlhv1Q== X-Received: by 2002:a17:903:1c7:b0:21f:4b01:b978 with SMTP id d9443c01a7336-2292f9e8394mr201222665ad.36.1743527803300; Tue, 01 Apr 2025 10:16:43 -0700 (PDT) Received: from localhost.localdomain ([124.79.129.75]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2291eee0bafsm90902495ad.90.2025.04.01.10.16.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Apr 2025 10:16:42 -0700 (PDT) From: toqsxw@gmail.com X-Google-Original-From: toqsxw@outlook.com To: ffmpeg-devel@ffmpeg.org Date: Wed, 2 Apr 2025 01:16:05 +0800 Message-ID: <20250401171616.1378-8-toqsxw@outlook.com> X-Mailer: git-send-email 2.44.0.windows.1 In-Reply-To: <20250401171616.1378-1-toqsxw@outlook.com> References: <20250401171616.1378-1-toqsxw@outlook.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v1 08/19] avcodec/vvc/sei: add decode_decoded_picture_hash X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches <ffmpeg-devel.ffmpeg.org> List-Unsubscribe: <https://ffmpeg.org/mailman/options/ffmpeg-devel>, <mailto:ffmpeg-devel-request@ffmpeg.org?subject=unsubscribe> List-Archive: <https://ffmpeg.org/pipermail/ffmpeg-devel> List-Post: <mailto:ffmpeg-devel@ffmpeg.org> List-Help: <mailto:ffmpeg-devel-request@ffmpeg.org?subject=help> List-Subscribe: <https://ffmpeg.org/mailman/listinfo/ffmpeg-devel>, <mailto:ffmpeg-devel-request@ffmpeg.org?subject=subscribe> Reply-To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org> Cc: Wu Jianhua <toqsxw@outlook.com> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" <ffmpeg-devel-bounces@ffmpeg.org> Archived-At: <https://master.gitmailbox.com/ffmpegdev/20250401171616.1378-8-toqsxw@outlook.com/> List-Archive: <https://master.gitmailbox.com/ffmpegdev/> List-Post: <mailto:ffmpegdev@gitmailbox.com> From: Wu Jianhua <toqsxw@outlook.com> Signed-off-by: Wu Jianhua <toqsxw@outlook.com> --- libavcodec/vvc/sei.c | 19 +++++++++++++++++++ libavcodec/vvc/sei.h | 2 ++ 2 files changed, 21 insertions(+) diff --git a/libavcodec/vvc/sei.c b/libavcodec/vvc/sei.c index 365f815950..2d81ae5908 100644 --- a/libavcodec/vvc/sei.c +++ b/libavcodec/vvc/sei.c @@ -80,6 +80,20 @@ static int decode_film_grain_characteristics(H2645SEIFilmGrainCharacteristics *h return 0; } +static int decode_decoded_picture_hash(H274SEIPictureHash *h, const SEIRawDecodedPictureHash *s) +{ + h->present = 1; + h->hash_type = s->dph_sei_hash_type; + if (h->hash_type == 0) + memcpy(h->md5, s->dph_sei_picture_md5, sizeof(h->md5)); + else if (h->hash_type == 1) + memcpy(h->crc, s->dph_sei_picture_crc, sizeof(h->crc)); + else if (h->hash_type == 2) + memcpy(h->checksum, s->dph_sei_picture_checksum, sizeof(h->checksum)); + + return 0; +} + int ff_vvc_sei_decode(VVCSEI *s, const H266RawSEI *sei, const struct VVCFrameContext *fc) { H2645SEI *c = &s->common; @@ -99,6 +113,9 @@ int ff_vvc_sei_decode(VVCSEI *s, const H266RawSEI *sei, const struct VVCFrameCon return AVERROR(ENOMEM); return decode_film_grain_characteristics(c->film_grain_characteristics, payload, fc); + case SEI_TYPE_DECODED_PICTURE_HASH: + return decode_decoded_picture_hash(&s->picture_hash, payload); + default: av_log(fc->log_ctx, AV_LOG_DEBUG, "Skipped %s SEI %d\n", sei->nal_unit_header.nal_unit_type == VVC_PREFIX_SEI_NUT ? @@ -112,10 +129,12 @@ int ff_vvc_sei_decode(VVCSEI *s, const H266RawSEI *sei, const struct VVCFrameCon int ff_vvc_sei_replace(VVCSEI *dst, const VVCSEI *src) { + dst->picture_hash.present = 0; // drop hash return ff_h2645_sei_ctx_replace(&dst->common, &src->common); } void ff_vvc_sei_reset(VVCSEI *s) { ff_h2645_sei_reset(&s->common); + s->picture_hash.present = 0; } diff --git a/libavcodec/vvc/sei.h b/libavcodec/vvc/sei.h index 17e04cde63..6e4855bf60 100644 --- a/libavcodec/vvc/sei.h +++ b/libavcodec/vvc/sei.h @@ -31,9 +31,11 @@ #include "libavcodec/h2645_sei.h" #include "libavcodec/sei.h" #include "libavcodec/vvc.h" +#include "libavcodec/h274.h" typedef struct VVCSEI { H2645SEI common; + H274SEIPictureHash picture_hash; } VVCSEI; struct VVCFrameContext; -- 2.44.0.windows.1 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".