Commit 27d185cb authored by vaclav's avatar vaclav
Browse files

Merge branch '284-highest-bitrate-limit-in-ism-format' into 'main'

"Highest bitrate limit in ISM format"

See merge request !475
parents 23db55ab 53df95ad
Loading
Loading
Loading
Loading
Loading
+16 −7
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 for 1 ISM, 16400 for 1 ISM and 2 ISM, \n" );
    fprintf( stdout, "                                               (24400, 32000, 48000, 64000, 80000, 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" );
@@ -1657,16 +1667,16 @@ static void usage_enc( void )
    fprintf( stdout, "EVS mono is default, for IVAS choose one of the following: -stereo, -ism, -sba, -masa, -mc\n" );
    fprintf( stdout, "-stereo [Mode]      : Stereo format, default is unified stereo \n" );
    fprintf( stdout, "                      optional for Mode: 1: DFT Stereo, 2: TD Stereo, 3: MDCT Stereo\n" );
    fprintf( stdout, "-ism Channels Files : ISm format \n" );
    fprintf( stdout, "                      where Channels specifies the number of ISms (1-4)\n" );
    fprintf( stdout, "-ism Channels Files : ISM format \n" );
    fprintf( stdout, "                      where Channels specifies the number of ISMs (1-4)\n" );
    fprintf( stdout, "                      and Files specify input files containing metadata, one file per object\n" );
    fprintf( stdout, "                      (use NULL for no input metadata)\n" );
    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 1 ISM, 16400 for 1 ISM and 2 ISM,
											   (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
+21 −30
Original line number Diff line number Diff line
@@ -1828,10 +1828,7 @@
                    64000,
                    80000,
                    96000,
                    128000,
                    160000,
                    192000,
                    256000
                    128000
                ],
                "swb": [
                    13200,
@@ -1842,10 +1839,7 @@
                    64000,
                    80000,
                    96000,
                    128000,
                    160000,
                    192000,
                    256000
                    128000
                ],
                "fb": [
                    32000,
@@ -1853,10 +1847,7 @@
                    64000,
                    80000,
                    96000,
                    128000,
                    160000,
                    192000,
                    256000
                    128000
                ]
            }
        },
@@ -1892,10 +1883,7 @@
                    64000,
                    80000,
                    96000,
                    128000,
                    160000,
                    192000,
                    256000
                    128000
                ],
                "swb": [
                    13200,
@@ -1906,10 +1894,7 @@
                    64000,
                    80000,
                    96000,
                    128000,
                    160000,
                    192000,
                    256000
                    128000
                ],
                "fb": [
                    32000,
@@ -1917,10 +1902,7 @@
                    64000,
                    80000,
                    96000,
                    128000,
                    160000,
                    192000,
                    256000
                    128000
                ]
            }
        }
@@ -2021,7 +2003,8 @@
                    128000,
                    160000,
                    192000,
                    256000
                    256000,
					384000
                ],
                "swb": [
                    24400,
@@ -2033,7 +2016,8 @@
                    128000,
                    160000,
                    192000,
                    256000
                    256000,
					384000
                ],
                "fb": [
                    32000,
@@ -2044,7 +2028,8 @@
                    128000,
                    160000,
                    192000,
                    256000
                    256000,
					384000
                ]
            }
        },
@@ -2118,7 +2103,9 @@
                    128000,
                    160000,
                    192000,
                    256000
                    256000,
					384000,
					512000
                ],
                "swb": [
                    24400,
@@ -2130,7 +2117,9 @@
                    128000,
                    160000,
                    192000,
                    256000
                    256000,
					384000,
					512000
                ],
                "fb": [
                    32000,
@@ -2141,7 +2130,9 @@
                    128000,
                    160000,
                    192000,
                    256000
                    256000,
					384000,
					512000
                ]
            }
        },
Loading