Commit 48033366 authored by Marek Szczerba's avatar Marek Szczerba
Browse files

Merge branch '196-refactor-renderer-output-configuration' into...

Merge branch '196-refactor-renderer-output-configuration' into philips/contribution-38-control-metadata-reverb
parents b8b402c3 1101d393
Loading
Loading
Loading
Loading
Loading
+4 −6
Original line number Diff line number Diff line
@@ -465,14 +465,17 @@ int main(

    if ( arg.voipMode )
    {
#ifdef VARIABLE_SPEED_DECODING
        if ( ( error = IVAS_DEC_EnableVoIP( hIvasDec, IVAS_DEC_VOIP_MODE_VOIP, 100, 60, arg.inputFormat ) ) != IVAS_ERR_OK )
#else
        if ( ( error = IVAS_DEC_EnableVoIP( hIvasDec, 60, arg.inputFormat ) ) != IVAS_ERR_OK )
#endif
        {
            fprintf( stderr, "\nCould not enable VOIP: %s\n\n", IVAS_DEC_GetErrorMessage( error ) );
            goto cleanup;
        }
    }
#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 )
@@ -482,7 +485,6 @@ int main(
        }
    }
#endif
#endif

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

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

@@ -752,7 +752,6 @@ int main(
        error = decodeVoIP( arg, hBsReader, hIvasDec );
    }
#ifdef VARIABLE_SPEED_DECODING
#ifdef DEBUGGING
    else if ( arg.variableSpeedMode )
    {
        error = decodeVariableSpeed( arg, hBsReader, headRotReader,
@@ -761,7 +760,6 @@ int main(
#endif
                                     refRotReader, referenceVectorReader, hIvasDec );
    }
#endif
#endif
    else
    {
+7 −1
Original line number Diff line number Diff line
@@ -127,7 +127,11 @@
/*#define DEBUG_BINAURAL_FILTER_DESIGN*/        /* debugging of Crend binaural filter design */
//#define DEBUG_AGC_ENCODER_CMD_OPTION            /* Ability to force enable or disable AGC behaviour in DIRAC/SPAR via command line option */
#define DEBUG_JBM_CMD_OPTION                    /* ability for telling the decoder the frontend fetch size and to not delay compensate for bad frames at the beginning */

#define VARIABLE_SPEED_DECODING                 /* variable speed decoding employing the JBM functioniality; move to DEBUGGING after build for disabled is fixed */

#endif

/* #################### End DEBUGGING switches ############################ */

/* ################# Start DEVELOPMENT switches ######################## */
@@ -148,7 +152,6 @@
#define USE_HRIR_128_METH5_IRC_53_Q10_SYML_ITRP1_48000  /* Dolby (Orange, FhG) : Contribution 36 - SBA HRIR update */
#define UPDATE_SBA_FILTER                               /* Dolby (Orange, FhG) : Contribution 36 - SBA HRIR update */

#define VARIABLE_SPEED_DECODING                         /* variable speed decoding employing the JBM functioniality; move to DEBUGGING after build for disabled is fixed */
/*#define FIX_XXX_JBM_FIFO_BUFFER  */                   /* FhG: prevent wraparound of a length identifier in cause of large frames and many channels*/

#define FIX_196_REFACTOR_RENDERER_OUTPUT_CONFIG         /* Phi: issue 196 - refactoring renderer output configuration */
@@ -179,6 +182,9 @@

#define MASA_PREREND                                    /* Nokia: Contribution 42: Support for IVAS_rend to merge MASA + other format to MASA */

#define FIX_528_ISM_MD_FILE_TOO_SHORT                   /* VA: issue 528: ISM Metadata file too short  */


/* ################## End DEVELOPMENT switches ######################### */
/* clang-format on */

+7 −0
Original line number Diff line number Diff line
@@ -113,6 +113,13 @@ ivas_error IsmFileReader_readNextFrame(

    file = self->file;

#ifdef FIX_528_ISM_MD_FILE_TOO_SHORT
    while ( feof( self->file ) )
    {
        rewind( self->file );
    }
#endif

    if ( fgets( char_buff, META_LINE_LENGTH, file ) == NULL )
    {
        return IVAS_ERR_FAILED_FILE_READ;
+1 −13
Original line number Diff line number Diff line
@@ -397,24 +397,12 @@ def test_ism_binaural_headrotation_refvec_rotating(test_info, in_fmt, out_fmt):
""" MASA """


@pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS[2:])
@pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS)
@pytest.mark.parametrize("in_fmt", INPUT_FORMATS_MASA)
def test_masa(test_info, in_fmt, out_fmt):
    run_renderer(in_fmt, out_fmt, in_meta_files=FORMAT_TO_METADATA_FILES[in_fmt])


# MASA inputs not supported yet
# @pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS)
# @pytest.mark.parametrize("in_fmt", METADATA_SCENES_TO_TEST_NO_BE)
# def test_metadata_masa(test_info, in_fmt, out_fmt):
#     # TODO: unify with test_metadata once Python supports MASA
#     cut, cut_fs = run_renderer(
#         "META",
#         out_fmt,
#         metadata_input=TEST_VECTOR_DIR.joinpath(f"{in_fmt}.txt"),
#     )


""" Custom loudspeaker layouts """


+8 −1
Original line number Diff line number Diff line
@@ -137,7 +137,14 @@ def test_ism_binaural_headrotation(test_info, in_fmt, out_fmt, trj_file):


""" MASA """
# TODO: MASA inputs not supported yet

@pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS)
@pytest.mark.parametrize("in_fmt", INPUT_FORMATS_MASA)
def test_masa(test_info, in_fmt, out_fmt):
    compare_renderer_vs_mergetarget(
        test_info, in_fmt, out_fmt, in_meta_files=FORMAT_TO_METADATA_FILES[in_fmt]
    )


""" Custom loudspeaker layouts """

Loading