Loading apps/decoder.c +24 −7 Original line number Diff line number Diff line Loading @@ -2076,7 +2076,21 @@ static ivas_error decodeG192( } } /* TODO(sgi): Get split bitstream here */ #ifdef SPLIT_REND_WITH_HEAD_ROT if ( arg.outputFormat == IVAS_DEC_OUTPUT_SPLIT_BINAURAL_CODED || arg.outputFormat == IVAS_DEC_OUTPUT_SPLIT_BINAURAL_PCM ) { error = IVAS_DEC_GetSplitBinaural(hIvasDec, &splitRendBits, &nSamplesRendered_loop, &needNewFrame ); nSamplesRendered += nSamplesRendered_loop; nSamplesToRender -= nSamplesRendered_loop; if ( error != IVAS_ERR_OK ) { fprintf( stderr, "\nError in IVAS_DEC_GetSplitBinaural: %s\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } } else { #endif error = IVAS_DEC_GetSamples( hIvasDec, nSamplesToRender, pcmBuf + nOutChannels * nSamplesRendered, &nSamplesRendered_loop, &needNewFrame ); nSamplesRendered += nSamplesRendered_loop; nSamplesToRender -= nSamplesRendered_loop; Loading @@ -2085,6 +2099,9 @@ static ivas_error decodeG192( fprintf( stderr, "\nError in IVAS_DEC_VoIP_GetSamples: %s\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } #ifdef SPLIT_REND_WITH_HEAD_ROT } #endif } while ( nSamplesRendered < nOutSamples && error == IVAS_ERR_OK ); Loading lib_dec/ivas_binRenderer_internal.c +5 −1 Original line number Diff line number Diff line Loading @@ -1730,9 +1730,13 @@ void ivas_rend_CldfbMultiBinRendProcess( for ( sf_idx = 0; sf_idx < MAX_PARAM_SPATIAL_SUBFRAMES; sf_idx++ ) { #endif for ( slot_idx = 0; slot_idx < MAX_PARAM_SPATIAL_SUBFRAMES; slot_idx++ ) for ( slot_idx = 0; slot_idx < MAX_PARAM_SPATIAL_SUBFRAMES; slot_idx++ ) /* FhG@Dolby: this looks suspicious */ { #ifdef API_5MS idx = slot_idx; #else idx = sf_idx * MAX_PARAM_SPATIAL_SUBFRAMES + slot_idx; #endif for ( ch_idx = 0; ch_idx < hCldfbRend->nInChannels; ch_idx++ ) { mvr2r( &Cldfb_In_Real[ch_idx][idx][0], &Cldfb_RealBuffer_sfIn[ch_idx][slot_idx][0], hCldfbRend->max_band ); Loading lib_dec/lib_dec.c +12 −5 Original line number Diff line number Diff line Loading @@ -982,8 +982,9 @@ ivas_error IVAS_DEC_GetSamples( #if defined API_5MS && defined SPLIT_REND_WITH_HEAD_ROT ivas_error IVAS_DEC_GetSplitBinaural( IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ bool *needNewFrame, /* indication that the decoder needs a new frame */ IVAS_SPLIT_REND_BITS_HANDLE hSplitRendBits /* o : bitstream output for split rendering mode*/ IVAS_SPLIT_REND_BITS_HANDLE hSplitRendBits, /* o : bitstream output for split rendering mode*/ int16_t *nOutSamples, /* o : number of samples per channel written to output buffer */ bool *needNewFrame /* indication that the decoder needs a new frame */ ) { Decoder_Struct *st_ivas; Loading @@ -991,7 +992,7 @@ ivas_error IVAS_DEC_GetSplitBinaural( int32_t output_Fs; float output[BINAURAL_CHANNELS * MAX_HEAD_ROT_POSES][L_FRAME48k]; int16_t output_int[BINAURAL_CHANNELS * MAX_HEAD_ROT_POSES * L_FRAME48k]; /* TODO(sgi): Need conversion */ int16_t numSamplesPerChannel, nOutSamples; int16_t numSamplesPerChannel; int16_t i, j; ivas_error error; Loading @@ -1006,19 +1007,25 @@ ivas_error IVAS_DEC_GetSplitBinaural( return IVAS_ERR_WRONG_PARAMS; } *nOutSamples = 0; while ( error == IVAS_ERR_OK ) { int16_t nOutSamplesLocal; /* Decode and render */ if ( ( error = IVAS_DEC_GetSamples( hIvasDec, numSamplesPerChannel, output_int, &nOutSamples, &nOutSamplesLocal, needNewFrame ) ) != IVAS_ERR_OK ) { return error; } *nOutSamples += nOutSamplesLocal; /*split rendering process calls*/ IVAS_DEC_SPLIT_REND_WRAPPER *hSplitBinRend; int16_t max_band; Loading lib_dec/lib_dec.h +3 −2 Original line number Diff line number Diff line Loading @@ -197,8 +197,9 @@ ivas_error IVAS_DEC_GetSamples( #if defined API_5MS && defined SPLIT_REND_WITH_HEAD_ROT ivas_error IVAS_DEC_GetSplitBinaural( IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ bool *needNewFrame, /* indication that the decoder needs a new frame */ IVAS_SPLIT_REND_BITS_HANDLE hSplitRendBits /* o : bitstream output for split rendering mode*/ IVAS_SPLIT_REND_BITS_HANDLE hSplitRendBits, /* o : bitstream output for split rendering mode*/ int16_t *nOutSamples, /* o : number of samples per channel written to output buffer */ bool *needNewFrame /* indication that the decoder needs a new frame */ ); #endif Loading Loading
apps/decoder.c +24 −7 Original line number Diff line number Diff line Loading @@ -2076,7 +2076,21 @@ static ivas_error decodeG192( } } /* TODO(sgi): Get split bitstream here */ #ifdef SPLIT_REND_WITH_HEAD_ROT if ( arg.outputFormat == IVAS_DEC_OUTPUT_SPLIT_BINAURAL_CODED || arg.outputFormat == IVAS_DEC_OUTPUT_SPLIT_BINAURAL_PCM ) { error = IVAS_DEC_GetSplitBinaural(hIvasDec, &splitRendBits, &nSamplesRendered_loop, &needNewFrame ); nSamplesRendered += nSamplesRendered_loop; nSamplesToRender -= nSamplesRendered_loop; if ( error != IVAS_ERR_OK ) { fprintf( stderr, "\nError in IVAS_DEC_GetSplitBinaural: %s\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } } else { #endif error = IVAS_DEC_GetSamples( hIvasDec, nSamplesToRender, pcmBuf + nOutChannels * nSamplesRendered, &nSamplesRendered_loop, &needNewFrame ); nSamplesRendered += nSamplesRendered_loop; nSamplesToRender -= nSamplesRendered_loop; Loading @@ -2085,6 +2099,9 @@ static ivas_error decodeG192( fprintf( stderr, "\nError in IVAS_DEC_VoIP_GetSamples: %s\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } #ifdef SPLIT_REND_WITH_HEAD_ROT } #endif } while ( nSamplesRendered < nOutSamples && error == IVAS_ERR_OK ); Loading
lib_dec/ivas_binRenderer_internal.c +5 −1 Original line number Diff line number Diff line Loading @@ -1730,9 +1730,13 @@ void ivas_rend_CldfbMultiBinRendProcess( for ( sf_idx = 0; sf_idx < MAX_PARAM_SPATIAL_SUBFRAMES; sf_idx++ ) { #endif for ( slot_idx = 0; slot_idx < MAX_PARAM_SPATIAL_SUBFRAMES; slot_idx++ ) for ( slot_idx = 0; slot_idx < MAX_PARAM_SPATIAL_SUBFRAMES; slot_idx++ ) /* FhG@Dolby: this looks suspicious */ { #ifdef API_5MS idx = slot_idx; #else idx = sf_idx * MAX_PARAM_SPATIAL_SUBFRAMES + slot_idx; #endif for ( ch_idx = 0; ch_idx < hCldfbRend->nInChannels; ch_idx++ ) { mvr2r( &Cldfb_In_Real[ch_idx][idx][0], &Cldfb_RealBuffer_sfIn[ch_idx][slot_idx][0], hCldfbRend->max_band ); Loading
lib_dec/lib_dec.c +12 −5 Original line number Diff line number Diff line Loading @@ -982,8 +982,9 @@ ivas_error IVAS_DEC_GetSamples( #if defined API_5MS && defined SPLIT_REND_WITH_HEAD_ROT ivas_error IVAS_DEC_GetSplitBinaural( IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ bool *needNewFrame, /* indication that the decoder needs a new frame */ IVAS_SPLIT_REND_BITS_HANDLE hSplitRendBits /* o : bitstream output for split rendering mode*/ IVAS_SPLIT_REND_BITS_HANDLE hSplitRendBits, /* o : bitstream output for split rendering mode*/ int16_t *nOutSamples, /* o : number of samples per channel written to output buffer */ bool *needNewFrame /* indication that the decoder needs a new frame */ ) { Decoder_Struct *st_ivas; Loading @@ -991,7 +992,7 @@ ivas_error IVAS_DEC_GetSplitBinaural( int32_t output_Fs; float output[BINAURAL_CHANNELS * MAX_HEAD_ROT_POSES][L_FRAME48k]; int16_t output_int[BINAURAL_CHANNELS * MAX_HEAD_ROT_POSES * L_FRAME48k]; /* TODO(sgi): Need conversion */ int16_t numSamplesPerChannel, nOutSamples; int16_t numSamplesPerChannel; int16_t i, j; ivas_error error; Loading @@ -1006,19 +1007,25 @@ ivas_error IVAS_DEC_GetSplitBinaural( return IVAS_ERR_WRONG_PARAMS; } *nOutSamples = 0; while ( error == IVAS_ERR_OK ) { int16_t nOutSamplesLocal; /* Decode and render */ if ( ( error = IVAS_DEC_GetSamples( hIvasDec, numSamplesPerChannel, output_int, &nOutSamples, &nOutSamplesLocal, needNewFrame ) ) != IVAS_ERR_OK ) { return error; } *nOutSamples += nOutSamplesLocal; /*split rendering process calls*/ IVAS_DEC_SPLIT_REND_WRAPPER *hSplitBinRend; int16_t max_band; Loading
lib_dec/lib_dec.h +3 −2 Original line number Diff line number Diff line Loading @@ -197,8 +197,9 @@ ivas_error IVAS_DEC_GetSamples( #if defined API_5MS && defined SPLIT_REND_WITH_HEAD_ROT ivas_error IVAS_DEC_GetSplitBinaural( IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ bool *needNewFrame, /* indication that the decoder needs a new frame */ IVAS_SPLIT_REND_BITS_HANDLE hSplitRendBits /* o : bitstream output for split rendering mode*/ IVAS_SPLIT_REND_BITS_HANDLE hSplitRendBits, /* o : bitstream output for split rendering mode*/ int16_t *nOutSamples, /* o : number of samples per channel written to output buffer */ bool *needNewFrame /* indication that the decoder needs a new frame */ ); #endif Loading