Commit 1c2cef80 authored by Dominik Weckbecker's avatar Dominik Weckbecker 💬
Browse files

make all instances of DBG_BITSTREAM_ANALYSIS explicitly dependent on DEBUGGING

parent 162fb594
Loading
Loading
Loading
Loading
+17 −17
Original line number Diff line number Diff line
@@ -50,7 +50,7 @@
#include "ivas_cnst.h"
#include "ivas_rom_com.h"
#include "wmc_auto.h"
#ifdef DBG_BITSTREAM_ANALYSIS
#if defined(DEBUGGING) && defined(DBG_BITSTREAM_ANALYSIS)
#include <string.h>
#endif

@@ -212,7 +212,7 @@ ivas_error ind_list_realloc(
        {
            new_ind_list[i].id = old_ind_list[i].id;
            new_ind_list[i].value = old_ind_list[i].value;
#ifdef DBG_BITSTREAM_ANALYSIS
#if defined(DEBUGGING) && defined(DBG_BITSTREAM_ANALYSIS)
            strncpy( new_ind_list[i].function_name, old_ind_list[i].function_name, 100 );
#endif
        }
@@ -223,7 +223,7 @@ ivas_error ind_list_realloc(
    for ( ; i < max_num_indices; i++ )
    {
        new_ind_list[i].nb_bits = -1;
#ifdef DBG_BITSTREAM_ANALYSIS
#if defined(DEBUGGING) && defined(DBG_BITSTREAM_ANALYSIS)
        sprintf( new_ind_list[i].function_name, "RESET in ind_list_realloc" );
#endif
    }
@@ -811,7 +811,7 @@ void move_indices(
            new_ind_list[i].id = old_ind_list[i].id;
            new_ind_list[i].value = old_ind_list[i].value;
            new_ind_list[i].nb_bits = old_ind_list[i].nb_bits;
#ifdef DBG_BITSTREAM_ANALYSIS
#if defined(DEBUGGING) && defined(DBG_BITSTREAM_ANALYSIS)
            strncpy( new_ind_list[i].function_name, old_ind_list[i].function_name, 100 );
#endif

@@ -825,12 +825,12 @@ void move_indices(
            new_ind_list[i].id = old_ind_list[i].id;
            new_ind_list[i].value = old_ind_list[i].value;
            new_ind_list[i].nb_bits = old_ind_list[i].nb_bits;
#ifdef DBG_BITSTREAM_ANALYSIS
#if defined(DEBUGGING) && defined(DBG_BITSTREAM_ANALYSIS)
            strncpy( new_ind_list[i].function_name, old_ind_list[i].function_name, 100 );
#endif

            old_ind_list[i].nb_bits = -1;
#ifdef DBG_BITSTREAM_ANALYSIS
#if defined(DEBUGGING) && defined(DBG_BITSTREAM_ANALYSIS)
            sprintf( old_ind_list[i].function_name, "RESET in move_indices" );
#endif
        }
@@ -913,7 +913,7 @@ ivas_error check_ind_list_limits(
    return error;
}

#ifdef DBG_BITSTREAM_ANALYSIS
#if defined(DEBUGGING) && defined(DBG_BITSTREAM_ANALYSIS)
const char *named_indices_table[] = {
    "IND_IVAS_FORMAT",
    "IND_SMODE_OMASA",
@@ -2857,7 +2857,7 @@ ivas_error push_indice(
            hBstr->ind_list[j].id = hBstr->ind_list[j - 1].id;
            hBstr->ind_list[j].nb_bits = hBstr->ind_list[j - 1].nb_bits;
            hBstr->ind_list[j].value = hBstr->ind_list[j - 1].value;
#ifdef DBG_BITSTREAM_ANALYSIS
#if defined(DEBUGGING) && defined(DBG_BITSTREAM_ANALYSIS)
            strncpy( hBstr->ind_list[j].function_name, hBstr->ind_list[j - 1].function_name, 100 );
#endif
        }
@@ -2868,7 +2868,7 @@ ivas_error push_indice(
    hBstr->ind_list[i].id = id;
    hBstr->ind_list[i].value = value;
    hBstr->ind_list[i].nb_bits = nb_bits;
#ifdef DBG_BITSTREAM_ANALYSIS
#if defined(DEBUGGING) && defined(DBG_BITSTREAM_ANALYSIS)
    strncpy( hBstr->ind_list[i].function_name, named_indices_table[id], 100 );
#endif

@@ -2885,7 +2885,7 @@ ivas_error push_indice(
 * Push a new indice into the buffer at the next position
 *-------------------------------------------------------------------*/

#ifdef DBG_BITSTREAM_ANALYSIS
#if defined(DEBUGGING) && defined(DBG_BITSTREAM_ANALYSIS)
ivas_error push_next_indice_(
    const char *caller,
#else
@@ -2934,7 +2934,7 @@ ivas_error push_next_indice(
    hBstr->ind_list[hBstr->nb_ind_tot].id = prev_id;
    hBstr->ind_list[hBstr->nb_ind_tot].value = value;
    hBstr->ind_list[hBstr->nb_ind_tot].nb_bits = nb_bits;
#ifdef DBG_BITSTREAM_ANALYSIS
#if defined(DEBUGGING) && defined(DBG_BITSTREAM_ANALYSIS)
    strncpy( hBstr->ind_list[hBstr->nb_ind_tot].function_name, caller, 100 );
#endif

@@ -2951,7 +2951,7 @@ ivas_error push_next_indice(
 * Push a bit buffer into the buffer at the next position
 *-------------------------------------------------------------------*/

#ifdef DBG_BITSTREAM_ANALYSIS
#if defined(DEBUGGING) && defined(DBG_BITSTREAM_ANALYSIS)
ivas_error push_next_bits_(
    const char *caller,
#else
@@ -3001,7 +3001,7 @@ ivas_error push_next_bits(
        ptr->value = code;
        ptr->nb_bits = 16;
        ptr->id = prev_id;
#ifdef DBG_BITSTREAM_ANALYSIS
#if defined(DEBUGGING) && defined(DBG_BITSTREAM_ANALYSIS)
        strncpy( ptr->function_name, caller, 100 );
#endif
        hBstr->nb_ind_tot++;
@@ -3024,7 +3024,7 @@ ivas_error push_next_bits(
        ptr->value = bits[i];
        ptr->nb_bits = 1;
        ptr->id = prev_id;
#ifdef DBG_BITSTREAM_ANALYSIS
#if defined(DEBUGGING) && defined(DBG_BITSTREAM_ANALYSIS)
        strncpy( ptr->function_name, caller, 100 );
#endif
        hBstr->nb_ind_tot++;
@@ -3096,7 +3096,7 @@ uint16_t delete_indice(
            hBstr->ind_list[j].id = hBstr->ind_list[i].id;
            hBstr->ind_list[j].value = hBstr->ind_list[i].value;
            hBstr->ind_list[j].nb_bits = hBstr->ind_list[i].nb_bits;
#ifdef DBG_BITSTREAM_ANALYSIS
#if defined(DEBUGGING) && defined(DBG_BITSTREAM_ANALYSIS)
            strncpy( hBstr->ind_list[j].function_name, hBstr->ind_list[i].function_name, 100 );
#endif
        }
@@ -3110,7 +3110,7 @@ uint16_t delete_indice(
    {
        /* reset the shifted indices at the end of the list */
        hBstr->ind_list[j].nb_bits = -1;
#ifdef DBG_BITSTREAM_ANALYSIS
#if defined(DEBUGGING) && defined(DBG_BITSTREAM_ANALYSIS)
        sprintf( hBstr->ind_list[j].function_name, "RESET in delete_indice" );
#endif
    }
@@ -3559,7 +3559,7 @@ static ivas_error write_indices_element(
        }
    }

#ifdef DBG_BITSTREAM_ANALYSIS
#if defined(DEBUGGING) && defined(DBG_BITSTREAM_ANALYSIS)
    if ( is_SCE ) /* EVS and SCE */
    {
        static FILE *f1 = 0;
+3 −3
Original line number Diff line number Diff line
@@ -492,13 +492,13 @@ ivas_error push_indice(
    int16_t nb_bits        /* i  : number of bits used to quantize the indice  */
);

#ifdef DBG_BITSTREAM_ANALYSIS
#if defined(DEBUGGING) && defined(DBG_BITSTREAM_ANALYSIS)
#define push_next_indice( ... ) push_next_indice_( __func__, __VA_ARGS__ )
#define push_next_bits( ... )   push_next_bits_( __func__, __VA_ARGS__ );
#endif


#ifdef DBG_BITSTREAM_ANALYSIS
#if defined(DEBUGGING) && defined(DBG_BITSTREAM_ANALYSIS)
ivas_error push_next_indice_(
    const char *caller,
#else
@@ -509,7 +509,7 @@ ivas_error push_next_indice(
    int16_t nb_bits /* i  : number of bits used to quantize the indice */
);

#ifdef DBG_BITSTREAM_ANALYSIS
#if defined(DEBUGGING) && defined(DBG_BITSTREAM_ANALYSIS)
ivas_error push_next_bits_(
    const char *caller,
#else
+4 −4
Original line number Diff line number Diff line
@@ -40,7 +40,7 @@
#include <assert.h>
#endif
#include "wmc_auto.h"
#ifdef DBG_BITSTREAM_ANALYSIS
#if defined(DEBUGGING) && defined(DBG_BITSTREAM_ANALYSIS)
#include <string.h>
#endif

@@ -170,7 +170,7 @@ ivas_error ivas_corecoder_enc_reconfig(
                temp_ind_list[i].id = hBstr->ind_list[i].id;
                temp_ind_list[i].value = hBstr->ind_list[i].value;
                temp_ind_list[i].nb_bits = hBstr->ind_list[i].nb_bits;
#ifdef DBG_BITSTREAM_ANALYSIS
#if defined(DEBUGGING) && defined(DBG_BITSTREAM_ANALYSIS)
                strncpy( temp_ind_list[i].function_name, hBstr->ind_list[i].function_name, 100 );
#endif

@@ -377,7 +377,7 @@ ivas_error ivas_corecoder_enc_reconfig(
                    st_ivas->hSCE[0]->hCoreCoder[0]->hBstr->ind_list[i].id = temp_ind_list[i].id;
                    st_ivas->hSCE[0]->hCoreCoder[0]->hBstr->ind_list[i].value = temp_ind_list[i].value;
                    st_ivas->hSCE[0]->hCoreCoder[0]->hBstr->ind_list[i].nb_bits = temp_ind_list[i].nb_bits;
#ifdef DBG_BITSTREAM_ANALYSIS
#if defined(DEBUGGING) && defined(DBG_BITSTREAM_ANALYSIS)
                    strncpy( st_ivas->hSCE[0]->hCoreCoder[0]->hBstr->ind_list[i].function_name, temp_ind_list[i].function_name, 100 );
#endif
                }
@@ -397,7 +397,7 @@ ivas_error ivas_corecoder_enc_reconfig(
                    st_ivas->hCPE[0]->hCoreCoder[0]->hBstr->ind_list[i].id = temp_ind_list[i].id;
                    st_ivas->hCPE[0]->hCoreCoder[0]->hBstr->ind_list[i].value = temp_ind_list[i].value;
                    st_ivas->hCPE[0]->hCoreCoder[0]->hBstr->ind_list[i].nb_bits = temp_ind_list[i].nb_bits;
#ifdef DBG_BITSTREAM_ANALYSIS
#if defined(DEBUGGING) && defined(DBG_BITSTREAM_ANALYSIS)
                    strncpy( st_ivas->hCPE[0]->hCoreCoder[0]->hBstr->ind_list[i].function_name, temp_ind_list[i].function_name, 100 );
#endif
                }
+1 −1
Original line number Diff line number Diff line
@@ -42,7 +42,7 @@
#include "debug.h"
#endif
#include "wmc_auto.h"
#ifdef DBG_BITSTREAM_ANALYSIS
#if defined(DEBUGGING) && defined(DBG_BITSTREAM_ANALYSIS)
#include <string.h>
#endif

+5 −5
Original line number Diff line number Diff line
@@ -42,7 +42,7 @@
#include "wmc_auto.h"
#include "prot.h"
#include "basop_settings.h"
#ifdef DBG_BITSTREAM_ANALYSIS
#if defined(DEBUGGING) && defined(DBG_BITSTREAM_ANALYSIS)
#include <string.h>
#endif

@@ -1280,7 +1280,7 @@ void reset_metadata_spatial(
                for ( i = 0; i < next_ind_sid; i++ )
                {
                    hMetaData->ind_list[i].nb_bits = -1;
#ifdef DBG_BITSTREAM_ANALYSIS
#if defined(DEBUGGING) && defined(DBG_BITSTREAM_ANALYSIS)
                    sprintf( hMetaData->ind_list[i].function_name, "RESET in reset_metadata_spatial" );
#endif
                }
@@ -1289,7 +1289,7 @@ void reset_metadata_spatial(
                {
                    hMetaData->ind_list[j].value = hMetaData->ind_list[i].value;
                    hMetaData->ind_list[j].nb_bits = hMetaData->ind_list[i].nb_bits;
#ifdef DBG_BITSTREAM_ANALYSIS
#if defined(DEBUGGING) && defined(DBG_BITSTREAM_ANALYSIS)
                    strncpy( hMetaData->ind_list[j].function_name, hMetaData->ind_list[i].function_name, 100 );
#endif
                    hMetaData->nb_bits_tot += hMetaData->ind_list[j].nb_bits;
@@ -1321,7 +1321,7 @@ void reset_metadata_spatial(
            hMetaData->nb_ind_tot--;
            hMetaData->nb_bits_tot -= hMetaData->ind_list[hMetaData->nb_ind_tot].nb_bits;
            hMetaData->ind_list[hMetaData->nb_ind_tot].nb_bits = -1;
#ifdef DBG_BITSTREAM_ANALYSIS
#if defined(DEBUGGING) && defined(DBG_BITSTREAM_ANALYSIS)
            sprintf( hMetaData->ind_list[hMetaData->nb_ind_tot].function_name, "RESET in reset_metadata_spatial" );
#endif
        }
@@ -1979,7 +1979,7 @@ void restore_metadata_buffer(
    for ( i = next_ind_start; i < hMetaData->nb_ind_tot; i++ )
    {
        hMetaData->ind_list[i].nb_bits = -1;
#ifdef DBG_BITSTREAM_ANALYSIS
#if defined(DEBUGGING) && defined(DBG_BITSTREAM_ANALYSIS)
        sprintf( hMetaData->ind_list[i].function_name, "RESET in restore_metadata_buffer" );
#endif
    }
Loading