Exemple #1
0
func (this *TDecTop) xDecodePPS() {
	pps := TLibCommon.NewTComPPS()
	this.m_cEntropyDecoder.DecodePPS(pps)
	this.m_parameterSetManagerDecoder.SetPPS(pps)

	if pps.GetDependentSliceSegmentsEnabledFlag() {
		var NumCtx int
		if pps.GetEntropyCodingSyncEnabledFlag() {
			NumCtx = 2
		} else {
			NumCtx = 1
		}
		this.m_cSliceDecoder.InitCtxMem(uint(NumCtx))
		for st := 0; st < NumCtx; st++ {
			ctx := NewTDecSbac()
			ctx.Init(this.m_cBinCabac)
			this.m_cSliceDecoder.SetCtxMem(ctx, st)
		}
	}
}
Exemple #2
0
func NewTEncTop() *TEncTop {
	return &TEncTop{m_iPOCLast: -1,
		m_cListPic:             list.New(),
		m_cSearch:              NewTEncSearch(),
		m_cTrQuant:             TLibCommon.NewTComTrQuant(),
		m_cLoopFilter:          TLibCommon.NewTComLoopFilter(),
		m_cEncSAO:              NewTEncSampleAdaptiveOffset(),
		m_cEntropyCoder:        NewTEncEntropy(),
		m_cCavlcCoder:          NewTEncCavlc(),
		m_cSbacCoder:           NewTEncSbac(),
		m_cBinCoderCABAC:       NewTEncBinCABAC(),
		m_cGOPEncoder:          NewTEncGOP(),
		m_cSliceEncoder:        NewTEncSlice(),
		m_cCuEncoder:           NewTEncCu(),
		m_cSPS:                 TLibCommon.NewTComSPS(),
		m_cPPS:                 TLibCommon.NewTComPPS(),
		m_cRDGoOnBinCoderCABAC: NewTEncBinCABACCounter(),
		m_cBitCounter:          TLibCommon.NewTComBitCounter(),
		m_cRdCost:              NewTEncRdCost(),
		m_cRDGoOnSbacCoder:     NewTEncSbac(),
		m_scalingList:          TLibCommon.NewTComScalingList(),
		m_cRateCtrl:            NewTEncRateCtrl(),
	}
}