Commit 637c10de authored by Tapani Pihlajakuja's avatar Tapani Pihlajakuja
Browse files

Merge branch 'main' into 73-add-description-templates-for-issues-and-merge-requests

parents ba43a408 8efa516d
Loading
Loading
Loading
Loading
Loading

apps/encoder.c

100644 → 100755
+1 −1

File changed.File mode changed from 100644 to 100755.

Contains only whitespace changes.

+1 −1
Original line number Diff line number Diff line
@@ -57,7 +57,7 @@ void basop_lsf2lsp( const Word16 lsf[], Word16 lsp[] );
void basop_weight_a( const Word16 *a, Word16 *ap, const Word16 gamma );
void basop_weight_a_inv( const Word16 *a, Word16 *ap, const Word16 inv_gamma );
void basop_E_LPC_a_add_tilt( const Word16 *a, Word16 *ap, Word16 gamma );
void basop_reorder_lsf( Word16 *lsf, const Word16 min_dist, const Word16 n, const Word32 fs );
void basop_reorder_lsf( Word16 *lsf, const Word16 min_dist, const Word16 n, const Word32 Fs );
void basop_E_LPC_f_lsp_a_conversion( const Word16 *lsp, Word16 *a, const Word16 m );

/* tcx_utils.c */
+14 −14
Original line number Diff line number Diff line
@@ -525,7 +525,7 @@ ivas_error config_acelp1(
    const int16_t L_frame,              /* i  : frame length at internal Fs     */
    const int16_t GSC_noisy_speech,     /* i  : GSC on SWB noisy speech flag    */
    ACELP_config *acelp_cfg,            /* i  : ACELP bit-allocation            */
    const int16_t signalling_bits,      /* i  : number of signalling bits       */
    const int16_t signaling_bits,       /* i  : number of signaling bits        */
    const int16_t coder_type,           /* i  : coder type                      */
    const int16_t tc_subfr,             /* i  : TC subfr ID                     */
    const int16_t tc_call,              /* i  : TC call number (0,1,2,3,5(DEC)) */
@@ -663,7 +663,7 @@ ivas_error config_acelp1(
            bits += *nBits_es_Pred; /* equalize for 4th signaling bit estimated at the encoder in TC_0_192 */
        }

        /* Subtract signalling bits */
        /* Subtract signaling bits */
        if ( enc_dec == DEC && idchan == 1 && element_mode > EVS_MONO )
        {
            bits -= TDM_SIGNAL_BITS_READ_FROM_THE_END_OF_BS;
@@ -681,13 +681,13 @@ ivas_error config_acelp1(
        }
        else
        {
            /* Subtract signalling bits */
            bits -= signalling_bits;
            /* Subtract signaling bits */
            bits -= signaling_bits;
        }

        if ( extl_brate > 0 && ( extl == WB_TBE || extl == SWB_TBE || extl == FB_TBE || extl == WB_BWE || extl == SWB_BWE || extl == FB_BWE ) )
        {
            /* extension layer signalling bit is counted in the extension layer bitbudget */
            /* extension layer signaling bit is counted in the extension layer bitbudget */
            bits++;
        }

@@ -896,14 +896,14 @@ ivas_error config_acelp1(
            fix_first = 1;
        }

        /* TC signalling */
        /* TC signaling */
        if ( L_frame == L_FRAME )
        {
            if ( tc_subfr == TC_0_0 )
            {
                if ( enc_dec == ENC )
                {
                    bits -= 1; /* TC signalling */
                    bits -= 1; /* TC signaling */
                }

                if ( acelp_cfg->ltf_mode == NORMAL_OPERATION )
@@ -915,7 +915,7 @@ ivas_error config_acelp1(
            {
                if ( enc_dec == ENC )
                {
                    bits -= 4; /* TC signalling */
                    bits -= 4; /* TC signaling */
                }

                if ( acelp_cfg->ltf_mode == NORMAL_OPERATION )
@@ -927,7 +927,7 @@ ivas_error config_acelp1(
            {
                if ( enc_dec == ENC )
                {
                    bits -= 4; /* TC signalling */
                    bits -= 4; /* TC signaling */
                }

                if ( acelp_cfg->ltf_mode == NORMAL_OPERATION )
@@ -939,7 +939,7 @@ ivas_error config_acelp1(
            {
                if ( enc_dec == ENC )
                {
                    bits -= 3; /* TC signalling */
                    bits -= 3; /* TC signaling */
                }

                if ( acelp_cfg->ltf_mode == NORMAL_OPERATION )
@@ -951,7 +951,7 @@ ivas_error config_acelp1(
            {
                if ( enc_dec == ENC )
                {
                    bits -= 3; /* TC signalling */
                    bits -= 3; /* TC signaling */
                }

                if ( acelp_cfg->ltf_mode == NORMAL_OPERATION )
@@ -963,7 +963,7 @@ ivas_error config_acelp1(
            {
                if ( enc_dec == ENC )
                {
                    bits -= 4; /* TC signalling */
                    bits -= 4; /* TC signaling */
                }

                if ( acelp_cfg->ltf_mode == NORMAL_OPERATION )
@@ -978,11 +978,11 @@ ivas_error config_acelp1(
            {
                if ( tc_subfr <= 2 * L_SUBFR )
                {
                    bits -= 2; /* TC signalling */
                    bits -= 2; /* TC signaling */
                }
                else
                {
                    bits -= 3; /* TC signalling */
                    bits -= 3; /* TC signaling */
                }
            }

lib_com/bitstream.c

100644 → 100755
+19 −28
Original line number Diff line number Diff line
@@ -1244,7 +1244,7 @@ static void dec_prm_core(
/*-----------------------------------------------------------------*
 * decision_matrix_core_dec()
 *
 * Read core signalling bits from the bitstream
 * Read core signaling bits from the bitstream
 * Set st->core, and st->bwidth if signalled together with the core.
 *-----------------------------------------------------------------*/

@@ -1291,12 +1291,12 @@ static void decision_matrix_core_dec(
    }

    /*-----------------------------------------------------------------*
     * Read ACELP signalling bits from the bitstream
     * Read ACELP signaling bits from the bitstream
     *-----------------------------------------------------------------*/

    if ( st->core == ACELP_CORE )
    {
        /* find the section in the ACELP signalling table corresponding to bitrate */
        /* find the section in the ACELP signaling table corresponding to bitrate */
        start_idx = 0;
        while ( acelp_sig_tbl[start_idx] != st->total_brate )
        {
@@ -1312,11 +1312,11 @@ static void decision_matrix_core_dec(
        /* retrieve the number of bits */
        nBits = (int16_t) acelp_sig_tbl[start_idx++];

        /* retrieve the signalling indice */
        /* retrieve the signaling indice */
        ind = acelp_sig_tbl[start_idx + get_next_indice( st, nBits )];
        st->bwidth = ( ind >> 3 ) & 0x7;

        /* convert signalling indice into signalling information */
        /* convert signaling indice into signaling information */
        if ( ( ind & 0x7 ) == LR_MDCT )
        {
            st->core = HQ_CORE;
@@ -1324,7 +1324,7 @@ static void decision_matrix_core_dec(
    }

    /*-----------------------------------------------------------------*
     * Read HQ signalling bits from the bitstream
     * Read HQ signaling bits from the bitstream
     * Set HQ core type
     *-----------------------------------------------------------------*/

@@ -1849,7 +1849,7 @@ ivas_error preview_indices(
                break;
            case SID_ISM:
                st_ivas->ivas_format = ISM_FORMAT;
                /* temporary hack to make mode signalling work with the current 1-object ISM DTX: read padding bits */
                /* temporary hack to make mode signaling work with the current 1-object ISM DTX: read padding bits */
                /* Todo: how to apply this here? maybe pt_stream += ... would work? */
                /* st->bit_stream += ( IVAS_SID_4k4 - SID_2k40 ) / FRAMES_PER_SEC - SID_FORMAT_NBITS; */
                break;
@@ -1974,20 +1974,11 @@ ivas_error preview_indices(
            st_ivas->nSCE = st_ivas->nchan_transport;
        }
        else if ( st_ivas->ivas_format == SBA_FORMAT )
        {
            if ( ( st_ivas->sba_mode != SBA_MODE_SPAR ) || ( ( st_ivas->sba_mode == SBA_MODE_SPAR ) && ( total_brate >= IVAS_256k ) ) )
        {
            /* Read SBA planar flag and SBA order */
            st_ivas->sba_planar = ( bit_stream[IVAS_FORMAT_SIGNALING_NBITS_SBA] == 1 );
            st_ivas->sba_order = ( bit_stream[IVAS_FORMAT_SIGNALING_NBITS_SBA + 2] == 1 );
            st_ivas->sba_order += 2 * ( bit_stream[IVAS_FORMAT_SIGNALING_NBITS_SBA + 1] == 1 );
            }
            else
            {
                st_ivas->sba_planar = 0;
                st_ivas->sba_order = 1;
            }

            ivas_sba_config( total_brate, st_ivas->sba_order, -1, &( st_ivas->nchan_transport ), st_ivas->sba_planar, &( st_ivas->nSCE ), &( st_ivas->nCPE ), &( st_ivas->element_mode_init ), st_ivas->sba_mode );
        }
    }
@@ -2504,7 +2495,7 @@ static void get_rfFlag(
    /* check for rf_flag in the packet and extract the rf_frame_type and rf_fec_offset */
    if ( st->total_brate == ACELP_13k20 && ( st->bfi == FRAMEMODE_NORMAL || st->bfi == FRAMEMODE_FUTURE ) )
    {
        /* find the section in the ACELP signalling table corresponding to bitrate */
        /* find the section in the ACELP signaling table corresponding to bitrate */
        start_idx = 0;
        while ( acelp_sig_tbl[start_idx] != st->total_brate )
        {
@@ -2518,10 +2509,10 @@ static void get_rfFlag(
        /* retrieve the number of bits */
        nBits_tmp = (int16_t) acelp_sig_tbl[start_idx++];

        /* retrieve the signalling indice */
        /* retrieve the signaling indice */
        ind_tmp = acelp_sig_tbl[start_idx + get_indice( st, 0, nBits_tmp )];

        /* convert signalling indice into RF flag. */
        /* convert signaling indice into RF flag. */
        *rf_flag = ( ind_tmp >> 7 ) & 0x1;

        if ( ind )
@@ -2624,7 +2615,7 @@ static void get_rfTargetBits(
/*-------------------------------------------------------------------*
 * berCheck()
 *
 * Check for bit errors in channel aware signalling.
 * Check for bit errors in channel aware signaling.
 *-------------------------------------------------------------------*/

static void berCheck(
@@ -2747,7 +2738,7 @@ void get_NextCoderType(
        tmp += bit_stream[k];
    }

    /* retrieve the signalling indice */
    /* retrieve the signaling indice */
    *next_coder_type = acelp_sig_tbl[start_idx + tmp] & 0x7;

    return;
@@ -2923,7 +2914,7 @@ void evs_dec_previewFrame(

    if ( total_brate == ACELP_13k20 )
    {
        /* find the section in the ACELP signalling table corresponding to bitrate */
        /* find the section in the ACELP signaling table corresponding to bitrate */
        start_idx = 0;
        while ( acelp_sig_tbl[start_idx] != total_brate )
        {
@@ -2936,10 +2927,10 @@ void evs_dec_previewFrame(
        /* retrieve the number of bits */
        nBits = (int16_t) acelp_sig_tbl[start_idx++];

        /* retrieve the signalling indice */
        /* retrieve the signaling indice */
        ind = acelp_sig_tbl[start_idx + get_indice_preview( bitstream, bitstreamSize, 0, nBits )];

        /* convert signalling indice into RF flag. */
        /* convert signaling indice into RF flag. */
        rf_flag = ( ind >> 7 ) & 0x1;
        if ( rf_flag != 0 )
        {
+1 −1
Original line number Diff line number Diff line
@@ -550,7 +550,7 @@ enum
#define L_MDCT_OVLP_MAX_CORE_FS             L_NEXT_MAX_32k                      /* 280, 2/3 * L_MDCT_OVLP_MAX */
#define L_MDCT_HALF_OVLP_MAX_CORE_FS        2 * ( L_MDCT_HALF_OVLP_MAX ) / 3    /* 2/3 * L_MDCT_HALF_OVLP_MAX */
#define L_MDCT_MIN_OVLP_MAX_CORE_FS         2 * ( L_MDCT_MIN_OVLP_MAX ) / 3     /* 2/3 * L_MDCT_MIN_OVLP_MAX */
#define L_ALDO_WIN1_MAX_CORE_FS             460                                 /* ALDO1 maximum window length for max core fs */
#define L_ALDO_WIN1_MAX_CORE_FS             460                                 /* ALDO1 maximum window length for max core Fs */
#define L_ALDO_WIN1_FB_MAX                  690                                 /* ALDO1 maximum window length */

/*----------------------------------------------------------------------------------*
Loading