本文整理汇总了Golang中gohm/TLibCommon.TComDataCU.SetMVPNumSubParts方法的典型用法代码示例。如果您正苦于以下问题:Golang TComDataCU.SetMVPNumSubParts方法的具体用法?Golang TComDataCU.SetMVPNumSubParts怎么用?Golang TComDataCU.SetMVPNumSubParts使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类gohm/TLibCommon.TComDataCU
的用法示例。
在下文中一共展示了TComDataCU.SetMVPNumSubParts方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1: DecodeMVPIdxPU
func (this *TDecEntropy) DecodeMVPIdxPU(pcSubCU *TLibCommon.TComDataCU, uiPartAddr, uiDepth, uiPartIdx uint, eRefList TLibCommon.RefPicList) {
iMVPIdx := -1
cZeroMv := TLibCommon.NewTComMv(0, 0)
cMv := cZeroMv
iRefIdx := -1
pcSubCUMvField := pcSubCU.GetCUMvField(eRefList)
pAMVPInfo := pcSubCUMvField.GetAMVPInfo()
iRefIdx = int(pcSubCUMvField.GetRefIdx(int(uiPartAddr)))
cMv = cZeroMv
if (pcSubCU.GetInterDir1(uiPartAddr) & (1 << eRefList)) != 0 {
this.m_pcEntropyDecoderIf.ParseMVPIdx(&iMVPIdx)
}
pcSubCU.FillMvpCand(uiPartIdx, uiPartAddr, eRefList, iRefIdx, pAMVPInfo)
pcSubCU.SetMVPNumSubParts(pAMVPInfo.IN, eRefList, uiPartAddr, uiPartIdx, uiDepth)
pcSubCU.SetMVPIdxSubParts(iMVPIdx, eRefList, uiPartAddr, uiPartIdx, uiDepth)
if iRefIdx >= 0 {
cMv = this.m_pcPrediction.GetMvPredAMVP(pcSubCU, uiPartIdx, uiPartAddr, eRefList)
cMvd := pcSubCUMvField.GetMvd(int(uiPartAddr))
//fmt.Printf("%d=(%d,%d)=(%d,%d)\n", iRefIdx, cMv.GetHor(), cMv.GetVer(), cMvd.GetHor(), cMvd.GetVer());
cMv.Set(cMv.GetHor()+cMvd.GetHor(), cMv.GetVer()+cMvd.GetVer())
}
ePartSize := pcSubCU.GetPartitionSize1(uiPartAddr)
pcSubCU.GetCUMvField(eRefList).SetAllMv(*cMv, ePartSize, int(uiPartAddr), 0, int(uiPartIdx))
//fmt.Printf("%d(%d,%d)=%d,%d,%d",eRefList,cMv.GetHor(), cMv.GetVer(),ePartSize, uiPartAddr, uiPartIdx);
}
示例2: DecodePUWise
func (this *TDecEntropy) DecodePUWise(pcCU *TLibCommon.TComDataCU, uiAbsPartIdx, uiDepth uint, pcSubCU *TLibCommon.TComDataCU) {
ePartSize := pcCU.GetPartitionSize1(uiAbsPartIdx)
var uiNumPU uint
if ePartSize == TLibCommon.SIZE_2Nx2N {
uiNumPU = 1
} else if ePartSize == TLibCommon.SIZE_NxN {
uiNumPU = 4
} else {
uiNumPU = 2
}
uiPUOffset := (TLibCommon.G_auiPUOffset[uint(ePartSize)] << ((pcCU.GetSlice().GetSPS().GetMaxCUDepth() - uiDepth) << 1)) >> 4
var cMvFieldNeighbours [TLibCommon.MRG_MAX_NUM_CANDS << 1]TLibCommon.TComMvField // double length for mv of both lists
var uhInterDirNeighbours [TLibCommon.MRG_MAX_NUM_CANDS]byte
for ui := uint(0); ui < pcCU.GetSlice().GetMaxNumMergeCand(); ui++ {
uhInterDirNeighbours[ui] = 0
}
numValidMergeCand := 0
isMerged := false
pcSubCU.CopyInterPredInfoFrom(pcCU, uiAbsPartIdx, TLibCommon.REF_PIC_LIST_0)
pcSubCU.CopyInterPredInfoFrom(pcCU, uiAbsPartIdx, TLibCommon.REF_PIC_LIST_1)
uiSubPartIdx := uiAbsPartIdx
for uiPartIdx := uint(0); uiPartIdx < uiNumPU; uiPartIdx++ {
this.DecodeMergeFlag(pcCU, uiSubPartIdx, uiDepth, uiPartIdx)
if pcCU.GetMergeFlag1(uiSubPartIdx) {
this.DecodeMergeIndex(pcCU, uiPartIdx, uiSubPartIdx, uiDepth)
uiMergeIndex := pcCU.GetMergeIndex1(uiSubPartIdx)
if pcCU.GetSlice().GetPPS().GetLog2ParallelMergeLevelMinus2() != 0 && ePartSize != TLibCommon.SIZE_2Nx2N && pcSubCU.GetWidth1(0) <= 8 {
pcSubCU.SetPartSizeSubParts(TLibCommon.SIZE_2Nx2N, 0, uiDepth)
if !isMerged {
pcSubCU.GetInterMergeCandidates(0, 0, cMvFieldNeighbours[:], uhInterDirNeighbours[:], &numValidMergeCand, -1)
isMerged = true
}
pcSubCU.SetPartSizeSubParts(ePartSize, 0, uiDepth)
} else {
uiMergeIndex = pcCU.GetMergeIndex1(uiSubPartIdx)
pcSubCU.GetInterMergeCandidates(uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours[:], uhInterDirNeighbours[:], &numValidMergeCand, int(uiMergeIndex))
}
pcCU.SetInterDirSubParts(uint(uhInterDirNeighbours[uiMergeIndex]), uiSubPartIdx, uiPartIdx, uiDepth)
cTmpMv := TLibCommon.NewTComMv(0, 0)
for uiRefListIdx := 0; uiRefListIdx < 2; uiRefListIdx++ {
if pcCU.GetSlice().GetNumRefIdx(TLibCommon.RefPicList(uiRefListIdx)) > 0 {
pcCU.SetMVPIdxSubParts(0, TLibCommon.RefPicList(uiRefListIdx), uiSubPartIdx, uiPartIdx, uiDepth)
pcCU.SetMVPNumSubParts(0, TLibCommon.RefPicList(uiRefListIdx), uiSubPartIdx, uiPartIdx, uiDepth)
pcCU.GetCUMvField(TLibCommon.RefPicList(uiRefListIdx)).SetAllMvd(*cTmpMv, ePartSize, int(uiSubPartIdx), uiDepth, int(uiPartIdx))
pcCU.GetCUMvField(TLibCommon.RefPicList(uiRefListIdx)).SetAllMvField(&cMvFieldNeighbours[2*int(uiMergeIndex)+uiRefListIdx], ePartSize, int(uiSubPartIdx), uiDepth, int(uiPartIdx))
}
}
} else {
this.DecodeInterDirPU(pcCU, uiSubPartIdx, uiDepth, uiPartIdx)
for uiRefListIdx := 0; uiRefListIdx < 2; uiRefListIdx++ {
if pcCU.GetSlice().GetNumRefIdx(TLibCommon.RefPicList(uiRefListIdx)) > 0 {
//fmt.Printf("%d \n",uiRefListIdx);
this.DecodeRefFrmIdxPU(pcCU, uiSubPartIdx, uiDepth, uiPartIdx, TLibCommon.RefPicList(uiRefListIdx))
this.DecodeMvdPU(pcCU, uiSubPartIdx, uiDepth, uiPartIdx, TLibCommon.RefPicList(uiRefListIdx))
this.DecodeMVPIdxPU(pcSubCU, uiSubPartIdx-uiAbsPartIdx, uiDepth, uiPartIdx, TLibCommon.RefPicList(uiRefListIdx))
}
}
}
if (pcCU.GetInterDir1(uiSubPartIdx) == 3) && pcSubCU.IsBipredRestriction(uiPartIdx) {
pcCU.GetCUMvField(TLibCommon.REF_PIC_LIST_1).SetAllMv(*TLibCommon.NewTComMv(0, 0), ePartSize, int(uiSubPartIdx), uiDepth, int(uiPartIdx))
pcCU.GetCUMvField(TLibCommon.REF_PIC_LIST_1).SetAllRefIdx(-1, ePartSize, int(uiSubPartIdx), uiDepth, int(uiPartIdx))
pcCU.SetInterDirSubParts(1, uiSubPartIdx, uiPartIdx, uiDepth)
}
uiSubPartIdx += uiPUOffset
}
return
}