[x265] fix for rd=0
Satoshi Nakagawa
nakagawa424 at oki.com
Thu Nov 20 06:27:16 CET 2014
# HG changeset patch
# User Satoshi Nakagawa <nakagawa424 at oki.com>
# Date 1416461101 -32400
# Thu Nov 20 14:25:01 2014 +0900
# Node ID 8db5ca1d16a1eee90035389236224548ca71d8bb
# Parent d059cfa88f1ac79b319bd8a05bc70704d454f0ba
fix for rd=0
diff -r d059cfa88f1a -r 8db5ca1d16a1 source/encoder/analysis.cpp
--- a/source/encoder/analysis.cpp Tue Nov 18 14:11:12 2014 -0600
+++ b/source/encoder/analysis.cpp Thu Nov 20 14:25:01 2014 +0900
@@ -1611,8 +1611,6 @@
uint32_t absPartIdx = cuGeom.encodeIdx;
int sizeIdx = cuGeom.log2CUSize - 2;
- Yuv& fencYuv = m_modeDepth[0].fencYuv;
-
/* reuse the bestMode data structures at the current depth */
Mode *bestMode = m_modeDepth[cuGeom.depth].bestMode;
CUData& cu = bestMode->cu;
@@ -1620,6 +1618,11 @@
cu.copyFromPic(ctu, cuGeom);
m_quant.setQPforQuant(cu);
+ Yuv& fencYuv = m_modeDepth[cuGeom.depth].fencYuv;
+ if (cuGeom.depth)
+ m_modeDepth[0].fencYuv.copyPartToYuv(fencYuv, absPartIdx);
+ X265_CHECK(bestMode->fencYuv == &fencYuv, "invalid fencYuv\n");
+
if (cu.isIntra(0))
{
uint32_t tuDepthRange[2];
@@ -1645,16 +1648,16 @@
pixel* predV = predYuv.getCrAddr(absPartIdx);
primitives.luma_sub_ps[sizeIdx](resiYuv.m_buf[0], resiYuv.m_size,
- fencYuv.getLumaAddr(absPartIdx), predY,
+ fencYuv.m_buf[0], predY,
fencYuv.m_size, predYuv.m_size);
primitives.chroma[m_csp].sub_ps[sizeIdx](resiYuv.m_buf[1], resiYuv.m_csize,
- fencYuv.getCbAddr(absPartIdx), predU,
- fencYuv.m_csize, predYuv.m_csize);
+ fencYuv.m_buf[1], predU,
+ fencYuv.m_csize, predYuv.m_csize);
primitives.chroma[m_csp].sub_ps[sizeIdx](resiYuv.m_buf[2], resiYuv.m_csize,
- fencYuv.getCrAddr(absPartIdx), predV,
- fencYuv.m_csize, predYuv.m_csize);
+ fencYuv.m_buf[2], predV,
+ fencYuv.m_csize, predYuv.m_csize);
uint32_t tuDepthRange[2];
cu.getInterTUQtDepthRange(tuDepthRange, 0);
More information about the x265-devel
mailing list