Void TEncEntropy::encodeAlfParam(ALFParam* pAlfParam) { m_pcEntropyCoderIf->codeAlfFlag(pAlfParam->alf_flag); if (!pAlfParam->alf_flag) { return; } Int pos; codeAux(pAlfParam); codeFilt(pAlfParam); // filter parameters for chroma m_pcEntropyCoderIf->codeAlfUvlc(pAlfParam->chroma_idc); if(pAlfParam->chroma_idc) { m_pcEntropyCoderIf->codeAlfUvlc((pAlfParam->tap_chroma-5)/2); // filter coefficients for chroma for(pos=0; pos<pAlfParam->num_coeff_chroma; pos++) { m_pcEntropyCoderIf->codeAlfSvlc(pAlfParam->coeff_chroma[pos]); } } #if !E045_SLICE_COMMON_INFO_SHARING // region control parameters for luma m_pcEntropyCoderIf->codeAlfFlag(pAlfParam->cu_control_flag); if (pAlfParam->cu_control_flag) { assert( (pAlfParam->cu_control_flag && m_pcEntropyCoderIf->getAlfCtrl()) || (!pAlfParam->cu_control_flag && !m_pcEntropyCoderIf->getAlfCtrl())); m_pcEntropyCoderIf->codeAlfCtrlDepth(); } #endif }
Void TEncEntropy::codeAuxCountBit(ALFParam* pAlfParam, Int64* ruiRate) { resetEntropy(); resetBits(); codeAux(pAlfParam); *ruiRate = getNumberOfWrittenBits(); resetEntropy(); resetBits(); }