Commit 9b8ec330 authored by Jan Kiene's avatar Jan Kiene
Browse files

add writeout of spectrum b4 stereo decision

parent 85caa307
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -57,6 +57,7 @@
/*#define MEM_COUNT_DETAILS*/                   /* Output detailed memory analysis for the worst-case frame (writes to the file "mem_analysis.csv") */

#ifdef DEBUGGING
#define DEBUG_WRITE_OUT_SPECTRUM_B4_STEREO_DECISION
#define DISABLE_DFT_STEREO_ASSERT               /* This assert is hit for -10 dB tests/codec_be_on_mr_nonselection/test_param_file.py::test_param_file_tests[stv-stereo at 32 kbps, 48kHz in, 48kHz out, DTX on, random FER at 5%, bandwidth switching] */

#define DEBUG_MODE_INFO                         /* output most important parameters to the subdirectory "res/" */
+4 −1
Original line number Diff line number Diff line
@@ -410,7 +410,10 @@ void stereo_coder_tcx(
            set_s( &ms_mask[k][0], 0, MAX_SFB );

            nAvailBitsMS[k] = ( ( mct_on ? 2 * sts[0]->bits_frame_channel : sts[0]->bits_frame_nominal ) - sts[0]->side_bits_frame_channel - sts[1]->side_bits_frame_channel - ( nSubframes == 2 ? OFFSET_BITS_TCX10 : OFFSET_BITS_TCX20 ) ) / nSubframes;

#ifdef DEBUG_WRITE_OUT_SPECTRUM_B4_STEREO_DECISION
            dbgwrite(&sts[0]->hTcxEnc->spectrum[k][0], sizeof(float), L_FRAME48k, 1, "left_spec_log");
            dbgwrite(&sts[1]->hTcxEnc->spectrum[k][0], sizeof(float), L_FRAME48k, 1, "right_spec_log");
#endif
            MsStereoDecision( sfbConf, sts[0]->hTcxEnc->spectrum[k], sts[1]->hTcxEnc->spectrum[k], inv_spectrum[0][k], inv_spectrum[1][k], &hStereoMdct->mdct_stereo_mode[k], &ms_mask[k][0], nAvailBitsMS[k] );

            if ( sts[0]->igf )