Commit 8c47ab5a authored by fotopoulou's avatar fotopoulou
Browse files

Merge branch 'main' into 1793-fix-decoder-mc-to-mono-output-scaling

parents cf7007ad 4263280a
Loading
Loading
Loading
Loading
Loading
+14 −1
Original line number Diff line number Diff line
@@ -1468,6 +1468,18 @@ static bool parseCmdlIVAS_dec(
        return false;
    }

#ifdef SUPPORT_JBM_TRACEFILE
    /* Validate options that depend on other options */
    if ( arg->jbmTraceFilename != NULL && arg->delayCompensationEnabled
         /* This decMode check should be removed once timestamp sync issues between JBM trace and audio are fixed in EVS */
         && arg->decMode != IVAS_DEC_MODE_EVS )
    {
        fprintf( stderr, "Error: Writing to a JBM trace file requires delay compensation to be disabled with -no_delay_cmp\n\n" );
        usage_dec();
        return false;
    }
#endif

    return true;
}

@@ -1504,7 +1516,8 @@ static void usage_dec( void )
    fprintf( stdout, "                      EVS RTP Payload Format. The SDP parameter hf_only is required.\n" );
    fprintf( stdout, "                      Reading RFC4867 AMR/AMR-WB RTP payload format is not supported.\n" );
#ifdef SUPPORT_JBM_TRACEFILE
    fprintf( stdout, "-Tracefile TF       : VoIP mode: Generate trace file named TF\n" );
    fprintf( stdout, "-Tracefile TF       : VoIP mode: Generate trace file named TF. Requires -no_delay_cmp to\n" );
    fprintf( stdout, "                      be enabled so that trace contents remain in sync with audio output.\n" );
#endif
    fprintf( stdout, "-fr L               : render frame size in ms L=(5,10,20), default is 20)\n" );
    fprintf( stdout, "-fec_cfg_file       : Optimal channel aware configuration computed by the JBM   \n" );
+5 −0
Original line number Diff line number Diff line
@@ -192,8 +192,13 @@ typedef enum
#define JBM_CLDFB_SLOTS_IN_SUBFRAME_LOG2        2                           /* To be used for shift operation instead of division */
#define MAX_JBM_CLDFB_TIMESLOTS                 32
#define DEFAULT_JBM_CLDFB_TIMESLOTS             16
#ifdef JBM_MEMORY_OPT
#define MAX_JBM_L_FRAME48k                      ( IVAS_MAX_FRAME_SIZE * 2 ) /* 1920:  max. time-scaled frame buffer length (per channel) in samples */
#define MAX_JBM_L_FRAME_NS                      40000000L                   /* 40 ms: time-scaled frame size in ns, proportional to MAX_JBM_L_FRAME48k  */
#else
#define MAX_JBM_L_FRAME48k                      1920
#define MAX_JBM_L_FRAME_NS                      40000000L
#endif
#define MAX_SPAR_INTERNAL_CHANNELS              IVAS_SPAR_MAX_CH
#define MAX_CLDFB_DIGEST_CHANNELS               3                           /* == maximum of ParamISM TCs and ParamMC TCs */

+119 −99

File changed.

Preview size limit exceeded, changes collapsed.

+68 −0
Original line number Diff line number Diff line
@@ -149,6 +149,73 @@ UWord32 ivas_syn_output_fx(
    return noClipping; /*Q0*/
}

#ifdef JBM_MEMORY_OPT

/*-------------------------------------------------------------------*
 * ivas_buffer_interleaved_to_deinterleaved()
 *
 * Convert an interleaved buffer of audio channels to deinterleaved one
 *-------------------------------------------------------------------*/

void ivas_buffer_interleaved_to_deinterleaved_fx(
    Word32 *audio,             /* i/o: audio buffer                    */
    const Word16 n_channels,   /* i  : number of channels              */
    const Word16 frame_length, /* i  : frame length (one channel)      */
    const Word16 n_samp_full   /* i  : full frame length (one channel) */
)
{
    Word16 offset, ch, m;
    Word32 buffer[MAX_TRANSPORT_CHANNELS][MAX_JBM_L_FRAME48k];

    FOR( ch = 0; ch < n_channels; ch++ )
    {
        FOR( m = 0; m < frame_length; m++ )
        {
            buffer[ch][m] = audio[m * n_channels + ch];
            move32();
        }
    }

    offset = 0;
    move16();
    FOR( ch = 0; ch < n_channels; ch++ )
    {
        Copy32( buffer[ch], audio + offset, frame_length );
        offset = add( offset, n_samp_full );
    }

    return;
}


/*-------------------------------------------------------------------*
 * ivas_buffer_deinterleaved_to_interleaved()
 *
 * Convert a deinterleaved buffer of audio channels to interleaved one
 *-------------------------------------------------------------------*/

void ivas_buffer_deinterleaved_to_interleaved_fx(
    Word32 *audio[],           /* i/o: deinterleaved audio buffer      */
    const Word16 n_channels,   /* i  : number of channels              */
    const Word16 frame_length, /* i  : frame length (one channel)      */
    Word32 *audio_out          /* o  : interleaved audio buffer        */
)
{
    Word16 ch, m;

    FOR( ch = 0; ch < n_channels; ch++ )
    {
        FOR( m = 0; m < frame_length; m++ )
        {
            audio_out[m * n_channels + ch] = audio[ch][m];
            move32();
        }
    }

    return;
}

#else

/*-------------------------------------------------------------------*
 * ivas_syn_output_f()
@@ -183,6 +250,7 @@ void ivas_syn_output_f_fx(
    return;
}

#endif

/*-------------------------------------------------------------------*
 * mvr2r_inc()
+3 −0

File changed.

Preview size limit exceeded, changes collapsed.

Loading