Skip to content
......@@ -9,7 +9,7 @@
#include "options.h"
#include "wmc_auto.h"
#include "setup_dec_lc3.h"
#include "setup_dec_lc3plus.h"
#include "functions.h"
#include <stdio.h>
#include <assert.h>
......
......@@ -9,7 +9,7 @@
#include "options.h"
#include "wmc_auto.h"
#include "setup_enc_lc3.h"
#include "setup_enc_lc3plus.h"
#include "functions.h"
#include <stdio.h>
......
......@@ -482,7 +482,6 @@ static void ivas_omasa_dmx(
float g1, g2;
float data_out_f[MASA_MAX_TRANSPORT_CHANNELS][L_FRAME48k];
for ( i = 0; i < nchan_transport; i++ )
{
set_zero( data_out_f[i], input_frame );
......@@ -490,7 +489,6 @@ static void ivas_omasa_dmx(
for ( i = 0; i < nchan_ism; i++ )
{
#ifdef NONBE_1362_FIX_OMASA_TO_MASA1_RENDERING
if ( nchan_transport == 1 )
{
v_add( data_out_f[0], data_in_f[i], data_out_f[0], input_frame );
......@@ -517,27 +515,6 @@ static void ivas_omasa_dmx(
prev_gains[i][j] = gains[j];
}
}
#else
azimuth = ism_azimuth[i];
elevation = ism_elevation[i];
ivas_ism_get_stereo_gains( azimuth, elevation, &gains[0], &gains[1] );
/* Downmix using the panning gains */
for ( j = 0; j < nchan_transport; j++ )
{
if ( fabsf( gains[j] ) > 0.0 || fabsf( prev_gains[i][j] ) > 0.0f )
{
for ( k = 0; k < input_frame; k++ )
{
g1 = interpolator[k];
g2 = 1.0f - g1;
data_out_f[j][k] += ( g1 * gains[j] + g2 * prev_gains[i][j] ) * data_in_f[i][k];
}
}
prev_gains[i][j] = gains[j];
}
#endif
}
for ( i = 0; i < nchan_transport; i++ )
......
......@@ -369,10 +369,75 @@ int16_t ivas_get_nchan_buffers_dec(
ivas_error ivas_output_buff_dec(
float *p_output_f[], /* i/o: output audio buffers */
#ifdef FIX_1330_JBM_MEMORY
const int16_t nchan_out_buff, /* i : number of output channels */
const int16_t Opt_tsm, /* i : TSM option flag */
DECODER_TC_BUFFER_HANDLE hTcBuffer /* i : TSM buffer handle */
#else
const int16_t nchan_out_buff_old, /* i : previous frame number of output channels */
const int16_t nchan_out_buff /* i : number of output channels */
#endif
)
{
#ifdef FIX_1330_JBM_MEMORY
int16_t ch, nchan_tc_jbm, nsamp_to_allocate, n_samp_full, offset;
for ( ch = 0; ch < MAX_OUTPUT_CHANNELS + MAX_NUM_OBJECTS; ch++ )
{
p_output_f[ch] = NULL;
}
if ( hTcBuffer->tc_buffer2 != NULL )
{
free( hTcBuffer->tc_buffer2 );
hTcBuffer->tc_buffer2 = NULL;
}
nchan_tc_jbm = 0;
if ( Opt_tsm )
{
/* JBM decoding: output audio buffers are shared with audio buffers from 'hTcBuffer->tc[]' */
nchan_tc_jbm = max( hTcBuffer->nchan_transport_jbm, hTcBuffer->nchan_buffer_full );
}
if ( nchan_out_buff <= nchan_tc_jbm && !Opt_tsm )
{
for ( ch = 0; ch < nchan_out_buff; ch++ )
{
p_output_f[ch] = hTcBuffer->tc[ch];
}
}
else
{
for ( ch = 0; ch < nchan_tc_jbm; ch++ )
{
p_output_f[ch] = hTcBuffer->tc[ch];
}
/* non-JBM decoding: allocate output audio buffers */
/* JBM decoding: when not enough audio buffers 'hTcBuffer->tc[]', allocate additional buffers */
n_samp_full = ( 48000 / FRAMES_PER_SEC );
nsamp_to_allocate = ( nchan_out_buff - nchan_tc_jbm ) * n_samp_full;
if ( nsamp_to_allocate > 0 )
{
/* note: these are intra-frame heap memories */
if ( ( hTcBuffer->tc_buffer2 = (float *) malloc( nsamp_to_allocate * sizeof( float ) ) ) == NULL )
{
return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for floating-point output audio buffer!\n" ) );
}
set_zero( hTcBuffer->tc_buffer2, nsamp_to_allocate );
}
offset = 0;
for ( ; ch < nchan_out_buff; ch++ )
{
p_output_f[ch] = &hTcBuffer->tc_buffer2[offset];
offset += n_samp_full;
}
}
#else
int16_t ch;
if ( nchan_out_buff > nchan_out_buff_old )
......@@ -400,6 +465,7 @@ ivas_error ivas_output_buff_dec(
p_output_f[ch] = NULL;
}
}
#endif
return IVAS_ERR_OK;
}
......
......@@ -1582,6 +1582,40 @@ void ivas_rend_closeCldfbRend(
CLDFB_REND_WRAPPER *pCldfbRend
);
/*----------------------------------------------------------------------------------*
* Time domain ring buffer prototypes
*----------------------------------------------------------------------------------*/
ivas_error ivas_TD_RINGBUF_Open(
TD_RINGBUF_HANDLE *ph, /* i/o: Ring buffer handle */
const uint32_t capacity_per_channel, /* i : Number of samples stored per channel */
const uint16_t num_channels /* i : Number of channels */
);
void ivas_TD_RINGBUF_Close(
TD_RINGBUF_HANDLE *ph /* i/o: Ring buffer handle */
);
void ivas_TD_RINGBUF_Push(
TD_RINGBUF_HANDLE h, /* i/o: Ring buffer handle */
const float *data, /* i : Input data */
const uint32_t num_samples_per_channel /* i : Number of samples per channel to store */
);
void ivas_TD_RINGBUF_PushZeros(
TD_RINGBUF_HANDLE h, /* i/o: Ring buffer handle */
const uint32_t num_samples_per_channel /* i : Number of zeros per channel to store */
);
void ivas_TD_RINGBUF_Pop(
TD_RINGBUF_HANDLE h, /* i/o: Ring buffer handle */
float *data, /* i : Output data */
const uint32_t num_samples_per_channel /* i : Number of samples per channel to retrieve*/
);
uint32_t ivas_TD_RINGBUF_Size(
const TD_RINGBUF_HANDLE h /* i : Ring buffer handle */
);
/* clang-format on */
......
......@@ -163,15 +163,9 @@ const float ap_lattice_coeffs_3[DIRAC_DECORR_FILTER_LEN_3*DIRAC_MAX_NUM_DECORR_F
const float * const ap_lattice_coeffs[DIRAC_DECORR_NUM_SPLIT_BANDS] =
{
#ifdef CODE_IMPROVEMENTS
ap_lattice_coeffs_1,
ap_lattice_coeffs_2,
ap_lattice_coeffs_3,
#else
&ap_lattice_coeffs_1[0],
&ap_lattice_coeffs_2[0],
&ap_lattice_coeffs_3[0],
#endif
};
const float ap_split_frequencies[DIRAC_DECORR_NUM_SPLIT_BANDS + 1] =
......@@ -183,11 +177,13 @@ const int16_t sba_map_tc[11] =
{
0, 1, 2, 3, 4, 8, 9, 15, 5, 6, 7
};
const int16_t sba_map_tc_512[11] =
{
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 15
};
/*----------------------------------------------------------------------------------*
* FASTCONV and PARAMETRIC binaural renderer ROM tables
*----------------------------------------------------------------------------------*/
......@@ -386,6 +382,7 @@ const float ivas_reverb_default_DSR[IVAS_REVERB_DEFAULT_N_BANDS] =
6.2001e-08f, 2.8483e-08f, 2.6267e-08f
};
/*----------------------------------------------------------------------------------*
* Renderer SBA & MC enc/dec matrices
*----------------------------------------------------------------------------------*/
......@@ -394,6 +391,7 @@ const float ivas_reverb_default_DSR[IVAS_REVERB_DEFAULT_N_BANDS] =
const float ls_azimuth_CICP1[1] = { 0.0f };
const float ls_elevation_CICP1[1] = { 0.0f };
/*----------------------------------------------------------------------------------*
* EFAP ROM tables
*----------------------------------------------------------------------------------*/
......
......@@ -1371,6 +1371,22 @@ typedef struct
} CLDFB_REND_WRAPPER;
/*----------------------------------------------------------------------------------*
* Time domain ring buffer structure
*----------------------------------------------------------------------------------*/
typedef struct
{
float *data; /* samples in interleaved layout */
uint32_t capacity;
uint16_t num_channels;
uint32_t write_pos;
uint32_t read_pos;
int16_t is_full;
} TD_RINGBUF_DATA, *TD_RINGBUF_HANDLE;
/*----------------------------------------------------------------------------------*
* MASA external renderer structure
*----------------------------------------------------------------------------------*/
......
/******************************************************************************************************
(C) 2022-2025 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB,
Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD.,
Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange,
Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other
contributors to this repository. All Rights Reserved.
This software is protected by copyright law and by international treaties.
The IVAS codec Public Collaboration consisting of Dolby International AB, Ericsson AB,
Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD.,
Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange,
Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other
contributors to this repository retain full ownership rights in their respective contributions in
the software. This notice grants no license of any kind, including but not limited to patent
license, nor is any license granted by implication, estoppel or otherwise.
Contributors are required to enter into the IVAS codec Public Collaboration agreement before making
contributions.
This software is provided "AS IS", without any express or implied warranties. The software is in the
development stage. It is intended exclusively for experts who have experience with such software and
solely for the purpose of inspection. All implied warranties of non-infringement, merchantability
and fitness for a particular purpose are hereby disclaimed and excluded.
Any dispute, controversy or claim arising under or in relation to providing this software shall be
submitted to and settled by the final, binding jurisdiction of the courts of Munich, Germany in
accordance with the laws of the Federal Republic of Germany excluding its conflict of law rules and
the United Nations Convention on Contracts on the International Sales of Goods.
*******************************************************************************************************/
#include <assert.h>
#include <stdlib.h>
#include "ivas_error_utils.h"
#include "ivas_prot_rend.h"
#include "options.h"
#include "wmc_auto.h"
/*-----------------------------------------------------------------------*
* Local function prototypes
*-----------------------------------------------------------------------*/
static uint32_t ivas_td_ringbuf_total_size(
TD_RINGBUF_HANDLE h )
{
if ( h->is_full )
{
return h->capacity;
}
if ( h->read_pos <= h->write_pos )
{
return h->write_pos - h->read_pos;
}
/* else wrap around */
return h->write_pos + h->capacity - h->read_pos;
}
static int16_t ivas_td_ringbuf_has_space_for_num_samples(
TD_RINGBUF_HANDLE h,
const uint32_t num_samples )
{
return (int16_t) ( ivas_td_ringbuf_total_size( h ) + num_samples <= h->capacity );
}
/*-----------------------------------------------------------------------*
* Global function definitions
*-----------------------------------------------------------------------*/
/*---------------------------------------------------------------------*
* ivas_TD_RINGBUF_Open()
*
* Allocate a ring buffer for TD data with the given capacity of TD samples per channel.
*
* May return IVAS_ERR_FAILED_ALLOC on failed allocation, or IVAS_ERR_OK otherwise.
*---------------------------------------------------------------------*/
ivas_error ivas_TD_RINGBUF_Open(
TD_RINGBUF_HANDLE *ph, /* i/o: Ring buffer handle */
const uint32_t capacity_per_channel, /* i : Number of samples stored per channel */
const uint16_t num_channels /* i : Number of channels */
)
{
TD_RINGBUF_HANDLE h;
uint32_t capacity;
capacity = capacity_per_channel * num_channels;
h = malloc( sizeof( TD_RINGBUF_DATA ) );
if ( h == NULL )
{
return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Failed to allocate memory for TD ring buffer\n" );
}
h->data = NULL;
h->capacity = 0;
h->num_channels = num_channels;
h->write_pos = 0;
h->read_pos = 0;
h->is_full = 0;
*ph = h;
h->data = malloc( capacity * sizeof( float ) );
if ( h->data == NULL )
{
return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Failed to allocate memory for TD ring buffer\n" );
}
h->capacity = capacity;
return IVAS_ERR_OK;
}
/*---------------------------------------------------------------------*
* ivas_TD_RINGBUF_Close()
*
* Dellocate TD ring buffer. The given handle will be set to NULL.
*---------------------------------------------------------------------*/
void ivas_TD_RINGBUF_Close(
TD_RINGBUF_HANDLE *ph /* i/o: Ring buffer handle */
)
{
TD_RINGBUF_HANDLE h;
if ( ph == NULL )
{
return;
}
h = *ph;
if ( h == NULL )
{
return;
}
if ( h->data != NULL )
{
free( h->data );
}
free( h );
*ph = NULL;
return;
}
/*---------------------------------------------------------------------*
* ivas_TD_RINGBUF_Push()
*
* Push samples onto the back of the TD ring buffer.
* Returns total number of buffered samples (includes number of channels)
*---------------------------------------------------------------------*/
void ivas_TD_RINGBUF_Push(
TD_RINGBUF_HANDLE h, /* i/o: Ring buffer handle */
const float *data, /* i : Input data */
const uint32_t num_samples_per_channel /* i : Number of samples per channel to store */
)
{
uint32_t s;
uint16_t c;
assert( ivas_td_ringbuf_has_space_for_num_samples( h, num_samples_per_channel * h->num_channels ) );
for ( s = 0; s < num_samples_per_channel; ++s )
{
for ( c = 0; c < h->num_channels; ++c )
{
h->data[h->write_pos] = *( data + c * num_samples_per_channel + s );
++h->write_pos;
if ( h->write_pos == h->capacity )
{
h->write_pos = 0;
}
}
}
if ( h->read_pos == h->write_pos )
{
h->is_full = 1;
}
return;
}
/*---------------------------------------------------------------------*
* ivas_TD_RINGBUF_PushZeros()
*
* Push zero samples onto the back of the TD ring buffer.
*---------------------------------------------------------------------*/
void ivas_TD_RINGBUF_PushZeros(
TD_RINGBUF_HANDLE h, /* i/o: Ring buffer handle */
const uint32_t num_samples_per_channel /* i : Number of zeros per channel to store */
)
{
uint32_t s;
uint16_t c;
assert( ivas_td_ringbuf_has_space_for_num_samples( h, num_samples_per_channel * h->num_channels ) );
if ( !num_samples_per_channel )
{
return;
}
for ( s = 0; s < num_samples_per_channel; ++s )
{
for ( c = 0; c < h->num_channels; ++c )
{
h->data[h->write_pos] = 0.f;
++h->write_pos;
if ( h->write_pos == h->capacity )
{
h->write_pos = 0;
}
}
}
if ( h->read_pos == h->write_pos )
{
h->is_full = 1;
}
return;
}
/*---------------------------------------------------------------------*
* ivas_TD_RINGBUF_Pop()
*
* Pop samples from the front of the TD ring buffer.
*---------------------------------------------------------------------*/
void ivas_TD_RINGBUF_Pop(
TD_RINGBUF_HANDLE h, /* i/o: Ring buffer handle */
float *data, /* i : Output data */
const uint32_t num_samples_per_channel /* i : Number of samples per channel to retrieve */
)
{
uint32_t s;
uint16_t c;
assert( ivas_td_ringbuf_total_size( h ) >= num_samples_per_channel * h->num_channels );
for ( s = 0; s < num_samples_per_channel; ++s )
{
for ( c = 0; c < h->num_channels; ++c )
{
*( data + c * num_samples_per_channel + s ) = h->data[h->read_pos];
++h->read_pos;
if ( h->read_pos == h->capacity )
{
h->read_pos = 0;
}
}
}
if ( h->is_full )
{
h->is_full = 0;
}
return;
}
/*---------------------------------------------------------------------*
* ivas_TD_RINGBUF_Size()
*
* Returns number of buffered samples per channel.
*---------------------------------------------------------------------*/
uint32_t ivas_TD_RINGBUF_Size(
const TD_RINGBUF_HANDLE h /* i : Ring buffer handle */
)
{
return ivas_td_ringbuf_total_size( h ) / (uint32_t) h->num_channels;
}
This diff is collapsed.
......@@ -134,7 +134,7 @@ ivas_error IVAS_REND_ConfigureCustomOutputLoudspeakerLayout(
/* Functions to be called before/during rendering */
ivas_error IVAS_REND_NumOutChannels(
ivas_error IVAS_REND_GetNumOutChannels(
IVAS_REND_CONST_HANDLE hIvasRend, /* i : Renderer handle */
int16_t *numOutChannels /* o : number of output channels */
);
......@@ -221,7 +221,8 @@ ivas_error IVAS_REND_GetHrtfStatisticsHandle(
ivas_error IVAS_REND_FeedInputAudio(
IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */
const IVAS_REND_InputId inputId, /* i : ID of the input */
const IVAS_REND_ReadOnlyAudioBuffer inputAudio /* i : buffer with input audio */
const IVAS_REND_ReadOnlyAudioBuffer inputAudio, /* i : buffer with input audio */
const bool flushInputs /* i : flush input audio */
);
ivas_error IVAS_REND_FeedInputObjectMetadata(
......
......@@ -305,7 +305,9 @@ MIME_ERROR MIME_Writer_Close(
}
static bool readByte( FILE *file, uint8_t *value )
static bool readByte(
FILE *file,
uint8_t *value )
{
if ( fread( value, 1, 1, file ) != 1U )
{
......@@ -314,14 +316,13 @@ static bool readByte( FILE *file, uint8_t *value )
return true;
}
static bool readLong( FILE *file, uint16_t *value )
static bool readLong(
FILE *file,
uint16_t *value )
{
char buffer[4] = { 0 };
#ifdef CODE_IMPROVEMENTS
if ( fread( buffer, 1, 4, file ) != 1U )
#else
if ( fread( buffer, 4, 1, file ) != 1U )
#endif
{
return false;
}
......@@ -346,7 +347,10 @@ static bool readLong( FILE *file, uint16_t *value )
* to the serial bitstream.
*-------------------------------------------------------------------*/
static void byteToSerialReordered( uint8_t byte, uint16_t *serial, const int16_t *sort_indices )
static void byteToSerialReordered(
uint8_t byte,
uint16_t *serial,
const int16_t *sort_indices )
{
for ( uint32_t i = 0; i < 8; ++i )
{
......@@ -360,8 +364,11 @@ static void byteToSerialReordered( uint8_t byte, uint16_t *serial, const int16_t
byte <<= 1;
}
return;
}
/*-------------------------------------------------------------------*
* byteToSerial()
*
......@@ -369,18 +376,25 @@ static void byteToSerialReordered( uint8_t byte, uint16_t *serial, const int16_t
* to the given serial bitstream array.
*-------------------------------------------------------------------*/
static void byteToSerial( uint8_t byte, uint16_t *serial )
static void byteToSerial(
uint8_t byte,
uint16_t *serial )
{
const int16_t indices[8] = { 0, 1, 2, 3, 4, 5, 6, 7 };
byteToSerialReordered( byte, serial, indices );
return;
}
static MIME_ERROR readHeader( MIME_HANDLE hMIME )
static MIME_ERROR readHeader(
MIME_HANDLE hMIME )
{
const char id[] = "#!EVS_MC1.0\n";
const uint16_t num_char_id = sizeof( id ) - 1;
char buffer[sizeof( id )] = { 0 };
if ( fread( buffer, sizeof( char ), num_char_id, hMIME->file ) != num_char_id )
{
return MIME_READ_ERROR;
......@@ -398,13 +412,17 @@ static MIME_ERROR readHeader( MIME_HANDLE hMIME )
return MIME_NO_ERROR;
}
/*-------------------------------------------------------------------*
* MIME_Reader_Open_filename()
*
* Open MIME reader
*-------------------------------------------------------------------*/
MIME_ERROR MIME_Reader_Open_filename( MIME_HANDLE *phMIME, const char *filename )
MIME_ERROR MIME_Reader_Open_filename(
MIME_HANDLE *phMIME,
const char *filename )
{
MIME_ERROR error = MIME_NO_ERROR;
......@@ -440,7 +458,8 @@ MIME_ERROR MIME_Reader_Open_filename( MIME_HANDLE *phMIME, const char *filename
* Rewind currently opened file to beginning
*-------------------------------------------------------------------*/
MIME_ERROR MIME_Reader_Rewind( MIME_HANDLE hMIME )
MIME_ERROR MIME_Reader_Rewind(
MIME_HANDLE hMIME )
{
if ( !hMIME || !hMIME->file )
{
......@@ -455,7 +474,13 @@ MIME_ERROR MIME_Reader_Rewind( MIME_HANDLE hMIME )
return MIME_NO_ERROR;
}
static MIME_ERROR readEvsFrame( FILE *file, uint8_t ToC, uint16_t *serial, int16_t *num_bits, int16_t *bfi )
static MIME_ERROR readEvsFrame(
FILE *file,
uint8_t ToC,
uint16_t *serial,
int16_t *num_bits,
int16_t *bfi )
{
switch ( ToC & 0x0f )
{
......@@ -524,7 +549,13 @@ static MIME_ERROR readEvsFrame( FILE *file, uint8_t ToC, uint16_t *serial, int16
return MIME_NO_ERROR;
}
static MIME_ERROR readAmrWbFrame( FILE *file, uint8_t ToC, uint16_t *serial, int16_t *num_bits, int16_t *bfi )
static MIME_ERROR readAmrWbFrame(
FILE *file,
uint8_t ToC,
uint16_t *serial,
int16_t *num_bits,
int16_t *bfi )
{
const uint8_t mode = ToC & 0x0f;
......@@ -595,12 +626,18 @@ static MIME_ERROR readAmrWbFrame( FILE *file, uint8_t ToC, uint16_t *serial, int
return MIME_NO_ERROR;
}
/*-------------------------------------------------------------------*
* MIME_ReadFrame_short()
*
* Read MIME frame to serial bitstream
*-------------------------------------------------------------------*/
MIME_ERROR MIME_ReadFrame_short( MIME_HANDLE hMIME, uint16_t *serial, int16_t *num_bits, int16_t *bfi )
MIME_ERROR MIME_ReadFrame_short(
MIME_HANDLE hMIME,
uint16_t *serial,
int16_t *num_bits,
int16_t *bfi )
{
if ( !hMIME )
{
......@@ -637,12 +674,16 @@ MIME_ERROR MIME_ReadFrame_short( MIME_HANDLE hMIME, uint16_t *serial, int16_t *n
return MIME_NO_ERROR;
}
/*-------------------------------------------------------------------*
* MIME_Reader_Close()
*
* Close MIME reader
*-------------------------------------------------------------------*/
MIME_ERROR MIME_Reader_Close( MIME_HANDLE *phMIME )
MIME_ERROR MIME_Reader_Close(
MIME_HANDLE *phMIME )
{
if ( phMIME == NULL || *phMIME == NULL )
{
......
......@@ -80,11 +80,7 @@ static unsigned char *parseByte( unsigned char *buffer, unsigned char *value )
static int readLong( FILE *file, unsigned int *value )
{
char buffer[4] = { 0 };
#ifdef CODE_IMPROVEMENTS
if ( fread( buffer, 1, 4, file ) != 1U )
#else
if ( fread( buffer, 4, 1, file ) != 1U )
#endif
{
return -1;
}
......
......@@ -54,22 +54,14 @@
#define __TWI_SUCCESS ( 0 )
#define __TWI_ERROR ( -1 )
#ifdef CODE_IMPROVEMENTS
typedef struct tinyWaveInHandle
#else
typedef struct __tinyWaveInHandle
#endif
{
FILE *theFile;
fpos_t dataChunkPos;
uint32_t position;
uint32_t length;
uint32_t bps;
#ifdef CODE_IMPROVEMENTS
} tinyWaveInHandle, WAVEFILEIN;
#else
} __tinyWaveInHandle, WAVEFILEIN;
#endif
typedef struct
{
......
......@@ -70,27 +70,15 @@
#endif
#endif
#ifdef CODE_IMPROVEMENTS
typedef struct tinyWaveOutHeader
#else
typedef struct __tinyWaveOutHeader
#endif
{
uint32_t riffType; /* 'RIFF' */
uint32_t riffSize; /* file size */
uint32_t waveType; /* 'WAVE' */
#ifdef CODE_IMPROVEMENTS
} tinyWaveOutHeader;
#else
} __tinyWaveOutHeader;
#endif
#ifdef CODE_IMPROVEMENTS
typedef struct tinyWaveOutFmtChunk
#else
typedef struct __tinyWaveOutFmtChunk
#endif
{
uint32_t formatType;
uint32_t formatSize;
......@@ -103,31 +91,15 @@ typedef struct __tinyWaveOutFmtChunk
uint16_t bitsPerSample;
/* wav fmt ext hdr here */
#ifdef CODE_IMPROVEMENTS
} tinyWaveOutFmtChunk;
#else
} __tinyWaveOutFmtChunk;
#endif
#ifdef CODE_IMPROVEMENTS
typedef struct tinyWaveOutDataChunk
#else
typedef struct tinyWaveOutDataChunk
#endif
{
uint32_t dataType;
uint32_t dataSize;
#ifdef CODE_IMPROVEMENTS
} tinyWaveOutDataChunk;
#else
} __tinyWaveOutDataChunk;
#endif
#ifdef CODE_IMPROVEMENTS
typedef struct tinyWaveOutHandle
#else
typedef struct __tinyWaveOutHandle
#endif
{
FILE *theFile;
uint32_t dataSize;
......@@ -136,11 +108,7 @@ typedef struct __tinyWaveOutHandle
uint32_t dataChunkOffset;
uint32_t bps;
uint32_t clipCount;
#ifdef CODE_IMPROVEMENTS
} tinyWaveOutHandle, WAVEFILEOUT;
#else
} __tinyWaveOutHandle, WAVEFILEOUT;
#endif
/*--- local protos --------------------------------------------------*/
static __inline uint32_t BigEndian32( char, char, char, char );
......@@ -163,15 +131,9 @@ static WAVEFILEOUT *CreateBWF(
/* ,const uint32_t writeWaveExt */ )
{
WAVEFILEOUT *self;
#ifdef CODE_IMPROVEMENTS
tinyWaveOutHeader whdr;
tinyWaveOutFmtChunk wfch;
tinyWaveOutDataChunk wdch;
#else
__tinyWaveOutHeader whdr;
__tinyWaveOutFmtChunk wfch;
__tinyWaveOutDataChunk wdch;
#endif
uint32_t blockAlignment = 0;
uint32_t ByteCnt = 0; /* Byte counter for fwrite */
......
......@@ -278,7 +278,8 @@ Options:
The decoder may read rtpdump files containing TS26.445 Annex A.2.2
EVS RTP Payload Format. The SDP parameter hf_only is required.
Reading RFC4867 AMR/AMR-WB RTP payload format is not supported.
-Tracefile TF : VoIP mode: Generate trace file named TF
-Tracefile TF : VoIP mode: Generate trace file named TF. Requires -no_delay_cmp to
be enabled so that trace contents remain in sync with audio output.
-fec_cfg_file : Optimal channel aware configuration computed by the JBM
as described in Section 6.3.1 of TS26.448. The output is
written into a .txt file. Each line contains the FER indicator
......
This diff is collapsed.
......@@ -250,14 +250,14 @@ eid-xor -fer -vbr -bs g192 -ep g192 bit ../scripts/dly_error_profiles/ep_5pct.g1
// Codec A at 13.20 kbps, 32kHz in, 32kHz out, DTX, JBM Prof 5
../IVAS_cod -dtx 13200 32 testv/stv32c.wav bit
networkSimulator_g192 ../scripts/dly_error_profiles/dly_error_profile_5.dat bit netsimoutput tracefile_sim 2 0
../IVAS_dec -Tracefile tracefile_dec -VOIP 32 netsimoutput testv/stv32c_13k20_32-32_DTX_JBM5.tst
../IVAS_dec -no_delay_cmp -Tracefile tracefile_dec -VOIP 32 netsimoutput testv/stv32c_13k20_32-32_DTX_JBM5.tst
// Codec B at 16.40 kbps, 32kHz in, 32kHz out, DTX, JBM Prof 5
../IVAS_cod -dtx 16400 32 testv/stv32c.wav bit
networkSimulator_g192 ../scripts/dly_error_profiles/dly_error_profile_5.dat bit netsimoutput tracefile_sim 2 0
../IVAS_dec -Tracefile tracefile_dec -VOIP 32 netsimoutput testv/stv32c_16k40_32-32_DTX_JBM5.tst
../IVAS_dec -no_delay_cmp -Tracefile tracefile_dec -VOIP 32 netsimoutput testv/stv32c_16k40_32-32_DTX_JBM5.tst
// Codec B at 13.20 kbps, 32kHz in, 32kHz out, JBM Prof 9, Channel aware
../IVAS_cod -rf 13200 32 testv/stv32c.wav bit
networkSimulator_g192 ../scripts/dly_error_profiles/dly_error_profile_5.dat bit netsimoutput tracefile_sim 2 0
../IVAS_dec -Tracefile tracefile_dec -VOIP 32 netsimoutput testv/stv32c_13k20_CA_32-32_JBM9.tst
../IVAS_dec -no_delay_cmp -Tracefile tracefile_dec -VOIP 32 netsimoutput testv/stv32c_13k20_CA_32-32_JBM9.tst