[x265] fix: constrained intra
Satoshi Nakagawa
nakagawa424 at oki.com
Tue Apr 15 06:46:13 CEST 2014
> 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
More information about the x265-devel
mailing list