Loading apps/decoder.c +31 −31 Original line number Diff line number Diff line Loading @@ -202,11 +202,7 @@ static int16_t app_own_random( int16_t *seed ); static IVAS_DEC_FORCED_REND_MODE parseForcedRendModeDec( char *forcedRendModeChar ); #endif #ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE #ifdef NONBE_FIX_1255_OBJ_EDIT_JBM static void do_object_editing( IVAS_EDITABLE_PARAMETERS *editableParameters, const int16_t num_subframes, ObjectEditFileReader *objectEditFileReader ); #else static void do_object_editing( IVAS_EDITABLE_PARAMETERS *editableParameters, ObjectEditFileReader *objectEditFileReader ); #endif #else static void do_object_editing( IVAS_EDITABLE_PARAMETERS *editableParameters ); #endif Loading Loading @@ -2475,11 +2471,7 @@ static ivas_error decodeG192( /* Do object metadata editing here ... */ #ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE #ifdef NONBE_FIX_1255_OBJ_EDIT_JBM do_object_editing( &editableParameters, IVAS_MAX_PARAM_SPATIAL_SUBFRAMES, objectEditFileReader ); #else do_object_editing( &editableParameters, objectEditFileReader ); #endif #else do_object_editing( &editableParameters ); #endif Loading Loading @@ -3055,6 +3047,9 @@ static ivas_error decodeVoIP( int16_t nOutSamples = 0; bool bitstreamReadDone = false; #ifdef NONBE_FIX_1255_OBJ_EDIT_JBM bool frameDecodedDone = false; #endif bool parametersAvailableForEditing = false; uint16_t nSamplesRendered = 0; Loading Loading @@ -3176,6 +3171,9 @@ static ivas_error decodeVoIP( while ( 1 ) { nSamplesRendered = 0; #ifdef NONBE_FIX_1255_OBJ_EDIT_JBM frameDecodedDone = false; #endif /* reference vector */ if ( arg.enableReferenceVectorTracking && vec_pos_update == 0 ) Loading Loading @@ -3290,18 +3288,11 @@ static ivas_error decodeVoIP( #ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE if ( arg.objEditEnabled && ( arg.objEditFileName != NULL ) ) { #ifdef NONBE_FIX_1255_OBJ_EDIT_JBM if ( frame * num_subframes % IVAS_MAX_PARAM_SPATIAL_SUBFRAMES == 0 ) { #endif if ( ( error = ObjectEditFileReader_readNextFrame( objectEditFileReader ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError: could not read object editing instructions from file: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); return error; } #ifdef NONBE_FIX_1255_OBJ_EDIT_JBM } #endif } #endif Loading Loading @@ -3406,11 +3397,7 @@ static ivas_error decodeVoIP( /* Do object metadata editing here ... */ #ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE #ifdef NONBE_FIX_1255_OBJ_EDIT_JBM do_object_editing( &editableParameters, num_subframes, objectEditFileReader ); #else do_object_editing( &editableParameters, objectEditFileReader ); #endif #else do_object_editing( &editableParameters ); #endif Loading @@ -3422,6 +3409,13 @@ static ivas_error decodeVoIP( return error; } } #ifdef NONBE_FIX_1255_OBJ_EDIT_JBM if ( parametersAvailableForEditing ) { frameDecodedDone = true; } #endif } /* while ( nSamplesRendered < nOutSamples ) */ /* write JBM Offset file entry */ Loading Loading @@ -3541,12 +3535,26 @@ static ivas_error decodeVoIP( } } #ifdef NONBE_FIX_1255_OBJ_EDIT_JBM if ( frameDecodedDone == true ) { if ( !arg.quietModeEnabled ) { fprintf( stdout, "%-8d\b\b\b\b\b\b\b\b", frame ); } frame++; } vec_pos_update = ( vec_pos_update + 1 ) % vec_pos_len; #else if ( !arg.quietModeEnabled ) { fprintf( stdout, "%-8d\b\b\b\b\b\b\b\b", frame ); } vec_pos_update = ( vec_pos_update + 1 ) % vec_pos_len; frame++; #endif if ( vec_pos_update == 0 ) { systemTime_ms += vec_pos_len * systemTimeInc_ms; Loading Loading @@ -3715,9 +3723,6 @@ cleanup: static void do_object_editing( #ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE IVAS_EDITABLE_PARAMETERS *editableParameters, #ifdef NONBE_FIX_1255_OBJ_EDIT_JBM const int16_t num_subframes, #endif ObjectEditFileReader *objectEditFileReader ) #else IVAS_EDITABLE_PARAMETERS *editableParameters ) Loading Loading @@ -3816,12 +3821,7 @@ static void do_object_editing( /* breakover object gains */ for ( obj_idx = 0; obj_idx < editableParameters->num_obj; obj_idx++ ) { #ifdef NONBE_FIX_1255_OBJ_EDIT_JBM editableParameters->ism_metadata[obj_idx].gain = 0.5f + (float) ( ( ( frame * num_subframes / IVAS_MAX_PARAM_SPATIAL_SUBFRAMES ) + obj_idx * 50 ) % 250 ) / 250.0f; #else editableParameters->ism_metadata[obj_idx].gain = 0.5f + (float) ( ( frame + obj_idx * 50 ) % 250 ) / 250.0f; #endif } editableParameters->gain_bed = 0.5f; Loading Loading
apps/decoder.c +31 −31 Original line number Diff line number Diff line Loading @@ -202,11 +202,7 @@ static int16_t app_own_random( int16_t *seed ); static IVAS_DEC_FORCED_REND_MODE parseForcedRendModeDec( char *forcedRendModeChar ); #endif #ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE #ifdef NONBE_FIX_1255_OBJ_EDIT_JBM static void do_object_editing( IVAS_EDITABLE_PARAMETERS *editableParameters, const int16_t num_subframes, ObjectEditFileReader *objectEditFileReader ); #else static void do_object_editing( IVAS_EDITABLE_PARAMETERS *editableParameters, ObjectEditFileReader *objectEditFileReader ); #endif #else static void do_object_editing( IVAS_EDITABLE_PARAMETERS *editableParameters ); #endif Loading Loading @@ -2475,11 +2471,7 @@ static ivas_error decodeG192( /* Do object metadata editing here ... */ #ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE #ifdef NONBE_FIX_1255_OBJ_EDIT_JBM do_object_editing( &editableParameters, IVAS_MAX_PARAM_SPATIAL_SUBFRAMES, objectEditFileReader ); #else do_object_editing( &editableParameters, objectEditFileReader ); #endif #else do_object_editing( &editableParameters ); #endif Loading Loading @@ -3055,6 +3047,9 @@ static ivas_error decodeVoIP( int16_t nOutSamples = 0; bool bitstreamReadDone = false; #ifdef NONBE_FIX_1255_OBJ_EDIT_JBM bool frameDecodedDone = false; #endif bool parametersAvailableForEditing = false; uint16_t nSamplesRendered = 0; Loading Loading @@ -3176,6 +3171,9 @@ static ivas_error decodeVoIP( while ( 1 ) { nSamplesRendered = 0; #ifdef NONBE_FIX_1255_OBJ_EDIT_JBM frameDecodedDone = false; #endif /* reference vector */ if ( arg.enableReferenceVectorTracking && vec_pos_update == 0 ) Loading Loading @@ -3290,18 +3288,11 @@ static ivas_error decodeVoIP( #ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE if ( arg.objEditEnabled && ( arg.objEditFileName != NULL ) ) { #ifdef NONBE_FIX_1255_OBJ_EDIT_JBM if ( frame * num_subframes % IVAS_MAX_PARAM_SPATIAL_SUBFRAMES == 0 ) { #endif if ( ( error = ObjectEditFileReader_readNextFrame( objectEditFileReader ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError: could not read object editing instructions from file: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); return error; } #ifdef NONBE_FIX_1255_OBJ_EDIT_JBM } #endif } #endif Loading Loading @@ -3406,11 +3397,7 @@ static ivas_error decodeVoIP( /* Do object metadata editing here ... */ #ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE #ifdef NONBE_FIX_1255_OBJ_EDIT_JBM do_object_editing( &editableParameters, num_subframes, objectEditFileReader ); #else do_object_editing( &editableParameters, objectEditFileReader ); #endif #else do_object_editing( &editableParameters ); #endif Loading @@ -3422,6 +3409,13 @@ static ivas_error decodeVoIP( return error; } } #ifdef NONBE_FIX_1255_OBJ_EDIT_JBM if ( parametersAvailableForEditing ) { frameDecodedDone = true; } #endif } /* while ( nSamplesRendered < nOutSamples ) */ /* write JBM Offset file entry */ Loading Loading @@ -3541,12 +3535,26 @@ static ivas_error decodeVoIP( } } #ifdef NONBE_FIX_1255_OBJ_EDIT_JBM if ( frameDecodedDone == true ) { if ( !arg.quietModeEnabled ) { fprintf( stdout, "%-8d\b\b\b\b\b\b\b\b", frame ); } frame++; } vec_pos_update = ( vec_pos_update + 1 ) % vec_pos_len; #else if ( !arg.quietModeEnabled ) { fprintf( stdout, "%-8d\b\b\b\b\b\b\b\b", frame ); } vec_pos_update = ( vec_pos_update + 1 ) % vec_pos_len; frame++; #endif if ( vec_pos_update == 0 ) { systemTime_ms += vec_pos_len * systemTimeInc_ms; Loading Loading @@ -3715,9 +3723,6 @@ cleanup: static void do_object_editing( #ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE IVAS_EDITABLE_PARAMETERS *editableParameters, #ifdef NONBE_FIX_1255_OBJ_EDIT_JBM const int16_t num_subframes, #endif ObjectEditFileReader *objectEditFileReader ) #else IVAS_EDITABLE_PARAMETERS *editableParameters ) Loading Loading @@ -3816,12 +3821,7 @@ static void do_object_editing( /* breakover object gains */ for ( obj_idx = 0; obj_idx < editableParameters->num_obj; obj_idx++ ) { #ifdef NONBE_FIX_1255_OBJ_EDIT_JBM editableParameters->ism_metadata[obj_idx].gain = 0.5f + (float) ( ( ( frame * num_subframes / IVAS_MAX_PARAM_SPATIAL_SUBFRAMES ) + obj_idx * 50 ) % 250 ) / 250.0f; #else editableParameters->ism_metadata[obj_idx].gain = 0.5f + (float) ( ( frame + obj_idx * 50 ) % 250 ) / 250.0f; #endif } editableParameters->gain_bed = 0.5f; Loading