Commit 6124eb86 authored by malenov's avatar malenov
Browse files

adjust the max number of indices for ISM3 at 384 kbps

parent 3e78c239
Loading
Loading
Loading
Loading
Loading
+20 −10
Original line number Diff line number Diff line
@@ -320,7 +320,7 @@ int16_t get_max_num_indices( /* o : maximum numb
        }
        else
        {
            return 700;
            return 760;
        }
    }
    else if ( ivas_format == SBA_FORMAT )
@@ -518,7 +518,7 @@ ivas_error push_indice(
    if ( hBstr->nb_ind_tot >= hBstr->max_num_indices )
    {
#ifdef DEBUGGING
        DEBUG_LINE( 1 )
        DEBUG_LINE( 0 )
        printf( "Warning: Maximum number of indices %d has been exceeded (frame %d)! Increase the limits in get_max_num_indices() or get_max_num_indices_metadata().\n", hBstr->max_num_indices, frame );
#endif

@@ -651,7 +651,7 @@ ivas_error push_next_indice(
    if ( hBstr->nb_ind_tot >= hBstr->max_num_indices )
    {
#ifdef DEBUGGING
        DEBUG_LINE( 1 )
        DEBUG_LINE( 0 )
        printf( "Warning: Maximum number of indices %d has been exceeded (frame %d)! Increase the limits in get_max_num_indices() or get_max_num_indices_metadata().\n", hBstr->max_num_indices, frame );
#endif

@@ -728,7 +728,7 @@ void push_next_bits(
#ifdef IND_LIST_DYN
    ptr = &hBstr->ind_list[hBstr->nb_ind_tot];

    /* get the id of the previous indice -> will be re-used here as well */
    /* get the id of the previous indice -> will be re-used */
    if ( hBstr->nb_ind_tot > 0 )
    {
        prev_id = hBstr->ind_list[hBstr->nb_ind_tot - 1].id;
@@ -762,17 +762,22 @@ void push_next_bits(
        if ( hBstr->nb_ind_tot >= hBstr->max_num_indices )
        {
#ifdef DEBUGGING
            DEBUG_LINE( 1 )
            DEBUG_LINE( 0 )
            printf( "Warning: Maximum number of indices %d has been exceeded (frame %d)! Increase the limits in get_max_num_indices() or get_max_num_indices_metadata().\n", hBstr->max_num_indices, frame );
#endif

            /* reallocate the buffer of indices with increased limit */
            ind_list_realloc( hBstr, hBstr->nb_ind_tot + STEP_MAX_NUM_INDICES );
            ptr = &hBstr->ind_list[hBstr->nb_ind_tot];
        }
#endif

        else
        {
            ++ptr;
        }
#else
        ++ptr;
#endif
    }

    for ( ; i < nb_bits; ++i )
    {
@@ -792,17 +797,22 @@ void push_next_bits(
        if ( hBstr->nb_ind_tot >= hBstr->max_num_indices )
        {
#ifdef DEBUGGING
            DEBUG_LINE( 1 )
            DEBUG_LINE( 0 )
            printf( "Warning: Maximum number of indices %d has been exceeded (frame %d)! Increase the limits in get_max_num_indices() or get_max_num_indices_metadata().\n", hBstr->max_num_indices, frame );
#endif

            /* reallocate the buffer of indices with increased limit */
            ind_list_realloc( hBstr, hBstr->nb_ind_tot + STEP_MAX_NUM_INDICES );
            ptr = &hBstr->ind_list[hBstr->nb_ind_tot];
        }
#endif

        else
        {
            ++ptr;
        }
#else
        ++ptr;
#endif
    }

#ifndef IND_LIST_DYN
    hBstr->next_ind = (int16_t) ( ptr - hBstr->ind_list );