/*! *********************************************************************** * \brief * Free Q matrix arrays *********************************************************************** */ void free_QMatrix () { free(qp_rem_matrix); free(qp_per_matrix); free_mem4Dint(LevelScale4x4Luma, 2, 6); free_mem5Dint(LevelScale4x4Chroma, 2, 2, 6); free_mem4Dint(LevelScale8x8Luma, 2, 6); free_mem4Dint(InvLevelScale4x4Luma, 2, 6); free_mem5Dint(InvLevelScale4x4Chroma, 2, 2, 6); free_mem4Dint(InvLevelScale8x8Luma, 2, 6); }
/*! *********************************************************************** * \brief * Free Q matrix arrays *********************************************************************** */ void free_QOffsets () { free_mem5Dint(LevelOffset4x4Comp); free_mem5Dint(LevelOffset8x8Comp); if (params->AdaptRoundingFixed) { free_mem3Dshort(OffsetList8x8); free_mem3Dshort(OffsetList4x4); } else { free_mem3Dshort(OffsetList8x8); free_mem3Dshort(OffsetList4x4); } free_mem2Dshort(OffsetList8x8input); free_mem2Dshort(OffsetList4x4input); }
/*! *********************************************************************** * \brief * Free Q matrix arrays *********************************************************************** */ void free_QOffsets () { int max_qp_per_luma = (3 + 6*(input->BitDepthLuma) - MIN_QP)/6 + 1; int max_qp_per_cr = (3 + 6*(input->BitDepthChroma) - MIN_QP)/6 + 1; int max_qp_per = imax(max_qp_per_luma,max_qp_per_cr); free_mem4Dint(LevelOffset4x4Luma, 2, max_qp_per); free_mem5Dint(LevelOffset4x4Chroma, 2, 2, max_qp_per); free_mem4Dint(LevelOffset8x8Luma, 2, max_qp_per); free_mem2Dshort(OffsetList8x8); free_mem2Dshort(OffsetList4x4); free_mem2Dshort(OffsetList8x8input); free_mem2Dshort(OffsetList4x4input); }