[x265] fix: constrained intra
Deepthi Nandakumar
deepthi at multicorewareinc.com
Tue Apr 15 18:26:02 CEST 2014
Thanks, verified and pushed. Do you mind including some more information on
this option to the docs? This only affects intra decisions in inter-slices,
I think?
Deepthi
On Tue, Apr 15, 2014 at 10:16 AM, Satoshi Nakagawa <nakagawa424 at oki.com>wrote:
> > Was it generating hash mistakes without these fixes?
>
> Yes, when encoding with --constraind-intra option.
>
> > -----Original Message-----
> > From: x265-devel [mailto:x265-devel-bounces at videolan.org] On Behalf Of
> > Steve Borho
> > Sent: Tuesday, April 15, 2014 1:29 PM
> > To: Development for x265
> > Subject: Re: [x265] fix: constrained intra
> >
> > On Mon, Apr 14, 2014 at 10:36 PM, Satoshi Nakagawa <nakagawa424 at oki.com>
> > wrote:
> > > # HG changeset patch
> > > # User Satoshi Nakagawa <nakagawa424 at oki.com> # Date 1397532876 -32400
> > > # Tue Apr 15 12:34:36 2014 +0900
> > > # Node ID 5dde9f4817813e96116df5b86925fa3fc5eff2a8
> > > # Parent 08d64a70594ed31cd80046bd4a7e9fa52119be47
> > > fix: constrained intra
> >
> > Was it generating hash mistakes without these fixes?
> >
> > >
> > > diff -r 08d64a70594e -r 5dde9f481781
> > source/Lib/TLibCommon/TComPattern.cpp
> > > --- a/source/Lib/TLibCommon/TComPattern.cpp Mon Apr 14 13:18:18
> > 2014 -0500
> > > +++ b/source/Lib/TLibCommon/TComPattern.cpp Tue Apr 15 12:34:36
> > 2014 +0900
> > > @@ -79,12 +79,24 @@
> > > int leftUnits = cuHeightInUnits << 1;
> > > partIdxLB =
> > g_rasterToZscan[g_zscanToRaster[partIdxLT] + ((cuHeightInUnits - 1) *
> > partIdxStride)];
> > >
> > > - bNeighborFlags[leftUnits] = isAboveLeftAvailable(cu, partIdxLT);
> > > - numIntraNeighbor += (int)(bNeighborFlags[leftUnits]);
> > > - numIntraNeighbor += isAboveAvailable(cu, partIdxLT, partIdxRT,
> > (bNeighborFlags + leftUnits + 1));
> > > - numIntraNeighbor += isAboveRightAvailable(cu, partIdxLT,
> partIdxRT,
> > (bNeighborFlags + leftUnits + 1 + cuWidthInUnits));
> > > - numIntraNeighbor += isLeftAvailable(cu, partIdxLT, partIdxLB,
> > (bNeighborFlags + leftUnits - 1));
> > > - numIntraNeighbor += isBelowLeftAvailable(cu, partIdxLT, partIdxLB,
> > (bNeighborFlags + leftUnits - 1 - cuHeightInUnits));
> > > + if (!cu->getSlice()->getPPS()->getConstrainedIntraPred())
> > > + {
> > > + bNeighborFlags[leftUnits] = isAboveLeftAvailable(cu,
> > partIdxLT);
> > > + numIntraNeighbor += (int)(bNeighborFlags[leftUnits]);
> > > + numIntraNeighbor += isAboveAvailable(cu, partIdxLT, partIdxRT,
> > (bNeighborFlags + leftUnits + 1));
> > > + numIntraNeighbor += isAboveRightAvailable(cu, partIdxLT,
> > partIdxRT, (bNeighborFlags + leftUnits + 1 + cuWidthInUnits));
> > > + numIntraNeighbor += isLeftAvailable(cu, partIdxLT, partIdxLB,
> > (bNeighborFlags + leftUnits - 1));
> > > + numIntraNeighbor += isBelowLeftAvailable(cu, partIdxLT,
> > partIdxLB, (bNeighborFlags + leftUnits - 1 - cuHeightInUnits));
> > > + }
> > > + else
> > > + {
> > > + bNeighborFlags[leftUnits] = isAboveLeftAvailableCIP(cu,
> > partIdxLT);
> > > + numIntraNeighbor += (int)(bNeighborFlags[leftUnits]);
> > > + numIntraNeighbor += isAboveAvailableCIP(cu, partIdxLT,
> > partIdxRT, (bNeighborFlags + leftUnits + 1));
> > > + numIntraNeighbor += isAboveRightAvailableCIP(cu, partIdxLT,
> > partIdxRT, (bNeighborFlags + leftUnits + 1 + cuWidthInUnits));
> > > + numIntraNeighbor += isLeftAvailableCIP(cu, partIdxLT,
> > partIdxLB, (bNeighborFlags + leftUnits - 1));
> > > + numIntraNeighbor += isBelowLeftAvailableCIP(cu, partIdxLT,
> > partIdxLB, (bNeighborFlags + leftUnits - 1 - cuHeightInUnits));
> > > + }
> > >
> > > width = cuWidth2 + 1;
> > > height = cuHeight2 + 1;
> > > @@ -238,12 +250,24 @@
> > > int leftUnits = cuHeightInUnits << 1;
> > > partIdxLB =
> > g_rasterToZscan[g_zscanToRaster[partIdxLT] + ((cuHeightInUnits - 1) *
> > partIdxStride)];
> > >
> > > - bNeighborFlags[leftUnits] = isAboveLeftAvailable(cu, partIdxLT);
> > > - numIntraNeighbor += (int)(bNeighborFlags[leftUnits]);
> > > - numIntraNeighbor += isAboveAvailable(cu, partIdxLT, partIdxRT,
> > (bNeighborFlags + leftUnits + 1));
> > > - numIntraNeighbor += isAboveRightAvailable(cu, partIdxLT,
> partIdxRT,
> > (bNeighborFlags + leftUnits + 1 + cuWidthInUnits));
> > > - numIntraNeighbor += isLeftAvailable(cu, partIdxLT, partIdxLB,
> > (bNeighborFlags + leftUnits - 1));
> > > - numIntraNeighbor += isBelowLeftAvailable(cu, partIdxLT, partIdxLB,
> > (bNeighborFlags + leftUnits - 1 - cuHeightInUnits));
> > > + if (!cu->getSlice()->getPPS()->getConstrainedIntraPred())
> > > + {
> > > + bNeighborFlags[leftUnits] = isAboveLeftAvailable(cu,
> > partIdxLT);
> > > + numIntraNeighbor += (int)(bNeighborFlags[leftUnits]);
> > > + numIntraNeighbor += isAboveAvailable(cu, partIdxLT, partIdxRT,
> > (bNeighborFlags + leftUnits + 1));
> > > + numIntraNeighbor += isAboveRightAvailable(cu, partIdxLT,
> > partIdxRT, (bNeighborFlags + leftUnits + 1 + cuWidthInUnits));
> > > + numIntraNeighbor += isLeftAvailable(cu, partIdxLT, partIdxLB,
> > (bNeighborFlags + leftUnits - 1));
> > > + numIntraNeighbor += isBelowLeftAvailable(cu, partIdxLT,
> > partIdxLB, (bNeighborFlags + leftUnits - 1 - cuHeightInUnits));
> > > + }
> > > + else
> > > + {
> > > + bNeighborFlags[leftUnits] = isAboveLeftAvailableCIP(cu,
> > partIdxLT);
> > > + numIntraNeighbor += (int)(bNeighborFlags[leftUnits]);
> > > + numIntraNeighbor += isAboveAvailableCIP(cu, partIdxLT,
> > partIdxRT, (bNeighborFlags + leftUnits + 1));
> > > + numIntraNeighbor += isAboveRightAvailableCIP(cu, partIdxLT,
> > partIdxRT, (bNeighborFlags + leftUnits + 1 + cuWidthInUnits));
> > > + numIntraNeighbor += isLeftAvailableCIP(cu, partIdxLT,
> > partIdxLB, (bNeighborFlags + leftUnits - 1));
> > > + numIntraNeighbor += isBelowLeftAvailableCIP(cu, partIdxLT,
> > partIdxLB, (bNeighborFlags + leftUnits - 1 - cuHeightInUnits));
> > > + }
> > >
> > > width = cuWidth * 2 + 1;
> > > height = cuHeight * 2 + 1;
> > > _______________________________________________
> > > x265-devel mailing list
> > > x265-devel at videolan.org
> > > https://mailman.videolan.org/listinfo/x265-devel
> >
> >
> >
> > --
> > Steve Borho
> > _______________________________________________
> > x265-devel mailing list
> > x265-devel at videolan.org
> > https://mailman.videolan.org/listinfo/x265-devel
>
> _______________________________________________
> x265-devel mailing list
> x265-devel at videolan.org
> https://mailman.videolan.org/listinfo/x265-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20140415/598fbe56/attachment-0001.html>
More information about the x265-devel
mailing list