Commit 130b1ea1 authored by vaclav's avatar vaclav
Browse files

put variable speed decoding under DEBUGGING

parent ba929d40
Loading
Loading
Loading
Loading
+21 −12
Original line number Diff line number Diff line
@@ -127,8 +127,6 @@ typedef struct
#ifdef DEBUG_FOA_AGC
    FILE *agcBitstream; /* temporary */
#endif

#endif
#ifdef DEBUG_JBM_CMD_OPTION
    bool noBadFrameDelay;
#endif
@@ -143,6 +141,7 @@ typedef struct
    uint16_t frontendFetchSizeMs;
#endif
#endif
#endif

} DecArguments;

@@ -155,10 +154,10 @@ static bool parseCmdlIVAS_dec( int16_t argc, char **argv, DecArguments *arg );
static void usage_dec( void );
static ivas_error decodeG192( DecArguments arg, BS_READER_HANDLE hBsReader, HeadRotFileReader *headRotReader, HeadRotFileReader *refRotReader, Vector3PairFileReader *referenceVectorReader, IVAS_DEC_HANDLE hIvasDec, int16_t *pcmBuf );
static ivas_error decodeVoIP( DecArguments arg, BS_READER_HANDLE hBsReader, IVAS_DEC_HANDLE hIvasDec );
#ifdef DEBUGGING
#ifdef VARIABLE_SPEED_DECODING
static ivas_error decodeVariableSpeed( DecArguments arg, BS_READER_HANDLE hBsReader, HeadRotFileReader *headRotReader, HeadRotFileReader *refRotReader, Vector3PairFileReader *referenceVectorReader, IVAS_DEC_HANDLE hIvasDec );
#endif
#ifdef DEBUGGING
static ivas_error printBitstreamInfoVoip( DecArguments arg, BS_READER_HANDLE hBsReader, IVAS_DEC_HANDLE hIvasDec );
static int16_t app_own_random( int16_t *seed );
static IVAS_DEC_FORCED_REND_MODE parseForcedRendModeDec( char *forcedRendModeChar );
@@ -412,6 +411,7 @@ int main(
        }
    }
#ifdef VARIABLE_SPEED_DECODING
#ifdef DEBUGGING
    else if ( arg.variableSpeedMode )
    {
        if ( ( error = IVAS_DEC_EnableVoIP( hIvasDec, IVAS_DEC_VOIP_MODE_VARIABLE_SPEED, arg.tsmScale, 60, arg.inputFormat ) ) != IVAS_ERR_OK )
@@ -422,6 +422,7 @@ int main(
    }
#endif
#endif
#endif

#ifdef DEBUGGING
    /*-----------------------------------------------------------------*
@@ -455,6 +456,7 @@ int main(
        IVAS_DEC_PrintConfigWithBitstream( hIvasDec, arg.quietModeEnabled, bit_stream, num_bits );

#ifdef VARIABLE_SPEED_DECODING
#ifdef DEBUGGING
        if ( arg.variableSpeedMode )
        {
            if ( arg.tsmScaleFileEnabled )
@@ -466,6 +468,7 @@ int main(
                fprintf( stdout, "Variable speed factor:  %i\n", arg.tsmScale );
            }
        }
#endif
#endif
    }

@@ -645,10 +648,12 @@ int main(
        error = decodeVoIP( arg, hBsReader, hIvasDec );
    }
#ifdef VARIABLE_SPEED_DECODING
#ifdef DEBUGGING
    else if ( arg.variableSpeedMode )
    {
        error = decodeVariableSpeed( arg, hBsReader, headRotReader, refRotReader, referenceVectorReader, hIvasDec );
    }
#endif
#endif
    else
    {
@@ -876,6 +881,8 @@ static bool parseCmdlIVAS_dec(
    arg->inputFormat = IVAS_DEC_INPUT_FORMAT_G192;
    arg->Opt_non_diegetic_pan = 0;
    arg->non_diegetic_pan_gain = 0.f;

#ifdef DEBUGGING
#ifdef VARIABLE_SPEED_DECODING
    arg->variableSpeedMode = false;
    arg->tsmScale = 100;
@@ -889,6 +896,7 @@ static bool parseCmdlIVAS_dec(
#endif
#ifdef DEBUG_JBM_CMD_OPTION
    arg->noBadFrameDelay = false;
#endif
#endif

    /*-----------------------------------------------------------------*
@@ -1015,7 +1023,6 @@ static bool parseCmdlIVAS_dec(
        }
#endif /* #ifdef DEBUG_MODE_INFO_TWEAK */
#endif /* #ifdef DEBUG_MODE_INFO */
#endif /* #ifdef DEBUGGING */
#ifdef DEBUG_JBM_CMD_OPTION
        else if ( strcmp( argv_to_upper, "-VOIP_NO_BAD_FRAME" ) == 0 )
        {
@@ -1072,6 +1079,7 @@ static bool parseCmdlIVAS_dec(
        }
#endif
#endif
#endif /* #ifdef DEBUGGING */

        else if ( strcmp( argv_to_upper, "-MIME" ) == 0 )
        {
@@ -1348,6 +1356,13 @@ static void usage_dec( void )
#ifdef DEBUG_JBM_CMD_OPTION
    fprintf( stdout, "-VOIP_no_bad_frame  : VoIP mode: do not put out bad frames in the beginning as silence \n" );
#endif
    fprintf( stdout, "                      The decoder may read rtpdump files containing TS26.445 Annex A.2.2\n" );
    fprintf( stdout, "                      EVS RTP Payload Format. The SDP parameter hf_only is required.\n" );
    fprintf( stdout, "                      Reading RFC4867 AMR/AMR-WB RTP payload format is not supported.\n" );
#ifdef SUPPORT_JBM_TRACEFILE
    fprintf( stdout, "-Tracefile TF       : VoIP mode: Generate trace file named TF\n" );
#endif
#ifdef DEBUGGING
#ifdef VARIABLE_SPEED_DECODING
    fprintf( stdout, "-VS fac             : Variable Speed mode: change speed of playout fac as integer in percent. fac<100 faster, fac>100 slower\n" );
#endif
@@ -1355,13 +1370,7 @@ static void usage_dec( void )
#ifdef DEBUG_JBM_CMD_OPTION
    fprintf( stdout, "-VOIP_framesize     : VoIP mode: acoustic frontend fetch frame size (must be multiples of 5!)\n" );
#endif

#endif
    fprintf( stdout, "                      The decoder may read rtpdump files containing TS26.445 Annex A.2.2\n" );
    fprintf( stdout, "                      EVS RTP Payload Format. The SDP parameter hf_only is required.\n" );
    fprintf( stdout, "                      Reading RFC4867 AMR/AMR-WB RTP payload format is not supported.\n" );
#ifdef SUPPORT_JBM_TRACEFILE
    fprintf( stdout, "-Tracefile TF       : VoIP mode: Generate trace file named TF\n" );
#endif
    fprintf( stdout, "-fec_cfg_file       : Optimal channel aware configuration computed by the JBM   \n" );
    fprintf( stdout, "                      as described in Section 6.3.1 of TS26.448. The output is \n" );
@@ -2474,6 +2483,7 @@ cleanup:
}


#ifdef DEBUGGING
#ifdef VARIABLE_SPEED_DECODING
/*---------------------------------------------------------------------*
 * decodeVariableSpeed()
@@ -3005,10 +3015,9 @@ cleanup:

    return error;
}

#endif

#ifdef DEBUGGING

/*---------------------------------------------------------------------*
 * parseForcedRendModeDec()
 *
+0 −2
Original line number Diff line number Diff line
@@ -245,8 +245,6 @@ Options:
                      The decoder may read rtpdump files containing TS26.445 Annex A.2.2
                      EVS RTP Payload Format. The SDP parameter hf_only is required.
                      Reading RFC4867 AMR/AMR-WB RTP payload format is not supported.
-VS fac             : Variable Speed mode: change speed of playout fac as integer in percent. 
					  fac<100 faster, fac>100 slower
-Tracefile TF       : VoIP mode: Generate trace file named TF
-fec_cfg_file       : Optimal channel aware configuration computed by the JBM
                      as described in Section 6.3.1 of TS26.448. The output is