Loading lib_com/ivas_omasa_com.c +33 −6 Original line number Diff line number Diff line Loading @@ -53,6 +53,10 @@ #define GAMMA_ISM_LOW_IMP2 0.9f #define GAMMA_ISM_MEDIUM_IMP2 1.2f #define GAMMA_ISM_HIGH_IMP2 1.35f #define GAMMA_ISM_LOW_IMP3 0.85f #define GAMMA_ISM_MEDIUM_IMP3 1.15f #define GAMMA_ISM_HIGH_IMP3 1.3f #endif /*--------------------------------------------------------------- Loading @@ -65,12 +69,12 @@ /*! r : ISM format mode */ ISM_MODE ivas_omasa_ism_mode_select( const int32_t ivas_total_brate, /* i : IVAS total bitrate */ const int16_t no_obj /* i : number of objects */ const int16_t nchan_ism /* i : number of input ISM's */ ) { ISM_MODE ism_mode = ISM_MODE_NONE; switch ( no_obj ) switch ( nchan_ism ) { case 1: if ( ivas_total_brate >= IVAS_24k4 ) Loading Loading @@ -101,7 +105,11 @@ ISM_MODE ivas_omasa_ism_mode_select( } break; case 3: #ifdef TUNING_96kbps_3obj if ( ivas_total_brate >= IVAS_96k ) #else if ( ivas_total_brate >= IVAS_128k ) #endif { ism_mode = ISM_MASA_MODE_DISC; } Loading Loading @@ -152,6 +160,7 @@ ISM_MODE ivas_omasa_ism_mode_select( /*! r: adjusted bitrate */ int32_t ivas_interformat_brate( const ISM_MODE ism_mode, /* i : ISM mode */ const int16_t nchan_ism, /* i : number of ISM channels */ const int32_t element_brate, /* i : element bitrate */ const int16_t ism_imp /* i : ISM importance flag */ ) Loading @@ -168,8 +177,26 @@ int32_t ivas_interformat_brate( } else { #ifdef TUNING_96kbps_3obj if ( ism_mode == ISM_MASA_MODE_DISC && nchan_ism == 3 && element_brate == 16000 ) /* this condition corresponds to the ivas_total_brate = 96000 and 3 objects */ { if ( ism_imp == ISM_LOW_IMP ) { nBits = (int16_t) ( nBits * GAMMA_ISM_LOW_IMP3 ); } else if ( ism_imp == ISM_MEDIUM_IMP ) { nBits = (int16_t) ( nBits * GAMMA_ISM_MEDIUM_IMP3 ); } else /* ISM_HIGH_IMP */ { nBits = (int16_t) ( nBits * GAMMA_ISM_HIGH_IMP3 ); } } else #endif if ( ism_mode == ISM_MASA_MODE_ONE_OBJ || ( ism_mode == ISM_MASA_MODE_DISC && element_brate == 9600 ) /* this condition corresponds to the ivas_total_brate = 9600 and 1 object */ ( ism_mode == ISM_MASA_MODE_DISC && element_brate == 9600 ) /* this condition corresponds to the ivas_total_brate = 24400 and 1 object */ ) { if ( ism_imp == ISM_LOW_IMP ) Loading lib_com/ivas_prot.h +3 −2 Original line number Diff line number Diff line Loading @@ -4525,7 +4525,7 @@ void ivas_masa_encode( #ifdef MASA_AND_OBJECTS , const ISM_MODE ism_mode, /* i : ISM format mode */ const int16_t nchan_ism, /* i : number of ism channels */ const int16_t nchan_ism, /* i : number of ISM channels */ ISM_METADATA_HANDLE hIsmMetaData[MAX_NUM_OBJECTS], /* i : ISM metadata handle */ const int16_t idx_separated_object, /* i : index of the separated object */ OMASA_ENC_HANDLE hOMasa /* i : OMASA encoder handle */ Loading Loading @@ -5223,6 +5223,7 @@ void set_ism_importance_interformat( /*! r: adjusted bitrate */ int32_t ivas_interformat_brate( const ISM_MODE ism_mode, /* i : ISM mode */ const int16_t nchan_ism, /* i : number of ISM channels */ const int32_t element_brate, /* i : element bitrate */ const int16_t ism_imp /* i : ISM importance flag */ ); Loading @@ -5237,7 +5238,7 @@ void ivas_combined_format_brate_sanity( ISM_MODE ivas_omasa_ism_mode_select( const int32_t ivas_total_brate, /* i : IVAS total bitrate */ const int16_t no_obj /* i : number of input ISM's */ const int16_t nchan_ism /* i : number of input ISM's */ ); void ivas_merge_masa_transports( Loading lib_com/ivas_rom_com.c +4 −0 Original line number Diff line number Diff line Loading @@ -2801,7 +2801,11 @@ const int32_t sep_object_brate[][MAX_NUM_OBJECTS] = {16000, IVAS_13k2, 0, 0}, /* 64k */ #endif {20000, 16000, 0, 0}, /* 80k */ #ifdef TUNING_96kbps_3obj {IVAS_32k, 20000, 16000, 0}, /* 96k */ #else {IVAS_32k, 20000, 0, 0}, /* 96k */ #endif {IVAS_32k, IVAS_24k4, 20000, 0}, /* 128k */ {IVAS_48k, IVAS_32k, IVAS_24k4, 20000}, /* 160k */ {IVAS_64k, IVAS_48k, IVAS_32k, IVAS_24k4}, /* 192k */ Loading lib_com/options.h +3 −0 Original line number Diff line number Diff line Loading @@ -169,6 +169,9 @@ #ifdef MASA_AND_OBJECTS #define OMASA_BRATE /* VA: combined format bit-budget distribution */ #define MASAISM_EDIT_OBJECTS /* Nokia: Temporary command line editing of object directions in the decoder */ #define TUNING_96kbps_3obj #endif Loading lib_dec/ivas_omasa_dec.c +2 −2 Original line number Diff line number Diff line Loading @@ -59,7 +59,7 @@ void ivas_set_surplus_brate_dec( if ( st_ivas->ism_mode == ISM_MASA_MODE_ONE_OBJ ) { *ism_total_brate = ivas_interformat_brate( st_ivas->ism_mode, st_ivas->hSCE[0]->element_brate, st_ivas->hIsmMetaData[0]->ism_imp ); *ism_total_brate = ivas_interformat_brate( ISM_MASA_MODE_ONE_OBJ, 1, st_ivas->hSCE[0]->element_brate, st_ivas->hIsmMetaData[0]->ism_imp ); st_ivas->hCPE[0]->brate_surplus = st_ivas->hSCE[0]->element_brate - *ism_total_brate; Loading Loading @@ -90,7 +90,7 @@ void ivas_set_surplus_brate_dec( { st_ivas->hSCE[n]->element_brate = element_brate[n]; *ism_total_brate += ivas_interformat_brate( st_ivas->ism_mode, st_ivas->hSCE[n]->element_brate, st_ivas->hIsmMetaData[n]->ism_imp ); *ism_total_brate += ivas_interformat_brate( ISM_MASA_MODE_DISC, st_ivas->nchan_ism, st_ivas->hSCE[n]->element_brate, st_ivas->hIsmMetaData[n]->ism_imp ); } st_ivas->hCPE[0]->brate_surplus = ism_total_brate_ref - *ism_total_brate; Loading Loading
lib_com/ivas_omasa_com.c +33 −6 Original line number Diff line number Diff line Loading @@ -53,6 +53,10 @@ #define GAMMA_ISM_LOW_IMP2 0.9f #define GAMMA_ISM_MEDIUM_IMP2 1.2f #define GAMMA_ISM_HIGH_IMP2 1.35f #define GAMMA_ISM_LOW_IMP3 0.85f #define GAMMA_ISM_MEDIUM_IMP3 1.15f #define GAMMA_ISM_HIGH_IMP3 1.3f #endif /*--------------------------------------------------------------- Loading @@ -65,12 +69,12 @@ /*! r : ISM format mode */ ISM_MODE ivas_omasa_ism_mode_select( const int32_t ivas_total_brate, /* i : IVAS total bitrate */ const int16_t no_obj /* i : number of objects */ const int16_t nchan_ism /* i : number of input ISM's */ ) { ISM_MODE ism_mode = ISM_MODE_NONE; switch ( no_obj ) switch ( nchan_ism ) { case 1: if ( ivas_total_brate >= IVAS_24k4 ) Loading Loading @@ -101,7 +105,11 @@ ISM_MODE ivas_omasa_ism_mode_select( } break; case 3: #ifdef TUNING_96kbps_3obj if ( ivas_total_brate >= IVAS_96k ) #else if ( ivas_total_brate >= IVAS_128k ) #endif { ism_mode = ISM_MASA_MODE_DISC; } Loading Loading @@ -152,6 +160,7 @@ ISM_MODE ivas_omasa_ism_mode_select( /*! r: adjusted bitrate */ int32_t ivas_interformat_brate( const ISM_MODE ism_mode, /* i : ISM mode */ const int16_t nchan_ism, /* i : number of ISM channels */ const int32_t element_brate, /* i : element bitrate */ const int16_t ism_imp /* i : ISM importance flag */ ) Loading @@ -168,8 +177,26 @@ int32_t ivas_interformat_brate( } else { #ifdef TUNING_96kbps_3obj if ( ism_mode == ISM_MASA_MODE_DISC && nchan_ism == 3 && element_brate == 16000 ) /* this condition corresponds to the ivas_total_brate = 96000 and 3 objects */ { if ( ism_imp == ISM_LOW_IMP ) { nBits = (int16_t) ( nBits * GAMMA_ISM_LOW_IMP3 ); } else if ( ism_imp == ISM_MEDIUM_IMP ) { nBits = (int16_t) ( nBits * GAMMA_ISM_MEDIUM_IMP3 ); } else /* ISM_HIGH_IMP */ { nBits = (int16_t) ( nBits * GAMMA_ISM_HIGH_IMP3 ); } } else #endif if ( ism_mode == ISM_MASA_MODE_ONE_OBJ || ( ism_mode == ISM_MASA_MODE_DISC && element_brate == 9600 ) /* this condition corresponds to the ivas_total_brate = 9600 and 1 object */ ( ism_mode == ISM_MASA_MODE_DISC && element_brate == 9600 ) /* this condition corresponds to the ivas_total_brate = 24400 and 1 object */ ) { if ( ism_imp == ISM_LOW_IMP ) Loading
lib_com/ivas_prot.h +3 −2 Original line number Diff line number Diff line Loading @@ -4525,7 +4525,7 @@ void ivas_masa_encode( #ifdef MASA_AND_OBJECTS , const ISM_MODE ism_mode, /* i : ISM format mode */ const int16_t nchan_ism, /* i : number of ism channels */ const int16_t nchan_ism, /* i : number of ISM channels */ ISM_METADATA_HANDLE hIsmMetaData[MAX_NUM_OBJECTS], /* i : ISM metadata handle */ const int16_t idx_separated_object, /* i : index of the separated object */ OMASA_ENC_HANDLE hOMasa /* i : OMASA encoder handle */ Loading Loading @@ -5223,6 +5223,7 @@ void set_ism_importance_interformat( /*! r: adjusted bitrate */ int32_t ivas_interformat_brate( const ISM_MODE ism_mode, /* i : ISM mode */ const int16_t nchan_ism, /* i : number of ISM channels */ const int32_t element_brate, /* i : element bitrate */ const int16_t ism_imp /* i : ISM importance flag */ ); Loading @@ -5237,7 +5238,7 @@ void ivas_combined_format_brate_sanity( ISM_MODE ivas_omasa_ism_mode_select( const int32_t ivas_total_brate, /* i : IVAS total bitrate */ const int16_t no_obj /* i : number of input ISM's */ const int16_t nchan_ism /* i : number of input ISM's */ ); void ivas_merge_masa_transports( Loading
lib_com/ivas_rom_com.c +4 −0 Original line number Diff line number Diff line Loading @@ -2801,7 +2801,11 @@ const int32_t sep_object_brate[][MAX_NUM_OBJECTS] = {16000, IVAS_13k2, 0, 0}, /* 64k */ #endif {20000, 16000, 0, 0}, /* 80k */ #ifdef TUNING_96kbps_3obj {IVAS_32k, 20000, 16000, 0}, /* 96k */ #else {IVAS_32k, 20000, 0, 0}, /* 96k */ #endif {IVAS_32k, IVAS_24k4, 20000, 0}, /* 128k */ {IVAS_48k, IVAS_32k, IVAS_24k4, 20000}, /* 160k */ {IVAS_64k, IVAS_48k, IVAS_32k, IVAS_24k4}, /* 192k */ Loading
lib_com/options.h +3 −0 Original line number Diff line number Diff line Loading @@ -169,6 +169,9 @@ #ifdef MASA_AND_OBJECTS #define OMASA_BRATE /* VA: combined format bit-budget distribution */ #define MASAISM_EDIT_OBJECTS /* Nokia: Temporary command line editing of object directions in the decoder */ #define TUNING_96kbps_3obj #endif Loading
lib_dec/ivas_omasa_dec.c +2 −2 Original line number Diff line number Diff line Loading @@ -59,7 +59,7 @@ void ivas_set_surplus_brate_dec( if ( st_ivas->ism_mode == ISM_MASA_MODE_ONE_OBJ ) { *ism_total_brate = ivas_interformat_brate( st_ivas->ism_mode, st_ivas->hSCE[0]->element_brate, st_ivas->hIsmMetaData[0]->ism_imp ); *ism_total_brate = ivas_interformat_brate( ISM_MASA_MODE_ONE_OBJ, 1, st_ivas->hSCE[0]->element_brate, st_ivas->hIsmMetaData[0]->ism_imp ); st_ivas->hCPE[0]->brate_surplus = st_ivas->hSCE[0]->element_brate - *ism_total_brate; Loading Loading @@ -90,7 +90,7 @@ void ivas_set_surplus_brate_dec( { st_ivas->hSCE[n]->element_brate = element_brate[n]; *ism_total_brate += ivas_interformat_brate( st_ivas->ism_mode, st_ivas->hSCE[n]->element_brate, st_ivas->hIsmMetaData[n]->ism_imp ); *ism_total_brate += ivas_interformat_brate( ISM_MASA_MODE_DISC, st_ivas->nchan_ism, st_ivas->hSCE[n]->element_brate, st_ivas->hIsmMetaData[n]->ism_imp ); } st_ivas->hCPE[0]->brate_surplus = ism_total_brate_ref - *ism_total_brate; Loading