From 292eb5ced0df1206a600eb1a6bc472e5368d03b9 Mon Sep 17 00:00:00 2001 From: vaclav Date: Tue, 21 Oct 2025 09:30:41 +0200 Subject: [PATCH 1/2] port NONBE_FIX_1255_OBJ_EDIT_JBM --- apps/decoder.c | 27 +++++++++++++++++++++++---- lib_com/options.h | 2 ++ lib_dec/lib_dec.c | 3 ++- 3 files changed, 27 insertions(+), 5 deletions(-) diff --git a/apps/decoder.c b/apps/decoder.c index 82b40f9ec..306a813e2 100644 --- a/apps/decoder.c +++ b/apps/decoder.c @@ -3215,7 +3215,7 @@ static ivas_error decodeVoIP( int16_t nOutSamples = 0; bool bitstreamReadDone = false; #ifdef OBJ_EDITING_API - bool parameterAvailableForEditing = false; + bool parametersAvailableForEditing = false; #endif uint16_t nSamplesRendered; @@ -3449,7 +3449,11 @@ static ivas_error decodeVoIP( } #ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE +#ifdef NONBE_FIX_1255_OBJ_EDIT_JBM + if ( arg.objEditEnabled && arg.objEditFileName != NULL && vec_pos_update == 0 ) +#else if ( arg.objEditEnabled && ( arg.objEditFileName != NULL ) ) +#endif { if ( ( error = ObjectEditFileReader_readNextFrame( objectEditFileReader ) ) != IVAS_ERR_OK ) { @@ -3514,13 +3518,13 @@ static ivas_error decodeVoIP( { #ifdef SUPPORT_JBM_TRACEFILE #ifdef OBJ_EDITING_API - if ( ( error = IVAS_DEC_VoIP_GetSamples( hIvasDec, nOutSamples, IVAS_DEC_PCM_INT16, (void *) pcmBuf, writeJbmTraceFileFrameWrapper, jbmTraceWriter, &bitstreamReadDone, &nSamplesRendered, ¶meterAvailableForEditing, systemTime_ms ) ) != IVAS_ERR_OK ) + if ( ( error = IVAS_DEC_VoIP_GetSamples( hIvasDec, nOutSamples, IVAS_DEC_PCM_INT16, (void *) pcmBuf, writeJbmTraceFileFrameWrapper, jbmTraceWriter, &bitstreamReadDone, &nSamplesRendered, ¶metersAvailableForEditing, systemTime_ms ) ) != IVAS_ERR_OK ) #else if ( ( error = IVAS_DEC_VoIP_GetSamples( hIvasDec, nOutSamples, IVAS_DEC_PCM_INT16, (void *) pcmBuf, writeJbmTraceFileFrameWrapper, jbmTraceWriter, &bitstreamReadDone, &nSamplesRendered, systemTime_ms ) ) != IVAS_ERR_OK ) #endif #else #ifdef OBJ_EDITING_API - if ( ( error = IVAS_DEC_VoIP_GetSamples( hIvasDec, nOutSamples, IVAS_DEC_PCM_INT16, (void *) pcmBuf, &bitstreamReadDone, ¶meterAvailableForEditing, systemTime_ms ) ) != IVAS_ERR_OK ) + if ( ( error = IVAS_DEC_VoIP_GetSamples( hIvasDec, nOutSamples, IVAS_DEC_PCM_INT16, (void *) pcmBuf, &bitstreamReadDone, ¶metersAvailableForEditing, systemTime_ms ) ) != IVAS_ERR_OK ) #else if ( ( error = IVAS_DEC_VoIP_GetSamples( hIvasDec, nOutSamples, IVAS_DEC_PCM_INT16, (void *) pcmBuf, &bitstreamReadDone, systemTime_ms ) ) != IVAS_ERR_OK ) #endif @@ -3556,7 +3560,7 @@ static ivas_error decodeVoIP( #ifdef OBJ_EDITING_API /* Object metadata editing */ - if ( arg.objEditEnabled && parameterAvailableForEditing == true ) + if ( arg.objEditEnabled && parametersAvailableForEditing == true ) { IVAS_EDITABLE_PARAMETERS editableParameters; @@ -3709,17 +3713,32 @@ static ivas_error decodeVoIP( } } +#ifdef NONBE_FIX_1255_OBJ_EDIT_JBM + 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; } +#ifdef NONBE_FIX_1255_OBJ_EDIT_JBM + if ( vec_pos_update == 0 ) + { + frame++; + if ( !arg.quietModeEnabled ) + { + fprintf( stdout, "%-8d\b\b\b\b\b\b\b\b", frame ); + } + } +#endif + #ifdef WMOPS update_mem(); update_wmops(); diff --git a/lib_com/options.h b/lib_com/options.h index 3a04226ba..eecc2fe25 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -222,6 +222,8 @@ #endif #define FIX_1217_OBJECT_EDIT_FILE_INTERFACE /* Nokia: issue #1217: add decoder functionality to read object edit instructions from a file */ #define NONBE_1217_OBJ_EDIT_FOA /* VA/Nokia: isse 1217: fix crash in object editing to FOA output in ParamISM */ +#define NONBE_FIX_1255_OBJ_EDIT_JBM /* VA: issue 1255: restore object editing in JBM */ + /* #################### End BASOP porting switches ############################ */ diff --git a/lib_dec/lib_dec.c b/lib_dec/lib_dec.c index 67592f157..2757d8327 100644 --- a/lib_dec/lib_dec.c +++ b/lib_dec/lib_dec.c @@ -4229,13 +4229,14 @@ ivas_error IVAS_DEC_VoIP_GetSamples( hIvasDec->nSamplesRendered = 0; #endif } - +#ifndef NONBE_FIX_1255_OBJ_EDIT_JBM #ifdef OBJ_EDITING_API if ( hIvasDec->hasBeenFedFirstGoodFrame ) { *parametersAvailableForEditing = true; return IVAS_ERR_OK; } +#endif #endif } -- GitLab From aa7731e9fd4f19aef282645b6c43136777eb3b2f Mon Sep 17 00:00:00 2001 From: vaclav Date: Tue, 21 Oct 2025 09:44:54 +0200 Subject: [PATCH 2/2] port NONBE_FIX_1255_OBJ_EDIT_JBM --- lib_dec/lib_dec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib_dec/lib_dec.c b/lib_dec/lib_dec.c index 2757d8327..9c17b5fa4 100644 --- a/lib_dec/lib_dec.c +++ b/lib_dec/lib_dec.c @@ -4275,7 +4275,7 @@ ivas_error IVAS_DEC_VoIP_GetSamples( hIvasDec->nSamplesFlushed = nSamplesFlushed_ref; #endif *bitstreamReadDone = false; -#ifdef LIB_DEC_REVISION +#ifdef NONBE_FIX_1255_OBJ_EDIT_JBM *parametersAvailableForEditing = true; return IVAS_ERR_OK; #endif -- GitLab