本文整理汇总了Golang中gohm/TLibCommon.TComDataCU.GetMergeFlag1方法的典型用法代码示例。如果您正苦于以下问题:Golang TComDataCU.GetMergeFlag1方法的具体用法?Golang TComDataCU.GetMergeFlag1怎么用?Golang TComDataCU.GetMergeFlag1使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类gohm/TLibCommon.TComDataCU
的用法示例。
在下文中一共展示了TComDataCU.GetMergeFlag1方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1: DecodeCoeff
func (this *TDecEntropy) DecodeCoeff(pcCU *TLibCommon.TComDataCU, uiAbsPartIdx, uiDepth, uiWidth, uiHeight uint, bCodeDQP *bool) {
uiMinCoeffSize := pcCU.GetPic().GetMinCUWidth() * pcCU.GetPic().GetMinCUHeight()
uiLumaOffset := uiMinCoeffSize * uiAbsPartIdx
uiChromaOffset := uiLumaOffset >> 2
if !pcCU.IsIntra(uiAbsPartIdx) {
uiQtRootCbf := uint(1)
if !(pcCU.GetPartitionSize1(uiAbsPartIdx) == TLibCommon.SIZE_2Nx2N && pcCU.GetMergeFlag1(uiAbsPartIdx)) {
this.m_pcEntropyDecoderIf.ParseQtRootCbf(uiAbsPartIdx, &uiQtRootCbf)
}
if uiQtRootCbf == 0 {
pcCU.SetCbfSubParts(0, 0, 0, uiAbsPartIdx, uiDepth)
pcCU.SetTrIdxSubParts(0, uiAbsPartIdx, uiDepth)
return
}
}
this.xDecodeTransform(pcCU, uiLumaOffset, uiChromaOffset, uiAbsPartIdx, uiDepth, uiWidth, uiHeight, 0, bCodeDQP)
}
示例2: encodeCoeff
func (this *TEncEntropy) encodeCoeff(pcCU *TLibCommon.TComDataCU, uiAbsPartIdx, uiDepth, uiWidth, uiHeight uint, bCodeDQP *bool) {
uiMinCoeffSize := pcCU.GetPic().GetMinCUWidth() * pcCU.GetPic().GetMinCUHeight()
uiLumaOffset := uiMinCoeffSize * uiAbsPartIdx
uiChromaOffset := uiLumaOffset >> 2
if pcCU.IsIntra(uiAbsPartIdx) {
/*DTRACE_CABAC_VL( g_nSymbolCounter++ )*/
this.m_pcEntropyCoderIf.DTRACE_CABAC_T("\tdecodeTransformIdx()\tCUDepth=")
this.m_pcEntropyCoderIf.DTRACE_CABAC_V(uiDepth)
this.m_pcEntropyCoderIf.DTRACE_CABAC_T("\n")
} else {
if !(pcCU.GetMergeFlag1(uiAbsPartIdx) && pcCU.GetPartitionSize1(uiAbsPartIdx) == TLibCommon.SIZE_2Nx2N) {
this.m_pcEntropyCoderIf.codeQtRootCbf(pcCU, uiAbsPartIdx)
}
if !pcCU.GetQtRootCbf(uiAbsPartIdx) {
return
}
}
this.xEncodeTransform(pcCU, uiLumaOffset, uiChromaOffset, uiAbsPartIdx, uiDepth, uiWidth, uiHeight, 0, bCodeDQP)
}
示例3: encodePUWise
func (this *TEncEntropy) encodePUWise(pcCU *TLibCommon.TComDataCU, uiAbsPartIdx uint, bRD bool) { //= false );
if bRD {
uiAbsPartIdx = 0
}
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
}
uiDepth := uint(pcCU.GetDepth1(uiAbsPartIdx))
//fmt.Printf("ePartSize=%d\n",ePartSize);
uiPUOffset := (TLibCommon.G_auiPUOffset[uint(ePartSize)] << ((pcCU.GetSlice().GetSPS().GetMaxCUDepth() - uiDepth) << 1)) >> 4
uiSubPartIdx := uiAbsPartIdx
for uiPartIdx := uint(0); uiPartIdx < uiNumPU; uiPartIdx++ {
this.encodeMergeFlag(pcCU, uiSubPartIdx)
if pcCU.GetMergeFlag1(uiSubPartIdx) {
this.encodeMergeIndex(pcCU, uiSubPartIdx, false)
} else {
this.encodeInterDirPU(pcCU, uiSubPartIdx)
for uiRefListIdx := 0; uiRefListIdx < 2; uiRefListIdx++ {
if pcCU.GetSlice().GetNumRefIdx(TLibCommon.RefPicList(uiRefListIdx)) > 0 {
this.encodeRefFrmIdxPU(pcCU, uiSubPartIdx, TLibCommon.RefPicList(uiRefListIdx))
this.encodeMvdPU(pcCU, uiSubPartIdx, TLibCommon.RefPicList(uiRefListIdx))
this.encodeMVPIdxPU(pcCU, uiSubPartIdx, TLibCommon.RefPicList(uiRefListIdx))
}
}
}
uiSubPartIdx += uiPUOffset
}
return
}
示例4: 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
}