Commit 1d3f3e2c authored by vaclav's avatar vaclav
Browse files

formatting

parent 94c829b2
Loading
Loading
Loading
Loading
Loading
+20 −15
Original line number Diff line number Diff line
@@ -220,6 +220,7 @@ Word16 rate2EVSmode(
    return rate2AMRWB_IOmode( brate );
}


#ifdef IND_LIST_DYN
/*-------------------------------------------------------------------*
 * ind_list_realloc()
@@ -281,7 +282,8 @@ ivas_error ind_list_realloc(
 * Get the maximum allowed number of indices in the encoder
 *-----------------------------------------------------------------------*/

int16_t get_ivas_max_num_indices(                                /* o  : maximum number of indices */
/*! r: maximum number of indices */
int16_t get_ivas_max_num_indices(
    const IVAS_FORMAT ivas_format, /* i  : IVAS format               */
    const int32_t ivas_total_brate /* i  : IVAS total bitrate        */
)
@@ -513,13 +515,15 @@ int16_t get_ivas_max_num_indices( /* o : maximum
    return 2450;
}


/*-----------------------------------------------------------------------*
 * get_core_max_num_indices()
 *
 * Get the maximum allowed number of indices in the core coder
 *-----------------------------------------------------------------------*/

int16_t get_core_max_num_indices(                           /* o  : maximum number of indices */
/*! r: maximum number of indices */
int16_t get_core_max_num_indices(
    const int16_t core,       /* i  : core                      */
    const int32_t total_brate /* i  : total bitrate             */
)
@@ -694,7 +698,8 @@ int16_t get_core_max_num_indices( /* o : maximum numb
 * Get the maximum number of indices in the BWE
 *-----------------------------------------------------------------------*/

int16_t get_BWE_max_num_indices(                          /* o  : maximum number of indices */
/*! r: maximum number of indices */
int16_t get_BWE_max_num_indices(
    const int32_t extl_brate /* i  : extensiona layer bitrate  */
)
{
@@ -716,7 +721,8 @@ int16_t get_BWE_max_num_indices( /* o : maximum number
 * Set the maximum allowed number of metadata indices in the list
 *-----------------------------------------------------------------------*/

int16_t get_ivas_max_num_indices_metadata(                                /* o  : maximum number of indices */
/*! r: maximum number of indices */
int16_t get_ivas_max_num_indices_metadata(
    const IVAS_FORMAT ivas_format, /* i  : IVAS format              */
    const int32_t ivas_total_brate /* i  : IVAS total bitrate       */
)
@@ -893,6 +899,7 @@ int16_t get_ivas_max_num_indices_metadata( /* o
    return 50;
}


/*-------------------------------------------------------------------*
 * move_indices()
 *
@@ -933,9 +940,7 @@ void move_indices(
    return;
}

#endif

#ifdef IND_LIST_DYN
/*-------------------------------------------------------------------*
 * check_ind_list_limits()
 *
+26 −20
Original line number Diff line number Diff line
@@ -528,21 +528,25 @@ void push_next_bits(
);

#ifdef IND_LIST_DYN
int16_t get_ivas_max_num_indices(                                /* o  : maximum number of indices */
/*! r: maximum number of indices */
int16_t get_ivas_max_num_indices(
    const IVAS_FORMAT ivas_format, /* i  : IVAS format               */
    const int32_t ivas_total_brate /* i  : IVAS total bitrate        */
);

int16_t get_core_max_num_indices(                           /* o  : maximum number of indices */
/*! r: maximum number of indices */
int16_t get_core_max_num_indices(
    const int16_t core,       /* i  : core                      */
    const int32_t total_brate /* i  : total bitrate             */
);

int16_t get_BWE_max_num_indices(                          /* o  : maximum number of indices */
/*! r: maximum number of indices */
int16_t get_BWE_max_num_indices(
    const int32_t extl_brate /* i  : extensiona layer bitrate  */
);

int16_t get_ivas_max_num_indices_metadata(                                /* o  : maximum number of indices for metadata */
/*! r: maximum number of indices for metadata */
int16_t get_ivas_max_num_indices_metadata(
    const IVAS_FORMAT ivas_format, /* i  : IVAS format              */
    const int32_t ivas_total_brate /* i  : IVAS total bitrate       */
);
@@ -562,14 +566,16 @@ void move_indices(
    const int16_t nb_indices    /* i  : number of moved indices */
);

int16_t find_indice(                        /* o  : index of the indice in the list, -1 if not found */
/*! r: index of the indice in the list, -1 if not found */
int16_t find_indice(
    BSTR_ENC_HANDLE hBstr, /* i  : encoder bitstream handle                    */
    int16_t id,            /* i  : ID of the indice                            */
    uint16_t *value,       /* o  : value of the quantized indice               */
    int16_t *nb_bits       /* o  : number of bits used to quantize the indice  */
);

uint16_t delete_indice(                        /* o  : number of deleted indices                   */
/*! r: number of deleted indices  */
uint16_t delete_indice(
    BSTR_ENC_HANDLE hBstr, /* i/o: encoder bitstream handle                    */
    int16_t id             /* i  : ID of the indice                            */
);
+0 −2
Original line number Diff line number Diff line
@@ -329,8 +329,6 @@ ivas_error ivas_init_encoder(
#ifndef IND_LIST_DYN
    ,
    Indice ind_list[][MAX_NUM_INDICES] /* o  : bitstream indices           */
#endif
#ifndef IND_LIST_DYN
    ,
    Indice ind_list_metadata[][MAX_BITS_METADATA] /* o  : bitstream indices metadata  */
#endif
+7 −10
Original line number Diff line number Diff line
@@ -52,8 +52,6 @@ struct IVAS_ENC
    Encoder_Struct *st_ivas;
#ifndef IND_LIST_DYN
    Indice ind_list[MAX_NUM_DATA][MAX_NUM_INDICES];                /* list of indices */
#endif
#ifndef IND_LIST_DYN
    Indice ind_list_metadata[MAX_NUM_METADATA][MAX_BITS_METADATA]; /* list of indices for metadata */
#endif
    ENC_CORE_HANDLE hCoreCoder;
@@ -139,11 +137,11 @@ ivas_error IVAS_ENC_Open(
    ( *phIvasEnc )->maxBandwidthUser = false;
    resetIsmMetadataProvidedFlags( *phIvasEnc );

#ifndef IND_LIST_DYN
    /*-----------------------------------------------------------------*
     * Initialize indices
     *-----------------------------------------------------------------*/

#ifndef IND_LIST_DYN
    for ( i = 0; i < MAX_NUM_DATA; ++i )
    {
        for ( j = 0; j < MAX_NUM_INDICES; ++j )
@@ -152,9 +150,7 @@ ivas_error IVAS_ENC_Open(
            ( *phIvasEnc )->ind_list[i][j].value = 0;
        }
    }
#endif

#ifndef IND_LIST_DYN
    for ( i = 0; i < MAX_NUM_METADATA; ++i )
    {
        for ( j = 0; j < MAX_BITS_METADATA; ++j )
@@ -928,10 +924,7 @@ static ivas_error configureEncoder(
    if ( ( error = ivas_init_encoder( st_ivas
#ifndef IND_LIST_DYN
                                      ,
                                      hIvasEnc->ind_list
#endif
#ifndef IND_LIST_DYN
                                      ,
                                      hIvasEnc->ind_list,
                                      hIvasEnc->ind_list_metadata
#endif
                                      ) ) != IVAS_ERR_OK )
@@ -1226,6 +1219,10 @@ ivas_error IVAS_ENC_EncodeFrameToSerial(
            }
        }
    }

    /*-----------------------------------------------------------------*
     * Encode one frame
     *-----------------------------------------------------------------*/
#endif

    if ( hIvasEnc->switchingActive && hEncoderConfig->ivas_format == MONO_FORMAT )