Commit e519c8a7 authored by Archit Tamarapu's avatar Archit Tamarapu
Browse files

Merge branch 'main' of ssh://forge.3gpp.org:29419/sa4/audio/ivas-basop into...

Merge branch 'main' of ssh://forge.3gpp.org:29419/sa4/audio/ivas-basop into lc3plus-v161-update-main
parents ccebcd94 2b4433e8
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -216,7 +216,7 @@ target_link_libraries(ISAR_post_rend lib_basop lib_isar lib_util lib_com)
target_include_directories(ISAR_post_rend PRIVATE lib_basop lib_isar)

add_executable(ambi_converter apps/ambi_converter.c)
target_link_libraries(ambi_converter lib_util lib_com lib_basop)
target_link_libraries(ambi_converter lib_util lib_com lib_basop lib_debug)
if(UNIX)
  target_link_libraries(ambi_converter m)
endif()
+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