Commit 02d8eb0b authored by Archit Tamarapu's avatar Archit Tamarapu
Browse files

[fix] BINAURAL_SPLIT_PCM uses a temporary buffer where scaling isn't applied

parent 8e5e43d3
Loading
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -345,7 +345,9 @@ ivas_error ivas_dec_render(
        if ( st_ivas->ivas_format == SBA_FORMAT &&
             ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC ||
               st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM ||
               st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV ) )
                             st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV ) &&
                         output_config != IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED &&
                         output_config != IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM )
        {
            /* loudness correction for SBA binaural rendering */
            nchan_out_syn_output = ( st_ivas->hSplitBinRend != NULL ) ? st_ivas->hSplitBinRend->splitrend.multiBinPoseData.num_poses * BINAURAL_CHANNELS : BINAURAL_CHANNELS;
+13 −0
Original line number Diff line number Diff line
@@ -2250,6 +2250,19 @@ static ivas_error isar_generate_metadata_and_bitstream(
        return error;
    }

#ifdef FIX_1521_SBA_LOUDNESS_BINAURAL
    if ( pcm_out_flag && st_ivas->ivas_format == SBA_FORMAT &&
         ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC ||
           st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM ||
           st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV ) )
    {
        for ( i = 0; i < st_ivas->hDecoderConfig->nchan_out; ++i )
        {
            v_multc( p_head_pose_buf[i], INV_SQRT2, p_head_pose_buf[i], nSamples );
        }
    }
#endif

    return IVAS_ERR_OK;
}