Commit 4cd3e0c3 authored by Nicolas Roussin's avatar Nicolas Roussin
Browse files

Merge branch 'main' into 2142-implement-basop-w_min-and-w_max-functions

parents f34e91dd c577e846
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -130,6 +130,9 @@ typedef enum
    IVAS_ERR_BITSTREAM_READER_INVALID_FORMAT,
    IVAS_ERR_NO_FILE_OPEN,
    IVAS_ERR_SAMPLING_RATE_UNKNOWN,
#ifdef FIX_1370_EXTERNAL_ORIENTATION_CHECK
    IVAS_ERR_EXTERNAL_ORIENTATION_INVALID_FORMAT,
#endif

    /*----------------------------------------*
     *    renderer (lib_rend only)            *
@@ -269,6 +272,10 @@ static inline const char *ivas_error_to_string( ivas_error error_code )
            return "Invalid input format";
        case IVAS_ERR_INVALID_INDEX:
            return "Invalid index";
#ifdef FIX_1370_EXTERNAL_ORIENTATION_CHECK
        case IVAS_ERR_EXTERNAL_ORIENTATION_INVALID_FORMAT:
            return "Euler angles were detected in the input but only Quaternions are supported";
#endif
        default:
            break;
    }
+9 −0
Original line number Diff line number Diff line
@@ -178,6 +178,15 @@ void ivas_omasa_render_objects_from_mix_fx(
    Word16 *output_q                                            /* i/o: output Q value                          */
);

#ifdef NONBE_FIX_1305_OMASA_OBJ_EDIT_EXT
void ivas_omasa_gain_masa_tc_fx(
    Word32 *output_fx[],                                       /* i/o: output synthesis signal                  */
    const Word16 gainMasa_fx,                                  /* i  : gain for MASA transport channels         */
    const Word16 nchan_transport_ism,                          /* i  : number of ISM TCs                        */
    const Word16 output_frame                                  /* i  : output frame length per channel          */
);
#endif

ivas_error ivas_omasa_ism_metadata_dec_fx(
    Decoder_Struct *st_ivas,                                    /* i/o: IVAS decoder structure                  */
    const Word32 ism_total_brate,                               /* i  : ISM total bitrate                       */
+7 −0
Original line number Diff line number Diff line
@@ -79,6 +79,8 @@
#define FIX_2092_ASSERT_IN_OMASA_RENDER                      /* FhG, Nokia: Fix LTV crash due to overflow in OMASA EXT output */
#define FIX_2084_FLOATING_POINT_LEFTOVERS                    /* FhG: convert floating-point leftovers in IVAS_ENC_FeedObjectMetadata() */
#define FIX_2141_ASSERT_IN_OMASA_BITRATE_SWITSCHING          /* FhG: Replace L_shl with L_shl_sat to prevent overflow when calculating scale factors for very small numbers in the logarithmic domain */
#define FIX_APA_EXECS_SCALING                                /* VA: fix scaling of JBM APA buffer */

/* ################### End FIXES switches ########################### */

/* #################### Start BASOP porting switches ############################ */
@@ -113,6 +115,9 @@
#define UNIFIED_DECODING_PATHS_LEFTOVERS                /* VA: issue 880: remove leftovers after NONBE_UNIFIED_DECODING_PATHS */
#define FIX_NCHAN_BUFFERS                               /* VA: issue 1322: Correct the number of float buffers (channels) at the decoder */
#define FIX_RENDERER_STACK                              /* VA: issue 1322: reduction of renderers' buffers size */
#define FIX_1370_EXTERNAL_ORIENTATION_CHECK             /* Nokia: add sanity check for Euler angles for external orientations */
#define NONBE_FIX_1197_OMASA_META_BUFFER                /* Nokia: OMASA ISM_MASA_MODE_PARAM_ONE_OBJ history zero in rateswitching - port 251 */
#define FIX_1413_IGF_INIT_PRINTOUT                      /* FhG: use correct variable for IGF initiliazation */

// object-editing feature porting
#define TMP_FIX_SPLIT_REND                              // temporary fix to split-rendering (it follows the later state of the framework but it is needed now because of current test-conditions)
@@ -125,6 +130,8 @@
#define NONBE_FIX_1255_OBJ_EDIT_JBM                     /* VA: issue 1255: restore object editing in JBM */
#define FIX_1372_OSBA_OBJECT_EDITING                    /* VA: issue 1372: Fix OSBA object-editing in BINAURAL_ROOM_IR */
#define FIX_2140_OBJECT_EDITING_SANITIZER_ISSUES        /* Nokia: Issue 2140, fixes three different sanitizer issues persisting in object editing code. */
#define NONBE_FIX_1305_OMASA_OBJ_EDIT_EXT               /* Nokia: issue 1305: Fix OMASA ext output in case of object editing */
#define NONBE_FIX_1172_OBJ_EDIT_JBM                     /* VA: issue 1172: fix OMASA object editing in JBM */

/* #################### End BASOP porting switches ############################ */

+22 −0
Original line number Diff line number Diff line
@@ -4424,6 +4424,16 @@ void ivas_dec_prepare_renderer_fx(
        {
            ivas_jbm_masa_sf_to_slot_map( st_ivas, n_render_timeslots );
        }
#ifdef NONBE_FIX_1305_OMASA_OBJ_EDIT_EXT
        /* MASA transport gaining for edited disc OMASA EXT. For ISMs, only metadata is modified */
        test();
        test();
        test();
        IF( EQ_32( st_ivas->ivas_format, MASA_ISM_FORMAT ) && EQ_32( st_ivas->ism_mode, ISM_MASA_MODE_DISC ) && EQ_32( st_ivas->hDecoderConfig->output_config, IVAS_AUDIO_CONFIG_EXTERNAL ) && EQ_16( st_ivas->hMasaIsmData->masa_gain_is_edited, 1 ) )
        {
            ivas_omasa_gain_masa_tc_fx( st_ivas->hTcBuffer->tc_fx, st_ivas->hMasaIsmData->gain_masa_edited_fx, st_ivas->nchan_ism, st_ivas->hTcBuffer->n_samples_available );
        }
#endif
    }
    ELSE IF( EQ_16( st_ivas->ivas_format, STEREO_FORMAT ) )
    {
@@ -4547,6 +4557,18 @@ void ivas_dec_prepare_renderer_fx(
            {
                ivas_jbm_masa_sf_to_slot_map( st_ivas, n_render_timeslots );
            }
#ifdef NONBE_FIX_1305_OMASA_OBJ_EDIT_EXT
            /* MASA transport gaining for edited param_one OMASA EXT. For ISMs, only metadata is modified.  */
            test();
            IF( EQ_32( st_ivas->ism_mode, ISM_MASA_MODE_PARAM_ONE_OBJ ) && EQ_16( st_ivas->hMasaIsmData->masa_gain_is_edited, 1 ) )
            {
                FOR( n = 0; n < CPE_CHANNELS; n++ )
                {
                    v_multc_fx_16( st_ivas->hTcBuffer->tc_fx[n], st_ivas->hMasaIsmData->gain_masa_edited_fx, st_ivas->hTcBuffer->tc_fx[n], st_ivas->hTcBuffer->n_samples_available ); // Q8
                    Scale_sig32( st_ivas->hTcBuffer->tc_fx[n], st_ivas->hTcBuffer->n_samples_available, Q3 );                                                                         // Q8 -> Q11
                }
            }
#endif
        }
        ELSE
        {
+19 −0
Original line number Diff line number Diff line
@@ -214,7 +214,12 @@ ivas_error ivas_td_binaural_renderer_sf_fx(
        IF( EQ_16( subframe_idx, ism_md_subframe_update_jbm ) )
        {
            test();
#ifdef NONBE_FIX_1305_OMASA_OBJ_EDIT_EXT
            test();
            IF( EQ_32( st_ivas->ivas_format, ISM_FORMAT ) || EQ_32( st_ivas->ivas_format, SBA_ISM_FORMAT ) || EQ_32( st_ivas->ivas_format, MASA_ISM_FORMAT ) )
#else
            IF( EQ_16( st_ivas->ivas_format, ISM_FORMAT ) || EQ_16( st_ivas->ivas_format, SBA_ISM_FORMAT ) )
#endif
            {
                ISM_METADATA_FRAME ismMetaData[MAX_NUM_OBJECTS];
                ISM_METADATA_HANDLE hIsmMetaData[MAX_NUM_OBJECTS];
@@ -232,8 +237,22 @@ ivas_error ivas_td_binaural_renderer_sf_fx(
                    move32();
                    ismMetaData[nS].non_diegetic_flag = st_ivas->hIsmMetaData[nS]->non_diegetic_flag;
                    move16();
#ifdef NONBE_FIX_1305_OMASA_OBJ_EDIT_EXT
                    IF( EQ_32( st_ivas->ivas_format, MASA_ISM_FORMAT ) )
                    {
                        /* DISC OMASA ISM gaining with TDREND is done in ivas_dec_prepare_renderer()*/
                        ismMetaData[nS].gain_fx = ONE_IN_Q29;
                        move32();
                    }
                    ELSE
                    {
                        ismMetaData[nS].gain_fx = st_ivas->hIsmMetaData[nS]->edited_gain_fx;
                        move32();
                    }
#else
                    ismMetaData[nS].gain_fx = st_ivas->hIsmMetaData[nS]->edited_gain_fx;
                    move32();
#endif
                    hIsmMetaData[nS] = &ismMetaData[nS];
                }

Loading