Commit 0642edf0 authored by sagnowski's avatar sagnowski
Browse files

Merge branch 'isar_bitstream_format_update' into isar_metadata_length_field

parents f32b4cf6 8258c47c
Loading
Loading
Loading
Loading
+13 −1
Original line number Diff line number Diff line
@@ -800,6 +800,18 @@ split-rendering-smoke-test:
      junit:
        - report-junit.xml

lc3-wrapper-unit-test:
  extends:
    - .test-job-linux
    - .rules-merge-request
  needs: ["build-codec-linux-cmake"]
  stage: test
  script:
    - *enable-split-rendering
    - cmake -B cmake-build -G "Unix Makefiles" -DCOPY_EXECUTABLES_FROM_BUILD_DIR=true
    - cmake --build cmake-build -- -j
    - scripts/split_rendering/lc3plus/ivas_lc3plus_unit_test

# compare split-rendering bitexactness between target and source branch
split-rendering-pytest-on-merge-request:
  extends:
@@ -1351,7 +1363,7 @@ ivas-conformance:
  timeout: "60 minutes"
  rules:
    - if: ($CI_PIPELINE_SOURCE == 'web' || $CI_PIPELINE_SOURCE == 'trigger') && $MANUAL_PIPELINE_TYPE == 'ivas-conformance'
#    - if: $CI_PIPELINE_SOURCE == 'push' && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
    - if: $CI_PIPELINE_SOURCE == 'push' && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
  allow_failure:
    exit_codes:
      - 123
+28 −6
Original line number Diff line number Diff line
@@ -713,11 +713,12 @@ int main(
            }
            renderConfig.roomAcoustics.override = true;
        }

#ifdef SPLIT_REND_WITH_HEAD_ROT
#ifdef ISAR_BITSTREAM_UPDATE_LC3PLUS
        /* ISAR frame size is set from command line, not renderer config file.
         * This will be ignored if output format is not split rendering. */
        renderConfig.split_rend_config.isar_frame_size_ms = (int16_t) arg.renderFramesize /* given in number of 5ms subframes */ * 5;
#endif
#endif

        if ( ( error = IVAS_DEC_FeedRenderConfig( hIvasDec, renderConfig ) ) != IVAS_ERR_OK )
@@ -1710,6 +1711,15 @@ static bool parseCmdlIVAS_dec(
            usage_dec();
            return false;
        }

#ifdef FIX_1081_BINAURAL_SPLIT_PCM_SANITY_CHECK
        if ( arg->outputMdFilename != NULL && arg->outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM )
        {
            fprintf( stderr, "Error: Output split rendering metadata file is supported for BINAURAL_SPLIT_PCM output config. only\n\n" );
            usage_dec();
            return false;
        }
#endif
    }
    else
    {
@@ -1973,7 +1983,7 @@ static ivas_error initOnFirstGoodFrame(
        ISAR_SPLIT_REND_CODEC splitRendCodec;
        int16_t splitRendCodecFrameSizeMs;
        ISAR_SPLIT_REND_POSE_CORRECTION_MODE poseCorrection;
#ifdef SPLIT_REND_EXTEND_ISAR_FILE_HEADER
#ifdef ISAR_BITSTREAM_UPDATE_LC3PLUS
        int16_t splitRendIsarFrameSizeMs;
        int16_t lc3plusHighRes;
#endif
@@ -1987,11 +1997,11 @@ static ivas_error initOnFirstGoodFrame(
        if ( ( error = IVAS_DEC_GetSplitRendBitstreamHeader( hIvasDec,
                                                             &splitRendCodec,
                                                             &poseCorrection,
#ifdef SPLIT_REND_EXTEND_ISAR_FILE_HEADER
#ifdef ISAR_BITSTREAM_UPDATE_LC3PLUS
                                                             &splitRendIsarFrameSizeMs,
#endif
                                                             &splitRendCodecFrameSizeMs
#ifdef SPLIT_REND_EXTEND_ISAR_FILE_HEADER
#ifdef ISAR_BITSTREAM_UPDATE_LC3PLUS
                                                             ,
                                                             &lc3plusHighRes
#endif
@@ -2010,7 +2020,7 @@ static ivas_error initOnFirstGoodFrame(
                                                   splitRendCodec,
                                                   poseCorrection,
                                                   splitRendCodecFrameSizeMs
#ifdef SPLIT_REND_EXTEND_ISAR_FILE_HEADER
#ifdef ISAR_BITSTREAM_UPDATE_LC3PLUS
                                                   ,
                                                   splitRendIsarFrameSizeMs,
                                                   arg.output_Fs,
@@ -2024,6 +2034,14 @@ static ivas_error initOnFirstGoodFrame(
        }
        else
        {
#ifdef FIX_1081_BINAURAL_SPLIT_PCM_SANITY_CHECK
            if ( arg.outputMdFilename == NULL )
            {
                fprintf( stderr, "\nOutput split rendering metadata file not specified\n" );
                return IVAS_ERR_INVALID_SPLIT_REND_CONFIG;
            }
#endif

            if ( ( error = split_rend_writer_open( splitRendWriter,
                                                   arg.outputMdFilename,
                                                   delayNumSamples_temp[0],
@@ -2031,7 +2049,7 @@ static ivas_error initOnFirstGoodFrame(
                                                   splitRendCodec,
                                                   poseCorrection,
                                                   splitRendCodecFrameSizeMs
#ifdef SPLIT_REND_EXTEND_ISAR_FILE_HEADER
#ifdef ISAR_BITSTREAM_UPDATE_LC3PLUS
                                                   ,
                                                   splitRendIsarFrameSizeMs,
                                                   arg.output_Fs,
@@ -2073,8 +2091,12 @@ static ivas_error initOnFirstGoodFrame(
            splitRendBitsZero.buf_len = 0;
            splitRendBitsZero.codec = ISAR_SPLIT_REND_CODEC_DEFAULT;
            splitRendBitsZero.pose_correction = ISAR_SPLIT_REND_POSE_CORRECTION_MODE_NONE;
#ifdef ISAR_BITSTREAM_UPDATE_LC3PLUS
            splitRendBitsZero.codec_frame_size_ms = 0;
            splitRendBitsZero.isar_frame_size_ms = 20;
#else
            splitRendBitsZero.codec_frame_size_ms = 20;
#endif

            if ( split_rend_write_bitstream_to_file( *splitRendWriter, splitRendBitsZero.bits_buf, &splitRendBitsZero.bits_read, &splitRendBitsZero.bits_written ) != IVAS_ERR_OK )
            {
+18 −14
Original line number Diff line number Diff line
@@ -730,10 +730,12 @@ int main(
    bitsBuffer.config.bufLenInBytes = 0;
    bitsBuffer.config.codec = ISAR_SPLIT_REND_CODEC_DEFAULT;
    bitsBuffer.config.poseCorrection = ISAR_SPLIT_REND_POSE_CORRECTION_MODE_NONE;
#ifdef ISAR_BITSTREAM_UPDATE_LC3PLUS
    bitsBuffer.config.codec_frame_size_ms = 5;
    bitsBuffer.config.isar_frame_size_ms = 20;
#ifdef SPLIT_REND_EXTEND_ISAR_FILE_HEADER
    bitsBuffer.config.lc3plusHighRes = 0;
#else
    bitsBuffer.config.codec_frame_size_ms = 20;
#endif


@@ -758,7 +760,7 @@ int main(
        SplitRendBFIFileReader_open( args.splitRendBFIFilePath, &splitRendBFIReader );
    }

#ifdef SPLIT_REND_EXTEND_ISAR_FILE_HEADER
#ifdef ISAR_BITSTREAM_UPDATE_LC3PLUS
    int32_t inFileSampleRate = 0;
#endif
    strncpy( audioFilePath, args.inputFilePath, FILENAME_MAX - 1 );
@@ -769,11 +771,12 @@ int main(
                                        args.inMetadataFilePaths[0],
                                        &bitsBuffer.config.codec,
                                        &bitsBuffer.config.poseCorrection,
                                        &bitsBuffer.config.codec_frame_size_ms,
                                        &bitsBuffer.config.isar_frame_size_ms
#ifdef SPLIT_REND_EXTEND_ISAR_FILE_HEADER
                                        &bitsBuffer.config.codec_frame_size_ms
#ifdef ISAR_BITSTREAM_UPDATE_LC3PLUS
                                        ,
                                        &inFileSampleRate, &bitsBuffer.config.lc3plusHighRes
                                        &bitsBuffer.config.isar_frame_size_ms,
                                        &inFileSampleRate,
                                        &bitsBuffer.config.lc3plusHighRes
#endif
        );
        if ( error != IVAS_ERR_OK )
@@ -796,11 +799,12 @@ int main(
                                        args.inputFilePath,
                                        &bitsBuffer.config.codec,
                                        &bitsBuffer.config.poseCorrection,
                                        &bitsBuffer.config.codec_frame_size_ms,
                                        &bitsBuffer.config.isar_frame_size_ms
#ifdef SPLIT_REND_EXTEND_ISAR_FILE_HEADER
                                        &bitsBuffer.config.codec_frame_size_ms
#ifdef ISAR_BITSTREAM_UPDATE_LC3PLUS
                                        ,
                                        &inFileSampleRate, &bitsBuffer.config.lc3plusHighRes
                                        &bitsBuffer.config.isar_frame_size_ms,
                                        &inFileSampleRate,
                                        &bitsBuffer.config.lc3plusHighRes
#endif
        );
        if ( error != IVAS_ERR_OK )
@@ -811,7 +815,7 @@ int main(
        audioReader = NULL;
    }

#ifndef SPLIT_REND_EXTEND_ISAR_FILE_HEADER
#ifndef ISAR_BITSTREAM_UPDATE_LC3PLUS
    int32_t inFileSampleRate = 0;
#endif
    if ( audioReader != NULL )
@@ -819,7 +823,7 @@ int main(
        error = AudioFileReader_getSamplingRate( audioReader, &inFileSampleRate );
    }
    else
#ifdef SPLIT_REND_EXTEND_ISAR_FILE_HEADER
#ifdef ISAR_BITSTREAM_UPDATE_LC3PLUS
        if ( hSplitRendFileReadWrite == NULL )
#endif
    {
@@ -883,10 +887,10 @@ int main(
        if ( ( error = ISAR_REND_SetSplitRendBitstreamHeader( hIsarPostRend,
                                                              bitsBuffer.config.codec,
                                                              bitsBuffer.config.poseCorrection,
                                                              bitsBuffer.config.isar_frame_size_ms,
                                                              bitsBuffer.config.codec_frame_size_ms
#ifdef SPLIT_REND_EXTEND_ISAR_FILE_HEADER
#ifdef ISAR_BITSTREAM_UPDATE_LC3PLUS
                                                              ,
                                                              bitsBuffer.config.isar_frame_size_ms,
                                                              bitsBuffer.config.lc3plusHighRes
#endif
                                                              ) ) != IVAS_ERR_OK )
+19 −7
Original line number Diff line number Diff line
@@ -762,10 +762,12 @@ int main(
    bitsBuffer.config.bufLenInBytes = 0;
    bitsBuffer.config.codec = ISAR_SPLIT_REND_CODEC_DEFAULT;
    bitsBuffer.config.poseCorrection = ISAR_SPLIT_REND_POSE_CORRECTION_MODE_NONE;
#ifdef ISAR_BITSTREAM_UPDATE_LC3PLUS
    bitsBuffer.config.codec_frame_size_ms = 5;
    bitsBuffer.config.isar_frame_size_ms = 20;
#ifdef SPLIT_REND_EXTEND_ISAR_FILE_HEADER
    bitsBuffer.config.lc3plus_highres = 0;
#else
    bitsBuffer.config.codec_frame_size_ms = 20;
#endif
#endif
    for ( i = 0; i < RENDERER_MAX_MC_INPUTS; ++i )
@@ -1111,9 +1113,11 @@ int main(
        }

#ifdef SPLIT_REND_WITH_HEAD_ROT
#ifdef ISAR_BITSTREAM_UPDATE_LC3PLUS
        /* ISAR frame size is set from command line, not renderer config file.
         * This will be ignored if output format is not split rendering. */
        renderConfig.split_rend_config.isar_frame_size_ms = (int16_t) args.render_framesize /* given in number of 5ms subframes */ * 5;
#endif
#endif

        if ( ( error = IVAS_REND_FeedRenderConfig( hIvasRend, renderConfig ) ) != IVAS_ERR_OK )
@@ -1379,8 +1383,12 @@ int main(
        IVAS_REND_GetSplitRendBitstreamHeader( hIvasRend,
                                               &bitsBuffer.config.codec,
                                               &bitsBuffer.config.poseCorrection,
                                               &bitsBuffer.config.isar_frame_size_ms,
                                               &bitsBuffer.config.codec_frame_size_ms );
                                               &bitsBuffer.config.codec_frame_size_ms
#ifdef ISAR_BITSTREAM_UPDATE_LC3PLUS
                                               ,
                                               &bitsBuffer.config.isar_frame_size_ms
#endif
        );

        if ( IVAS_REND_GetDelay( hIvasRend, &delayNumSamples_temp, &delayTimeScale_temp ) != IVAS_ERR_OK )
        {
@@ -1395,7 +1403,7 @@ int main(
                                               bitsBuffer.config.codec,
                                               bitsBuffer.config.poseCorrection,
                                               bitsBuffer.config.codec_frame_size_ms
#ifdef SPLIT_REND_EXTEND_ISAR_FILE_HEADER
#ifdef ISAR_BITSTREAM_UPDATE_LC3PLUS
                                               ,
                                               bitsBuffer.config.isar_frame_size_ms,
                                               args.sampleRate,
@@ -1416,8 +1424,12 @@ int main(
            IVAS_REND_GetSplitRendBitstreamHeader( hIvasRend,
                                                   &bitsBuffer.config.codec,
                                                   &bitsBuffer.config.poseCorrection,
                                                   &bitsBuffer.config.isar_frame_size_ms,
                                                   &bitsBuffer.config.codec_frame_size_ms );
                                                   &bitsBuffer.config.codec_frame_size_ms
#ifdef ISAR_BITSTREAM_UPDATE_LC3PLUS
                                                   ,
                                                   &bitsBuffer.config.isar_frame_size_ms
#endif
            );

            if ( IVAS_REND_GetDelay( hIvasRend, &delayNumSamples_temp, &delayTimeScale_temp ) != IVAS_ERR_OK )
            {
@@ -1432,7 +1444,7 @@ int main(
                                                   bitsBuffer.config.codec,
                                                   bitsBuffer.config.poseCorrection,
                                                   bitsBuffer.config.codec_frame_size_ms
#ifdef SPLIT_REND_EXTEND_ISAR_FILE_HEADER
#ifdef ISAR_BITSTREAM_UPDATE_LC3PLUS
                                                   ,
                                                   bitsBuffer.config.isar_frame_size_ms,
                                                   args.sampleRate,
+0 −16
Original line number Diff line number Diff line
@@ -884,11 +884,7 @@ ivas_error check_ind_list_limits(
        }
        else
        {
#ifdef IVAS_ERRORS_FIX_GLOBAL_FRAME
            return IVAS_ERROR( IVAS_ERR_INTERNAL_FATAL, "Buffer of indices corrupted! Attempt to overwrite indice ID = %d (value: %d, bits: %d)!\n", hBstr->ind_list[hBstr->nb_ind_tot].id, hBstr->ind_list[hBstr->nb_ind_tot].value, hBstr->ind_list[hBstr->nb_ind_tot].nb_bits );
#else
            return IVAS_ERROR( IVAS_ERR_INTERNAL_FATAL, "Buffer of indices corrupted in frame %d! Attempt to overwrite indice ID = %d (value: %d, bits: %d)!\n", frame, hBstr->ind_list[hBstr->nb_ind_tot].id, hBstr->ind_list[hBstr->nb_ind_tot].value, hBstr->ind_list[hBstr->nb_ind_tot].nb_bits );
#endif
        }
    }

@@ -943,11 +939,7 @@ ivas_error push_indice(
    /* check the limits of the list of indices */
    if ( ( error = check_ind_list_limits( hBstr ) ) != IVAS_ERR_OK )
    {
#ifdef IVAS_ERRORS_FIX_GLOBAL_FRAME
        return IVAS_ERROR( error, "Error occured in push_indice() while re-allocating the list of indices!\n" );
#else
        return IVAS_ERROR( error, "Error occured in push_indice() while re-allocating the list of indices (frame %d) !\n", frame );
#endif
    }

    /* find the location in the list of indices based on ID */
@@ -1103,11 +1095,7 @@ ivas_error push_next_bits(
        /* check the limits of the list of indices */
        if ( ( error = check_ind_list_limits( hBstr ) ) != IVAS_ERR_OK )
        {
#ifdef IVAS_ERRORS_FIX_GLOBAL_FRAME
            return IVAS_ERROR( error, "Error occured in push_next_bits() while re-allocating the list of indices!\n" );
#else
            return IVAS_ERROR( error, "Error occured in push_next_bits() while re-allocating the list of indices (frame %d) !\n", frame );
#endif
        }
        ptr = &hBstr->ind_list[hBstr->nb_ind_tot];

@@ -1126,11 +1114,7 @@ ivas_error push_next_bits(
        /* check the limits of the list of indices */
        if ( ( error = check_ind_list_limits( hBstr ) ) != IVAS_ERR_OK )
        {
#ifdef IVAS_ERRORS_FIX_GLOBAL_FRAME
            return IVAS_ERROR( error, "Error occured in push_next_bits() while re-allocating the list of indices!\n" );
#else
            return IVAS_ERROR( error, "Error occured in push_next_bits() while re-allocating the list of indices (frame %d) !\n", frame );
#endif
        }
        ptr = &hBstr->ind_list[hBstr->nb_ind_tot];

Loading