Commit 81ef67c8 authored by vaclav's avatar vaclav
Browse files

formal improvement

parent 3b9c6d09
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -5127,7 +5127,7 @@ ivas_error ivas_omasa_enc_open(
);

void ivas_omasa_enc_close(
    OMASA_ENC_HANDLE hOMasa                                     /* i/o: encoder OMASA handle                    */
    OMASA_ENC_HANDLE *hOMasa                                    /* i/o: encoder OMASA handle                    */
);

ivas_error ivas_omasa_enc_config(
+2 −0
Original line number Diff line number Diff line
@@ -456,7 +456,9 @@ ivas_error ivas_masa_decode(

    if ( st_ivas->hDirAC != NULL )
    {
#ifdef MASA_AND_OBJECTS
        dirac_bs_md_write_idx = st_ivas->hDirAC->dirac_bs_md_write_idx; /* Store the write-index for this frame */
#endif

        ivas_qmetadata_to_dirac( hQMetaData, st_ivas->hDirAC, hMasa, ivas_total_brate, SBA_MODE_NONE, 0 );
    }
+2 −5
Original line number Diff line number Diff line
@@ -1085,11 +1085,8 @@ void ivas_destroy_enc(
    ivas_mcmasa_enc_close( &( st_ivas->hMcMasa ), st_ivas->hEncoderConfig->input_Fs );

#ifdef MASA_AND_OBJECTS
    if ( st_ivas->hOMasa != NULL )
    {
        ivas_omasa_enc_close( st_ivas->hOMasa ); // VE!!!!!
        st_ivas->hOMasa = NULL;
    }
    /* OMASA handle */
    ivas_omasa_enc_close( &( st_ivas->hOMasa ) );
#endif

    /* Stereo downmix for EVS encoder handle */
+17 −11
Original line number Diff line number Diff line
@@ -150,35 +150,41 @@ ivas_error ivas_omasa_enc_open(
 *--------------------------------------------------------------------------*/

void ivas_omasa_enc_close(
    OMASA_ENC_HANDLE hOMasa /* i/o: encoder OMASA handle */
    OMASA_ENC_HANDLE *hOMasa /* i/o: encoder OMASA handle */
)
{
    int16_t i, j;

    for ( i = 0; i < hOMasa->num_Cldfb_instances; i++ )
    if ( hOMasa == NULL || *hOMasa == NULL )
    {
        return;
    }

    for ( i = 0; i < ( *hOMasa )->num_Cldfb_instances; i++ )
    {
        deleteCldfb( &( hOMasa->cldfbAnaEnc[i] ) );
        deleteCldfb( &( ( *hOMasa )->cldfbAnaEnc[i] ) );
    }

    for ( i = 0; i < DIRAC_NUM_DIMS; i++ )
    {
        for ( j = 0; j < MAX_PARAM_SPATIAL_SUBFRAMES; j++ )
        {
            free( hOMasa->direction_vector_m[i][j] );
            hOMasa->direction_vector_m[i][j] = NULL;
            free( ( *hOMasa )->direction_vector_m[i][j] );
            ( *hOMasa )->direction_vector_m[i][j] = NULL;
        }

        for ( j = 0; j < DIRAC_NO_COL_AVG_DIFF; j++ )
        {
            free( hOMasa->buffer_intensity_real[i][j] );
            hOMasa->buffer_intensity_real[i][j] = NULL;
            free( ( *hOMasa )->buffer_intensity_real[i][j] );
            ( *hOMasa )->buffer_intensity_real[i][j] = NULL;
        }

        free( hOMasa->direction_vector_m[i] );
        hOMasa->direction_vector_m[i] = NULL;
        free( ( *hOMasa )->direction_vector_m[i] );
        ( *hOMasa )->direction_vector_m[i] = NULL;
    }

    free( hOMasa );
    free( *hOMasa );
    ( *hOMasa ) = NULL;

    return;
}
@@ -265,7 +271,7 @@ ivas_error ivas_omasa_enc_config(
        }
        else if ( st_ivas->ism_mode == ISM_MASA_MODE_DISC && st_ivas->hOMasa != NULL )
        {
            ivas_omasa_enc_close( st_ivas->hOMasa );
            ivas_omasa_enc_close( &( st_ivas->hOMasa ) );
            st_ivas->hOMasa = NULL;
        }