Commit dac4ceb6 authored by Jan Kiene's avatar Jan Kiene
Browse files

Merge branch 'main' into ci/split-output-files-b4-comparison-fixed

parents 1fde08ce db3a2561
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1818,7 +1818,7 @@ ltv-usan:
    - ivas-linux-fast
  artifacts:
    name: "$CI_JOB_NAME--main--sha-$CI_COMMIT_SHORT_SHA"
    expire_in: 4 weeks
    expire_in: 7 weeks
    when: always
    paths:
      - ep_015.g192
+68 −1
Original line number Diff line number Diff line
@@ -445,8 +445,14 @@ int main(
    asked_frame_size = arg.renderFramesize;
    uint16_t aeID = arg.aeSequence.count > 0 ? arg.aeSequence.pID[0] : 65535;

#ifdef LIB_DEC_REVISION
    if ( ( error = IVAS_DEC_Configure( hIvasDec, arg.output_Fs, arg.outputConfig, arg.renderFramesize, arg.customLsOutputEnabled, arg.hrtfReaderEnabled,
                                       arg.enableHeadRotation, arg.enableExternalOrientation, arg.orientation_tracking, arg.renderConfigEnabled, arg.non_diegetic_pan_enabled,
                                       arg.non_diegetic_pan_gain, arg.dpidEnabled, aeID, arg.objEditEnabled, arg.delayCompensationEnabled ) ) != IVAS_ERR_OK )
#else
    if ( ( error = IVAS_DEC_Configure( hIvasDec, arg.output_Fs, arg.outputConfig, arg.tsmEnabled, arg.renderFramesize, arg.customLsOutputEnabled, arg.hrtfReaderEnabled, arg.enableHeadRotation, arg.enableExternalOrientation, arg.orientation_tracking, arg.renderConfigEnabled, arg.non_diegetic_pan_enabled, arg.non_diegetic_pan_gain,
                                       arg.dpidEnabled, aeID, arg.objEditEnabled, arg.delayCompensationEnabled ) ) != IVAS_ERR_OK )
#endif
    {
        fprintf( stderr, "\nConfigure failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) );
        goto cleanup;
@@ -750,6 +756,13 @@ int main(
    }

    pcmBuf = malloc( pcmBufSize * sizeof( int16_t ) );
#ifdef LIB_DEC_REVISION
    if ( pcmBuf == NULL )
    {
        fprintf( stdout, "Error: Unable to allocate memory for output buffer.\n" );
        goto cleanup;
    }
#endif

    /*-----------------------------------------------------------------*
     * Decoding
@@ -1051,18 +1064,30 @@ static bool parseCmdlIVAS_dec(

        if ( strcmp( argv_to_upper, "-VOIP" ) == 0 )
        {
#ifdef LIB_DEC_REVISION
            arg->voipMode = true;
#else
            arg->voipMode = 1;
#endif
            i++;
        }
        else if ( strcmp( argv_to_upper, "-VOIP_HF_ONLY=0" ) == 0 )
        {
#ifdef LIB_DEC_REVISION
            arg->voipMode = true;
#else
            arg->voipMode = 1;
#endif
            arg->inputFormat = IVAS_DEC_INPUT_FORMAT_RTPDUMP;
            i++;
        }
        else if ( strcmp( argv_to_upper, "-VOIP_HF_ONLY=1" ) == 0 )
        {
#ifdef LIB_DEC_REVISION
            arg->voipMode = true;
#else
            arg->voipMode = 1;
#endif
            arg->inputFormat = IVAS_DEC_INPUT_FORMAT_RTPDUMP_HF;
            i++;
        }
@@ -1212,6 +1237,10 @@ static bool parseCmdlIVAS_dec(
            {
                if ( !is_digits_only( argv[i] ) )
                {
#ifdef LIB_DEC_REVISION
                    fprintf( stderr, "Error: Render frame size is invalid or not specified!\n\n" );
                    usage_dec();
#endif
                    return false;
                }

@@ -1793,6 +1822,7 @@ static ivas_error initOnFirstGoodFrame(
        return error;
    }

#ifndef LIB_DEC_REVISION
    int32_t pcmFrameSize;

    if ( ( error = IVAS_DEC_GetPcmFrameSize( hIvasDec, &pcmFrameSize ) ) != IVAS_ERR_OK )
@@ -1800,7 +1830,7 @@ static ivas_error initOnFirstGoodFrame(
        fprintf( stderr, "\nError in IVAS_DEC_GetPcmFrameSize, error code: %d\n", error );
        return error;
    }

#endif
    if ( isSplitRend )
    {
        /* Open split rendering metadata writer */
@@ -1858,7 +1888,23 @@ static ivas_error initOnFirstGoodFrame(
        }
    }

#ifdef LIB_DEC_REVISION
    int16_t pcmFrameSize;
    if ( ( error = IVAS_DEC_GetOutputBufferSize( hIvasDec, &pcmFrameSize ) ) != IVAS_ERR_OK )
    {
        fprintf( stderr, "\nError in IVAS_DEC_GetOutputBufferSize, error code: %d\n", error );
        return error;
    }

#endif
    int16_t *zeroBuf = malloc( pcmFrameSize * sizeof( int16_t ) );
#ifdef LIB_DEC_REVISION
    if ( zeroBuf == NULL )
    {
        fprintf( stdout, "Error: Unable to allocate memory for output buffer.\n" );
        return IVAS_ERR_FAILED_ALLOC;
    }
#endif
    memset( zeroBuf, 0, pcmFrameSize * sizeof( int16_t ) );

    for ( int16_t i = 0; i < numInitialBadFrames; ++i )
@@ -2072,6 +2118,19 @@ static ivas_error decodeG192(
    SplitFileReadWrite *splitRendWriter = NULL;
    int16_t isSplitRend, isSplitCoded;

#ifdef VARIABLE_SPEED_DECODING
#ifdef LIB_DEC_REVISION
    if ( arg.tsmEnabled )
    {
        if ( ( error = IVAS_DEC_EnableTsm( hIvasDec ) ) != IVAS_ERR_OK )
        {
            fprintf( stderr, "\nError in IVAS_DEC_EnableTsm, code: %d\n", error );
            return error;
        }
    }

#endif
#endif
    if ( ( error = IVAS_DEC_is_split_rendering_enabled( hIvasDec, &isSplitRend ) ) != IVAS_ERR_OK )
    {
        fprintf( stderr, "\nError in IVAS_DEC_is_split_rendering_enabled, code: %d\n", error );
@@ -3386,7 +3445,12 @@ static ivas_error decodeVoIP(
        {
            if ( ( error = IVAS_DEC_HasDecodedFirstGoodFrame( hIvasDec, &decodedGoodFrame ) ) != IVAS_ERR_OK )
            {
#ifdef LIB_DEC_REVISION
                fprintf( stderr, "Error in IVAS_DEC_HasDecodedFirstGoodFrame(): %s\n", IVAS_DEC_GetErrorMessage( error ) );
#else
                fprintf( stderr, "Error in IVAS_DEC_HasDecodedFirstGoodFrame, code: %d\n", error );

#endif
                goto cleanup;
            }

@@ -3398,6 +3462,9 @@ static ivas_error decodeVoIP(
                if ( ( error = initOnFirstGoodFrame( hIvasDec, arg, numInitialBadFrames, &nOutSamples, NULL, delayNumSamples_orig, &delayNumSamples, &delayTimeScale,
                                                     &bsFormat, &afWriter, &masaWriter, ismWriters, &nOutChannels, &numObj, &splitRendWriter ) ) != IVAS_ERR_OK )
                {
#ifdef LIB_DEC_REVISION
                    fprintf( stderr, "Error in initOnFirstGoodFrame(): %s\n", IVAS_DEC_GetErrorMessage( error ) );
#endif
                    goto cleanup;
                }
            }
+21 −0
Original line number Diff line number Diff line
@@ -985,6 +985,9 @@ int main(

    while ( 1 )
    {
#ifdef NONBE_1293_CRASH_FIRST_FRAME_LOST
        int16_t bfi = 0;
#endif
        int16_t num_in_channels;
        num_in_channels = inBuffer.config.numChannels;

@@ -993,7 +996,11 @@ int main(
        {
            ivas_error error_tmp;
            numSamplesRead = (int16_t) inBufferSize;
#ifdef NONBE_1293_CRASH_FIRST_FRAME_LOST
            error_tmp = split_rend_read_bits_from_file( hSplitRendFileReadWrite, bitsBuffer.bits, &bitsBuffer.config.bitsRead, &bitsBuffer.config.bitsWritten, &bfi );
#else
            error_tmp = split_rend_read_bits_from_file( hSplitRendFileReadWrite, bitsBuffer.bits, &bitsBuffer.config.bitsRead, &bitsBuffer.config.bitsWritten );
#endif
            if ( error_tmp != IVAS_ERR_OK )
            {
                if ( error_tmp == IVAS_ERR_END_OF_FILE )
@@ -1060,19 +1067,33 @@ int main(
        /* Read from split renderer bfi file if specified */
        if ( splitRendBFIReader != NULL && splitBinNeedsNewFrame )
        {
#ifndef NONBE_1293_CRASH_FIRST_FRAME_LOST
            int16_t bfi;
#endif
            if ( ( error = SplitRendBFIFileReading( splitRendBFIReader, &bfi ) ) != IVAS_ERR_OK )
            {
                fprintf( stderr, "\nError in SplitRendBFIFileReading(): %s\n", ivas_error_to_string( error ) );
                goto cleanup;
            }

#ifndef NONBE_1293_CRASH_FIRST_FRAME_LOST
            if ( ( error = ISAR_POST_REND_SetSplitRendBFI( hIsarPostRend, bfi ) ) != IVAS_ERR_OK )
            {
                fprintf( stderr, "Error in ISAR_POST_REND_SetSplitRendBFI(): %s\n", ivas_error_to_string( error ) );
                exit( -1 );
            }
#endif
        }
#ifdef NONBE_1293_CRASH_FIRST_FRAME_LOST
        if ( splitBinNeedsNewFrame )
        {
            if ( ( error = ISAR_POST_REND_SetSplitRendBFI( hIsarPostRend, bfi ) ) != IVAS_ERR_OK )
            {
                fprintf( stderr, "\nError in ISAR_POST_REND_SetSplitRendBFI(): %s\n", ivas_error_to_string( error ) );
                goto cleanup;
            }
        }
#endif

        for ( i = 0; i < args.inConfig.numBinBuses; ++i )
        {
+5 −0
Original line number Diff line number Diff line
@@ -156,6 +156,11 @@ def get_artifacts_for_jobs_and_return_num_failed(
                tmp_dir = pathlib.Path(tmp_dir)

                for artifact in tmp_dir.iterdir():
                    # ignore the COMPLEXITY dir from complexity measurement, that one only contins runtime logs
                    # and creates problems because it has the same name for every complexity job
                    if artifact.name == "COMPLEXITY":
                        continue

                    src = tmp_dir.joinpath(artifact).absolute()
                    dst = PUBLIC_FOLDER.joinpath(artifact.name)
                    print(f"{src} -> {dst}")
+26 −0
Original line number Diff line number Diff line
@@ -656,6 +656,13 @@ void ivas_renderer_select(
    Decoder_Struct *st_ivas                                     /* i/o: IVAS decoder structure                  */
);

#ifdef NONBE_1303_REND_GRANULARITY
/*! r: secondary binaural renderer type */
RENDERER_TYPE ivas_renderer_secondary_select(
    Decoder_Struct *st_ivas                                     /* i/o: IVAS decoder structure                  */
);

#endif
ivas_error ivas_mc_enc_config(
    Encoder_Struct *st_ivas                                     /* i/o: IVAS encoder structure                  */
);
@@ -799,8 +806,12 @@ void ivas_apply_non_diegetic_panning(
 *----------------------------------------------------------------------------------*/

ivas_error ivas_jbm_dec_tc(
#ifdef LIB_DEC_REVISION
    Decoder_Struct *st_ivas                                     /* i/o: IVAS decoder structure                                      */
#else
    Decoder_Struct *st_ivas,                                    /* i/o: IVAS decoder structure                                      */
    float *data                                                 /* o  : output synthesis signals                                    */
#endif
);

ivas_error ivas_jbm_dec_render(
@@ -885,10 +896,16 @@ TC_BUFFER_MODE ivas_jbm_dec_get_tc_buffer_mode(

/*! r: render granularity */
int16_t ivas_jbm_dec_get_render_granularity(
#ifdef NONBE_1303_REND_GRANULARITY
    const RENDERER_TYPE renderer_type,                          /* i  : renderer type                                               */
    const RENDERER_TYPE renderer_type_sec,                      /* i  : secondary renderer type                                     */
    const int32_t output_Fs                                     /* i  : sampling rate                                               */
#else
    const RENDERER_TYPE rendererType, /* i  : renderer type     */
    const IVAS_FORMAT ivas_format,    /* i  : ivas format */
    const MC_MODE mc_mode,            /* i  : MC mode */
    const int32_t output_Fs           /* i  : sampling rate     */
#endif
);

ivas_error ivas_jbm_dec_tc_buffer_open(
@@ -5791,6 +5808,15 @@ void ivas_omasa_render_objects_from_mix(
    const int16_t output_frame                                  /* i  : output frame length per channel        */
);

#ifdef NONBE_FIX_1305_OMASA_OBJ_EDIT_EXT
void ivas_omasa_gain_masa_tc(
    float *output[],                                            /* i/o  : output synthesis signal                 */
    const float gainMasa,                                       /* i  : gain for MASA transport channels        */
    const int16_t nchan_transport_ism,                          /* i  : number of ISM TCs                       */
    const int16_t output_frame                                  /* i  : output frame length per channel         */
);
#endif

void ivas_omasa_dirac_rend_jbm(
    Decoder_Struct *st_ivas,                                    /* i/o: IVAS decoder handle                     */
    const uint16_t nSamplesAsked,                               /* i  : number of samples requested             */
Loading