1 /* specGapFilling.h - header file for class with spectral gap filling coding methods 2 * written by C. R. Helmrich, last modified in 2020 - see License.htm for legal notices 3 * 4 * The copyright in this software is being made available under the exhale Copyright License 5 * and comes with ABSOLUTELY NO WARRANTY. This software may be subject to other third- 6 * party rights, including patent rights. No such rights are granted under this License. 7 * 8 * Copyright (c) 2018-2021 Christian R. Helmrich, project ecodis. All rights reserved. 9 */ 10 11 #ifndef _SPEC_GAP_FILLING_H_ 12 #define _SPEC_GAP_FILLING_H_ 13 14 #include "exhaleLibPch.h" 15 #include "quantization.h" 16 17 // constants, experimental macro 18 #define SGF_LIMIT 2*INDEX_OFFSET 19 #define SGF_OPT_SHORT_WIN_CALC 1 20 #define SGF_SF_PEAK_SMOOTHING 1 21 22 // MDCT-domain gap filling class 23 class SpecGapFiller 24 { 25 private: 26 27 // member variables 28 uint16_t m_1stGapFillSfb; 29 int16_t m_1stNonZeroSfb[NUM_WINDOW_GROUPS]; 30 31 public: 32 33 // constructor 34 SpecGapFiller (); 35 // destructor ~SpecGapFiller()36 ~SpecGapFiller () { } 37 // public functions getFirstGapFillSfb()38 uint16_t getFirstGapFillSfb () const { return m_1stGapFillSfb; } 39 uint8_t getSpecGapFillParams (const SfbQuantizer& sfbQuantizer, const uint8_t* const quantMagn, 40 const uint8_t numSwbShort, SfbGroupData& grpData /*modified*/, 41 const unsigned nSamplesInFrame, const unsigned samplingRate, 42 const unsigned sampRateBitSave, const uint8_t specFlat); 43 }; // SpecGapFiller 44 45 #endif // _SPEC_GAP_FILLING_H_ 46