Commit 5addf2b5 authored by sagnowski's avatar sagnowski
Browse files

Ensure changes are cleanly wrapped in SPLIT_REND_WITH_HEAD_ROT (WIP)

parent 2ea8d50d
Loading
Loading
Loading
Loading
Loading
+18 −7
Original line number Diff line number Diff line
@@ -339,7 +339,7 @@ static ivas_error ivas_binRenderer_convModuleOpen(
            }
        }
    }
#endif
#endif /* SPLIT_REND_WITH_HEAD_ROT */

    /* set memories */

@@ -381,6 +381,11 @@ static ivas_error ivas_binRenderer_convModuleOpen(

            if ( renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM )
            {
#ifndef SPLIT_REND_WITH_HEAD_ROT
                /* set the memories to zero */
                set_zero( hBinRenConvModule->filterStatesLeftReal[bandIdx][chIdx], hBinRenConvModule->numTapsArray[bandIdx] );
                set_zero( hBinRenConvModule->filterStatesLeftImag[bandIdx][chIdx], hBinRenConvModule->numTapsArray[bandIdx] );
#endif
                if ( isLoudspeaker )
                {
                    hBinRenConvModule->filterTapsLeftReal[bandIdx][chIdx] = hHrtf->leftBRIRReal[bandIdx][tmp];
@@ -398,6 +403,12 @@ static ivas_error ivas_binRenderer_convModuleOpen(
            }
            else
            {
#ifndef SPLIT_REND_WITH_HEAD_ROT
                /* set the memories to zero */
                set_zero( hBinRenConvModule->filterStatesLeftReal[bandIdx][chIdx], hBinRenConvModule->numTaps );
                set_zero( hBinRenConvModule->filterStatesLeftImag[bandIdx][chIdx], hBinRenConvModule->numTaps );
#endif

                if ( isLoudspeaker )
                {
                    hBinRenConvModule->filterTapsLeftReal[bandIdx][chIdx] = hHrtf->leftHRIRReal[bandIdx][tmp];
@@ -754,7 +765,7 @@ ivas_error ivas_rend_openCldfbRend(

    return error;
}
#endif
#endif /* SPLIT_REND_WITH_HEAD_ROT */

/*-------------------------------------------------------------------------
 * ivas_binRenderer_open()
@@ -1069,7 +1080,7 @@ static void ivas_binRenderer_convModuleClose(

    free( hBinRenConvModule->filterStatesLeftImag );
    hBinRenConvModule->filterStatesLeftImag = NULL;
#else
#else /* SPLIT_REND_WITH_HEAD_ROT */
    for ( bandIdx = 0; bandIdx < ( *hBinRenderer )->conv_band; bandIdx++ )
    {
        for ( chIdx = 0; chIdx < ( *hBinRenderer )->nInChannels; chIdx++ )
@@ -1093,7 +1104,7 @@ static void ivas_binRenderer_convModuleClose(

    free( hBinRenConvModule->filterStatesLeftImag );
    hBinRenConvModule->filterStatesLeftImag = NULL;
#endif
#endif /* SPLIT_REND_WITH_HEAD_ROT */

    free( ( *hBinRenderer )->hBinRenConvModule );
    ( *hBinRenderer )->hBinRenConvModule = NULL;
@@ -1472,7 +1483,7 @@ void ivas_binRenderer(
            set_zero( Cldfb_ImagBuffer_Binaural[chIdx][k], CLDFB_NO_CHANNELS_MAX );
        }
    }
#endif
#endif /* SPLIT_REND_WITH_HEAD_ROT */

    /* Head rotation in HOA3 or CICPx */
    if (
@@ -1563,7 +1574,7 @@ void ivas_binRenderer(
            }
        }
    }
#endif
#endif /* SPLIT_REND_WITH_HEAD_ROT */

    /* Obtain the binaural dmx and compute the reverb */
    if ( hBinRenderer->hReverb != NULL )
@@ -1692,4 +1703,4 @@ void ivas_rend_CldfbMultiBinRendProcess(

    return;
}
#endif
#endif /* SPLIT_REND_WITH_HEAD_ROT */
+0 −3
Original line number Diff line number Diff line
@@ -1923,9 +1923,6 @@ void ivas_destroy_dec(
#ifdef SPLIT_REND_WITH_HEAD_ROT
    /* Split binaural renderer handle */
    ivas_split_renderer_close( &st_ivas->splitBinRend.splitrend );

#else

#endif

    /* Parametric binaural renderer handle */
+1 −1
Original line number Diff line number Diff line
@@ -143,7 +143,7 @@ extern const int32_t ivas_split_rend_huff_pred_consts[IVAS_SPLIT_REND_PRED_QUANT
extern const int32_t ivas_split_rend_huff_p_d_consts[IVAS_SPLIT_REND_D_QUANT_PNTS][3];
extern const int32_t ivas_split_rend_huff_p_d_diff_consts[IVAS_SPLIT_REND_D_QUANT_PNTS][3];
extern const int32_t split_rend_brate_tbl[];
#endif
#endif /* SPLIT_REND_WITH_HEAD_ROT */
extern const int16_t huff_nodes_first_band_alpha[32][2];
extern const int16_t huff_nodes_first_band_alpha_coarse[16][2];

+0 −1
Original line number Diff line number Diff line
@@ -2811,7 +2811,6 @@ static void ivas_parse_parameter_bitstream_dtx(
 *
 * Deindex real index
 *-----------------------------------------------------------------------------------------*/

ivas_error ivas_deindex_real_index(
    const int16_t *index,
    const int16_t q_levels,
+0 −3
Original line number Diff line number Diff line
@@ -1098,9 +1098,6 @@ typedef struct ivas_binaural_rendering_struct
    float earlyPartEneCorrection[CLDFB_NO_CHANNELS_MAX];
    REVERB_STRUCT_HANDLE hReverb;

#ifdef SPLIT_REND_WITH_HEAD_ROT
    int16_t numPoses;
#endif
} BINAURAL_RENDERER, *BINAURAL_RENDERER_HANDLE;
#endif

Loading