Commit 45db3cd8 authored by Jan Kiene's avatar Jan Kiene
Browse files

Merge remote-tracking branch 'origin/main' into replace_cmp_custom

parents 28137917 09d42f9c
Loading
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -935,6 +935,7 @@ coverage-test-on-main-scheduled:
    - python3 -m pytest tests/test_param_file.py -v -n 0 --update_ref 1 -m create_ref --param_file scripts/config/self_test_evs.prm --ref_encoder_path ./IVAS_cod --ref_decoder_path ./IVAS_dec
    - bash ci/smoke_test.sh coverage
    - python3 -m pytest -q -n auto tests/renderer/test_renderer_be_comparison.py
    - bash ci/ivas_voip_be_test.sh coverage
    - lcov -c -d obj -o coverage.info
    - genhtml coverage.info -o coverage
  artifacts:
+40 −7
Original line number Diff line number Diff line
@@ -28,23 +28,51 @@
# accordance with the laws of the Federal Republic of Germany excluding its conflict of law rules and
# the United Nations Convention on Contracts on the International Sales of Goods.

function usage {
    echo
    echo "Usage:"
    echo "      ivas_voip_be_test.sh [MODE]"
    echo 
    echo "      MODE - test (default) or coverage"
    exit
}

if [ ! -d "lib_com" ]; then
    echo "not in root directory! - please run in IVAS root"
    exit 1
fi

if [ -z "$1" ] || [ "$1" == "test" ]; then
    WORKERS=""
    BUILD=1
    COVERAGE=0
elif [ "$1" == "coverage" ]; then
    WORKERS="-t 1"
    BUILD=0
    COVERAGE=1
else
    usage
fi

if [ $BUILD -eq 1 ];then
    make clean
    make all -j
fi

# Configuration
modes=('SBA_b128_wb_cbr' 'MC_7_1_b96_fb_cbr' 'ISM2_b48_fb_cbr')
output_formats=('STEREO' 'FOA' '7_1' 'HOA3')
limit_input_to_x_seconds=30

network_profile_path="scripts/dly_error_profiles/dly_error_profile_0.dat"
cfg=./scripts/config/ci_linux.json
dly_profile=./scripts/dly_error_profiles/dly_error_profile_0.dat

output_dir_default="out"
output_dir_voip="out_voip"

# Build IVAS
make clean
make all -j 8

# Run the same modes in VoIP and non-VoIP mode with a neutral delay profile
./scripts/runIvasCodec.py -p ./scripts/config/ci_linux.json -U $limit_input_to_x_seconds -m "${modes[@]}" --oc "${output_formats[@]}" -o $output_dir_default | tee voip_be_test_output.txt
./scripts/runIvasCodec.py -p ./scripts/config/ci_linux.json -U $limit_input_to_x_seconds -m "${modes[@]}" --oc "${output_formats[@]}" -o $output_dir_voip -J "$network_profile_path" | tee -a voip_be_test_output.txt
./scripts/runIvasCodec.py -p $cfg $WORKERS -U $limit_input_to_x_seconds -m "${modes[@]}" --oc "${output_formats[@]}" -o $output_dir_default | tee voip_be_test_output.txt
./scripts/runIvasCodec.py -p $cfg $WORKERS -U $limit_input_to_x_seconds -m "${modes[@]}" --oc "${output_formats[@]}" -o $output_dir_voip -J "$dly_profile" | tee -a voip_be_test_output.txt

# Check if Python scripts above failed. They return status 0 even when running a mode fails, so we have to parse log file
if grep -iq failed voip_be_test_output.txt ; then
@@ -52,6 +80,11 @@ if grep -iq failed voip_be_test_output.txt ; then
    exit 1
fi

if [ $COVERAGE -eq 1 ];then
    # Coverage analysis requires only running the codec and may exit before the comparison part
    exit 0
fi

# Set up Python path
python_audio_module_path=$(pwd)/scripts
export PYTHONPATH=$python_audio_module_path:$PYTHONPATH
+8 −8
Original line number Diff line number Diff line
@@ -58,7 +58,7 @@ dly_profile=./scripts/dly_error_profiles/dly_error_profile_10.dat

if [ $BUILD -eq 1 ];then
    make clean
	make all -j 8
    make all -j
fi

./scripts/runIvasCodec.py -p $cfg -U 1 $WORKERS | tee smoke_test_output.txt
+2 −1
Original line number Diff line number Diff line
@@ -4608,11 +4608,12 @@ void ivas_binRenderer_close(
    BINAURAL_RENDERER_HANDLE *hBinRenderer                      /* i/o: decoder binaural renderer handle                */
);

#ifdef DEBUGGING
void ivas_binaural_cldfb(
    Decoder_Struct *st_ivas,                                    /* i/o: IVAS decoder structure                                  */
    float output_f[][L_FRAME48k]                                /* i/o: synthesized core-coder transport channels/DirAC output  */
);

#endif
void ivas_binRenderer(
    BINAURAL_RENDERER_HANDLE hBinRenderer,                      /* i/o: fastconv binaural renderer handle                       */
    HEAD_TRACK_DATA_HANDLE hHeadTrackData,                      /* i/o: head track handle                                       */
+88 −0
Original line number Diff line number Diff line
@@ -1007,6 +1007,26 @@ void lls_interp_n(
    return;
}

#ifdef FIX_ANGLE_WRAPPING
/* helper function for panning_wrap_angles */
static float wrap_azi(
    const float azi_deg )
{
    float azi = azi_deg;

    /* Wrap azimuth value */
    while ( azi > 180 )
    {
        azi -= 360.0f;
    }

    while ( azi <= -180 )
    {
        azi += 360;
    }

    return azi;
}

/*-------------------------------------------------------------------*
 * panning_wrap_angles()
@@ -1016,7 +1036,74 @@ void lls_interp_n(
 * elevation = [-90, 90]
 * Considers direction changes from large elevation values
 *-------------------------------------------------------------------*/
void panning_wrap_angles(
    const float azi_deg, /* i  : azimuth in degrees for panning direction (positive left) */
    const float ele_deg, /* i  : elevation in degrees for panning direction (positive up) */
    float *azi_wrapped,  /* o  : wrapped azimuth component                                */
    float *ele_wrapped   /* o  : wrapped elevation component                              */
)
{
    float azi, ele;

    azi = azi_deg;
    ele = ele_deg;

    if ( fabsf( ele ) < 90 )
    {
        *ele_wrapped = ele;
        *azi_wrapped = wrap_azi( azi );
        return;
    }
    else
    {
        /* Special case when elevation is a multiple of 90; azimuth is irrelevant */
        if ( ( fmodf( ele, 90 ) == 0 ) && ( fmodf( ele, 180 ) != 0 ) )
        {
            *azi_wrapped = 0;
            while ( ele > 90 )
            {
                ele -= 360;
            }
            while ( ele < -90 )
            {
                ele += 360;
            }
            *ele_wrapped = ele;
        }
        else
        {
            /* Wrap elevation and adjust azimuth accordingly */
            while ( fabsf( ele ) > 90 )
            {
                /* Flip to other hemisphere */
                azi += 180;

                /* Compensate elevation accordingly */
                if ( ele > 90 )
                {
                    ele = 180 - ele;
                }
                else if ( ele < -90 )
                {
                    ele = -180 - ele;
                }
            }
            *azi_wrapped = wrap_azi( azi );
            *ele_wrapped = ele;
        }

        return;
    }
}
#else
/*-------------------------------------------------------------------*
 * panning_wrap_angles()
 *
 * Wrap angles for amplitude panning to the range:
 * azimuth = (-180, 180]
 * elevation = [-90, 90]
 * Considers direction changes from large elevation values
 *-------------------------------------------------------------------*/
void panning_wrap_angles(
    const float azi_deg, /* i  : azimuth in degrees for panning direction (positive left) */
    const float ele_deg, /* i  : elevation in degrees for panning direction (positive up) */
@@ -1080,6 +1167,7 @@ void panning_wrap_angles(

    return;
}
#endif

/*-------------------------------------------------------------------------*
 * v_sort_ind()
Loading