Commit 47ce51df authored by vasilache's avatar vasilache
Browse files

Merge branch 'main' into...

Merge branch 'main' into 1305-audible-artifact-in-signal-decoded-from-fixed-point-encoded-osba-bitstreams-with-16lkfs-input
parents 85dbab9f 7f488e0a
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -179,7 +179,7 @@
    <ClCompile Include="..\lib_rend\lib_rend.c" />
  </ItemGroup>
  <ItemGroup>
    <ClInclude Include="..\lib_rend\ivas_prot_rend.h" />
    <ClInclude Include="..\lib_rend\ivas_prot_rend_fx.h" />
    <ClInclude Include="..\lib_rend\ivas_rom_binauralRenderer.h" />
    <ClInclude Include="..\lib_rend\ivas_rom_binaural_crend_head.h" />
    <ClInclude Include="..\lib_rend\ivas_rom_rend.h" />
+3 −3
Original line number Diff line number Diff line
@@ -125,9 +125,6 @@
  </ItemGroup>
  <ItemGroup>
    <ClInclude Include="..\lib_rend\lib_rend.h" />
    <ClInclude Include="..\lib_rend\ivas_prot_rend.h">
      <Filter>rend_h</Filter>
    </ClInclude>
    <ClInclude Include="..\lib_rend\ivas_rom_rend.h">
      <Filter>rend_h</Filter>
    </ClInclude>
@@ -143,6 +140,9 @@
    <ClInclude Include="..\lib_rend\ivas_rom_TdBinauralRenderer.h">
      <Filter>rend_h</Filter>
    </ClInclude>
    <ClInclude Include="..\lib_rend\ivas_prot_rend_fx.h">
      <Filter>rend_h</Filter>
    </ClInclude>
  </ItemGroup>
  <ItemGroup>
    <Filter Include="rend_h">
+14 −99
Original line number Diff line number Diff line
@@ -1364,8 +1364,8 @@ ivas_error openCldfb_ivas_fx(
    HANDLE_CLDFB_FILTER_BANK *h_cldfb, /* i/o: filter bank handle                */
    CLDFB_TYPE type,                   /* i  : analysis or synthesis             */
    const Word32 sampling_rate,        /* i  : sampling rate                     */
    CLDFB_PROTOTYPE prototype          /* i  : CLDFB version (1.25ms/5ms delay)  */
)
    CLDFB_PROTOTYPE prototype,         /* i  : CLDFB version (1.25ms/5ms delay)  */
    const Word16 enc_dec )             /* i  : encoder/decoder flag            */
{
    HANDLE_CLDFB_FILTER_BANK hs;
    Word16 buf_len;
@@ -1379,7 +1379,17 @@ ivas_error openCldfb_ivas_fx(
    move32();
    hs->prototype = prototype;
    move32();
    IF( enc_dec == ENC )
    {
        configureCldfb_ivas_enc_fx( hs, sampling_rate );
        hs->Q_cldfb_state = 0;
    }
    ELSE
    {
        configureCldfb_ivas_fx( hs, sampling_rate );
        hs->Q_cldfb_state = Q11;
    }
    move16();
    hs->memory32 = NULL;
    hs->FilterStates = NULL;
    hs->memory_length = 0;
@@ -1405,69 +1415,9 @@ ivas_error openCldfb_ivas_fx(
    hs->cldfb_size = buf_len; /*for having original size at intermediatery conversion, will be removed on removing conversion*/
    move16();
    set32_fx( hs->cldfb_state_fx, 0, buf_len );
    hs->Q_cldfb_state = Q11;
    move16();
    *h_cldfb = hs;
    move16();

    return IVAS_ERR_OK;
}

ivas_error openCldfb_ivas_enc(
    HANDLE_CLDFB_FILTER_BANK *h_cldfb, /* i/o: filter bank handle                */
    CLDFB_TYPE type,                   /* i  : analysis or synthesis             */
    const Word32 sampling_rate,        /* i  : sampling rate                     */
    CLDFB_PROTOTYPE prototype          /* i  : CLDFB version (1.25ms/5ms delay)  */
)
{
    HANDLE_CLDFB_FILTER_BANK hs;
    Word16 buf_len;

    IF( ( hs = (HANDLE_CLDFB_FILTER_BANK) malloc( sizeof( CLDFB_FILTER_BANK ) ) ) == NULL )
    {
        return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Cannot allocate memory for CLDFB" );
    }

    hs->type = type;
    move32();
    hs->prototype = prototype;
    move32();

    configureCldfb_ivas_enc_fx( hs, sampling_rate );
    hs->memory_length = 0;
    move32();

    IF( type == CLDFB_ANALYSIS )
    {
        buf_len = sub( hs->p_filter_length, hs->no_channels );
        hs->FilterStates = (Word16 *) malloc( ( 9 + 16 ) * CLDFB_getNumChannels( sampling_rate ) * sizeof( Word16 ) );
        hs->FilterStates_eg = 0;
        move16();
    }
    ELSE
    {
        buf_len = hs->p_filter_length;
        move16();
        hs->FilterStates = (Word16 *) malloc( 2 * ( 9 + 16 ) * CLDFB_getNumChannels( sampling_rate ) * sizeof( Word16 ) );
        hs->FilterStates_eg = 0;
        move16();
    }

    if ( ( hs->cldfb_state_fx = (Word32 *) malloc( buf_len * sizeof( Word32 ) ) ) == NULL )
    {
        return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Cannot allocate memory for CLDFB" );
    }
    hs->cldfb_state_length = buf_len; // Temporarily added to store the length of buffer
    move16();
    hs->cldfb_size = buf_len; /*for having original size at intermediatery conversion, will be removed on removing conversion*/
    move16();
    set32_fx( hs->cldfb_state_fx, 0, buf_len );
    hs->Q_cldfb_state = 0;
    move16();
    set16_fx( hs->FilterStates, 0, i_mult( 9 + 16, hs->no_channels ) );
    set16_fx( hs->FilterStates_e, 0, sizeof( hs->FilterStates_e ) / sizeof( hs->FilterStates_e[0] ) );

    *h_cldfb = hs;
    move16();

    return IVAS_ERR_OK;
}
@@ -1563,41 +1513,6 @@ void analysisCldfbEncoder_ivas_fx(
    return;
}


/*-------------------------------------------------------------------*
 * GetEnergyCldfb_ivas()
 *
 * Remove handle
 *--------------------------------------------------------------------*/

void deleteCldfb_ivas(
    HANDLE_CLDFB_FILTER_BANK *h_cldfb /* i/o: filter bank handle  */
)
{
    HANDLE_CLDFB_FILTER_BANK hs = *h_cldfb;

    test();
    IF( h_cldfb == NULL || *h_cldfb == NULL )
    {
        return;
    }

    IF( hs->cldfb_state_fx )
    {
        free( hs->cldfb_state_fx );
    }

    IF( hs->FilterStates )
    {
        free( hs->FilterStates );
    }

    free( hs );
    *h_cldfb = NULL;

    return;
}

void deleteCldfb_ivas_fx(
    HANDLE_CLDFB_FILTER_BANK *h_cldfb /* i/o: filter bank handle  */
)

lib_com/ivas_prot.h

deleted100644 → 0
+0 −4065

File deleted.

Preview size limit exceeded, changes collapsed.

+2 −13
Original line number Diff line number Diff line
@@ -9803,8 +9803,8 @@ ivas_error openCldfb_ivas_fx(
    HANDLE_CLDFB_FILTER_BANK *h_cldfb, /* i/o: filter bank handle                */
    CLDFB_TYPE type,                   /* i  : analysis or synthesis             */
    const Word32 sampling_rate,        /* i  : sampling rate                     */
    CLDFB_PROTOTYPE prototype          /* i  : CLDFB version (1.25ms/5ms delay)  */
);
    CLDFB_PROTOTYPE prototype,         /* i  : CLDFB version (1.25ms/5ms delay)  */
    const Word16 enc_dec );            /* i  : encoder/decoder flag            */
Word32 rand_gauss_fx(
    Word32 *x,
@@ -11944,13 +11944,6 @@ ivas_error openCldfb_ivas(
    CLDFB_PROTOTYPE prototype          /* i  : CLDFB version (1.25ms/5ms delay) */
);
ivas_error openCldfb_ivas_enc(
    HANDLE_CLDFB_FILTER_BANK *h_cldfb, /* i/o: filter bank handle               */
    CLDFB_TYPE type,                   /* i  : analysis or synthesis            */
    const Word32 sampling_rate,        /* i  : sampling rate                    */
    CLDFB_PROTOTYPE prototype          /* i  : CLDFB version (1.25ms/5ms delay) */
);
void resampleCldfb_ivas(
    HANDLE_CLDFB_FILTER_BANK hs, /* i/o: filter bank handle          */
    const Word32 newSamplerate   /* i  : new samplerate to operate   */
@@ -11960,10 +11953,6 @@ ivas_error cldfb_save_memory_ivas(
    HANDLE_CLDFB_FILTER_BANK hs /* i/o: filter bank handle          */
);
void deleteCldfb_ivas(
    HANDLE_CLDFB_FILTER_BANK *h_cldfb /* i/o: filter bank handle          */
);
/*! r: flag indicating a valid bitrate */
Word16 is_EVS_bitrate(
    const Word32 ivas_total_brate, /* i  : EVS total bitrate  */
Loading