Commit f32c3593 authored by emerit's avatar emerit
Browse files

on going fix non diegetic pan value in sid frame

parent dd76ec56
Loading
Loading
Loading
Loading
+4 −5
Original line number Diff line number Diff line
@@ -332,7 +332,7 @@ typedef enum
#define ISM_RADIUS_DELTA                        0.25f /* Max radius = (2^ISM_RADIUS_NBITS-1)*0.25 = 15.75 */
#define ISM_EXTENDED_METADATA_BRATE             IVAS_64k
#ifdef ISM_NON_DIEGETIC_PAN
#define ISM_METADATA_IS_NDP_FLAG_BITS       1
#define ISM_METADATA_IS_NDP_BITS       1
#endif
#define ISM_EXTENDED_METADATA_BITS              1
#define ISM_METADATA_RS_MAX_FRAMES              5 /* Number of frames with opposite extended metadata flags before switching */
@@ -383,7 +383,6 @@ enum
    IND_ISM_NOISY_SPEECH_FLAG = IND_ISM_VAD_FLAG + MAX_NUM_OBJECTS,
    IND_ISM_SCE_ID_DTX,
    IND_ISM_DTX_COH_SCA,   

    /* ------------- loop for objects -------------- */
    TAG_ISM_LOOP_START = IND_ISM_DTX_COH_SCA + MAX_NUM_OBJECTS,
#ifdef ISM_NON_DIEGETIC_PAN    
+11 −5
Original line number Diff line number Diff line
@@ -92,6 +92,9 @@ ivas_error ivas_ism_config(
    const int16_t nchan_transport,  /* i  : number of transport channels   */
    const int16_t nchan_ism,        /* i  : number of objects              */
    ISM_METADATA_HANDLE hIsmMeta[], /* i/o: ISM metadata handles           */
#ifdef ISM_NON_DIEGETIC_PAN
    const int16_t ism_extended_metadata_flag,
#endif
    const int16_t localVAD[MAX_NUM_OBJECTS], /* i  : local VAD flag                 */
    const int16_t ism_imp[],                 /* i  : ISM importance flags           */
    int32_t element_brate[],                 /* o  : element bitrate per object     */
@@ -136,7 +139,10 @@ ivas_error ivas_ism_config(
        {
            nb_bits_metadata[0] += ISM_EXTENDED_METADATA_BITS;
#ifdef ISM_NON_DIEGETIC_PAN
            nb_bits_metadata[0] += ISM_METADATA_IS_NDP_FLAG_BITS;
            if ( ism_extended_metadata_flag )
            {
                nb_bits_metadata[0] += ISM_METADATA_IS_NDP_BITS;
            }
#endif
        }
        nb_bits_metadata[0] += n_ISms * ISM_METADATA_FLAG_BITS + nchan_ism;
+4 −1
Original line number Diff line number Diff line
@@ -746,6 +746,9 @@ ivas_error ivas_ism_config(
    const int16_t nchan_transport,                              /* i  : number of transport channels                */
    const int16_t nchan_ism,                                    /* i  : number of objects                           */
    ISM_METADATA_HANDLE hIsmMeta[],                             /* i/o: ISM metadata handles                        */
#ifdef ISM_NON_DIEGETIC_PAN
    const int16_t ism_extended_metadata_flag,
#endif
    const int16_t localVAD[MAX_NUM_OBJECTS],                    /* i  : local VAD flag                              */
    const int16_t ism_imp[],                                    /* i  : ISM importance flags                        */
    int32_t element_brate[],                                    /* o  : element bitrate per object                  */
@@ -949,7 +952,7 @@ void ivas_ism_metadata_sid_enc(
    const int16_t md_diff_flag[],                               /* i  : metadata differental flag                   */
    BSTR_ENC_HANDLE hBstr,                                      /* i/o: bitstream handle                            */
    int16_t nb_bits_metadata[]                                  /* o  : number of metadata bits                     */
#ifdef ISM_NON_DIEGETIC_PAN    
#ifdef ISM_NON_DIEGETIC_PAN_SID    
    ,const int32_t ism_total_brate,           /* i  : ISM total bitrate               */
    const int16_t ism_extended_metadata_flag                    /* i  : Extended metadata flag                      */
#endif
+1 −0
Original line number Diff line number Diff line
@@ -144,6 +144,7 @@
#define NON_DIEGETIC_PAN
#define FIX_CRASH_EVS_BITSTREAM_WITH_OUTPUT
#define ISM_NON_DIEGETIC_PAN
#define ISM_NON_DIEGETIC_PAN_SID

#define FIX_CLANG_WARNING

+7 −1
Original line number Diff line number Diff line
@@ -68,7 +68,13 @@ static ivas_error ivas_ism_bitrate_switching(
    ivas_init_dec_get_num_cldfb_instances( st_ivas, &numCldfbAnalyses_old, &numCldfbSyntheses_old );
#endif

    if ( ( error = ivas_ism_config( st_ivas->hDecoderConfig->ivas_total_brate, st_ivas->nchan_transport, st_ivas->nchan_ism, NULL, NULL, NULL, element_brate_tmp, NULL, NULL ) ) != IVAS_ERR_OK )
    if ( ( error = ivas_ism_config( st_ivas->hDecoderConfig->ivas_total_brate, st_ivas->nchan_transport, st_ivas->nchan_ism, NULL,
#ifdef ISM_NON_DIEGETIC_PAN
                                    0,
#endif
                                    NULL,

                                    NULL, element_brate_tmp, NULL, NULL ) ) != IVAS_ERR_OK )
    {
        return error;
    }
Loading