Fix bug in loading co-located CU's TU depth.

via Brad (maintainer)
This commit is contained in:
ajacoutot 2019-12-20 13:18:35 +00:00
parent 75bc7c16c1
commit 8ec24bd00b
2 changed files with 24 additions and 1 deletions

View File

@ -1,10 +1,11 @@
# $OpenBSD: Makefile,v 1.44 2019/11/02 18:35:02 ajacoutot Exp $
# $OpenBSD: Makefile,v 1.45 2019/12/20 13:18:35 ajacoutot Exp $
COMMENT= free H.265/HEVC encoder
VER= 3.2.1
DISTNAME= x265_${VER}
PKGNAME= x265-${VER}
REVISION= 0
CATEGORIES= multimedia
MASTER_SITES= https://bitbucket.org/multicoreware/x265/downloads/

View File

@ -0,0 +1,22 @@
$OpenBSD: patch-source_encoder_analysis_cpp,v 1.1 2019/12/20 13:18:35 ajacoutot Exp $
limit-tu: Fix bug in loading co-located CU's TU depth.
Index: source/encoder/analysis.cpp
--- source/encoder/analysis.cpp.orig
+++ source/encoder/analysis.cpp
@@ -375,12 +375,12 @@ int32_t Analysis::loadTUDepth(CUGeom cuGeom, CUData pa
CUData* neighbourCU;
uint8_t count = 0;
int32_t maxTUDepth = -1;
- neighbourCU = m_slice->m_refFrameList[0][0]->m_encData->m_picCTU;
+ neighbourCU = &m_slice->m_refFrameList[0][0]->m_encData->m_picCTU[parentCTU.m_cuAddr];
predDepth += neighbourCU->m_refTuDepth[cuGeom.geomRecurId];
count++;
if (m_slice->isInterB())
{
- neighbourCU = m_slice->m_refFrameList[1][0]->m_encData->m_picCTU;
+ neighbourCU = &m_slice->m_refFrameList[1][0]->m_encData->m_picCTU[parentCTU.m_cuAddr];
predDepth += neighbourCU->m_refTuDepth[cuGeom.geomRecurId];
count++;
}