From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTPS id 309BE4DFF2 for ; Sun, 27 Apr 2025 11:46:38 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 089A3687F0E; Sun, 27 Apr 2025 14:46:07 +0300 (EEST) Received: from mail-pf1-f176.google.com (mail-pf1-f176.google.com [209.85.210.176]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id A0F6368A76F for ; Sun, 27 Apr 2025 14:45:28 +0300 (EEST) Received: by mail-pf1-f176.google.com with SMTP id d2e1a72fcca58-7398d65476eso3081328b3a.1 for ; Sun, 27 Apr 2025 04:45:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1745754327; x=1746359127; 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=PprnhCPLPI3BSUl1gbNJAH4KDPcZRIpuBXly+c3EDen1ZrqNkS+B07gOcnyFoAgv6W QyBSGM4HHViHNB2sQs5jGoDkvxdUARvw7Jp6NX3lSq8oX8KvRCH4pOVqfrO6Y28Qk3nK e6KgxvgYLPRVUMr3Y9lJMhutHxhhOA6xdlD8cbHGXObNCZUALrh3z+kGQPqONuMhO5Ju eUIAst+YUObB6C/OaFd9A/tTXUhmSygfXG8bcMv9/RLuDHO3nmwsf9+yXQH5Hg/B1Vqh fFrfUqkWlxJzEiid6dcARszVrytkyKwjdXSUFfK/CIlrfbHAnlO5x6UeZS/qpjHAn+IY es4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745754327; x=1746359127; 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=o3vrCPT9WZLfaXmo1X2ruUzIu/4YBTeeAuiLCsou4DbNsNRQaBHiKdca5nhgiG3LGs dG6HBcL3i6b/HtPI2pLn25mispTwwEaWm+Uf3uWmvplNMA5kDJqGlS+B/0jqpOyJEr8Z Ymb1kbFR7N/HJ+82BBuHYgkl7FODRZxZ6q47ecQABqshFKaMu91UMypwIZlaOUJy1hMq rz3o7nuwOXGWtTsOr4qBMU3NVHeI9TVGVJE+yV3SsSxrN1CpzdkmuUMm2wyaqYXs1rPX UXbM/WULZWicgHnaoN1i1WSB8+/7fDEq9Ubc82+QSoXCu/uQiIKEWKe40I7GDu84RoSh NNxQ== X-Gm-Message-State: AOJu0Yy864DtZSzuw2f7fqtEYrIpfyPNlv0huy6ME292Q1CFV4QBZPVW RlE1/ZXy9I8quvlfKCjSONYKVOtc/PQY1/Ir52tBeWHPoG0pKvJkr2hyrTU5 X-Gm-Gg: ASbGncstjLHOPU/CuGDjpcLavHikYMGS+yhnd81FQN0DBlo3hilQ4H7LdL7lUOT0ph3 Bg9pEOC7HeMTpiBgyKkjmfnqs7cNsysU9NnT24grH7B4P0vS95Vbkc2ls4Zdl7ipdoLP3woRal0 DogrbEtKy+oYfFW6rGPPn5i3VdxKMGNeRAhvuVAUrb0pCjUkAFgpFQxA/2rOnVf6obTgEFtApWh I+m5P+AlqJ62wiuc3KrF1lBaau9/Or1b3FV3dAyc+dLF6WTPgYzpFKDxIGovSfexso1rVvtPd/F c3QhNbdbd0iatdGs3ddovRYrknQVS8RynD32xF+SQwH4JfSI8vlj9XGuiyWzyA== X-Google-Smtp-Source: AGHT+IGecKheoG+LyMl6nkziui34NUXC1SMvUbXR6LKOOL3qalMIksDglBvyojd+fzKn2/9adXE7SA== X-Received: by 2002:a05:6a00:c92:b0:728:f21b:ce4c with SMTP id d2e1a72fcca58-73fd5a5337bmr12082570b3a.5.1745754326707; Sun, 27 Apr 2025 04:45:26 -0700 (PDT) Received: from localhost.localdomain ([124.79.129.75]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-73e259134ebsm6064452b3a.27.2025.04.27.04.45.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 27 Apr 2025 04:45:26 -0700 (PDT) From: toqsxw@gmail.com X-Google-Original-From: toqsxw@outlook.com To: ffmpeg-devel@ffmpeg.org Date: Sun, 27 Apr 2025 19:44:39 +0800 Message-ID: <20250427114451.1236-9-toqsxw@outlook.com> X-Mailer: git-send-email 2.44.0.windows.1 In-Reply-To: <20250427114451.1236-1-toqsxw@outlook.com> References: <20250427114451.1236-1-toqsxw@outlook.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v2 09/20] 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: nuomi2021@gmail.com, Wu Jianhua Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: From: Wu Jianhua Signed-off-by: Wu Jianhua --- 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".