Commit 5ec9064a authored by brownstef's avatar brownstef
Browse files

Merge branch 'main' into 'dlb/cont-47-low-bitrate-SBA-update2'

# Conflicts:
#   lib_dec/ivas_sba_dec.c
parents 76567704 e2686739
Loading
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -321,6 +321,7 @@ codec-smoke-test:
    - *print-common-info
    - bash ci/smoke_test.sh
    ### analyze for failures
    - cat out/logs/stv1MASA2TC48c_MASA_2TC_1DIR_b96_fb_cbr.enc.txt
    - if cat smoke_test_output.txt | grep -c "failed"; then echo "Smoke test without PLC failed"; exit 1; fi
    - if cat smoke_test_output_plc.txt | grep -c "failed"; then echo "Smoke test with PLC failed"; exit 1; fi
    - if cat smoke_test_output_jbm_noEXT.txt | grep -c "failed"; then echo "Smoke test JBM part failed"; exit 1; fi
+1 −23
Original line number Diff line number Diff line
@@ -1353,24 +1353,15 @@ static ivas_error initOnFirstGoodFrame(
        /* If outputting MASA, open output file and write metadata for initial bad frames */
        else if ( *pBsFormat == IVAS_DEC_BS_MASA )
        {
#ifdef FIX_350_MASA_DELAY_COMP
            if ( ( error = MasaFileWriter_open( arg.outputWavFilename, arg.delayCompensationEnabled, ppMasaWriter ) ) != IVAS_ERR_OK )
#else
            if ( ( error = MasaFileWriter_open( arg.outputWavFilename, ppMasaWriter ) ) != IVAS_ERR_OK )
#endif
            {
                fprintf( stderr, "\nError: Error opening MASA decoded metadata file %s\n", MasaFileWriter_getFilePath( *ppMasaWriter ) );
                return error;
            }

            /* Duplicate good first frame metadata to fill the beginning of stream. */
#ifdef FIX_350_MASA_DELAY_COMP
            MASA_DECODER_EXT_OUT_META_HANDLE hMasaExtOutMeta = NULL;
            if ( ( error = IVAS_DEC_GetMasaMetadata( hIvasDec, &hMasaExtOutMeta ) ) != IVAS_ERR_OK )
#else
            IVAS_MASA_QMETADATA_HANDLE qMetadata = NULL;
            if ( ( error = IVAS_DEC_GetMasaMetadata( hIvasDec, &qMetadata ) ) != IVAS_ERR_OK )
#endif
            {
                fprintf( stderr, "\nError in IVAS_DEC_GetMasaMetadata: %s\n", IVAS_DEC_GetErrorMessage( error ) );
                return error;
@@ -1378,11 +1369,7 @@ static ivas_error initOnFirstGoodFrame(

            for ( int16_t j = 0; j < numInitialBadFrames; ++j )
            {
#ifdef FIX_350_MASA_DELAY_COMP
                if ( ( error = MasaFileWriter_writeFrame( *ppMasaWriter, hMasaExtOutMeta ) ) != IVAS_ERR_OK )
#else
                if ( ( error = MasaFileWriter_writeFrame( *ppMasaWriter, qMetadata ) ) != IVAS_ERR_OK )
#endif
                {
                    fprintf( stderr, "\nError writing MASA metadata to file: %s\n", MasaFileWriter_getFilePath( *ppMasaWriter ) );
                    return error;
@@ -1429,7 +1416,7 @@ static ivas_error decodeG192(
    ivas_error error = IVAS_ERR_UNKNOWN;
    uint16_t numObj = 0;
    IVAS_DEC_BS_FORMAT bsFormat = IVAS_DEC_BS_UNKOWN;
    IVAS_POSITION Pos[IVAS_MAX_PARAM_SPATIAL_SUBFRAMES];
    IVAS_VECTOR3 Pos[IVAS_MAX_PARAM_SPATIAL_SUBFRAMES];

    IsmFileWriter *ismWriters[IVAS_MAX_NUM_OBJECTS];
    for ( i = 0; i < IVAS_MAX_NUM_OBJECTS; ++i )
@@ -1642,23 +1629,14 @@ static ivas_error decodeG192(
            }
            else if ( bsFormat == IVAS_DEC_BS_MASA )
            {
#ifdef FIX_350_MASA_DELAY_COMP
                MASA_DECODER_EXT_OUT_META_HANDLE hMasaExtOutMeta;
                if ( ( error = IVAS_DEC_GetMasaMetadata( hIvasDec, &hMasaExtOutMeta ) ) != IVAS_ERR_OK )
#else
                IVAS_MASA_QMETADATA_HANDLE qMetadata;
                if ( ( error = IVAS_DEC_GetMasaMetadata( hIvasDec, &qMetadata ) ) != IVAS_ERR_OK )
#endif
                {
                    fprintf( stderr, "\nError in IVAS_DEC_GetMasaMetadata: %s\n", IVAS_DEC_GetErrorMessage( error ) );
                    goto cleanup;
                }

#ifdef FIX_350_MASA_DELAY_COMP
                if ( ( error = MasaFileWriter_writeFrame( masaWriter, hMasaExtOutMeta ) ) != IVAS_ERR_OK )
#else
                if ( ( error = MasaFileWriter_writeFrame( masaWriter, qMetadata ) ) != IVAS_ERR_OK )
#endif
                {
                    fprintf( stderr, "\nError writing MASA metadata to file: %s\n", MasaFileWriter_getFilePath( masaWriter ) );
                    goto cleanup;
+1 −12
Original line number Diff line number Diff line
@@ -536,7 +536,7 @@ int main(
    int32_t delayTimeScale = 0;
    int16_t i, numChannels;
    ivas_error error = IVAS_ERR_OK;
    IVAS_POSITION Pos[RENDERER_HEAD_POSITIONS_PER_FRAME];
    IVAS_VECTOR3 Pos[RENDERER_HEAD_POSITIONS_PER_FRAME];

#ifdef WMOPS
    reset_wmops();
@@ -645,9 +645,6 @@ int main(
                fprintf( stderr, "Sampling rate must be specified on command line when using raw PCM input\n" );
                exit( -1 );
            }
#ifndef FIX_389_EXT_REND_PCM_SR
            args.sampleRate = inFileSampleRate;
#endif
            break;
        default:
            fprintf( stderr, "Error: %s\n", ivas_error_to_string( error ) );
@@ -675,11 +672,7 @@ int main(
    }

    /* === Configure === */
#ifdef FIX_392_LATE_REVERB
    if ( ( error = IVAS_REND_InitConfig( hIvasRend, args.outConfig.audioConfig ) ) != IVAS_ERR_OK )
#else
    if ( ( error = IVAS_REND_InitConfig( hIvasRend, ( args.outConfig.audioConfig == IVAS_REND_AUDIO_CONFIG_BINAURAL_ROOM ) || ( args.outConfig.audioConfig == IVAS_REND_AUDIO_CONFIG_BINAURAL ) ) ) != IVAS_ERR_OK )
#endif
    {
        fprintf( stderr, "Error in Renderer Config Init\n" );
        exit( -1 );
@@ -971,12 +964,8 @@ int main(
        }
        else
        {
#ifdef FIX_379_EXT_METADATA
            error = IVAS_REND_SetHeadRotation( hIvasRend, NULL, NULL );
            if ( ( error != IVAS_ERR_OK ) && ( error != IVAS_ERR_INVALID_OUTPUT_FORMAT ) ) // VE: TBC
#else
            if ( ( ( error = IVAS_REND_SetHeadRotation( hIvasRend, NULL, NULL ) ) != IVAS_ERR_OK ) && ( IVAS_REND_SetHeadRotation( hIvasRend, NULL, NULL ) != IVAS_ERR_INVALID_OUTPUT_FORMAT ) ) // VE: TBC
#endif
            {
                fprintf( stderr, "Error setting Head Rotation: %s\n", ivas_error_to_string( error ) );
                exit( -1 );
+18 −3
Original line number Diff line number Diff line
@@ -63,8 +63,7 @@ def main(args):

    assert all([t in SUPPORTED_TESTS for t in tests])

    modes = get_modes(in_format)
    returncode = run_check(modes, out_formats, tests, run_fec=run_fec)
    returncode = run_check(in_format, out_formats, tests, run_fec=run_fec)

    collect_for_sanitizer_test(CONSOLE_OUT_FILE)

@@ -92,7 +91,22 @@ def get_modes(in_format: str) -> list:
    return mode_list


def run_check(modes: list, out_formats: list, tests: list, run_fec: bool = True):
def get_md_file_command(in_format: str) -> list:

    cmd = list()
    if in_format.startswith("ISM"):
        cmd.append("--metadata_files")
        md_filename = "/usr/local/ltv/ltvISM{}.csv"
        n = int(in_format[-1])
        cmd.extend([md_filename.format(i) for i in range(1, n + 1)])

    return cmd


def run_check(in_format: str, out_formats: list, tests: list, run_fec: bool = True):

    modes = get_modes(in_format)
    md_file_command = get_md_file_command(in_format)

    ### always run encoder and decoder with no frameloss
    cmd_no_fec = [
@@ -107,6 +121,7 @@ def run_check(modes: list, out_formats: list, tests: list, run_fec: bool = True)
        *modes,
        "--oc",
        *out_formats,
        *md_file_command,
    ]

    print(
+6 −1
Original line number Diff line number Diff line
@@ -55,6 +55,7 @@ fi

cfg=./scripts/config/ci_linux.json
dly_profile=./scripts/dly_error_profiles/dly_error_profile_10.dat
ism_md_cmd="--metadata_files /usr/local/testv/stvISM1.csv /usr/local/testv/stvISM2.csv /usr/local/testv/stvISM3.csv /usr/local/testv/stvISM4.csv"

if [ $BUILD -eq 1 ];then
	# Enable memory macros to find unbalanced memory allocations/deallocations
@@ -74,7 +75,11 @@ if [ $BUILD -eq 1 ];then
fi

# run all modes vanilla-fashion
./scripts/runIvasCodec.py -p $cfg -U 1 $WORKERS | tee smoke_test_output.txt
# treat ISM modes separately because passing the metadata files to MASA modes causes crashes
ism_modes=$(./scripts/runIvasCodec.py -l | grep ISM)
non_ism_modes=$(./scripts/runIvasCodec.py -l | grep -v ISM)
./scripts/runIvasCodec.py -m $non_ism_modes -p $cfg -U 1 $WORKERS | tee smoke_test_output.txt
./scripts/runIvasCodec.py -m $ism_modes -p $cfg -U 1 $WORKERS $ism_md_cmd | tee smoke_test_output.txt
# run the decoding again, but with 15% frame loss
./scripts/runIvasCodec.py -p $cfg -U 1 $WORKERS -D="-fec 15" --decoder_only | tee smoke_test_output_plc.txt

Loading