internal void InitMacroBlockD(ref MacroBlockD xd, ArrayPtr <int> dqcoeff) { int i; for (i = 0; i < Constants.MaxMbPlane; ++i) { xd.Plane[i].DqCoeff = dqcoeff; xd.AboveContext[i] = AboveContext.Slice(i * 2 * TileInfo.MiColsAlignedToSb(MiCols)); if (i == 0) { MemoryUtil.Copy(ref xd.Plane[i].SegDequant, ref YDequant); } else { MemoryUtil.Copy(ref xd.Plane[i].SegDequant, ref UvDequant); } xd.Fc = new Ptr <Vp9EntropyProbs>(ref Fc.Value); } xd.AboveSegContext = AboveSegContext; xd.MiStride = MiStride; xd.ErrorInfo = new Ptr <InternalErrorInfo>(ref Error); SetPartitionProbs(ref xd); }
private const int MvBorder = (16 << 3); // Allow 16 pels in 1/8th pel units public void ClampMvRef(ref MacroBlockD xd) { ClampMv( xd.MbToLeftEdge - MvBorder, xd.MbToRightEdge + MvBorder, xd.MbToTopEdge - MvBorder, xd.MbToBottomEdge + MvBorder); }
private void SetPartitionProbs(ref MacroBlockD xd) { xd.PartitionProbs = FrameIsIntraOnly() ? new ArrayPtr <Array3 <byte> >(ref Fc.Value.KfPartitionProb[0], 16) : new ArrayPtr <Array3 <byte> >(ref Fc.Value.PartitionProb[0], 16); }
public static byte GetPredProbSegId(ref Array3 <byte> segPredProbs, ref MacroBlockD xd) { return(segPredProbs[xd.GetPredContextSegId()]); }