Commit 8f9f26cb authored by TYAGIRIS's avatar TYAGIRIS
Browse files

lib decoder split rendering BASOP updates

parent 2f2d6f6d
Loading
Loading
Loading
Loading
+38 −38
Original line number Diff line number Diff line
@@ -2034,7 +2034,7 @@ static ivas_error decodeG192(
#ifdef SPLIT_REND_WITH_HEAD_ROT
            if ( IVAS_DEC_is_split_rendering_enabled( hIvasDec ) )
            {
                if ( ( error = IVAS_DEC_GetSplitBinauralBitstream( hIvasDec, (void *) ( pcmBuf + nOutChannels * nSamplesRendered ), splitRendBits, &nSamplesRendered_loop, &needNewFrame ) ) != IVAS_ERR_OK )
                if ( ( error = IVAS_DEC_GetSplitBinauralBitstream( hIvasDec, (Word16 *) ( pcmBuf + nOutChannels * nSamplesRendered ), splitRendBits, &nSamplesRendered_loop, &needNewFrame ) ) != IVAS_ERR_OK )
                {
                    fprintf( stderr, "\nError in IVAS_DEC_GetSplitBinauralBitstream: %s\n", IVAS_DEC_GetErrorMessage( error ) );
                    goto cleanup;
+52 −1
Original line number Diff line number Diff line
@@ -144,6 +144,46 @@ ivas_error IVAS_DEC_GetSamples(
  bool *needNewFrame                          /* o  : indication that the decoder needs a new frame                           */
);

#ifdef SPLIT_REND_WITH_HEAD_ROT
ivas_error IVAS_DEC_GetSplitBinauralBitstream(
    IVAS_DEC_HANDLE hIvasDec,                   /* i/o: IVAS decoder handle                                                     */
    void *pcmBuf_out,                           /* o  : output synthesis signal for BINAURAL_SPLIT_PCM                          */
    ISAR_SPLIT_REND_BITS_DATA *splitRendBits,   /* o  : output split rendering bits                                             */
    Word16 *nOutSamples,                       /* o  : number of samples per channel written to output buffer                  */
    bool *needNewFrame                          /* o  : indication that the decoder needs a new frame                           */
);

/*! r: decoder error code */
ivas_error IVAS_DEC_GetSplitRendBitstreamHeader(
    IVAS_DEC_HANDLE hIvasDec,                              /* i/o: IVAS decoder handle                                                     */
    ISAR_SPLIT_REND_CODEC *pCodec,                         /* o: pointer to codec setting                */
    ISAR_SPLIT_REND_POSE_CORRECTION_MODE *poseCorrection,  /* o: pointer to pose correction mode                */
#ifdef ISAR_BITSTREAM_UPDATE_LC3PLUS
    Word16 *pIsar_frame_size_ms,                          /* o: pointer to isar frame size setting     */
#endif
    Word16 *pCodec_frame_size_ms                          /* o: pointer to codec frame size setting     */
#ifdef ISAR_BITSTREAM_UPDATE_LC3PLUS
    ,
    Word16 *pLc3plusHighRes                               /* o: pointer to LC3plus High-Res setting     */
#endif
);

/*! r: decoder error code */
ivas_error IVAS_DEC_GetCldfbSamples(
    IVAS_DEC_HANDLE hIvasDec,                   /* i/o: IVAS decoder handle                                                     */
    Word32 *out_real,                            /* o  : buffer for decoded PCM real output in CLDFB domain                      */
    Word32 *out_imag,                            /* o  : buffer for decoded PCM imag output in CLDFB domain                      */
    IVAS_AUDIO_CONFIG *audio_config,            /* o  : audio configuration                                                     */
    Word16 *nOutSamples                        /* o  : number of samples per channel written to output buffer                  */
);

int16_t IVAS_DEC_is_split_rendering_enabled(
    IVAS_DEC_HANDLE hIvasDec /* i: IVAS decoder handle  */
);
int16_t IVAS_DEC_is_split_rendering_coded_out(
    IVAS_DEC_HANDLE hIvasDec /* i/o: IVAS decoder handle  */
);
#endif

/*! r: error code */
ivas_error IVAS_DEC_GetObjectMetadata(
@@ -165,7 +205,12 @@ ivas_error IVAS_DEC_FeedHeadTrackData(
  IVAS_DEC_HANDLE hIvasDec,                   /* i/o: IVAS decoder handle                                                     */
  IVAS_QUATERNION orientation,                /* i  : head-tracking data, listener orientation                                */
  IVAS_VECTOR3 Pos,                           /* i  : listener position                                                       */
#ifdef SPLIT_REND_WITH_HEAD_ROT
    const Word16 subframe_idx,                 /* i  : subframe index                                                          */
    const ISAR_SPLIT_REND_ROT_AXIS rot_axis     /* i  : external control for rotation axis for split rendering                  */
#else
    const Word16 subframe_idx                  /* i  : subframe index                                                          */
#endif
);

/*! r: error code */
@@ -242,6 +287,12 @@ ivas_error IVAS_DEC_EnableVoIP(
  const IVAS_DEC_INPUT_FORMAT inputFormat     /* i  : format of the input bitstream                                           */
);

#ifdef SPLIT_REND_WITH_HEAD_ROT
/*! r: error code */
ivas_error IVAS_DEC_EnableSplitRendering(
    IVAS_DEC_HANDLE hIvasDec                    /* i/o: IVAS decoder handle                                                     */
);
#endif

ivas_error IVAS_DEC_SetRenderFramesize(
  IVAS_DEC_HANDLE hIvasDec,               /* i/o: IVAS decoder handle   */
+685 −2

File changed.

Preview size limit exceeded, changes collapsed.

+1 −1
Original line number Diff line number Diff line
@@ -256,7 +256,7 @@ typedef struct
    ISAR_BIN_HR_SPLIT_LCLD_ENC_HANDLE hSplitBinLCLDEnc;
    CLDFB_HANDLES_WRAPPER_HANDLE hCldfbHandles;
    ISAR_LC3PLUS_ENC_HANDLE hLc3plusEnc;
    float *lc3plusDelayBuffers[MAX_HEAD_ROT_POSES * BINAURAL_CHANNELS];     /* Used to time-align head pose correction metadata with LC3plus-coded reference audio */
    // float *lc3plusDelayBuffers[MAX_HEAD_ROT_POSES * BINAURAL_CHANNELS];     /* Used to time-align head pose correction metadata with LC3plus-coded reference audio */
    Word32 *lc3plusDelayBuffers_fx[MAX_HEAD_ROT_POSES * BINAURAL_CHANNELS]; /* Used to time-align head pose correction metadata with LC3plus-coded reference audio */
    Word16 lc3plusDelayBuffers_q;
    Word32 lc3plusDelaySamples;
+3 −10
Original line number Diff line number Diff line
@@ -273,11 +273,6 @@ void ISAR_PRE_REND_close(

    FOR( i = 0; i < MAX_HEAD_ROT_POSES * BINAURAL_CHANNELS; ++i )
    {
        IF( hSplitBinRend->lc3plusDelayBuffers[i] != NULL )
        {
            free( hSplitBinRend->lc3plusDelayBuffers[i] );
            hSplitBinRend->lc3plusDelayBuffers[i] = NULL;
        }
        if ( hSplitBinRend->lc3plusDelayBuffers_fx[i] != NULL )
        {
            free( hSplitBinRend->lc3plusDelayBuffers_fx[i] );
@@ -288,10 +283,10 @@ void ISAR_PRE_REND_close(
    IF( pSplitRendEncBuffer != NULL )
    {

        IF( pSplitRendEncBuffer->data != NULL )
        IF( pSplitRendEncBuffer->data_fx != NULL )
        {
            free( pSplitRendEncBuffer->data );
            pSplitRendEncBuffer->data = NULL;
            free( pSplitRendEncBuffer->data_fx );
            pSplitRendEncBuffer->data_fx = NULL;
        }

        pSplitRendEncBuffer->config.numChannels = 0;
@@ -335,7 +330,6 @@ ivas_error ISAR_PRE_REND_MultiBinToSplitBinaural(
    Word32 Cldfb_In_BinReal_fx[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX],
    Word32 Cldfb_In_BinImag_fx[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX],
    const Word16 max_bands,
    float *output[],
    Word32 *pOutput_fx[],
    const Word16 low_res_pre_rend_rot,
    const Word16 cldfb_in_flag,
@@ -361,7 +355,6 @@ ivas_error ISAR_PRE_REND_MultiBinToSplitBinaural(
     FILE *fp = fopen( "Float_code_output.txt", "ab+" );
    FILE *fp1 = fopen( "Float_code_cldfb_state.txt", "ab+" );*/
#endif
    output;
    Q_buff_re = Q_buff;
    move16();
    Q_buff_im = Q_buff;
Loading