Commit 1606acd8 authored by Dominik Weckbecker's avatar Dominik Weckbecker 💬
Browse files

port bitstream debugging functionality from bitstream_debugging_float

parent 4614fa40
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -758,7 +758,11 @@ int main(
        }

        /* *** Encode one frame *** */
        if ( ( error = IVAS_ENC_EncodeFrameToSerial( hIvasEnc, pcmBuf, pcmBufSize, bitStream, &numBits ) ) != IVAS_ERR_OK )
        if ( ( error = IVAS_ENC_EncodeFrameToSerial( hIvasEnc, pcmBuf, pcmBufSize, bitStream, &numBits 
#ifdef BITSTREAM_ANALYSIS
			, frame
#endif
		) ) != IVAS_ERR_OK )
        {
            fprintf( stderr, "\nencodeFrame failed: %s\n\n", IVAS_ENC_GetErrorMessage( error ) );
            goto cleanup;
+2017 −5

File changed.

Preview size limit exceeded, changes collapsed.

+4 −0
Original line number Diff line number Diff line
@@ -98,4 +98,8 @@
#define FIX_1486_IND_SHB_RES                   /* VA: Fix for issue 1486: align the usage of IND_SHB_RES_GS indices with float code */

#define TEST_HR
#define REMOVE_EVS_DUPLICATES                   /* remove core-coder duplicated functions, ACELP low-band decoder */

/*#define BITSTREAM_ANALYSIS*/

#endif
+24 −4
Original line number Diff line number Diff line
@@ -10661,13 +10661,27 @@ ivas_error config_acelp1_fx(
    const Word16 GSC_IVAS_mode             /* i  : GSC IVAS mode                   */
);
ivas_error push_next_indice(
#ifdef BITSTREAM_ANALYSIS
#define push_next_indice( ... ) push_next_indice_( __func__, __VA_ARGS__ )
#define push_next_bits( ... )   push_next_bits_( __func__, __VA_ARGS__ );
#else
#define push_next_indice( ... ) push_next_indice_( __VA_ARGS__ )
#define push_next_bits( ... )   push_next_bits_( __VA_ARGS__ );
#endif
ivas_error push_next_indice_(
#ifdef BITSTREAM_ANALYSIS
	const char *caller,
#endif
    BSTR_ENC_HANDLE hBstr,
    UWord16 value, /* i  : value of the quantized indice          */
    Word16 nb_bits /* i  : number of bits used to quantize the indice */
);
ivas_error push_next_bits(
ivas_error push_next_bits_(
#ifdef BITSTREAM_ANALYSIS
	const char *caller,
#endif
    BSTR_ENC_HANDLE hBstr, /* i/o: encoder bitstream handle               */
    const UWord16 bits[],  /* i  : bit buffer to pack, sequence of single bits */
    const Word16 nb_bits   /* i  : number of bits to pack                 */
@@ -10989,13 +11003,19 @@ ivas_error push_indice(
    Word16 nb_bits         /* i  : number of bits used to quantize the indice  */
);
ivas_error push_next_indice(
ivas_error push_next_indice_(
#ifdef BITSTREAM_ANALYSIS
	const char *caller,
#endif
    BSTR_ENC_HANDLE hBstr,
    UWord16 value, /* i  : value of the quantized indice          */
    Word16 nb_bits /* i  : number of bits used to quantize the indice */
);
ivas_error push_next_bits(
ivas_error push_next_bits_(
#ifdef BITSTREAM_ANALYSIS
	const char *caller,
#endif
    BSTR_ENC_HANDLE hBstr, /* i/o: encoder bitstream handle               */
    const UWord16 bits[],  /* i  : bit buffer to pack, sequence of single bits */
    const Word16 nb_bits   /* i  : number of bits to pack                 */
+13 −0
Original line number Diff line number Diff line
@@ -38,6 +38,10 @@
#include "wmc_auto.h"
#include "ivas_prot_fx.h"
#include "math.h"
#include "wmc_auto.h"
#ifdef BITSTREAM_ANALYSIS
#include <string.h>
#endif
/*-------------------------------------------------------------------*
 * ivas_corecoder_enc_reconfig()
 *
@@ -192,6 +196,9 @@ ivas_error ivas_corecoder_enc_reconfig_fx(
                move16();
                temp_ind_list[i].nb_bits = hBstr->ind_list[i].nb_bits; /* Q0 */
                move16();
#ifdef BITSTREAM_ANALYSIS
				strncpy(temp_ind_list[i].function_name, hBstr->ind_list[i].function_name, 100);
#endif
                hBstr->ind_list[i].nb_bits = -1; /* Q0 */
                move16();
            }
@@ -545,6 +552,9 @@ ivas_error ivas_corecoder_enc_reconfig_fx(
                    move16();
                    st_ivas->hSCE[0]->hCoreCoder[0]->hBstr->ind_list[i].nb_bits = temp_ind_list[i].nb_bits; /* Q0 */
                    move16();
#ifdef BITSTREAM_ANALYSIS
					strncpy(st_ivas->hSCE[0]->hCoreCoder[0]->hBstr->ind_list[i].function_name, temp_ind_list[i].function_name, 100);
#endif
                }

                nb_bits = add( nb_bits, temp_ind_list[i].nb_bits ); /* Q0 */
@@ -569,6 +579,9 @@ ivas_error ivas_corecoder_enc_reconfig_fx(
                    move16();
                    st_ivas->hCPE[0]->hCoreCoder[0]->hBstr->ind_list[i].nb_bits = temp_ind_list[i].nb_bits; /* Q0 */
                    move16();
#ifdef BITSTREAM_ANALYSIS
					strncpy(st_ivas->hCPE[0]->hCoreCoder[0]->hBstr->ind_list[i].function_name, temp_ind_list[i].function_name, 100);
#endif
                }

                nb_bits = add( nb_bits, temp_ind_list[i].nb_bits ); /* Q0 */
Loading