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 ESMTP id 9B0554A417 for ; Thu, 28 Mar 2024 01:27:02 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id E72E268D6C3; Thu, 28 Mar 2024 03:26:31 +0200 (EET) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.16]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 94AFB68D655 for ; Thu, 28 Mar 2024 03:26:23 +0200 (EET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1711589189; x=1743125189; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=zg9EDh8dnEU0ZLkLVWejkU5Kc9gwESHBaOfDjyHpzdk=; b=B+k7CT1mirQ/UQIlda7wT8LRIVLDpOH+G+Yq7+cnPqpGvV8QVeKkvvIR JKPQy4g3XoMdmUV8ickgTT1btGaW6Roi6UTIDpbKDnenGrHHxUQRawEje 5L+Vm8nrep0q8lo+42sIQnBezukq3ZLyYdXYFD9XEKwjkbmJxpivPeahj iNhY/6irIjDAhBVFVvq8Or3BfCKuagho2PApQtDP2Ze2Vc2dVm25DJUDH Tfrwrlj4WWeNzmNKAKoC+RKQGXOgbtmPdzGBpxUcTBVDBXtsp3+m6CpfL 71qgPYw8+icsDTCfGuc/e9isfK4X9ciajW6Q45BSW222/sSMNLt+efFmS Q==; X-CSE-ConnectionGUID: oKNR4uyBR164HxVNOnsnOg== X-CSE-MsgGUID: XKwxDpwWSQi7eUFs/MgbvQ== X-IronPort-AV: E=McAfee;i="6600,9927,11026"; a="7324917" X-IronPort-AV: E=Sophos;i="6.07,160,1708416000"; d="scan'208";a="7324917" Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by fmvoesa110.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Mar 2024 18:26:17 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,160,1708416000"; d="scan'208";a="20996878" Received: from t-dg2.sh.intel.com ([10.239.159.57]) by fmviesa003.fm.intel.com with ESMTP; 27 Mar 2024 18:26:16 -0700 From: fei.w.wang-at-intel.com@ffmpeg.org To: ffmpeg-devel@ffmpeg.org Date: Thu, 28 Mar 2024 09:26:29 +0800 Message-Id: <20240328012631.777476-5-fei.w.wang@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240328012631.777476-1-fei.w.wang@intel.com> References: <20240328012631.777476-1-fei.w.wang@intel.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v1 5/7] lavc/vvc_ps: Add alf raw syntax into VVCALF 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: fei.w.wang@intel.com 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: Fei Wang Signed-off-by: Fei Wang --- libavcodec/vvc/vvc_ps.c | 10 +++++++++- libavcodec/vvc/vvc_ps.h | 1 + 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/libavcodec/vvc/vvc_ps.c b/libavcodec/vvc/vvc_ps.c index 7972803da6..97eef85be9 100644 --- a/libavcodec/vvc/vvc_ps.c +++ b/libavcodec/vvc/vvc_ps.c @@ -873,13 +873,21 @@ static void alf_derive(VVCALF *alf, const H266RawAPS *aps) alf_cc(alf, aps); } +static void alf_free(FFRefStructOpaque unused, void *obj) +{ + VVCALF *alf = obj; + + ff_refstruct_unref(&alf->r); +} + static int aps_decode_alf(const VVCALF **alf, const H266RawAPS *aps) { - VVCALF *a = ff_refstruct_allocz(sizeof(*a)); + VVCALF *a = ff_refstruct_alloc_ext(sizeof(*a), 0, NULL, alf_free); if (!a) return AVERROR(ENOMEM); alf_derive(a, aps); + ff_refstruct_replace(&a->r, aps); ff_refstruct_replace(alf, a); ff_refstruct_unref(&a); diff --git a/libavcodec/vvc/vvc_ps.h b/libavcodec/vvc/vvc_ps.h index 1164d0eab6..d306e0354a 100644 --- a/libavcodec/vvc/vvc_ps.h +++ b/libavcodec/vvc/vvc_ps.h @@ -159,6 +159,7 @@ typedef struct VVCPH { #define ALF_NUM_COEFF_CC 7 typedef struct VVCALF { + const H266RawAPS *r; int16_t luma_coeff [ALF_NUM_FILTERS_LUMA][ALF_NUM_COEFF_LUMA]; uint8_t luma_clip_idx [ALF_NUM_FILTERS_LUMA][ALF_NUM_COEFF_LUMA]; -- 2.25.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".