On Sun, Mar 16, 2014 at 1:23 PM, <[email protected]> wrote: > # HG changeset patch > # User Kavitha Sampath <[email protected]> > # Date 1394994092 -19800 > # Sun Mar 16 23:51:32 2014 +0530 > # Node ID a61f19998ba46b4dda79f460960af12eec47c9e8 > # Parent ba3ddc1848fff0fb8e96ca8f0453dd84171f213f > weightp: add unweighted duplicate of first weighted L0 reference > > diff -r ba3ddc1848ff -r a61f19998ba4 source/encoder/frameencoder.cpp > --- a/source/encoder/frameencoder.cpp Fri Mar 14 12:56:01 2014 -0500 > +++ b/source/encoder/frameencoder.cpp Sun Mar 16 23:51:32 2014 +0530 > @@ -454,6 +454,35 @@ > } > } > > + if (bUseWeightP && slice->m_weightPredTable[0][0][0].bPresentFlag) > + { > + /* Add an unweighted duplicate of weighted first L0 reference */ > + int numref = slice->getNumRefIdx(0); > + TComPic *dup = slice->getRefPic(0, 0); > + slice->setRefPic(dup, 0, numref); > + slice->setRefPOC(slice->getRefPOC(0, 0), 0, numref); > + > + // update rps > + TComReferencePictureSet *rps = slice->getLocalRPS(); > + rps->m_numberOfPictures++; > + rps->m_numberOfNegativePictures++; > + rps->m_deltaPOC[numref + 1] = rps->m_deltaPOC[numref]; > + rps->m_used[numref + 1] = rps->m_used[numref]; > + rps->m_POC[numref + 1] = rps->m_POC[numref]; > + > + //copy first ref data to the dup ref in rps
try to keep just a single comment style within a file or at least within a function. This patch adds a mix of C and C++ comments. Also, for C++ comment there should be a space between the double slash and text. > + rps->m_deltaPOC[numref] = rps->m_deltaPOC[0]; > + rps->m_used[numref] = rps->m_used[0]; > + rps->m_POC[numref] = rps->m_POC[0]; > + > + wpScalingParam *wp = slice->m_weightPredTable[0][numref]; > + SET_WEIGHT(wp[0], false, 1, 0, 0); > + SET_WEIGHT(wp[1], false, 1, 0, 0); > + SET_WEIGHT(wp[2], false, 1, 0, 0); > + m_mref[0][numref].init(slice->getRefPic(0, 0)->getPicYuvRec(), NULL); > + slice->setNumRefIdx(0, ++numref); > + } > + > // Analyze CTU rows, most of the hard work is done here > // frame is compressed in a wave-front pattern if WPP is enabled. Loop > filter runs as a > // wave-front behind the CU compression and reconstruction > _______________________________________________ > x265-devel mailing list > [email protected] > https://mailman.videolan.org/listinfo/x265-devel -- Steve Borho _______________________________________________ x265-devel mailing list [email protected] https://mailman.videolan.org/listinfo/x265-devel
