Commit 0287dc47 authored by Archit Tamarapu's avatar Archit Tamarapu
Browse files

[cleanup] accept SPLIT_REND_POSE_CORRECTION_UNUSED_BITS

parent cc113f02
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -105,7 +105,6 @@

#define SPLIT_REND_WITH_HEAD_ROT                  /* Dlb,FhG: Split Rendering contributions 21 and 35 */
#ifdef SPLIT_REND_WITH_HEAD_ROT
#define SPLIT_REND_POSE_CORRECTION_UNUSED_BITS
#define ISAR_BITSTREAM_UPDATE_LC3PLUS                   /* FhG: Multiple improvements to the ISAR bitstream when LC3plus is used. See MR 1456 for details. */
#define FIX_1372_ISAR_POST_REND
#endif
+0 −4
Original line number Diff line number Diff line
@@ -76,12 +76,8 @@ typedef enum
#define MAX_SPLIT_REND_MD_BANDS      20
#define MAX_SPLIT_MD_SUBFRAMES       1
#define COMPLEX_MD_BAND_THRESH       MAX_SPLIT_REND_MD_BANDS
#ifdef SPLIT_REND_POSE_CORRECTION_UNUSED_BITS
#define COMPLEX_MD_BAND_THRESH_LOW   4
#define COMPLEX_MD_BAND_THRESH_HIGH   10
#else
#define COMPLEX_MD_BAND_THRESH_LOW   5
#endif
#define SPLIT_REND_RO_MD_BAND_THRESH 4

#define ISAR_SPLIT_REND_PRED_63QUANT_PNTS_LOG2_CEIL       6
+0 −8
Original line number Diff line number Diff line
@@ -199,14 +199,8 @@ void isar_split_rend_get_quant_params_fx(
    Word16 bands_pitch[ISAR_SPLIT_REND_NUM_QUANT_STRATS],
    Word16 pred_real_bands_roll[ISAR_SPLIT_REND_NUM_QUANT_STRATS],
    Word16 pred_imag_bands_roll[ISAR_SPLIT_REND_NUM_QUANT_STRATS],
#ifdef SPLIT_REND_POSE_CORRECTION_UNUSED_BITS
    const Word16 ro_flag,
#endif
    Word16 *num_quant_strats
#ifndef SPLIT_REND_POSE_CORRECTION_UNUSED_BITS
    ,
    Word16 *num_complex_bands
#endif
);

void isar_split_rend_get_quant_params(
@@ -293,7 +287,6 @@ void isar_rend_CldfbSplitPreRendProcess(
    const Word16 low_res_pre_rend_rot,
    const Word16 ro_md_flag );

#ifdef SPLIT_REND_POSE_CORRECTION_UNUSED_BITS
Word16 isar_renderSplitGetRot_axisNumBits(
    const Word16 dof );

@@ -305,7 +298,6 @@ Word16 isar_renderSplitGetCodeFromRot_axis(
    const Word16 dof,
    const ISAR_SPLIT_REND_ROT_AXIS rot_axis,
    Word16 *num_bits );
#endif

void isar_init_split_post_rend_handles(
    ISAR_SPLIT_POST_REND_WRAPPER *hSplitRendWrapper );
+0 −163
Original line number Diff line number Diff line
@@ -239,22 +239,9 @@ static void ivas_split_rend_unquant_md_fx(

        quantstep = pred_quant_step;
        move32();
#ifndef SPLIT_REND_POSE_CORRECTION_UNUSED_BITS
        FOR( ch1 = 0; ch1 < BINAURAL_CHANNELS; ch1++ )
        {
            FOR( ch2 = 0; ch2 < BINAURAL_CHANNELS; ch2++ )
            {
                hMd->pred_mat_re_fx[ch1][ch2] = Mpy_32_16_1( quantstep, extract_l( L_shl( hMd->pred_mat_re_idx[ch1][ch2], Q9 ) ) ); /* Q25 */
                move32();
                hMd->pred_mat_re_fx[ch1][ch2] = L_add( hMd->pred_mat_re_fx[ch1][ch2], L_shr( fix_pos_rot_mat[ch1][ch2], Q6 ) ); /* Q25 */
                move32();
            }
        }
#endif

        IF( real_only )
        {
#ifdef SPLIT_REND_POSE_CORRECTION_UNUSED_BITS
            FOR( ch1 = 0; ch1 < BINAURAL_CHANNELS; ch1++ )
            {
                FOR( ch2 = 0; ch2 < BINAURAL_CHANNELS; ch2++ )
@@ -265,7 +252,6 @@ static void ivas_split_rend_unquant_md_fx(
                    move32();
                }
            }
#endif

            FOR( ch1 = 0; ch1 < BINAURAL_CHANNELS; ch1++ )
            {
@@ -278,7 +264,6 @@ static void ivas_split_rend_unquant_md_fx(
        }
        ELSE
        {
#ifdef SPLIT_REND_POSE_CORRECTION_UNUSED_BITS
            FOR( ch1 = 0; ch1 < BINAURAL_CHANNELS; ch1++ )
            {
                FOR( ch2 = 0; ch2 < BINAURAL_CHANNELS; ch2++ )
@@ -289,7 +274,6 @@ static void ivas_split_rend_unquant_md_fx(
                    move32();
                }
            }
#endif

            FOR( ch1 = 0; ch1 < BINAURAL_CHANNELS; ch1++ )
            {
@@ -385,34 +369,6 @@ static void isar_splitBinPostRendMdBase2Dec(
        {
            IF( EQ_32( hBinHrSplitPostRend->pose_type[pos_idx], ANY_YAW ) )
            {
#ifndef SPLIT_REND_POSE_CORRECTION_UNUSED_BITS
                FOR( b = 0; b < pred_real_bands_yaw; b++ )
                {
                    hMd = &hBinHrSplitPostRend->rot_md[pos_idx][sf_idx][b];
                    FOR( ch1 = 0; ch1 < BINAURAL_CHANNELS; ch1++ )
                    {
                        FOR( ch2 = 0; ch2 < BINAURAL_CHANNELS; ch2++ )
                        {
                            code = extract_l( ISAR_SPLIT_REND_BITStream_read_int32( pBits, pred_code_len ) );
                            hMd->pred_mat_re_idx[ch1][ch2] = add( code, min_pred_idx );
                            move16();
                        }
                    }
                }
                FOR( b = 0; b < pred_imag_bands_yaw; b++ )
                {
                    hMd = &hBinHrSplitPostRend->rot_md[pos_idx][sf_idx][b];
                    FOR( ch1 = 0; ch1 < BINAURAL_CHANNELS; ch1++ )
                    {
                        FOR( ch2 = 0; ch2 < BINAURAL_CHANNELS; ch2++ )
                        {
                            code = extract_l( ISAR_SPLIT_REND_BITStream_read_int32( pBits, pred_code_len ) );
                            hMd->pred_mat_im_idx[ch1][ch2] = add( code, min_pred_idx );
                            move16();
                        }
                    }
                }
#else
                FOR( b = 0; b < pred_imag_bands_yaw; b++ )
                {
                    hMd = &hBinHrSplitPostRend->rot_md[pos_idx][sf_idx][b];
@@ -450,7 +406,6 @@ static void isar_splitBinPostRendMdBase2Dec(
                    hMd->pred_mat_re_idx[1][0] = 0;
                    move16();
                }
#endif
                FOR( b = 0; b < d_bands_yaw; b++ )
                {
                    hMd = &hBinHrSplitPostRend->rot_md[pos_idx][sf_idx][b];
@@ -474,34 +429,6 @@ static void isar_splitBinPostRendMdBase2Dec(
            }
            ELSE
            {
#ifndef SPLIT_REND_POSE_CORRECTION_UNUSED_BITS
                FOR( b = 0; b < pred_real_bands_roll; b++ )
                {
                    hMd = &hBinHrSplitPostRend->rot_md[pos_idx][sf_idx][b];
                    FOR( ch1 = 0; ch1 < BINAURAL_CHANNELS; ch1++ )
                    {
                        FOR( ch2 = 0; ch2 < BINAURAL_CHANNELS; ch2++ )
                        {
                            code = extract_l( ISAR_SPLIT_REND_BITStream_read_int32( pBits, pred_roll_code_len ) );
                            hMd->pred_mat_re_idx[ch1][ch2] = add( code, min_pred_roll_idx );
                            move16();
                        }
                    }
                }
                FOR( b = 0; b < pred_imag_bands_roll; b++ )
                {
                    hMd = &hBinHrSplitPostRend->rot_md[pos_idx][sf_idx][b];
                    FOR( ch1 = 0; ch1 < BINAURAL_CHANNELS; ch1++ )
                    {
                        FOR( ch2 = 0; ch2 < BINAURAL_CHANNELS; ch2++ )
                        {
                            code = extract_l( ISAR_SPLIT_REND_BITStream_read_int32( pBits, pred_roll_code_len ) );
                            hMd->pred_mat_im_idx[ch1][ch2] = add( code, min_pred_roll_idx );
                            move16();
                        }
                    }
                }
#else
                FOR( b = 0; b < pred_imag_bands_roll; b++ )
                {
                    hMd = &hBinHrSplitPostRend->rot_md[pos_idx][sf_idx][b];
@@ -539,7 +466,6 @@ static void isar_splitBinPostRendMdBase2Dec(
                    hMd->pred_mat_re_idx[1][0] = 0;
                    move16();
                }
#endif
            }
        }
    }
@@ -599,36 +525,6 @@ static void ivas_splitBinPostRendMdHuffDec(
        {
            IF( EQ_32( hBinHrSplitPostRend->pose_type[pos_idx], ANY_YAW ) )
            {
#ifndef SPLIT_REND_POSE_CORRECTION_UNUSED_BITS
                FOR( b = 0; b < pred_real_bands_yaw; b++ )
                {
                    hMd = &hBinHrSplitPostRend->rot_md[pos_idx][sf_idx][b];
                    FOR( ch1 = 0; ch1 < BINAURAL_CHANNELS; ch1++ )
                    {
                        FOR( ch2 = 0; ch2 < BINAURAL_CHANNELS; ch2++ )
                        {
                            sym_adj_idx[ch1][ch2] = ivas_split_rend_huffman_decode_opt( &pHuff_cfg->pred[pred_cb_idx], pBits, pHuff_cfg->pred_idx_trav[pred_cb_idx] );
                            move16();
                            // sym_adj_idx[ch1][ch2] = ivas_split_rend_huffman_decode( &pHuff_cfg->pred, pBits );
                        }
                    }
                    isar_SplitRenderer_getdiagdiff( sym_adj_idx, hMd->pred_mat_re_idx, 1, min_pred_idx, max_pred_idx );
                }
                FOR( b = 0; b < pred_imag_bands_yaw; b++ )
                {
                    hMd = &hBinHrSplitPostRend->rot_md[pos_idx][sf_idx][b];
                    FOR( ch1 = 0; ch1 < BINAURAL_CHANNELS; ch1++ )
                    {
                        FOR( ch2 = 0; ch2 < BINAURAL_CHANNELS; ch2++ )
                        {
                            sym_adj_idx[ch1][ch2] = ivas_split_rend_huffman_decode_opt( &pHuff_cfg->pred[pred_cb_idx], pBits, pHuff_cfg->pred_idx_trav[pred_cb_idx] );
                            move16();
                            // sym_adj_idx[ch1][ch2] = ivas_split_rend_huffman_decode( &pHuff_cfg->pred, pBits );
                        }
                    }
                    isar_SplitRenderer_getdiagdiff( sym_adj_idx, hMd->pred_mat_im_idx, -1, min_pred_idx, max_pred_idx );
                }
#else
                FOR( b = 0; b < pred_imag_bands_yaw; b++ )
                {
                    hMd = &hBinHrSplitPostRend->rot_md[pos_idx][sf_idx][b];
@@ -668,7 +564,6 @@ static void ivas_splitBinPostRendMdHuffDec(
                    move16();
                    isar_SplitRenderer_getdiagdiff( sym_adj_idx, hMd->pred_mat_re_idx, -1, min_pred_idx, max_pred_idx );
                }
#endif
                FOR( b = 0; b < d_bands_yaw; b++ )
                {
                    hMd = &hBinHrSplitPostRend->rot_md[pos_idx][sf_idx][b];
@@ -689,37 +584,6 @@ static void ivas_splitBinPostRendMdHuffDec(
            }
            ELSE
            {
#ifndef SPLIT_REND_POSE_CORRECTION_UNUSED_BITS
                FOR( b = 0; b < pred_real_bands_roll; b++ )
                {
                    hMd = &hBinHrSplitPostRend->rot_md[pos_idx][sf_idx][b];

                    FOR( ch1 = 0; ch1 < BINAURAL_CHANNELS; ch1++ )
                    {
                        FOR( ch2 = 0; ch2 < BINAURAL_CHANNELS; ch2++ )
                        {
                            sym_adj_idx[ch1][ch2] = ivas_split_rend_huffman_decode_opt( &pHuff_cfg->pred_roll, pBits, pHuff_cfg->pred_roll_idx_trav );
                            move16();
                            // sym_adj_idx[ch1][ch2] = ivas_split_rend_huffman_decode( &pHuff_cfg->pred_roll, pBits );
                        }
                    }
                    isar_SplitRenderer_getdiagdiff( sym_adj_idx, hMd->pred_mat_re_idx, 1, min_pred_roll_idx, max_pred_roll_idx );
                }
                FOR( b = 0; b < pred_imag_bands_roll; b++ )
                {
                    hMd = &hBinHrSplitPostRend->rot_md[pos_idx][sf_idx][b];
                    FOR( ch1 = 0; ch1 < BINAURAL_CHANNELS; ch1++ )
                    {
                        FOR( ch2 = 0; ch2 < BINAURAL_CHANNELS; ch2++ )
                        {
                            sym_adj_idx[ch1][ch2] = ivas_split_rend_huffman_decode_opt( &pHuff_cfg->pred_roll, pBits, pHuff_cfg->pred_roll_idx_trav );
                            move16();
                            // sym_adj_idx[ch1][ch2] = ivas_split_rend_huffman_decode( &pHuff_cfg->pred_roll, pBits );
                        }
                    }
                    isar_SplitRenderer_getdiagdiff( sym_adj_idx, hMd->pred_mat_im_idx, -1, min_pred_roll_idx, max_pred_roll_idx );
                }
#else
                FOR( b = 0; b < pred_imag_bands_roll; b++ )
                {
                    hMd = &hBinHrSplitPostRend->rot_md[pos_idx][sf_idx][b];
@@ -760,7 +624,6 @@ static void ivas_splitBinPostRendMdHuffDec(
                    move16();
                    isar_SplitRenderer_getdiagdiff( sym_adj_idx, hMd->pred_mat_re_idx, -1, min_pred_roll_idx, max_pred_roll_idx );
                }
#endif
            }
        }
    }
@@ -789,11 +652,7 @@ void isar_splitBinPostRendMdDec_fx(
    Word16 pred_real_bands_yaw[ISAR_SPLIT_REND_NUM_QUANT_STRATS], pred_real_bands_roll[ISAR_SPLIT_REND_NUM_QUANT_STRATS];
    Word16 pred_imag_bands_yaw[ISAR_SPLIT_REND_NUM_QUANT_STRATS], pred_imag_bands_roll[ISAR_SPLIT_REND_NUM_QUANT_STRATS];
    Word16 d_bands_yaw[ISAR_SPLIT_REND_NUM_QUANT_STRATS], bands_pitch[ISAR_SPLIT_REND_NUM_QUANT_STRATS];
#ifdef SPLIT_REND_POSE_CORRECTION_UNUSED_BITS
    Word16 num_quant_strats;
#else
    Word16 num_complex_bands, num_quant_strats;
#endif
    Word32 quant_strat_bits, is_huff_coding, quant_strat;
    Word16 pred_quant_pnts_yaw[ISAR_SPLIT_REND_NUM_QUANT_STRATS];
    Word32 pred_1byquantstep_yaw_fx[ISAR_SPLIT_REND_NUM_QUANT_STRATS]; // Q26
@@ -804,9 +663,7 @@ void isar_splitBinPostRendMdDec_fx(
    ISAR_BIN_HR_SPLIT_REND_MD_HANDLE hMd;
    ISAR_SPLIT_REND_CONFIG_DATA split_rend_config;
    ISAR_SPLIT_REND_ROT_AXIS rot_axis;
#ifdef SPLIT_REND_POSE_CORRECTION_UNUSED_BITS
    Word16 ro_md_flag, num_bits, axis_code;
#endif

    hBinHrSplitPostRend->low_Res = 1;
    move16();
@@ -814,7 +671,6 @@ void isar_splitBinPostRendMdDec_fx(
    split_rend_config.dof = extract_l( ISAR_SPLIT_REND_BITStream_read_int32( pBits, ISAR_SPLIT_REND_DOF_BITS ) );
    split_rend_config.hq_mode = extract_l( ISAR_SPLIT_REND_BITStream_read_int32( pBits, ISAR_SPLIT_REND_HQ_MODE_BITS ) );

#ifdef SPLIT_REND_POSE_CORRECTION_UNUSED_BITS
    num_bits = isar_renderSplitGetRot_axisNumBits( split_rend_config.dof );
    if ( num_bits > 0 )
    {
@@ -826,9 +682,6 @@ void isar_splitBinPostRendMdDec_fx(
    }
    rot_axis = isar_renderSplitGetRot_axisFromCode( split_rend_config.dof, axis_code );
    ro_md_flag = (int16_t) ISAR_SPLIT_REND_BITStream_read_int32( pBits, ISAR_SPLIT_REND_RO_FLAG_BITS );
#else
    rot_axis = (ISAR_SPLIT_REND_ROT_AXIS) ISAR_SPLIT_REND_BITStream_read_int32( pBits, ISAR_SPLIT_REND_ROT_AXIS_BITS );
#endif
    isar_renderSplitGetMultiBinPoseData_fx( &split_rend_config, pMultiBinPoseData, rot_axis );

    set_fix_rotation_mat_fx( hBinHrSplitPostRend->fix_pos_rot_mat_fx, pMultiBinPoseData );
@@ -862,7 +715,6 @@ void isar_splitBinPostRendMdDec_fx(
        move32();
    }

#ifdef SPLIT_REND_POSE_CORRECTION_UNUSED_BITS
    isar_split_rend_get_quant_params_fx(
        MAX_SPLIT_REND_MD_BANDS,
        pred_real_bands_yaw,
@@ -876,21 +728,6 @@ void isar_splitBinPostRendMdDec_fx(
        pred_imag_bands_roll,
        ro_md_flag,
        &num_quant_strats );
#else
    isar_split_rend_get_quant_params_fx(
        MAX_SPLIT_REND_MD_BANDS,
        pred_real_bands_yaw,
        pred_imag_bands_yaw,
        pred_quant_pnts_yaw,
        pred_quantstep_yaw_fx,
        pred_1byquantstep_yaw_fx,
        d_bands_yaw,
        bands_pitch,
        pred_real_bands_roll,
        pred_imag_bands_roll,
        &num_quant_strats,
        &num_complex_bands );
#endif
    quant_strat_bits = L_deposit_l( ceil_log_2( num_quant_strats ) );
    is_huff_coding = ISAR_SPLIT_REND_BITStream_read_int32( pBits, 1 );
    quant_strat = ISAR_SPLIT_REND_BITStream_read_int32( pBits, quant_strat_bits );
+0 −246

File changed.

Preview size limit exceeded, changes collapsed.

Loading