Commit db7d0c78 authored by vaclav's avatar vaclav
Browse files

Issue 284: Update highest bitrate limit in ISM format; under ISM_HIGHEST_BITRATE

parent 23db55ab
Loading
Loading
Loading
Loading
+14 −5
Original line number Diff line number Diff line
@@ -1640,8 +1640,18 @@ static void usage_enc( void )
    fprintf( stdout, "                                                *VBR mode (average bitrate),\n" );
    fprintf( stdout, "                      for AMR-WB IO modes R =  (6600, 8850, 12650, 14250, 15850, 18250,\n" );
    fprintf( stdout, "                                                19850, 23050, 23850) \n" );
#ifdef ISM_HIGHEST_BITRATE
    fprintf( stdout, "                      for IVAS stereo R =      (13200, 16400, 24400, 32000, 48000, 64000, 80000, \n" );
    fprintf( stdout, "                                                96000, 128000, 160000, 192000, 256000) \n" );
    fprintf( stdout, "                      for IVAS ISM R =         (13200, 16400, 24400, 32000, 48000, 64000, 80000, \n" );
    fprintf( stdout, "                                                96000, 128000,  \n" );
    fprintf( stdout, "                                                for 2 ISM, 3 ISM and 4 ISM also 160000, 192000, 256000) \n" );
    fprintf( stdout, "                                                for 3 ISM and 4 ISM also 384000 \n" );
    fprintf( stdout, "                                                for 4 ISM also 512000 \n" );
#else
    fprintf( stdout, "                      for IVAS stereo & ISm R =(13200, 16400, 24400, 32000, 48000, 64000, 80000, \n" );
    fprintf( stdout, "                                                96000, 128000, 160000, 192000, 256000) \n" );
#endif
    fprintf( stdout, "                      for IVAS SBA, MASA, MC R=(13200, 16400, 24400, 32000, 48000, 64000, 80000, \n" );
    fprintf( stdout, "                                                96000, 128000, 160000, 192000, 256000, 384000, 512000) \n" );
    fprintf( stdout, "                      Alternatively, R can be a bitrate switching file which consists of R values\n" );
@@ -1664,9 +1674,9 @@ static void usage_enc( void )
    fprintf( stdout, "-sba +/-Order       : Scene Based Audio input format (Ambisonics ACN/SN3D),\n" );
    fprintf( stdout, "                      where Order specifies the Ambisionics order (1-3),\n" );
    fprintf( stdout, "                      where positive (+) means full 3D and negative (-) only 2D/planar components to be coded\n" );
    fprintf( stdout, "-masa Ch File       : MASA format \n" );
    fprintf( stdout, "                      where Ch specifies the number of input/transport channels (1 or 2): \n" );
    fprintf( stdout, "                      and File specifies input file containing parametric metadata \n" );
    fprintf( stdout, "-masa Channels File : MASA format \n" );
    fprintf( stdout, "                      where Channels specifies the number of input/transport channels (1 or 2): \n" );
    fprintf( stdout, "                      and File specifies input file containing parametric MASA metadata \n" );
    fprintf( stdout, "-mc InputConf       : Multi-channel format\n" );
    fprintf( stdout, "                      where InputConf specifies the channel configuration: 5_1, 7_1, 5_1_2, 5_1_4, 7_1_4\n" );
    fprintf( stdout, "                      Loudspeaker positions are assumed to have azimuth and elevation as per \n" );
@@ -1676,8 +1686,7 @@ static void usage_enc( void )
    fprintf( stdout, "                      where 0 = adaptive, 3-100 = fixed in number of frames,\n" );
    fprintf( stdout, "                      default is deactivated\n" );
    fprintf( stdout, "-dtx                : Activate DTX mode with a SID update rate of 8 frames\n" );
    fprintf( stdout, "                      Note: DTX is currently supported in EVS, stereo, 1 ISm, \n" );
    fprintf( stdout, "                      SBA (up to 128kbps) and MASA (up to 128kbps)\n" );
    fprintf( stdout, "                      Note: DTX is supported in EVS, stereo, ISM, SBA up to 80kbps and MASA up to 128kbps \n" );
    fprintf( stdout, "-rf p o             : Activate channel-aware mode for WB and SWB signal at 13.2kbps, \n" );
    fprintf( stdout, "                      where FEC indicator, p: LO or HI, and FEC offset, o: 2, 3, 5, or 7 in number of frames.\n" );
    fprintf( stdout, "                      Alternatively p and o can be replaced by a rf configuration file with each line  \n" );
+1 −1
Original line number Diff line number Diff line
@@ -164,7 +164,7 @@
#define FIX_351_HRTF_COMMAND                            /* VA: Issue 354 - improve "-hrtf" command-line option */

#define FIX_94_VERIFY_WAV_NUM_CHANNELS                  /* FhG: Issue 94 - Check if number of channels in input wav file matches encoder/renderer configuration */

#define ISM_HIGHEST_BITRATE                             /* VA: Issue 284: Update highest bitrate limit in ISM format */

/* ################## End DEVELOPMENT switches ######################### */
/* clang-format on */
+20 −3
Original line number Diff line number Diff line
@@ -1985,24 +1985,41 @@ static ivas_error sanitizeBandwidth(
static ivas_error sanitizeBitrateISM(
    const ENCODER_CONFIG_HANDLE hEncoderConfig )
{
#ifdef ISM_HIGHEST_BITRATE
    if ( hEncoderConfig->ivas_total_brate > IVAS_128k && hEncoderConfig->nchan_inp == 1 )
    {
        return IVAS_ERROR( IVAS_ERR_INVALID_BITRATE, "Too high bitrate for 1 ISM specified in IVAS: %d", hEncoderConfig->ivas_total_brate );
    }

    if ( hEncoderConfig->ivas_total_brate > IVAS_256k && hEncoderConfig->nchan_inp == 2 )
    {
        return IVAS_ERROR( IVAS_ERR_INVALID_BITRATE, "Too high bitrate for 2 ISM specified in IVAS: %d", hEncoderConfig->ivas_total_brate );
    }

    if ( hEncoderConfig->ivas_total_brate > IVAS_384k && hEncoderConfig->nchan_inp == 3 )
    {
        return IVAS_ERROR( IVAS_ERR_INVALID_BITRATE, "Too high bitrate for 3 ISM specified in IVAS: %d", hEncoderConfig->ivas_total_brate );
    }
#else
    if ( hEncoderConfig->ivas_total_brate > IVAS_256k )
    {
        return IVAS_ERROR( IVAS_ERR_INVALID_BITRATE, "Too high bitrate for ISm specified in IVAS: %d", hEncoderConfig->ivas_total_brate );
    }
#endif

    if ( hEncoderConfig->ivas_total_brate < IVAS_16k4 && hEncoderConfig->nchan_inp == 2 )
    {
        return IVAS_ERROR( IVAS_ERR_INVALID_BITRATE, "Too low bitrate for 2 ISm specified in IVAS: %d", hEncoderConfig->ivas_total_brate );
        return IVAS_ERROR( IVAS_ERR_INVALID_BITRATE, "Too low bitrate for 2 ISM specified in IVAS: %d", hEncoderConfig->ivas_total_brate );
    }

    if ( hEncoderConfig->ivas_total_brate < IVAS_24k4 && hEncoderConfig->nchan_inp == 3 )
    {
        return IVAS_ERROR( IVAS_ERR_INVALID_BITRATE, "Too low bitrate for 3 ISm specified in IVAS: %d", hEncoderConfig->ivas_total_brate );
        return IVAS_ERROR( IVAS_ERR_INVALID_BITRATE, "Too low bitrate for 3 ISM specified in IVAS: %d", hEncoderConfig->ivas_total_brate );
    }

    if ( hEncoderConfig->ivas_total_brate < IVAS_24k4 && hEncoderConfig->nchan_inp == 4 )
    {
        return IVAS_ERROR( IVAS_ERR_INVALID_BITRATE, "Too low bitrate for 4 ISm specified in IVAS: %d", hEncoderConfig->ivas_total_brate );
        return IVAS_ERROR( IVAS_ERR_INVALID_BITRATE, "Too low bitrate for 4 ISM specified in IVAS: %d", hEncoderConfig->ivas_total_brate );
    }

    return IVAS_ERR_OK;
+13 −9
Original line number Diff line number Diff line
@@ -160,8 +160,13 @@ R : Bitrate in bps,
                                                *VBR mode (average bitrate),
                      for AMR-WB IO modes R =  (6600, 8850, 12650, 14250, 15850, 18250,
                                                19850, 23050, 23850)
                      for IVAS stereo & ISm R =(13200, 16400, 24400, 32000, 48000, 64000, 80000,
                      for IVAS stereo R =      (13200, 16400, 24400, 32000, 48000, 64000, 80000,
											    96000, 128000, 160000, 192000, 256000)
					  for IVAS ISM R =          13200 for ISM 1, 16400 for ISM 1 and ISM 2,
											   (24400, 32000, 48000, 64000, 80000, 96000, 128000)                                                
                                                for 2 ISM, 3 ISM and 4 ISM also 160000, 192000, 256000
                                                for 3 ISM and 4 ISM also 384000
                                                for 4 ISM also 512000											
                      for IVAS SBA, MASA, MC R=(13200, 16400, 24400, 32000, 48000, 64000, 80000,
                                                96000, 128000, 160000, 192000, 256000, 384000, 512000)
                      Alternatively, R can be a bitrate switching file which consists of R values
@@ -176,16 +181,16 @@ Options:
EVS mono is default, for IVAS choose one of the following: -stereo, -ism, -sba, -masa, -mc
-stereo [Mode]      : Stereo format, default is unified stereo
                      optional for Mode: 1: DFT Stereo, 2: TD Stereo, 3: MDCT Stereo
-ism Channels Files : ISm format
                      where Channels specifies the number of ISms (1-4)
-ism Channels Files : ISM format
                      where Channels specifies the number of ISMs (1-4)
                      and Files specify input files containing metadata, one file per object
                      (use NULL for no input metadata)
-sba +/-Order       : Scene Based Audio input format (Ambisonics ACN/SN3D),
                      where Order specifies the Ambisionics order (1-3),
                      where positive (+) means full 3D and negative (-) only 2D/planar components to be coded
-masa Ch File       : MASA format
                      where Ch specifies the number of input/transport channels (1 or 2):
                      and File specifies input file containing parametric metadata
-masa Channels File : MASA format
                      where Channels specifies the number of input/transport channels (1 or 2):
                      and File specifies input file containing parametric MASA metadata
-mc InputConf       : Multi-channel format
                      where InputConf specifies the channel configuration: 5_1, 7_1, 5_1_2, 5_1_4, 7_1_4
                      Loudspeaker positions are assumed to have azimuth and elevation as per
@@ -195,8 +200,7 @@ EVS mono is default, for IVAS choose one of the following: -stereo, -ism, -sba,
                      where 0 = adaptive, 3-100 = fixed in number of frames,
                      default is deactivated
-dtx                : Activate DTX mode with a SID update rate of 8 frames
                      Note: DTX is currently supported in EVS, stereo, 1 ISm,
                      SBA (up to 128kbps) and MASA (up to 128kbps)
                      Note: DTX is supported in EVS, stereo, ISM, SBA up to 80kbps and MASA up to 128kbps
-rf p o             : Activate channel-aware mode for WB and SWB signal at 13.2kbps,
                      where FEC indicator, p: LO or HI, and FEC offset, o: 2, 3, 5, or 7 in number of frames.
                      Alternatively p and o can be replaced by a rf configuration file with each line
+9 −0
Original line number Diff line number Diff line
@@ -378,6 +378,15 @@
../IVAS_cod -ism 4 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv testv/stvISM4.csv 256000 48 testv/stv4ISM48s.wav bit
../IVAS_dec -t testv/headrot_case03_3000_q.csv BINAURAL 48 bit testv/stv4ISM48s.wav_256000_48-48_TDHR.tst

// 3 ISm with metadata at 384 kbps, 48 kHz in, 32 kHz out, 7_1_4 out
../IVAS_cod -ism 3 testv/stvISM2.csv testv/stvISM3.csv testv/stvISM4.csv 384000 48 testv/stv3ISM48s.wav bit
../IVAS_dec 7_1_4 32 bit testv/stv3ISM48s.wav_384000_48-32_7_1_4.tst

// 4 ISm with metadata at 512 kbps, 48 kHz in, 48 kHz out, 5_1
../IVAS_cod -ism 4 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv testv/stvISM4.csv 512000 48 testv/stv4ISM48s.wav bit
../IVAS_dec 5_1 48 bit testv/stv4ISM48s.wav_512000_48-48_5_1.tst


// 1 ISm with metadata bitrate switching from 13.2 kbps to 128 kbps, 32 kHz in, 32 kHz out, mono out, DTX on
../IVAS_cod -dtx -ism 1 testv/stvISM1.csv ../scripts/switchPaths/sw_13k2_to_128k_10fr.bin 32 testv/stv32c.wav bit
../IVAS_dec MONO 32 bit testv/stv32c.wav_brate_sw_32-32_mono_dtx.tst