Commit 2d374950 authored by vaclav's avatar vaclav
Browse files

maintenance

parent f97cdfb1
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1385,7 +1385,7 @@ void initMdctStereoDecData_fx(
    const Word16 bwidth                                         /* i  : audio bandwidth                  */
);

void stereo_tdm_downmix_ivas_fx(
void stereo_tdm_downmix_fx(
    STEREO_TD_ENC_DATA_HANDLE hStereoTD,                        /* i  : TD stereo IVAS encoder structure        */
    Word16 *Left_in_fx,                                         /* Qx */
    Word16 *Right_in_fx,                                        /* Qx */
+5 −0
Original line number Diff line number Diff line
@@ -9778,6 +9778,11 @@ ivas_error push_indice(
    Word16 nb_bits         /* i  : number of bits used to quantize the indice  */
);

#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

#if defined( DEBUGGING ) && defined( DBG_BITSTREAM_ANALYSIS )
ivas_error push_next_indice_(
    const char *caller,
+1 −1
Original line number Diff line number Diff line
@@ -795,7 +795,7 @@ ivas_error ivas_cpe_enc_fx(
            tdm_SM_flag = 0;
            move16();
        }
        stereo_tdm_downmix_ivas_fx( hCPE->hStereoTD, sts[0]->input_fx, sts[1]->input_fx, input_frame, tdm_ratio_idx, tdm_SM_flag, tdm_ratio_idx_SM );
        stereo_tdm_downmix_fx( hCPE->hStereoTD, sts[0]->input_fx, sts[1]->input_fx, input_frame, tdm_ratio_idx, tdm_SM_flag, tdm_ratio_idx_SM );
        Copy_Scale_sig_16_32_no_sat( sts[0]->input_fx, sts[0]->input32_fx, input_frame, sub( sts[0]->q_inp32, sts[0]->q_inp ) );
        Copy_Scale_sig_16_32_no_sat( sts[1]->input_fx, sts[1]->input32_fx, input_frame, sub( sts[1]->q_inp32, sts[1]->q_inp ) );

+0 −4
Original line number Diff line number Diff line
@@ -438,11 +438,7 @@ static void write_metadata_buffer_fx(

    FOR( i = 0; i < hMetaData_tmp->nb_ind_tot; i++ )
    {
#if defined( DEBUGGING ) && defined( DBG_BITSTREAM_ANALYSIS )
        push_next_indice( hMetaData_tmp->ind_list[i].function_name, hMetaData, hMetaData_tmp->ind_list[i].value, hMetaData_tmp->ind_list[i].nb_bits );
#else
        push_next_indice( hMetaData, hMetaData_tmp->ind_list[i].value, hMetaData_tmp->ind_list[i].nb_bits );
#endif
    }

    return;
+21 −15
Original line number Diff line number Diff line
@@ -364,11 +364,14 @@ ivas_error stereo_set_tdm_fx(

    return error;
}


/*-------------------------------------------------------------------*
 * tdm_configure_enc()
 *
 * Configure TD stereo encoder
 *-------------------------------------------------------------------*/

void tdm_configure_enc_fx(
    const Word16 ivas_format,                /* i  : IVAS format                       */
    const Word16 ism_mode,                   /* i  : ISM mode in combined format       */
@@ -777,13 +780,14 @@ ivas_error signaling_enc_secondary_fx(
    return error;
}


/*-------------------------------------------------------------------*
 * Function tdm_downmix_plain()
 *
 * downmix Left+Right to Primary+Secondary channel
 *-------------------------------------------------------------------*/

static void tdm_downmix_plain_ivas_fx(
static void tdm_downmix_plain_fx(
    Word16 FR_Y_fx[],            /*Qx*/
    Word16 LR_X_fx[],            /*Qx*/
    const Word16 Left_in_fx[],   /*Qx*/
@@ -810,12 +814,14 @@ static void tdm_downmix_plain_ivas_fx(
    return;
}


/*-------------------------------------------------------------------*
 * Function tdm_downmix_fade()
 *
 * downmix Left+Right to Primary+Secondary channel with fade in/out
 *-------------------------------------------------------------------*/
static void tdm_downmix_fade_ivas_fx(

static void tdm_downmix_fade_fx(
    Word16 FR_Y_fx[],               /* o  : primary channel       Qx  */
    Word16 LR_X_fx[],               /* o  : secondary channel     Qx  */
    const Word16 Left_in_fx[],      /* i  : Left channel          Qx  */
@@ -868,7 +874,8 @@ static void tdm_downmix_fade_ivas_fx(
 *
 * Compute the TD stereo downmix signal based on the ratio index
 *-------------------------------------------------------------------*/
void stereo_tdm_downmix_ivas_fx(

void stereo_tdm_downmix_fx(
    STEREO_TD_ENC_DATA_HANDLE hStereoTD, /* i  : TD stereo IVAS encoder structure    */
    Word16 *Left_in_fx,                  /* Qx */
    Word16 *Right_in_fx,                 /* Qx */
@@ -925,10 +932,10 @@ void stereo_tdm_downmix_ivas_fx(
        case ( 0 ):
        {
            /* Switching from YX scheme to SM scheme */
            tdm_downmix_fade_ivas_fx( FR_Y_fx, LR_X_fx, Left_in_fx, Right_in_fx, tdm_ratio_tabl_fx[tdm_ratio_idx_SM], L_sub( tdm_ratio_tabl_fx[tdm_ratio_idx_SM], 2147483647 ), hStereoTD->tdm_last_ratio_fx, L_sub( 2147483647, hStereoTD->tdm_last_ratio_fx ), 0, tdm_n_OVA ); // 1.0 in Q31 -> 2147483647
            tdm_downmix_fade_fx( FR_Y_fx, LR_X_fx, Left_in_fx, Right_in_fx, tdm_ratio_tabl_fx[tdm_ratio_idx_SM], L_sub( tdm_ratio_tabl_fx[tdm_ratio_idx_SM], 2147483647 ), hStereoTD->tdm_last_ratio_fx, L_sub( 2147483647, hStereoTD->tdm_last_ratio_fx ), 0, tdm_n_OVA ); // 1.0 in Q31 -> 2147483647

            /* Create new mixture of using the ratio computed above and formular for SM scheme */
            tdm_downmix_plain_ivas_fx( FR_Y_fx, LR_X_fx, Left_in_fx, Right_in_fx, tdm_ratio_tabl_fx[tdm_ratio_idx_SM], L_sub( tdm_ratio_tabl_fx[tdm_ratio_idx_SM], 2147483647 ), tdm_n_OVA, input_frame ); // 1.0 in Q31 -> 2147483647
            tdm_downmix_plain_fx( FR_Y_fx, LR_X_fx, Left_in_fx, Right_in_fx, tdm_ratio_tabl_fx[tdm_ratio_idx_SM], L_sub( tdm_ratio_tabl_fx[tdm_ratio_idx_SM], 2147483647 ), tdm_n_OVA, input_frame ); // 1.0 in Q31 -> 2147483647
        }
            BREAK;
        case ( 1 ):
@@ -936,38 +943,37 @@ void stereo_tdm_downmix_ivas_fx(
            /* Create new mixture of using the ratio computed above and formular for SM scheme */
            IF( EQ_32( tdm_ratio_tabl_fx[tdm_ratio_idx_SM], hStereoTD->tdm_last_ratio_SM_fx ) )
            {
                tdm_downmix_plain_ivas_fx( FR_Y_fx, LR_X_fx, Left_in_fx, Right_in_fx, tdm_ratio_tabl_fx[tdm_ratio_idx_SM], L_sub( (Word32) tdm_ratio_tabl_fx[tdm_ratio_idx_SM], 2147483647 ), 0, input_frame ); // 1.0 in Q31 -> 2147483647
                tdm_downmix_plain_fx( FR_Y_fx, LR_X_fx, Left_in_fx, Right_in_fx, tdm_ratio_tabl_fx[tdm_ratio_idx_SM], L_sub( (Word32) tdm_ratio_tabl_fx[tdm_ratio_idx_SM], 2147483647 ), 0, input_frame ); // 1.0 in Q31 -> 2147483647
            }
            ELSE
            {
                tdm_downmix_fade_ivas_fx( FR_Y_fx, LR_X_fx, Left_in_fx, Right_in_fx, tdm_ratio_tabl_fx[tdm_ratio_idx_SM], L_sub( tdm_ratio_tabl_fx[tdm_ratio_idx_SM], 2147483647 ), hStereoTD->tdm_last_ratio_SM_fx, L_sub( hStereoTD->tdm_last_ratio_SM_fx, 2147483647 ), 0, tdm_n_OVA ); // 1.0 in Q31 -> 2147483647
                tdm_downmix_fade_fx( FR_Y_fx, LR_X_fx, Left_in_fx, Right_in_fx, tdm_ratio_tabl_fx[tdm_ratio_idx_SM], L_sub( tdm_ratio_tabl_fx[tdm_ratio_idx_SM], 2147483647 ), hStereoTD->tdm_last_ratio_SM_fx, L_sub( hStereoTD->tdm_last_ratio_SM_fx, 2147483647 ), 0, tdm_n_OVA ); // 1.0 in Q31 -> 2147483647

                tdm_downmix_plain_ivas_fx( FR_Y_fx, LR_X_fx, Left_in_fx, Right_in_fx, tdm_ratio_tabl_fx[tdm_ratio_idx_SM], L_sub( tdm_ratio_tabl_fx[tdm_ratio_idx_SM], 2147483647 ), tdm_n_OVA, input_frame ); // 1.0 in Q31 -> 2147483647
                tdm_downmix_plain_fx( FR_Y_fx, LR_X_fx, Left_in_fx, Right_in_fx, tdm_ratio_tabl_fx[tdm_ratio_idx_SM], L_sub( tdm_ratio_tabl_fx[tdm_ratio_idx_SM], 2147483647 ), tdm_n_OVA, input_frame ); // 1.0 in Q31 -> 2147483647
            }
        }
            BREAK;
        case ( 2 ):
        {
            /* Switching from SM scheme to YX scheme */
            tdm_downmix_fade_ivas_fx( FR_Y_fx, LR_X_fx, Left_in_fx, Right_in_fx, tdm_ratio_tabl_fx[tdm_ratio_idx], L_sub( 2147483647, tdm_ratio_tabl_fx[tdm_ratio_idx] ), hStereoTD->tdm_last_ratio_SM_fx, L_sub( hStereoTD->tdm_last_ratio_SM_fx, 2147483647 ), 0, tdm_n_OVA ); // 1.0 in Q31 -> 2147483647
            tdm_downmix_fade_fx( FR_Y_fx, LR_X_fx, Left_in_fx, Right_in_fx, tdm_ratio_tabl_fx[tdm_ratio_idx], L_sub( 2147483647, tdm_ratio_tabl_fx[tdm_ratio_idx] ), hStereoTD->tdm_last_ratio_SM_fx, L_sub( hStereoTD->tdm_last_ratio_SM_fx, 2147483647 ), 0, tdm_n_OVA ); // 1.0 in Q31 -> 2147483647

            /* Create new mixture of using the ratio computed above and formular for YX scheme */
            tdm_downmix_plain_ivas_fx( FR_Y_fx, LR_X_fx, Left_in_fx, Right_in_fx, tdm_ratio_tabl_fx[tdm_ratio_idx], L_sub( 2147483647, tdm_ratio_tabl_fx[tdm_ratio_idx] ), tdm_n_OVA, input_frame ); // 1.0 in Q31 -> 2147483647
            tdm_downmix_plain_fx( FR_Y_fx, LR_X_fx, Left_in_fx, Right_in_fx, tdm_ratio_tabl_fx[tdm_ratio_idx], L_sub( 2147483647, tdm_ratio_tabl_fx[tdm_ratio_idx] ), tdm_n_OVA, input_frame ); // 1.0 in Q31 -> 2147483647
        }
            BREAK;
        case ( 3 ):
        {
            /* Create new mixture of using the ratio computed above and formular for YX scheme */
            IF( EQ_32( tdm_ratio_tabl_fx[tdm_ratio_idx],
                       hStereoTD->tdm_last_ratio_fx ) )
            IF( EQ_32( tdm_ratio_tabl_fx[tdm_ratio_idx], hStereoTD->tdm_last_ratio_fx ) )
            {
                tdm_downmix_plain_ivas_fx( FR_Y_fx, LR_X_fx, Left_in_fx, Right_in_fx, tdm_ratio_tabl_fx[tdm_ratio_idx], L_sub( 2147483647, tdm_ratio_tabl_fx[tdm_ratio_idx] ), 0, input_frame ); // 1.0 in Q31 -> 2147483647
                tdm_downmix_plain_fx( FR_Y_fx, LR_X_fx, Left_in_fx, Right_in_fx, tdm_ratio_tabl_fx[tdm_ratio_idx], L_sub( 2147483647, tdm_ratio_tabl_fx[tdm_ratio_idx] ), 0, input_frame ); // 1.0 in Q31 -> 2147483647
            }
            ELSE
            {
                tdm_downmix_fade_ivas_fx( FR_Y_fx, LR_X_fx, Left_in_fx, Right_in_fx, tdm_ratio_tabl_fx[tdm_ratio_idx], L_sub( 2147483647, tdm_ratio_tabl_fx[tdm_ratio_idx] ), hStereoTD->tdm_last_ratio_fx, L_sub( 2147483647, hStereoTD->tdm_last_ratio_fx ), 0, tdm_n_OVA ); // 1.0 in Q31 -> 2147483647
                tdm_downmix_fade_fx( FR_Y_fx, LR_X_fx, Left_in_fx, Right_in_fx, tdm_ratio_tabl_fx[tdm_ratio_idx], L_sub( 2147483647, tdm_ratio_tabl_fx[tdm_ratio_idx] ), hStereoTD->tdm_last_ratio_fx, L_sub( 2147483647, hStereoTD->tdm_last_ratio_fx ), 0, tdm_n_OVA ); // 1.0 in Q31 -> 2147483647

                tdm_downmix_plain_ivas_fx( FR_Y_fx, LR_X_fx, Left_in_fx, Right_in_fx, tdm_ratio_tabl_fx[tdm_ratio_idx], L_sub( 2147483647, tdm_ratio_tabl_fx[tdm_ratio_idx] ), tdm_n_OVA, input_frame ); // 1.0 in Q31 -> 2147483647
                tdm_downmix_plain_fx( FR_Y_fx, LR_X_fx, Left_in_fx, Right_in_fx, tdm_ratio_tabl_fx[tdm_ratio_idx], L_sub( 2147483647, tdm_ratio_tabl_fx[tdm_ratio_idx] ), tdm_n_OVA, input_frame ); // 1.0 in Q31 -> 2147483647
            }
        }
            BREAK;
+1 −1

File changed.

Contains only whitespace changes.

+1 −1

File changed.

Contains only whitespace changes.

Loading