Commit 7ef4214d authored by Tapani Pihlajakuja's avatar Tapani Pihlajakuja
Browse files

Merge remote-tracking branch 'origin/main' into 1380_change_omasa_enc_panning_gains_implementation

parents cd0d4f93 9b04ec3c
Loading
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -1488,6 +1488,8 @@ test-long-self-test:
  stage: compare
  resource_group: ivas-long-self-test-resource
  timeout: "50 minutes"
  tags:
    - ivas-linux-fast
  rules:
    - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == 'test-long-self-test'
  allow_failure:
@@ -2234,7 +2236,9 @@ sanitizer-test-osba-planar-hoa3-ism4:
    expire_in: 1 week

coverage-merge:
  extends: .rules-main-scheduled
  extends: 
    - .rules-main-scheduled
    - .test-job-linux-needs-testv-dir
  tags:
    - ivas-linux-fast
  stage: test
+11 −0
Original line number Diff line number Diff line
@@ -33,6 +33,9 @@
#include "lib_rend.h"
#include <assert.h>
#include <math.h>
#ifdef RENDERER_MD_SYNC_DELAY_TO_INTEGER
#include <stdint.h>
#endif
#include <string.h>
#include "audio_file_reader.h"
#include "audio_file_writer.h"
@@ -189,7 +192,11 @@ typedef struct
    float lfeConfigElevation;
    bool lfeCustomRoutingEnabled;
    char inLfePanningMatrixFile[RENDERER_MAX_CLI_ARG_LENGTH];
#ifdef RENDERER_MD_SYNC_DELAY_TO_INTEGER
    int16_t syncMdDelay;
#else
    float syncMdDelay;
#endif
    IVAS_RENDER_FRAMESIZE render_framesize;
    uint16_t directivityPatternId[RENDERER_MAX_ISM_INPUTS];
    AcousticEnvironmentSequence aeSequence;
@@ -2844,7 +2851,11 @@ static void parseOption(
        case CmdLnOptionId_syncMdDelay:
            assert( numOptionValues == 1 );
            /* Metadata Delay to sync with audio delay in ms */
#ifdef RENDERER_MD_SYNC_DELAY_TO_INTEGER
            args->syncMdDelay = (int16_t) strtol( optionValues[0], NULL, 10 );
#else
            args->syncMdDelay = strtof( optionValues[0], NULL );
#endif
            break;
        default:
            assert( 0 && "This should be unreachable - all command line options should be explicitly handled." );
+24 −0
Original line number Diff line number Diff line
@@ -275,8 +275,14 @@ void edxt(
            {
                for ( k = Nm1 >> 1; k > 0; k-- )
                {
#ifdef NONBE_FIX_NONBE_BETWEEN_OPTIMIZATION_LEVELS_2
                    volatile float angle_tmp = scale * k;
                    const float wRe = cosf( angle_tmp );
                    const float wIm = sinf( angle_tmp );
#else
                    const float wRe = cosf( scale * k );
                    const float wIm = sinf( scale * k );
#endif

                    y[k] /*pt 1*/ = wRe * re[k] + wIm * im[k];
                    y[length - k] = wIm * re[k] - wRe * im[k];
@@ -287,8 +293,14 @@ void edxt(
            {
                for ( k = Nm1 >> 1; k > 0; k-- )
                {
#ifdef NONBE_FIX_NONBE_BETWEEN_OPTIMIZATION_LEVELS_2
                    volatile float angle_tmp = scale * k;
                    const float wRe = cosf( angle_tmp );
                    const float wIm = sinf( angle_tmp );
#else
                    const float wRe = cosf( scale * k );
                    const float wIm = sinf( scale * k );
#endif

                    y[Nm1 - k] = wRe * re[k] + wIm * im[k];
                    y[k - 1] = wIm * re[k] - wRe * im[k];
@@ -304,8 +316,14 @@ void edxt(
            {
                for ( k = Nm1 >> 1; k > 0; k-- )
                {
#ifdef NONBE_FIX_NONBE_BETWEEN_OPTIMIZATION_LEVELS_2
                    volatile float angle_tmp = scale * k;
                    const float wRe = cosf( angle_tmp ) * 0.5f;
                    const float wIm = sinf( angle_tmp ) * 0.5f;
#else
                    const float wRe = cosf( scale * k ) * 0.5f;
                    const float wIm = sinf( scale * k ) * 0.5f;
#endif

                    re[k] = wRe * x[k] + wIm * x[length - k];
                    im[k] = wRe * x[length - k] - wIm * x[k];
@@ -316,8 +334,14 @@ void edxt(
            {
                for ( k = Nm1 >> 1; k > 0; k-- )
                {
#ifdef NONBE_FIX_NONBE_BETWEEN_OPTIMIZATION_LEVELS_2
                    volatile float angle_tmp = scale * k;
                    const float wRe = cosf( angle_tmp ) * 0.5f;
                    const float wIm = sinf( angle_tmp ) * 0.5f;
#else
                    const float wRe = cosf( scale * k ) * 0.5f;
                    const float wIm = sinf( scale * k ) * 0.5f;
#endif

                    re[k] = wRe * x[Nm1 - k] + wIm * x[k - 1];
                    im[k] = wRe * x[k - 1] - wIm * x[Nm1 - k];
+5 −0
Original line number Diff line number Diff line
@@ -169,6 +169,7 @@
#define FIX_1119_SPLIT_RENDERING_VOIP                   /* FhG: Add split rendering support to decoder in VoIP mode */
#define TMP_1342_WORKAROUND_DEC_FLUSH_BROKEN_IN_SR      /* FhG: Temporary workaround for incorrect implementation of decoder flush with split rendering */
#define FIX_1413_IGF_INIT_PRINTOUT                      /* FhG: use correct variable for IGF initiliazation */
#define RENDERER_MD_SYNC_DELAY_TO_INTEGER               /* FhG: change data type of metadata sync delay in ext renderer to int16_t for better BASOP portability (and nicer code) */


/* #################### End BE switches ################################## */
@@ -185,6 +186,10 @@

#define NONBE_1412_AVOID_ROUNDING_AZ_ELEV              /* FhG:  Avoid rounding when passing azimuth and elevation to efap_determine_gains() */
#define NONBE_MDCT_ST_DTX_FIX_SUBOPT_SPATIAL_CNG       /* FhG: Fix MDCT-Stereo comfort noise for certain noise types */
#define NONBE_FIX_NONBE_BETWEEN_OPTIMIZATION_LEVELS    /* FhG: fix non-BE in DFT stereo encoder between optimization levels */
#define NONBE_FIX_NONBE_BETWEEN_OPTIMIZATION_LEVELS_2  /* FhG: fix even more non-BEnesses */

/*#define NONBE_1324_TC_BUFFER_MEMOERY_KEEP*/               /* VA: issue 1324: do not reset TSM memory in JBM bitrate switching */

#define NONBE_1380_OMASA_BUILD_DIFF                     /* Nokia: Fix for issue #1380: Large differences in OMASA output between Debug and Release builds */

+12 −0
Original line number Diff line number Diff line
@@ -2284,13 +2284,16 @@ ivas_error ivas_jbm_dec_tc_buffer_reconfigure(
    const int16_t n_samples_granularity     /* i  : new granularity of the renderer/buffer  */
)
{
#ifdef NONBE_1324_TC_BUFFER_MEMOERY_KEEP
    int16_t ch_idx, num_tc_buffer_mem, n_samples_still_available;
    float tc_buffer_mem[MAX_INTERN_CHANNELS][L_FRAME48k / MAX_PARAM_SPATIAL_SUBFRAMES - 1];
#endif
    ivas_error error;
    DECODER_TC_BUFFER_HANDLE hTcBuffer;

    hTcBuffer = st_ivas->hTcBuffer;

#ifdef NONBE_1324_TC_BUFFER_MEMOERY_KEEP
    num_tc_buffer_mem = 0;
    n_samples_still_available = 0;

@@ -2309,6 +2312,7 @@ ivas_error ivas_jbm_dec_tc_buffer_reconfigure(
        }
    }

#endif
    /* if granularity changes, adapt subframe_nb_slots */
    if ( n_samples_granularity != hTcBuffer->n_samples_granularity )
    {
@@ -2348,6 +2352,12 @@ ivas_error ivas_jbm_dec_tc_buffer_reconfigure(
    hTcBuffer->nchan_buffer_full = nchan_full;
    hTcBuffer->n_samples_granularity = n_samples_granularity;

#ifndef NONBE_1324_TC_BUFFER_MEMOERY_KEEP
#ifdef DEBUGGING
    /* what is remaining from last frames needs always be smaller than n_samples_granularity */
    assert( ( hTcBuffer->n_samples_buffered - hTcBuffer->n_samples_rendered ) < n_samples_granularity );
#endif
#endif
    /* reallocate TC audio buffers */

    ivas_jbm_dec_tc_audio_deallocate( hTcBuffer );
@@ -2357,12 +2367,14 @@ ivas_error ivas_jbm_dec_tc_buffer_reconfigure(
        return error;
    }

#ifdef NONBE_1324_TC_BUFFER_MEMOERY_KEEP
    /* propagate samples of the TC buffer from the previous frame */
    for ( ch_idx = 0; ch_idx < num_tc_buffer_mem; ch_idx++ )
    {
        mvr2r( tc_buffer_mem[ch_idx], hTcBuffer->tc_buffer_old[ch_idx], n_samples_still_available );
    }

#endif
    return IVAS_ERR_OK;
}

Loading