func (this *TDecTop) DeletePicBuffer() { for e := this.m_pcListPic.Front(); e != nil; e = e.Next() { pcPic := e.Value.(*TLibCommon.TComPic) pcPic.Destroy() this.m_pcListPic.Remove(e) } this.m_cSAO.Destroy() this.m_cLoopFilter.Destroy() // destroy ROM TLibCommon.DestroyROM() }
func (this *TEncTop) Destroy() { if this.m_pTraceFile != nil { this.m_pTraceFile.Close() } // destroy processing unit classes this.m_cGOPEncoder.destroy() this.m_cSliceEncoder.destroy() this.m_cCuEncoder.destroy() if this.m_cSPS.GetUseSAO() { fmt.Printf("not support SAO\n") /* this.m_cEncSAO.destroy(); this.m_cEncSAO.destroyEncBuffer(); */ } this.m_cLoopFilter.Destroy() this.m_cRateCtrl.destroy() // SBAC RD if this.GetEncCfg().m_bUseSBACRD { var iDepth int for iDepth = 0; iDepth < int(TLibCommon.G_uiMaxCUDepth+1); iDepth++ { for iCIIdx := 0; iCIIdx < TLibCommon.CI_NUM; iCIIdx++ { //delete this.m_pppcRDSbacCoder[iDepth][iCIIdx]; //delete this.m_pppcBinCoderCABAC[iDepth][iCIIdx]; } } for iDepth = 0; iDepth < int(TLibCommon.G_uiMaxCUDepth+1); iDepth++ { //delete [] this.m_pppcRDSbacCoder[iDepth]; //delete [] this.m_pppcBinCoderCABAC[iDepth]; } //delete [] this.m_pppcRDSbacCoder; //delete [] this.m_pppcBinCoderCABAC; for ui := 0; ui < this.m_iNumSubstreams; ui++ { for iDepth = 0; iDepth < int(TLibCommon.G_uiMaxCUDepth+1); iDepth++ { for iCIIdx := 0; iCIIdx < TLibCommon.CI_NUM; iCIIdx++ { //delete this.m_ppppcRDSbacCoders [ui][iDepth][iCIIdx]; //delete this.m_ppppcBinCodersCABAC[ui][iDepth][iCIIdx]; } } for iDepth = 0; iDepth < int(TLibCommon.G_uiMaxCUDepth+1); iDepth++ { //delete [] this.m_ppppcRDSbacCoders [ui][iDepth]; //delete [] this.m_ppppcBinCodersCABAC[ui][iDepth]; } //delete[] this.m_ppppcRDSbacCoders [ui]; //delete[] this.m_ppppcBinCodersCABAC[ui]; } //delete[] this.m_ppppcRDSbacCoders; //delete[] this.m_ppppcBinCodersCABAC; } //delete[] this.m_pcSbacCoders; //delete[] this.m_pcBinCoderCABACs; //delete[] this.m_pcRDGoOnSbacCoders; //delete[] this.m_pcRDGoOnBinCodersCABAC; //delete[] this.m_pcBitCounters; //delete[] this.m_pcRdCosts; // destroy ROM TLibCommon.DestroyROM() return }