Commit 2323d31c authored by multrus's avatar multrus
Browse files

[cleanup] accept SPLIT_REND_POSE_CORRECTION_UNUSED_BITS

parent 9fa9fa3f
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -160,7 +160,6 @@
#ifdef ISAR_BITSTREAM_UPDATE_LC3PLUS
#define LC3PLUS_LEA_COMPAT_BITRATES_48_6                /* FhG: treat split-rendering 256kbps lc3plus 10ms 0dof bitrate as sentinel value for LEA compatible 48_6 bitrate (124 kbps per channel)  */
#endif
#define SPLIT_REND_POSE_CORRECTION_UNUSED_BITS
#endif

//#define FIX_CREND_FIX_POINT_HRTF_FILE_FORMAT          /* Orange issue 1031 : new fix point hrtf binary file format */
+0 −4
Original line number Diff line number Diff line
@@ -75,12 +75,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_NUM_QUANT_STRATS     4
+0 −7
Original line number Diff line number Diff line
@@ -236,13 +236,8 @@ void isar_split_rend_get_quant_params(
    int16_t bands_pitch[ISAR_SPLIT_REND_NUM_QUANT_STRATS],
    int16_t pred_real_bands_roll[ISAR_SPLIT_REND_NUM_QUANT_STRATS],
    int16_t pred_imag_bands_roll[ISAR_SPLIT_REND_NUM_QUANT_STRATS],
#ifdef SPLIT_REND_POSE_CORRECTION_UNUSED_BITS
    const int16_t ro_flag,
    int16_t *num_quant_strats
#else
    int16_t *num_quant_strats,
    int16_t *num_complex_bands
#endif
);

void isar_splitBinPostRendMdDec(
@@ -319,7 +314,6 @@ void isar_renderSplitGetMultiBinPoseData(
    const ISAR_SPLIT_REND_ROT_AXIS rot_axis                     /* i  : external control for rotation axis for split rendering */
);

#ifdef SPLIT_REND_POSE_CORRECTION_UNUSED_BITS
int16_t isar_renderSplitGetRot_axisNumBits(
    const int16_t dof 
);
@@ -334,7 +328,6 @@ int16_t isar_renderSplitGetCodeFromRot_axis(
    const ISAR_SPLIT_REND_ROT_AXIS rot_axis,
    int16_t *num_bits 
);
#endif

void isar_init_split_post_rend_handles(
    ISAR_SPLIT_POST_REND_WRAPPER *hSplitRendWrapper             /* i/o: Split renderer post-renderer handle     */
+0 −149
Original line number Diff line number Diff line
@@ -241,19 +241,8 @@ static void isar_split_rend_unquant_md(
        float quantstep;

        quantstep = pred_quant_step;
#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[ch1][ch2] = hMd->pred_mat_re_idx[ch1][ch2] * quantstep;
                hMd->pred_mat_re[ch1][ch2] = hMd->pred_mat_re[ch1][ch2] + fix_pos_rot_mat[ch1][ch2];
            }
        }
#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++ )
@@ -262,7 +251,6 @@ static void isar_split_rend_unquant_md(
                    hMd->pred_mat_re[ch1][ch2] = hMd->pred_mat_re[ch1][ch2] + ( ( ch1 == ch2 ) ? 1.0f : 0.0f );
                }
            }
#endif

            for ( ch1 = 0; ch1 < BINAURAL_CHANNELS; ch1++ )
            {
@@ -274,7 +262,6 @@ static void isar_split_rend_unquant_md(
        }
        else
        {
#ifdef SPLIT_REND_POSE_CORRECTION_UNUSED_BITS
            for ( ch1 = 0; ch1 < BINAURAL_CHANNELS; ch1++ )
            {
                for ( ch2 = 0; ch2 < BINAURAL_CHANNELS; ch2++ )
@@ -283,7 +270,6 @@ static void isar_split_rend_unquant_md(
                    hMd->pred_mat_re[ch1][ch2] = hMd->pred_mat_re[ch1][ch2] + fix_pos_rot_mat[ch1][ch2];
                }
            }
#endif

            for ( ch1 = 0; ch1 < BINAURAL_CHANNELS; ch1++ )
            {
@@ -370,32 +356,6 @@ static void isar_splitBinPostRendMdBase2Dec(
        {
            if ( 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 = (int16_t) ISAR_SPLIT_REND_BITStream_read_int32( pBits, pred_code_len );
                            hMd->pred_mat_re_idx[ch1][ch2] = code + min_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++ )
                        {
                            code = (int16_t) ISAR_SPLIT_REND_BITStream_read_int32( pBits, pred_code_len );
                            hMd->pred_mat_im_idx[ch1][ch2] = code + min_pred_idx;
                        }
                    }
                }
#else
                for ( b = 0; b < pred_imag_bands_yaw; b++ )
                {
                    hMd = &hBinHrSplitPostRend->rot_md[pos_idx][sf_idx][b];
@@ -428,7 +388,6 @@ static void isar_splitBinPostRendMdBase2Dec(
                    hMd->pred_mat_re_idx[0][1] = 0;
                    hMd->pred_mat_re_idx[1][0] = 0;
                }
#endif
                for ( b = 0; b < d_bands_yaw; b++ )
                {
                    hMd = &hBinHrSplitPostRend->rot_md[pos_idx][sf_idx][b];
@@ -449,32 +408,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 = (int16_t) ISAR_SPLIT_REND_BITStream_read_int32( pBits, pred_roll_code_len );
                            hMd->pred_mat_re_idx[ch1][ch2] = code + min_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++ )
                        {
                            code = (int16_t) ISAR_SPLIT_REND_BITStream_read_int32( pBits, pred_roll_code_len );
                            hMd->pred_mat_im_idx[ch1][ch2] = code + min_pred_roll_idx;
                        }
                    }
                }
#else
                for ( b = 0; b < pred_imag_bands_roll; b++ )
                {
                    hMd = &hBinHrSplitPostRend->rot_md[pos_idx][sf_idx][b];
@@ -507,7 +440,6 @@ static void isar_splitBinPostRendMdBase2Dec(
                    hMd->pred_mat_re_idx[0][1] = 0;
                    hMd->pred_mat_re_idx[1][0] = 0;
                }
#endif
            }
        }
    }
@@ -565,32 +497,6 @@ static void isar_splitBinPostRendMdHuffDec(
        {
            if ( 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] = isar_split_rend_huffman_decode_opt( &pHuff_cfg->pred[pred_cb_idx], pBits, pHuff_cfg->pred_idx_trav[pred_cb_idx] );
                        }
                    }
                    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] = isar_split_rend_huffman_decode_opt( &pHuff_cfg->pred[pred_cb_idx], pBits, pHuff_cfg->pred_idx_trav[pred_cb_idx] );
                        }
                    }
                    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];
@@ -622,7 +528,6 @@ static void isar_splitBinPostRendMdHuffDec(
                    sym_adj_idx[0][1] = 0;
                    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];
@@ -641,33 +546,6 @@ static void isar_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] = isar_split_rend_huffman_decode_opt( &pHuff_cfg->pred_roll, pBits, pHuff_cfg->pred_roll_idx_trav );
                        }
                    }
                    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] = isar_split_rend_huffman_decode_opt( &pHuff_cfg->pred_roll, pBits, pHuff_cfg->pred_roll_idx_trav );
                        }
                    }
                    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];
@@ -702,7 +580,6 @@ static void isar_splitBinPostRendMdHuffDec(
                    sym_adj_idx[0][1] = 0;
                    isar_SplitRenderer_getdiagdiff( sym_adj_idx, hMd->pred_mat_re_idx, -1, min_pred_roll_idx, max_pred_roll_idx );
                }
#endif
            }
        }
    }
@@ -731,11 +608,7 @@ void isar_splitBinPostRendMdDec(
    int16_t pred_real_bands_yaw[ISAR_SPLIT_REND_NUM_QUANT_STRATS], pred_real_bands_roll[ISAR_SPLIT_REND_NUM_QUANT_STRATS];
    int16_t pred_imag_bands_yaw[ISAR_SPLIT_REND_NUM_QUANT_STRATS], pred_imag_bands_roll[ISAR_SPLIT_REND_NUM_QUANT_STRATS];
    int16_t d_bands_yaw[ISAR_SPLIT_REND_NUM_QUANT_STRATS], bands_pitch[ISAR_SPLIT_REND_NUM_QUANT_STRATS];
#ifdef SPLIT_REND_POSE_CORRECTION_UNUSED_BITS
    int16_t num_quant_strats;
#else
    int16_t num_complex_bands, num_quant_strats;
#endif
    int32_t quant_strat_bits, is_huff_coding, quant_strat;
    int16_t pred_quant_pnts_yaw[ISAR_SPLIT_REND_NUM_QUANT_STRATS];
    float pred_1byquantstep_yaw[ISAR_SPLIT_REND_NUM_QUANT_STRATS];
@@ -746,16 +619,13 @@ void isar_splitBinPostRendMdDec(
    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
    int16_t ro_md_flag, num_bits, axis_code;
#endif

    hBinHrSplitPostRend->low_Res = 1;

    split_rend_config.dof = (int16_t) ISAR_SPLIT_REND_BITStream_read_int32( pBits, ISAR_SPLIT_REND_DOF_BITS );
    split_rend_config.hq_mode = (int16_t) 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 )
    {
@@ -767,9 +637,6 @@ void isar_splitBinPostRendMdDec(
    }
    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( &split_rend_config, pMultiBinPoseData, rot_axis );

@@ -796,7 +663,6 @@ void isar_splitBinPostRendMdDec(
        hBinHrSplitPostRend->QuaternionsPre[sf_idx].z = (float) angle;
    }

#ifdef SPLIT_REND_POSE_CORRECTION_UNUSED_BITS
    isar_split_rend_get_quant_params(
        MAX_SPLIT_REND_MD_BANDS,
        pred_real_bands_yaw,
@@ -810,21 +676,6 @@ void isar_splitBinPostRendMdDec(
        pred_imag_bands_roll,
        ro_md_flag,
        &num_quant_strats );
#else
    isar_split_rend_get_quant_params(
        MAX_SPLIT_REND_MD_BANDS,
        pred_real_bands_yaw,
        pred_imag_bands_yaw,
        pred_quant_pnts_yaw,
        pred_quantstep_yaw,
        pred_1byquantstep_yaw,
        d_bands_yaw,
        bands_pitch,
        pred_real_bands_roll,
        pred_imag_bands_roll,
        &num_quant_strats,
        &num_complex_bands );
#endif

    quant_strat_bits = (int32_t) ceilf( log2f( num_quant_strats ) );
    is_huff_coding = ISAR_SPLIT_REND_BITStream_read_int32( pBits, 1 );
+0 −207

File changed.

Preview size limit exceeded, changes collapsed.

Loading