Commit b691d959 authored by Dominik Weckbecker's avatar Dominik Weckbecker 💬
Browse files

restore BE-ness of ISM with head tracking when object editing is not in use

parent 79f4aa97
Loading
Loading
Loading
Loading
Loading
+20 −6
Original line number Diff line number Diff line
@@ -245,18 +245,32 @@ void ivas_ism_render_sf(
                if ( subframe_idx >= ism_md_subframe_update_jbm )
                {
#ifdef OBJ_EDITING_DECODER
                    /*
                      Due to a smoothing in the MD decoder, setting the edited values to the original ones
                      does not recover the same output as without the object-editing feature.
                      Therefore, the smoothed unedited values must be used here, when no editing has been performed.
                    */
                    if ( st_ivas->hIsmRendererData->has_been_edited )
                    {
                        rotateAziEle( st_ivas->hIsmRendererData->edited_azimuth[i], st_ivas->hIsmRendererData->edited_elevation[i], &azimuth, &elevation, st_ivas->hCombinedOrientationData->Rmat[st_ivas->hCombinedOrientationData->subframe_idx], st_ivas->hIntSetup.is_planar_setup );
#else
                    rotateAziEle( st_ivas->hIsmMetaData[i]->azimuth, st_ivas->hIsmMetaData[i]->elevation, &azimuth, &elevation, st_ivas->hCombinedOrientationData->Rmat[st_ivas->hCombinedOrientationData->subframe_idx], st_ivas->hIntSetup.is_planar_setup );
                    }
                    else
#endif
                    {
                        rotateAziEle( st_ivas->hIsmMetaData[i]->azimuth, st_ivas->hIsmMetaData[i]->elevation, &azimuth, &elevation, st_ivas->hCombinedOrientationData->Rmat[st_ivas->hCombinedOrientationData->subframe_idx], st_ivas->hIntSetup.is_planar_setup );
                    }
                }
                else
                {
#ifdef OBJ_EDITING_DECODER
                    if ( st_ivas->hIsmRendererData->has_been_edited )
                    {
                        rotateAziEle( st_ivas->hIsmRendererData->last_edited_azimuth[i], st_ivas->hIsmRendererData->last_edited_elevation[i], &azimuth, &elevation, st_ivas->hCombinedOrientationData->Rmat[st_ivas->hCombinedOrientationData->subframe_idx], st_ivas->hIntSetup.is_planar_setup );
#else
                    rotateAziEle( st_ivas->hIsmMetaData[i]->last_azimuth, st_ivas->hIsmMetaData[i]->last_elevation, &azimuth, &elevation, st_ivas->hCombinedOrientationData->Rmat[st_ivas->hCombinedOrientationData->subframe_idx], st_ivas->hIntSetup.is_planar_setup );
                    }
#endif
                    {
                        rotateAziEle( st_ivas->hIsmMetaData[i]->last_azimuth, st_ivas->hIsmMetaData[i]->last_elevation, &azimuth, &elevation, st_ivas->hCombinedOrientationData->Rmat[st_ivas->hCombinedOrientationData->subframe_idx], st_ivas->hIntSetup.is_planar_setup );
                    }
                }
                if ( st_ivas->hEFAPdata != NULL )
                {
+1 −0
Original line number Diff line number Diff line
@@ -818,6 +818,7 @@ typedef struct renderer_struct
    float last_edited_azimuth[MAX_NUM_OBJECTS];
    float last_edited_elevation[MAX_NUM_OBJECTS];
    int16_t non_diegetic_flag[MAX_NUM_OBJECTS];
    int16_t has_been_edited;
#endif

} ISM_RENDERER_DATA, *ISM_RENDERER_HANDLE;
+2 −0
Original line number Diff line number Diff line
@@ -1042,6 +1042,7 @@ ivas_error IVAS_DEC_FeedFrame_Serial(
                    hIsmRendererData->edited_pitch[obj] = hIvasDec->st_ivas->hIsmMetaData[obj]->pitch;
                    hIsmRendererData->edited_radius[obj] = hIvasDec->st_ivas->hIsmMetaData[obj]->radius;
                    hIsmRendererData->edited_gains[obj] = hIvasDec->st_ivas->hIsmMetaData[obj]->gain;
                    hIsmRendererData->has_been_edited = 0;
                }
            }
        }
@@ -1160,6 +1161,7 @@ ivas_error IVAS_DEC_SetEditableParameters(
                hIvasDec->st_ivas->hIsmRendererData->edited_radius[obj] = hIvasEditableParameters.ism_metadata[obj].radius;
                hIvasDec->st_ivas->hIsmRendererData->edited_gains[obj] = hIvasEditableParameters.ism_metadata[obj].gain;
                hIvasDec->st_ivas->hIsmRendererData->non_diegetic_flag[obj] = hIvasEditableParameters.ism_metadata[obj].non_diegetic_flag;
                hIvasDec->st_ivas->hIsmRendererData->has_been_edited = 1;
            }
        }
#ifdef OBJ_EDITING_PARAMISM