[x265] [PATCH 01/10] Add buffer for reference picture in bilateral filter

Anusuya Kumarasamy anusuya.kumarasamy at multicorewareinc.com
Mon Nov 11 13:03:56 UTC 2024


>From 7446c6a870002db01f75ef5fc8893446c7e59a1c Mon Sep 17 00:00:00 2001
From: AnusuyaKumarasamy <anusuya.kumarasamy at multicorewareinc.com>
Date: Fri, 10 Feb 2023 16:44:08 +0530
Subject: [PATCH 01/10] Add buffer for reference picture in bilateral filter

---
 source/common/temporalfilter.cpp | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/source/common/temporalfilter.cpp
b/source/common/temporalfilter.cpp
index 215feaa0f..5b75517ee 100644
--- a/source/common/temporalfilter.cpp
+++ b/source/common/temporalfilter.cpp
@@ -575,6 +575,9 @@ void TemporalFilter::bilateralFilter(Frame* frame,
                         else
                             correctedPicsStride =
refPicInfo->compensatedPic->m_strideC;

+                        const intptr_t pelOffset = y * correctedPicsStride
+ x;
+
 primitives.pu[1].copy_pp(m_metld->me.fencPUYuv.m_buf[0], FENC_STRIDE,
refPicInfo->compensatedPic->m_picOrg[c] + pelOffset, correctedPicsStride);
+
                         double variance = 0, diffsum = 0;
                         for (int y1 = 0; y1 < blkSize - 1; y1++)
                         {
@@ -584,9 +587,9 @@ void TemporalFilter::bilateralFilter(Frame* frame,
                                 int pixR = *(srcPel + x1 + 1);
                                 int pixD = *(srcPel + x1 + srcStride);

-                                int ref =
*(refPicInfo->compensatedPic->m_picOrg[c] + ((y + y1) * correctedPicsStride
+ x + x1));
-                                int refR =
*(refPicInfo->compensatedPic->m_picOrg[c] + ((y + y1) * correctedPicsStride
+ x + x1 + 1));
-                                int refD =
*(refPicInfo->compensatedPic->m_picOrg[c] + ((y + y1 + 1) *
correctedPicsStride + x + x1));
+                                int ref = *(m_metld->me.fencPUYuv.m_buf[0]
+ ((y1)*FENC_STRIDE + x1));
+                                int refR =
*(m_metld->me.fencPUYuv.m_buf[0] + ((y1)*FENC_STRIDE + x1 + 1));
+                                int refD =
*(m_metld->me.fencPUYuv.m_buf[0] + ((y1 + 1) * FENC_STRIDE + x1));

                                 int diff = pix - ref;
                                 int diffR = pixR - refR;
-- 
2.36.0.windows.1
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20241111/c7ca2fcd/attachment.htm>


More information about the x265-devel mailing list