本文整理汇总了Golang中gohm/TLibCommon.TComDataCU.GetTransformIdx1方法的典型用法代码示例。如果您正苦于以下问题:Golang TComDataCU.GetTransformIdx1方法的具体用法?Golang TComDataCU.GetTransformIdx1怎么用?Golang TComDataCU.GetTransformIdx1使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类gohm/TLibCommon.TComDataCU
的用法示例。
在下文中一共展示了TComDataCU.GetTransformIdx1方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1: xEncodeTransform
func (this *TEncEntropy) xEncodeTransform(pcCU *TLibCommon.TComDataCU, offsetLuma, offsetChroma, uiAbsPartIdx, uiDepth, width, height, uiTrIdx uint, bCodeDQP *bool) {
uiSubdiv := uint(TLibCommon.B2U(uint(pcCU.GetTransformIdx1(uiAbsPartIdx)+pcCU.GetDepth1(uiAbsPartIdx)) > uiDepth))
uiLog2TrafoSize := uint(TLibCommon.G_aucConvertToBit[pcCU.GetSlice().GetSPS().GetMaxCUWidth()]) + 2 - uiDepth
cbfY := pcCU.GetCbf3(uiAbsPartIdx, TLibCommon.TEXT_LUMA, uiTrIdx)
cbfU := pcCU.GetCbf3(uiAbsPartIdx, TLibCommon.TEXT_CHROMA_U, uiTrIdx)
cbfV := pcCU.GetCbf3(uiAbsPartIdx, TLibCommon.TEXT_CHROMA_V, uiTrIdx)
//fmt.Print("Enter xEncodeTransform\n");// with uiSubdiv=%d, uiAbsPartIdx=%d, uiDepth=%d\n", uiSubdiv, uiAbsPartIdx, uiDepth);
if uiTrIdx == 0 {
this.m_bakAbsPartIdxCU = uiAbsPartIdx
}
if uiLog2TrafoSize == 2 {
partNum := pcCU.GetPic().GetNumPartInCU() >> ((uiDepth - 1) << 1)
if (uiAbsPartIdx % partNum) == 0 {
this.m_uiBakAbsPartIdx = uiAbsPartIdx
this.m_uiBakChromaOffset = offsetChroma
} else if (uiAbsPartIdx % partNum) == (partNum - 1) {
cbfU = pcCU.GetCbf3(this.m_uiBakAbsPartIdx, TLibCommon.TEXT_CHROMA_U, uiTrIdx)
cbfV = pcCU.GetCbf3(this.m_uiBakAbsPartIdx, TLibCommon.TEXT_CHROMA_V, uiTrIdx)
}
}
if pcCU.GetPredictionMode1(uiAbsPartIdx) == TLibCommon.MODE_INTRA && pcCU.GetPartitionSize1(uiAbsPartIdx) == TLibCommon.SIZE_NxN && uiDepth == uint(pcCU.GetDepth1(uiAbsPartIdx)) {
//assert( uiSubdiv );
} else if pcCU.GetPredictionMode1(uiAbsPartIdx) == TLibCommon.MODE_INTER && (pcCU.GetPartitionSize1(uiAbsPartIdx) != TLibCommon.SIZE_2Nx2N) && uiDepth == uint(pcCU.GetDepth1(uiAbsPartIdx)) && (pcCU.GetSlice().GetSPS().GetQuadtreeTUMaxDepthInter() == 1) {
if uiLog2TrafoSize > pcCU.GetQuadtreeTULog2MinSizeInCU(uiAbsPartIdx) {
//assert( uiSubdiv );
} else {
//assert(!uiSubdiv );
}
} else if uiLog2TrafoSize > pcCU.GetSlice().GetSPS().GetQuadtreeTULog2MaxSize() {
//assert( uiSubdiv );
} else if uiLog2TrafoSize == pcCU.GetSlice().GetSPS().GetQuadtreeTULog2MinSize() {
//assert( !uiSubdiv );
} else if uiLog2TrafoSize == pcCU.GetQuadtreeTULog2MinSizeInCU(uiAbsPartIdx) {
//assert( !uiSubdiv );
} else {
//assert( uiLog2TrafoSize > pcCU.GetQuadtreeTULog2MinSizeInCU(uiAbsPartIdx) );
this.m_pcEntropyCoderIf.codeTransformSubdivFlag(uiSubdiv, 5-uiLog2TrafoSize)
}
uiTrDepthCurr := uiDepth - uint(pcCU.GetDepth1(uiAbsPartIdx))
bFirstCbfOfCU := uiTrDepthCurr == 0
if bFirstCbfOfCU || uiLog2TrafoSize > 2 {
if bFirstCbfOfCU || pcCU.GetCbf3(uiAbsPartIdx, TLibCommon.TEXT_CHROMA_U, uiTrDepthCurr-1) != 0 {
this.m_pcEntropyCoderIf.codeQtCbf(pcCU, uiAbsPartIdx, TLibCommon.TEXT_CHROMA_U, uiTrDepthCurr)
}
if bFirstCbfOfCU || pcCU.GetCbf3(uiAbsPartIdx, TLibCommon.TEXT_CHROMA_V, uiTrDepthCurr-1) != 0 {
this.m_pcEntropyCoderIf.codeQtCbf(pcCU, uiAbsPartIdx, TLibCommon.TEXT_CHROMA_V, uiTrDepthCurr)
}
} else if uiLog2TrafoSize == 2 {
//assert( pcCU.GetCbf( uiAbsPartIdx, TEXT_CHROMA_U, uiTrDepthCurr ) == pcCU.GetCbf( uiAbsPartIdx, TEXT_CHROMA_U, uiTrDepthCurr - 1 ) );
//assert( pcCU.GetCbf( uiAbsPartIdx, TEXT_CHROMA_V, uiTrDepthCurr ) == pcCU.GetCbf( uiAbsPartIdx, TEXT_CHROMA_V, uiTrDepthCurr - 1 ) );
}
if uiSubdiv != 0 {
var size uint
width >>= 1
height >>= 1
size = width * height
uiTrIdx++
uiDepth++
partNum := pcCU.GetPic().GetNumPartInCU() >> (uiDepth << 1)
this.xEncodeTransform(pcCU, offsetLuma, offsetChroma, uiAbsPartIdx, uiDepth, width, height, uiTrIdx, bCodeDQP)
uiAbsPartIdx += partNum
offsetLuma += size
offsetChroma += (size >> 2)
this.xEncodeTransform(pcCU, offsetLuma, offsetChroma, uiAbsPartIdx, uiDepth, width, height, uiTrIdx, bCodeDQP)
uiAbsPartIdx += partNum
offsetLuma += size
offsetChroma += (size >> 2)
this.xEncodeTransform(pcCU, offsetLuma, offsetChroma, uiAbsPartIdx, uiDepth, width, height, uiTrIdx, bCodeDQP)
uiAbsPartIdx += partNum
offsetLuma += size
offsetChroma += (size >> 2)
this.xEncodeTransform(pcCU, offsetLuma, offsetChroma, uiAbsPartIdx, uiDepth, width, height, uiTrIdx, bCodeDQP)
} else {
/*DTRACE_CABAC_VL( g_nSymbolCounter++ );*/
this.m_pcEntropyCoderIf.DTRACE_CABAC_T("\tTrIdx: abspart=")
this.m_pcEntropyCoderIf.DTRACE_CABAC_V(uiAbsPartIdx)
this.m_pcEntropyCoderIf.DTRACE_CABAC_T("\tdepth=")
this.m_pcEntropyCoderIf.DTRACE_CABAC_V(uiDepth)
this.m_pcEntropyCoderIf.DTRACE_CABAC_T("\ttrdepth=")
this.m_pcEntropyCoderIf.DTRACE_CABAC_V(uint(pcCU.GetTransformIdx1(uiAbsPartIdx)))
this.m_pcEntropyCoderIf.DTRACE_CABAC_T("\n")
if pcCU.GetPredictionMode1(uiAbsPartIdx) != TLibCommon.MODE_INTRA && uiDepth == uint(pcCU.GetDepth1(uiAbsPartIdx)) && pcCU.GetCbf3(uiAbsPartIdx, TLibCommon.TEXT_CHROMA_U, 0) == 0 && pcCU.GetCbf3(uiAbsPartIdx, TLibCommon.TEXT_CHROMA_V, 0) == 0 {
//assert( pcCU.GetCbf( uiAbsPartIdx, TLibCommon.TEXT_LUMA, 0 ) );
} else {
this.m_pcEntropyCoderIf.codeQtCbf(pcCU, uiAbsPartIdx, TLibCommon.TEXT_LUMA, uint(pcCU.GetTransformIdx1(uiAbsPartIdx)))
}
if cbfY != 0 || cbfU != 0 || cbfV != 0 {
// dQP: only for LCU once
if pcCU.GetSlice().GetPPS().GetUseDQP() {
//.........这里部分代码省略.........