Commit 995e7d4a authored by bayers's avatar bayers
Browse files

address remaining merge comments (ParamUpmix and temp fix for TD object renderer related)

parent 12bdd82a
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -160,7 +160,6 @@
// TODO: Check all switches in this section, remove if they were accepted
#define FIX_566_2DIR_MASA_384K                          /* Nokia: Issued 566:  Bugfix in 384k MASA metadata encoding of second direction */
#define FIX_XXX_HEADTRACKER_INIT
#define FIX_XXX_TDOBJRENDERER_INPUT                     /* sgi2bay: seems like this is already covered under FIX_550_FIRST_FRAME_ACCESS */
#define FIX_XXX_ISM_SBA_ASAN
#define NONBE_FIX_589_JBM_TC_OFFSETS
#define API_5MS
+36 −30
Original line number Diff line number Diff line
@@ -1105,7 +1105,11 @@ ivas_error ivas_jbm_dec_render(
#ifdef JBM_PARAMUPMIX
            else if ( st_ivas->mc_mode == MC_MODE_PARAMUPMIX )
            {
#ifdef JITTER_MEM_OPTIM_RENDERING
                ivas_mc_paramupmix_dec_render( st_ivas, nSamplesAskedLocal, &nSamplesRenderedLocal, nSamplesAvailableNext, p_tc, p_output );
#else
                ivas_mc_paramupmix_dec_render( st_ivas, nSamplesAskedLocal, nSamplesRendered, nSamplesAvailableNext, p_tc, p_output );
#endif

                /* HP filtering */
                for ( n = 0; n < st_ivas->nchan_transport; n++ )
@@ -1118,30 +1122,53 @@ ivas_error ivas_jbm_dec_render(

                if ( st_ivas->transport_config != st_ivas->intern_config && ( st_ivas->intern_config == AUDIO_CONFIG_FOA || st_ivas->intern_config == AUDIO_CONFIG_HOA2 || st_ivas->intern_config == AUDIO_CONFIG_HOA3 ) )
                {
#ifdef JITTER_MEM_OPTIM_RENDERING
                    ivas_mc2sba( st_ivas->hTransSetup, p_output, p_output, nSamplesRenderedLocal, st_ivas->hIntSetup.ambisonics_order, GAIN_LFE );
#else
                    ivas_mc2sba( st_ivas->hTransSetup, p_output, p_output, *nSamplesRendered, st_ivas->hIntSetup.ambisonics_order, GAIN_LFE );
#endif
                }

                /* Rendering */
                if ( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV || st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM )
                {
#ifdef JITTER_MEM_OPTIM_RENDERING
                    ivas_binaural_add_LFE( st_ivas, nSamplesRenderedLocal, p_output, p_output );
#else
                    ivas_binaural_add_LFE( st_ivas, *nSamplesRendered, p_output, p_output );
#endif
                }
                else if ( st_ivas->renderer_type == RENDERER_MC )
                {
#ifdef JITTER_MEM_OPTIM_RENDERING
                    ivas_ls_setup_conversion( st_ivas, MC_PARAMUPMIX_MAX_INPUT_CHANS, nSamplesRenderedLocal, p_output, p_output );
#else
                    ivas_ls_setup_conversion( st_ivas, MC_PARAMUPMIX_MAX_INPUT_CHANS, *nSamplesRendered, p_output, p_output );
#endif
                }
                else if ( st_ivas->renderer_type == RENDERER_SBA_LINEAR_ENC )
                {
#ifdef JITTER_MEM_OPTIM_RENDERING
                    ivas_mc2sba( st_ivas->hIntSetup, p_output, p_output, nSamplesRenderedLocal, st_ivas->hOutSetup.ambisonics_order, 0.f );
#else
                    ivas_mc2sba( st_ivas->hIntSetup, p_output, p_output, *nSamplesRendered, st_ivas->hOutSetup.ambisonics_order, 0.f );
#endif
                }
                else if ( st_ivas->renderer_type == RENDERER_BINAURAL_OBJECTS_TD )
                {
#ifdef JITTER_MEM_OPTIM_RENDERING
                    if ( ( ivas_td_binaural_renderer( st_ivas, p_output, nSamplesRenderedLocal ) ) != IVAS_ERR_OK )
#else
                    if ( ( ivas_td_binaural_renderer( st_ivas, p_output, *nSamplesRendered ) ) != IVAS_ERR_OK )
#endif
                    {
                        return error;
                    }

#ifdef JITTER_MEM_OPTIM_RENDERING
                    ivas_binaural_add_LFE( st_ivas, nSamplesRenderedLocal, p_output, p_output );
#else
                    ivas_binaural_add_LFE( st_ivas, *nSamplesRendered, p_output, p_output );
#endif
                }
            }
#endif
@@ -1153,27 +1180,6 @@ ivas_error ivas_jbm_dec_render(
            ivas_param_mc_dec_render( st_ivas, nSamplesAskedLocal, nSamplesRendered, nSamplesAvailableNext, p_output );
#endif
            }
// sgi2bay: seems like this was implemented on main in the meantime (see above). Please review
// #ifdef API_5MS
//             else if ( st_ivas->mc_mode == MC_MODE_PARAMUPMIX )
//             {
//                 /* zero output for now, not yet implemented...  */
//                 int16_t ch;
// #ifdef JITTER_MEM_OPTIM_RENDERING
//                 nSamplesRenderedLocal = min( st_ivas->hTcBuffer->n_samples_available, nSamplesAskedLocal );
// #else
//                 *nSamplesRendered = min( st_ivas->hTcBuffer->n_samples_available, nSamplesAsked );
// #endif /* JITTER_MEM_OPTIM_RENDERING */
//                 for ( ch = 0; ch < nchan_out; ch++ )
//                 {
// #ifdef JITTER_MEM_OPTIM_RENDERING
//                     set_zero( p_output[ch], nSamplesRenderedLocal );
// #else
//                     set_zero( p_output[ch], *nSamplesRendered );
// #endif /* JITTER_MEM_OPTIM_RENDERING */
//                 }
//             }
// #endif /* API_5MS */
            else if ( st_ivas->mc_mode == MC_MODE_MCMASA )
            {
                int16_t offset = hSpatParamRendCom->slots_rendered * hSpatParamRendCom->slot_size;
+0 −3
Original line number Diff line number Diff line
@@ -450,9 +450,6 @@ ivas_error TDREND_GetMix(
            v_multc_acc( &Src_p->InputFrame_p[subframe_idx * subframe_length], pan_right, output_buf[1], subframe_length );
#endif
        }
#endif
#ifdef FIX_XXX_TDOBJRENDERER_INPUT
        Src_p->InputFrame_p += subframe_length;
#endif
    }

+1 −1
Original line number Diff line number Diff line
@@ -79,7 +79,7 @@ ivas_error TDREND_REND_RenderSourceHRFilt(
    v_add( LeftOutputFrame, output_buf[0], output_buf[0], subframe_length );
    v_add( RightOutputFrame, output_buf[1], output_buf[1], subframe_length );

#if !defined FIX_550_FIRST_FRAME_ACCESS || !defined FIX_XXX_TDOBJRENDERER_INPUT
#if !defined FIX_550_FIRST_FRAME_ACCESS
    Src_p->InputFrame_p += subframe_length; /* Increment input pointer */
#endif