fprintf(stderr,"Warning: The maximum number of indices %d has been exceeded in frame %d! Increase the limits in get_ivas_max_num_indices() or get_max_num_indices_metadata().\n",*(hBstr->ivas_max_num_indices),frame);
#endif
/* reallocate the buffer of indices with increased limit */
fprintf(stderr,"Warning: The maximum number of indices %d has been exceeded in frame %d! Increase the limits in get_ivas_max_num_indices() or get_max_num_indices_metadata().\n",*(hBstr->ivas_max_num_indices),frame);
#endif
/* no available empty slot -> need to re-allocate the buffer */
returnIVAS_ERROR(IVAS_ERR_INTERNAL_FATAL,"Buffer of indices corrupted in frame %d! Attempt to overwrite indice ID = %d (value: %d, bits: %d)!\n",frame,hBstr->ind_list[hBstr->nb_ind_tot].id,hBstr->ind_list[hBstr->nb_ind_tot].value,hBstr->ind_list[hBstr->nb_ind_tot].nb_bits);
#else
returnIVAS_ERROR(IVAS_ERR_INTERNAL_FATAL,"Buffer of indices corrupted in frame %d! Attempt to overwrite indice ID = %d (value: %d, bits: %d)!\n",hBstr->ind_list[hBstr->nb_ind_tot].id,hBstr->ind_list[hBstr->nb_ind_tot].value,hBstr->ind_list[hBstr->nb_ind_tot].nb_bits);
#endif
}
}
@@ -903,10 +919,26 @@ ivas_error push_indice(
error=IVAS_ERR_OK;
move32();
#ifdef DEBUGGING
if(nb_bits<(32-1)&&(value>>nb_bits)>0)
{
returnIVAS_ERROR(IVAS_ERR_INTERNAL_FATAL,"Indice ID = %d with value %d exceeds the range of %d bits (frame %d) !\n",id,value,nb_bits,frame);
}
if(nb_bits>16)
{
returnIVAS_ERROR(IVAS_ERR_INTERNAL_FATAL,"Indice ID = %d with value %d is trying to allocate %d bits which exceeds 16 bits (frame %d) !\n",id,value,nb_bits,frame);
BSTR_ENC_HANDLEhBstr,/* i/o: encoder state structure */
Word16id,/* i : ID of the indice */
UWord16value,/* i : value of the quantized indice */
@@ -277,6 +285,19 @@ void push_indice_fx(
{
Word16i;
#ifdef DEBUGGING
ivas_errorerror=IVAS_ERR_OK;
if(nb_bits<(32-1)&&(value>>nb_bits)>0)
{
returnIVAS_ERROR(IVAS_ERR_INTERNAL_FATAL,"Indice ID = %d with value %d exceeds the range of %d bits (frame %d) !\n",id,value,nb_bits,frame);
}
if(nb_bits>16)
{
returnIVAS_ERROR(IVAS_ERR_INTERNAL_FATAL,"Indice ID = %d with value %d is trying to allocate %d bits which exceeds 16 bits (frame %d) !\n",id,value,nb_bits,frame);
#define DEBUG_MODE_INFO_TWEAK /* Enable command line switch to specify subdirectory for debug info output inside "./res/" */
#define DEBUG_FORCE_MDCT_STEREO_MODE /* Force stereo mode decision for MDCT stereo: -stereo 3 1 forces L/R coding and -stereo 3 2 forces full M/S coding */
/*#define DBG_WAV_WRITER*//* Enable dbgwrite_wav() function for generating ".wav" files */
#define ENABLE_BITRATE_VERIFICATION /* Enable bitrate verification - use when playing with bit budget */
#endif
#define SUPPORT_JBM_TRACEFILE /* Support for JBM tracefile, which is needed for 3GPP objective/subjective testing, but not relevant for real-world implementations */