Commit 332b949c authored by BOHMRR's avatar BOHMRR
Browse files

Merge branch 'main' into 57-sba-debug-changes

parents 6ce1bcc1 7ee32460
Loading
Loading
Loading
Loading
Loading
+47 −9
Original line number Diff line number Diff line
variables:
  TESTV_DIR: "/usr/local/testv"

  BUILD_OUTPUT: "build_output.txt"

# prevent running two pipelines on pushes to merge request branches
workflow:
@@ -38,18 +38,53 @@ stages:
    - if [ ! -d "$TESTV_DIR" ]; then mkdir -p $TESTV_DIR; fi
    - cp -r scripts/testv/* $TESTV_DIR/


# build all components of the project, i.e. codec itself, the unittests, the prerenderer and the standalone version of the TD object renderer
build-all-linux-make:
# template for build jobs to include the check for warnings
.build-job-with-check-for-warnings:
  extends: .test-job-linux
  stage: build
  allow_failure:
    exit_codes:
      - 123


build-codec-linux-make:
  extends: .build-job-with-check-for-warnings
  rules:
    - if: $CI_PIPELINE_SOURCE == 'merge_request_event'
  script:
    - make -j 2>&1 | tee $BUILD_OUTPUT
    # need to use the "|| exit $?" suffix to get the allowed_failure return code, otherwise the job fails with code 1...<
    - ci/check_for_warnings.py $BUILD_OUTPUT || exit $?

build-unittests-linux:
  extends: .build-job-with-check-for-warnings
  rules:
    - if: $CI_PIPELINE_SOURCE == 'merge_request_event'
  script:
    - make unittests -j 2>&1 | tee $BUILD_OUTPUT
    # need to use the "|| exit $?" suffix to get the allowed_failure return code, otherwise the job fails with code 1...<
    - ci/check_for_warnings.py $BUILD_OUTPUT || exit $?

build-prerenderer-linux:
  extends: .build-job-with-check-for-warnings
  rules:
    - if: $CI_PIPELINE_SOURCE == 'merge_request_event'
  script:
    - make -C scripts/prerenderer -j 2>&1 | tee $BUILD_OUTPUT
    # need to use the "|| exit $?" suffix to get the allowed_failure return code, otherwise the job fails with code 1...<
    - ci/check_for_warnings.py $BUILD_OUTPUT || exit $?

build-td-object-renderer-standalone-linux:
  extends: .build-job-with-check-for-warnings
  rules:
    - if: $CI_PIPELINE_SOURCE == 'merge_request_event'
  stage: build
  script:
    - bash ci/build_all_linux.sh
    - make -C scripts/td_object_renderer/object_renderer_standalone -j 2>&1 | tee $BUILD_OUTPUT
    # need to use the "|| exit $?" suffix to get the allowed_failure return code, otherwise the job fails with code 1...<
    - ci/check_for_warnings.py $BUILD_OUTPUT || exit $?

build-codec-linux-cmake:
  extends: .test-job-linux
  extends: .build-job-with-check-for-warnings
  rules:
    - if: $CI_PIPELINE_SOURCE == 'merge_request_event'
  stage: build
@@ -57,7 +92,10 @@ build-codec-linux-cmake:
    - mkdir build
    - cd build
    - cmake ..
    - make -j
    - cd ..
    - make -C build -j 2>&1 | tee $BUILD_OUTPUT
    # need to use the "|| exit $?" suffix to get the allowed_failure return code, otherwise the job fails with code 1...<
    - ci/check_for_warnings.py $BUILD_OUTPUT || exit $?

build-codec-instrumented-linux:
  extends: .test-job-linux
+39 −22
Original line number Diff line number Diff line
@@ -354,9 +354,10 @@ int main(
    {
        if ( bandwidth == IVAS_ENC_BANDWIDTH_NB && arg.inputFormat != IVAS_ENC_INPUT_MONO )
        {
            fprintf( stdout, "\nNB coding not supported in IVAS. Switching to WB.\n" );
            fprintf( stdout, "\nNB coding not supported in IVAS. Switching to WB.\n\n" );
        }

        else
        {
            switch ( bandwidth )
            {
                case IVAS_ENC_BANDWIDTH_UNDEFINED:
@@ -379,6 +380,11 @@ int main(
                    goto cleanup;
            }
        }
    }

    /*------------------------------------------------------------------------------------------*
     * Handle Channel-aware mode
     *------------------------------------------------------------------------------------------*/

    IVAS_ENC_CHANNEL_AWARE_CONFIG caConfig = arg.caConfig;

@@ -398,6 +404,13 @@ int main(
        fprintf( stdout, "Channel-aware mode:     ON, FEC indicator : %s  FEC offset: %d \n\n", ( caConfig.fec_indicator == IVAS_ENC_FEC_LO ) ? "LO" : "HI", caConfig.fec_offset );
    }

    if ( arg.inputFormat != IVAS_ENC_INPUT_MONO && ( caConfig.channelAwareModeEnabled || arg.ca_config_file ) )
    {
        fprintf( stderr, "Channel-aware mode is not supported in IVAS.\n\n" );
        usage_enc();
        goto cleanup;
    }

    /*------------------------------------------------------------------------------------------*
     * Configure and initialize (allocate memory for static variables) the encoder
     *------------------------------------------------------------------------------------------*/
@@ -456,7 +469,11 @@ int main(
            goto cleanup;
    }

    IVAS_ENC_PrintConfig( hIvasEnc, caConfig.channelAwareModeEnabled );
    if( ( error = IVAS_ENC_PrintConfig( hIvasEnc, caConfig.channelAwareModeEnabled ) ) != IVAS_ERR_OK )
    {
        fprintf( stderr, "\n IVAS_ENC_PrintConfig failed %s\n\n", IVAS_ENC_GetErrorMessage( error ) );
        goto cleanup;
    }

    /*------------------------------------------------------------------------------------------*
     * Open input metadata files
+33 −0
Original line number Diff line number Diff line
#!/usr/bin/env python3
import argparse
import sys


SEARCH_FOR = "warning:"
RETURN_FOUND = 123


def main(log_file):
    with open(log_file) as f:
        lines_with_warnings = [l for l in f.readlines() if SEARCH_FOR in l]

    n_warnings = len(lines_with_warnings)
    if n_warnings > 0:
        print(f"========== Found {n_warnings} warnings: =========")
        for l in lines_with_warnings:
            print(l)
        return RETURN_FOUND
    else:
        return 0


if __name__ == "__main__":
    parser = argparse.ArgumentParser()
    parser.add_argument(
        "compilation-output",
        type=str,
        help="text output of compilation process to analyze",
    )
    args = vars(parser.parse_args())
    ret_code = main(args[ "compilation-output" ])
    sys.exit(ret_code)
+1 −1
Original line number Diff line number Diff line
@@ -1048,7 +1048,7 @@ ivas_error ivas_ism_dec_config(
            if ( st_ivas->ism_mode != last_ism_mode )
            {
                /*ivas_ism_dec_reconfigure( st_ivas );*/
                return IVAS_ERROR( IVAS_ERR_INTERNAL_FATAL, "\n\n!!! Error: ISM format switching not supported yet!!!\n\n" );
                return IVAS_ERROR( IVAS_ERR_RECONFIGURE_NOT_SUPPORTED, "\n\n!!! Error: ISM format switching not supported yet!!!\n\n" );
            }
        }
    }
+21 −1
Original line number Diff line number Diff line
@@ -971,7 +971,18 @@ ivas_error IVAS_DEC_GetRenderConfig(

    hRCin = hIvasDec->st_ivas->hRenderConfig;
#ifdef DEBUGGING
    hRCout->renderer_type_override = hRCin->renderer_type_override;
    switch (hRCin->renderer_type_override)
    {
        case RENDER_TYPE_OVERRIDE_CREND :
            hRCout->renderer_type_override = IVAS_RENDER_TYPE_OVERRIDE_CREND;
            break;
        case RENDER_TYPE_OVERRIDE_FASTCONV :
            hRCout->renderer_type_override = IVAS_RENDER_TYPE_OVERRIDE_FASTCONV;
            break;
        default:
            hRCout->renderer_type_override = IVAS_RENDER_TYPE_OVERRIDE_NONE;
            break;
    }
#endif
    hRCout->room_acoustics.override = hRCin->roomAcoustics.override;
    hRCout->room_acoustics.use_brir = hRCin->roomAcoustics.use_brir;
@@ -1585,10 +1596,19 @@ const char *IVAS_DEC_GetErrorMessage(
            return "invalid format of input bitstream";
        case IVAS_ERR_INVALID_INDEX:
            return "invalid index";
        case IVAS_ERR_INTERNAL:
        case IVAS_ERR_INTERNAL_FATAL:
            return "internal error";
        case IVAS_ERR_RECONFIGURE_NOT_SUPPORTED:
            return "reconfigure not supported";
        case IVAS_ERR_UNEXPECTED_NULL_POINTER:
            return "unexpected NULL pointer";            
#ifdef DEBUGGING
        case IVAS_ERR_INVALID_FORCE_MODE:
            return "invalid force mode";
#endif
        case IVAS_ERR_FAILED_FILE_READ:
            return "could not read from file";
        case IVAS_ERR_NOT_IMPLEMENTED:
            return "not implemented";
        case IVAS_ERR_UNKNOWN:
Loading