/// obtain required buffers func (this *TAppEncTop) xGetBuffer() *TLibCommon.TComPicYuv { //assert( this.m_iGOPSize > 0 ); var rpcPicYuvRec *TLibCommon.TComPicYuv // org. buffer if this.m_cListPicYuvRec.Len() == this.m_iGOPSize { e := this.m_cListPicYuvRec.Front() rpcPicYuvRec = e.Value.(*TLibCommon.TComPicYuv) this.m_cListPicYuvRec.Remove(e) } else { rpcPicYuvRec = TLibCommon.NewTComPicYuv() rpcPicYuvRec.Create(this.m_iSourceWidth, this.m_iSourceHeight, this.m_uiMaxCUWidth, this.m_uiMaxCUHeight, this.m_uiMaxCUDepth) } this.m_cListPicYuvRec.PushBack(rpcPicYuvRec) return rpcPicYuvRec }