Commit 10a4d7cb authored by multrus's avatar multrus
Browse files

[cleanup] FIX_550_FIRST_FRAME_ACCESS, FIX_550_FIRST_FRAME_ACCESS_ALT

parent a1649dba
Loading
Loading
Loading
Loading
+0 −9
Original line number Diff line number Diff line
@@ -1717,22 +1717,13 @@ typedef enum
typedef enum
{
    TDREND_POSTYPE_ABSOLUTE,                                                /* The source position is in absolute coordinates  */
#ifdef FIX_550_FIRST_FRAME_ACCESS_ALT
    TDREND_POSTYPE_NON_DIEGETIC                                             /* The source position is non-diegetic */
#else
    TDREND_POSTYPE_RELATIVE_TO_LISTENER                                     /* The source position is relative to the listener */
#endif
} TDREND_PosType_t;

typedef enum
{
    TDREND_PLAYSTATUS_INITIAL,
#ifndef FIX_550_FIRST_FRAME_ACCESS_ALT
    TDREND_PLAYSTATUS_PLAYING,
    TDREND_PLAYSTATUS_PLAYING_NON_DIEGETIC
#else
    TDREND_PLAYSTATUS_PLAYING
#endif
} TDREND_PlayStatus_t;

typedef enum
+0 −2
Original line number Diff line number Diff line
@@ -152,8 +152,6 @@



#define FIX_550_FIRST_FRAME_ACCESS                      /* Eri: Issue 550: TD Object renderer: first frame accesses wrong transport channel offsets */
#define FIX_550_FIRST_FRAME_ACCESS_ALT                  /* Eri: Issue 550: Should be merged with FIX_550_FIRST_FRAME_ACCESS above, or accepted at the same time */
#define FIX_569_TD_FILTER_LENGTH                        /* Eri: Issue 569: If an HRTF binary file exceeds the SFX_SPAT_BIN_MAX_FILTER_LENGTH the decoder crashes. This truncates the filter when generated from the model.  */

#define FIX_595_SHL_NOGLOB                              /* FhG: Issue 595: compilation with BASOP_NOGLOB disabled */
+0 −46
Original line number Diff line number Diff line
@@ -315,21 +315,6 @@ ivas_error ivas_td_binaural_renderer_unwrap(
            hBinRendererTd->Sources[c_indx]->SrcRend_p->InputAvailable = TRUE;
            c_indx++;
        }
#ifndef FIX_550_FIRST_FRAME_ACCESS_ALT
#ifdef FIX_550_FIRST_FRAME_ACCESS
        if ( ivas_format == ISM_FORMAT )
        {
            if ( hIsmMetaData[nS]->non_diegetic_flag )
            {
                TDREND_MIX_SRC_SetPlayState( hBinRendererTd, nS, TDREND_PLAYSTATUS_PLAYING_NON_DIEGETIC );
            }
            else
            {
                TDREND_MIX_SRC_SetPlayState( hBinRendererTd, nS, TDREND_PLAYSTATUS_PLAYING );
            }
        }
#endif
#endif
    }

    for ( subframe_idx = 0; subframe_idx < MAX_PARAM_SPATIAL_SUBFRAMES; subframe_idx++ )
@@ -356,7 +341,6 @@ ivas_error ivas_td_binaural_renderer_unwrap(
            return error;
        }

#ifdef FIX_550_FIRST_FRAME_ACCESS
        /* Advance subframe pointer */
        c_indx = 0;
        for ( nS = 0; nS < num_src; nS++ )
@@ -367,7 +351,6 @@ ivas_error ivas_td_binaural_renderer_unwrap(
                c_indx++;
            }
        }
#endif
    }

    if ( hReverb != NULL )
@@ -404,9 +387,6 @@ ivas_error TDREND_GetMix(
    float hrf_left_delta[SFX_SPAT_BIN_MAX_FILTER_LENGTH];
    float hrf_right_delta[SFX_SPAT_BIN_MAX_FILTER_LENGTH];
    int16_t intp_count;
#ifndef FIX_550_FIRST_FRAME_ACCESS_ALT
    float pan_left, pan_right;
#endif
    int16_t subframe_update_flag;

    subframe_update_flag = subframe_idx == ism_md_subframe_update;
@@ -443,20 +423,6 @@ ivas_error TDREND_GetMix(
            error = TDREND_REND_RenderSourceHRFilt( Src_p, hrf_left_delta, hrf_right_delta, intp_count, output_buf, subframe_length );
        }

#ifndef FIX_550_FIRST_FRAME_ACCESS_ALT
        if ( ( SrcRend_p->InputAvailable == TRUE ) && ( SrcRend_p->PlayStatus == TDREND_PLAYSTATUS_PLAYING_NON_DIEGETIC ) )
        {
            pan_left = ( SrcSpatial_p->Pos_p[1] + 1.f ) * 0.5f;
            pan_right = 1.f - pan_left;
#ifdef FIX_550_FIRST_FRAME_ACCESS
            v_multc_acc( Src_p->InputFrame_p, pan_left, output_buf[0], subframe_length );
            v_multc_acc( Src_p->InputFrame_p, pan_right, output_buf[1], subframe_length );
#else
            v_multc_acc( &Src_p->InputFrame_p[subframe_idx * subframe_length], pan_left, output_buf[0], subframe_length );
            v_multc_acc( &Src_p->InputFrame_p[subframe_idx * subframe_length], pan_right, output_buf[1], subframe_length );
#endif
        }
#endif
    }

    /* Populate output variable */
@@ -541,23 +507,11 @@ void TDREND_Update_object_positions(
                Pos[1] = hIsmMetaData[nS]->azimuth / 90.f;
                Pos[2] = 0;
                TDREND_MIX_SRC_SetPos( hBinRendererTd, nS, Pos );
#ifdef FIX_550_FIRST_FRAME_ACCESS_ALT
                hBinRendererTd->Sources[nS]->SrcSpatial_p->PosType = TDREND_POSTYPE_NON_DIEGETIC;
#else
#ifndef FIX_550_FIRST_FRAME_ACCESS
                TDREND_MIX_SRC_SetPlayState( hBinRendererTd, nS, TDREND_PLAYSTATUS_PLAYING_NON_DIEGETIC );
#endif
#endif
            }
            else
            {
#ifdef FIX_550_FIRST_FRAME_ACCESS_ALT
                hBinRendererTd->Sources[nS]->SrcSpatial_p->PosType = TDREND_POSTYPE_ABSOLUTE;
#else
#ifndef FIX_550_FIRST_FRAME_ACCESS
                TDREND_MIX_SRC_SetPlayState( hBinRendererTd, nS, TDREND_PLAYSTATUS_PLAYING );
#endif
#endif
            }

            TDREND_MIX_SRC_SetDir( hBinRendererTd, nS, Dir );
+0 −3
Original line number Diff line number Diff line
@@ -79,9 +79,6 @@ 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 );

#ifndef FIX_550_FIRST_FRAME_ACCESS
    Src_p->InputFrame_p += subframe_length; /* Increment input pointer */
#endif


    return IVAS_ERR_OK;
+0 −4
Original line number Diff line number Diff line
@@ -312,11 +312,7 @@ ivas_error TDREND_MIX_AddSrc(
    }
    else
    {
#ifdef FIX_550_FIRST_FRAME_ACCESS_ALT
        if ( ( PosType < TDREND_POSTYPE_ABSOLUTE ) || ( PosType > TDREND_POSTYPE_NON_DIEGETIC ) )
#else
        if ( ( PosType < TDREND_POSTYPE_ABSOLUTE ) || ( PosType > TDREND_POSTYPE_RELATIVE_TO_LISTENER ) )
#endif
        {
            return ( IVAS_ERROR( IVAS_ERR_INTERNAL, "Invalid position type!\n" ) );
        }
Loading