Commit 157959e8 authored by Archit Tamarapu's avatar Archit Tamarapu
Browse files

manually fix merge, pipeline failures can be ignored until v2 is merged in

parent b5803bdf
Loading
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -158,6 +158,7 @@ static void print_mem_dec( size_t SRAM_size )
    fprintf( stdout, "PROM size (common):                       %d words (or instructions)\n", PROM_Size_lib_com );
    fprintf( stdout, "Stack size (decoder):                     %ld words in %s() in frame #%d\n", ( ( ptr_base_stack - ptr_max_stack ) * sizeof( int16_t ) ) / sizeof( float ), location_max_stack, wc_frame );
    fprintf( stdout, "Table ROM size (decoder):                 %ld words\n", ( Const_Data_Size_rom_dec() + Const_Data_Size_ivas_rom_dec() ) / sizeof( float ) );
    fprintf( stdout, "Table ROM size (binaural renderer):       %ld words\n", ( Const_Data_Size_ivas_rom_binauralRen() + Const_Data_Size_ivas_rom_TdBinauralR() + Const_Data_Size_ivas_rom_binaural_cr() ) / sizeof( float ) );
    fprintf( stdout, "Table ROM size (common):                  %ld words\n", ( Const_Data_Size_rom_com() + Const_Data_Size_ivas_rom_com() ) / sizeof( float ) );
#ifdef RAM_COUNTING_TOOL
    fprintf( stdout, "Static RAM size (decoder):                %ld words\n\n", SRAM_size );
@@ -426,25 +427,25 @@ int main(
        /* sanity check */
        if ( arg.outputFormat != IVAS_DEC_OUTPUT_BINAURAL_ROOM )
        {
            fprintf( stderr, "\nExternal Renderer Config is supported only when BINAURAL_ROOM is used as output. Exiting. \n" );
            fprintf( stderr, "\nExternal Renderer Config is supported only when BINAURAL_ROOM is used as output. Exiting. \n\n" );
            goto cleanup;
        }

        if ( ( error = IVAS_DEC_GetRenderConfig( hIvasDec, &renderConfig ) ) != IVAS_ERR_OK )
        {
            fprintf( stderr, "\nIVAS_DEC_GetRenderConfig failed: %s\n", IVAS_DEC_GetErrorMessage( error ) );
            fprintf( stderr, "\nIVAS_DEC_GetRenderConfig failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) );
            goto cleanup;
        }

        if ( RenderConfigReader_read( renderConfigReader, &renderConfig ) != IVAS_ERR_OK )
        {
            fprintf( stderr, "Failed to read renderer configuration from file %s\n", arg.renderConfigFilename );
            fprintf( stderr, "Failed to read renderer configuration from file %s\n\n", arg.renderConfigFilename );
            goto cleanup;
        }

        if ( ( error = IVAS_DEC_FeedRenderConfig( hIvasDec, renderConfig ) ) != IVAS_ERR_OK )
        {
            fprintf( stderr, "\nIVAS_DEC_FeedRenderConfig failed: %s\n", IVAS_DEC_GetErrorMessage( error ) );
            fprintf( stderr, "\nIVAS_DEC_FeedRenderConfig failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) );
            goto cleanup;
        }
    }
+1 −1
Original line number Diff line number Diff line
@@ -1618,7 +1618,7 @@ static void usage_enc( void )
    fprintf( stdout, "                      where 0 = adaptive, 3-100 = fixed in number of frames,\n" );
    fprintf( stdout, "                      default is deactivated\n" );
    fprintf( stdout, "-dtx                : Activate DTX mode with a SID update rate of 8 frames\n" );
    fprintf( stdout, "                      Note: DTX is currently supported in EVS, DFT/TD stereo, 1 ISm, \n" );
    fprintf( stdout, "                      Note: DTX is currently supported in EVS, stereo, 1 ISm, \n" );
    fprintf( stdout, "                      SBA (up to 128kbps) and MASA (up to 128kbps)\n" );
    fprintf( stdout, "-rf p o             : Activate channel-aware mode for WB and SWB signal at 13.2kbps, \n" );
    fprintf( stdout, "                      where FEC indicator, p: LO or HI, and FEC offset, o: 2, 3, 5, or 7 in number of frames.\n" );
+1 −1
Original line number Diff line number Diff line
@@ -3,7 +3,7 @@ import argparse
import sys


SEARCH_FOR = "warning:"
SEARCH_FOR = "warning"
RETURN_FOUND = 123


ci/disable_ram_counting.py

100644 → 100755
+0 −0

File mode changed from 100644 to 100755.

ci/run_evs_be_test.py

0 → 100755
+76 −0
Original line number Diff line number Diff line
#!/usr/bin/env python3
import subprocess
import pathlib
import sys
import concurrent.futures
from threading import Lock


README_FILES_PARALLEL = [
    "Readme_AMRWB_IO_enc.txt",
    "Readme_AMRWB_IO_dec.txt",
    "Readme_EVS_enc.txt",
    "Readme_EVS_dec.txt",
]
README_FILES_JBM = ["Readme_JBM_dec.txt"]
README_FILES = README_FILES_PARALLEL + README_FILES_JBM
BINARY_PATHS = ["./bin/EVS_cod", "./bin/EVS_dec"]
FOLDER_PATHS = ["testv"]
BIN_PATHS = BINARY_PATHS * 2

def main():

    if not environment_is_correct():
        return 1

    result_dict = dict()
    # run first part in parallel
    with concurrent.futures.ThreadPoolExecutor(max_workers=4) as executor:
        executor.map(
            run_file, README_FILES_PARALLEL, BIN_PATHS, [result_dict] * len(README_FILES_PARALLEL)
        )

    # JBM test can not run concurrently with the others
    run_file(README_FILES_JBM[0], BINARY_PATHS[1], result_dict)

    return analyze_results(result_dict)


def analyze_results(result_dict):
    ret = 0

    for filename, ret_code in result_dict.items():
        if ret_code != 0:
            print(f"========= Test for {filename} failed! See log below: ==========")
            with open(filename.replace("Readme", "Log")) as f:
                print(f.read())
            ret = 1

    return ret


def run_file(filename: str, bin_path: str, result_dict: dict):
    ret_code = subprocess.call(["bash", filename, bin_path])
    with Lock():
        result_dict[filename] = ret_code


def environment_is_correct():
    """
    Check that the folder with the test resources is set up correctly:
    - all Readme files there
    - EVS binaries available in bin/
    - testv and switchPaths folder exist - Content is not checked, though
    """
    ret = True

    for path in README_FILES + BINARY_PATHS + FOLDER_PATHS:
        if not pathlib.Path(path).exists():
            print(f"Environment setup is incorrect - {path} not found.")
            ret = False

    return ret


if __name__ == "__main__":
    sys.exit(main())
Loading