Commit ab5fb1cf authored by vaclav's avatar vaclav
Browse files

address reviewer's comments

parent f9a640fd
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -429,7 +429,7 @@ int main(

    if ( ( error = IVAS_DEC_GetRenderNumSubfr( hIvasDec, &arg.render_num_subframes ) ) != IVAS_ERR_OK )
    {
        fprintf( stderr, "\nConfigure failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) );
        fprintf( stderr, "\nIVAS_DEC_GetRenderNumSubfr failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) );
        goto cleanup;
    }

@@ -453,7 +453,7 @@ int main(

        if ( ( error = IVAS_DEC_GetRenderNumSubfr( hIvasDec, &arg.render_num_subframes ) ) != IVAS_ERR_OK )
        {
            fprintf( stderr, "\nConfigure failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) );
            fprintf( stderr, "\nIVAS_DEC_GetRenderNumSubfr failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) );
            goto cleanup;
        }

@@ -2164,7 +2164,7 @@ static ivas_error decodeG192(
        IVAS_RENDER_NUM_SUBFR num_subframes;
        if ( ( error = IVAS_DEC_GetRenderNumSubfr( hIvasDec, &num_subframes ) ) != IVAS_ERR_OK )
        {
            fprintf( stderr, "\nIVAS_DEC_GetRenderNumSubfr failed: \n" );
            fprintf( stderr, "\nIVAS_DEC_GetRenderNumSubfr failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) );
            goto cleanup;
        }

@@ -2995,7 +2995,7 @@ static ivas_error decodeVoIP(
        IVAS_RENDER_NUM_SUBFR num_subframes;
        if ( ( error = IVAS_DEC_GetRenderNumSubfr( hIvasDec, &num_subframes ) ) != IVAS_ERR_OK )
        {
            fprintf( stderr, "\nIVAS_DEC_GetRenderNumSubfr failed: \n" );
            fprintf( stderr, "\nIVAS_DEC_GetRenderNumSubfr failed: %s\n", IVAS_DEC_GetErrorMessage( error ) );
            goto cleanup;
        }

@@ -3998,7 +3998,7 @@ static ivas_error restartDecoder(

    if ( ( error = IVAS_DEC_GetRenderNumSubfr( hIvasDec, &arg->render_num_subframes ) ) != IVAS_ERR_OK )
    {
        fprintf( stderr, "\nConfigure failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) );
        fprintf( stderr, "\nIVAS_DEC_GetRenderNumSubfr failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) );
        goto cleanup;
    }

+3 −3
Original line number Diff line number Diff line
@@ -116,7 +116,7 @@ static ivas_error ivas_dec_reconfig_split_rend( Decoder_Struct *st_ivas );
static ivas_error ivas_dec_init_split_rend( Decoder_Struct *st_ivas );
static ivas_error ivas_create_handle_isar( ISAR_DEC_SPLIT_REND_WRAPPER_HANDLE *hSplitBinRend_out );
static void ivas_destroy_handle_isar( ISAR_DEC_SPLIT_REND_WRAPPER_HANDLE *hSplitBinRend_out );
static Word16 get_render_frame_size_ms( IVAS_RENDER_NUM_SUBFR render_num_subframes );
static Word16 get_render_frame_size_ms( const IVAS_RENDER_NUM_SUBFR render_num_subframes );
static Word16 get_render_frame_size_samples( const DECODER_CONFIG_HANDLE hDecoderConfig );
static Word16 ivas_dec_split_rend_cldfb_in( const RENDERER_TYPE renderer_type );
static void update_voip_rendered20ms( IVAS_DEC_HANDLE hIvasDec, const Word16 nSamplesRendered );
@@ -702,7 +702,7 @@ ivas_error IVAS_DEC_EnableSplitRendering(

/*! r: render framesize in ms  */
static Word16 get_render_frame_size_ms(
    IVAS_RENDER_NUM_SUBFR render_num_subframes )
    const IVAS_RENDER_NUM_SUBFR render_num_subframes )
{
    return (int16_t) ( render_num_subframes * ( 1000 / ( FRAMES_PER_SEC * IVAS_MAX_PARAM_SPATIAL_SUBFRAMES ) ) );
}
@@ -806,7 +806,7 @@ static Word16 get_render_frame_size_samples(


/*---------------------------------------------------------------------*
 * IVAS_DEC_GetGetRenderFramesizeSamples( )
 * IVAS_DEC_GetRenderFramesizeSamples( )
 *
 * Get render framesize in samples
 *---------------------------------------------------------------------*/
+9 −8
Original line number Diff line number Diff line
@@ -51,8 +51,8 @@
 *------------------------------------------------------------------------*/

ivas_error ISAR_PRE_REND_open(
    SPLIT_REND_WRAPPER *hSplitRendWrapper,            /* i/o: Split renderer pre-renerer handle               */
    ISAR_SPLIT_REND_CONFIG_DATA *pSplitRendConfig,    /* i/o: Split renderer pre-renerer config               */
    SPLIT_REND_WRAPPER *hSplitRendWrapper,            /* i/o: Split renderer pre-renderer handle              */
    ISAR_SPLIT_REND_CONFIG_DATA *pSplitRendConfig,    /* i/o: Split renderer pre-renderer config              */
    const Word32 OutSampleRate,                       /* i  : output sampling rate                            */
    const Word16 cldfb_in_flag,                       /* i  : Flag to indicate CLDFB or time doamin input     */
    const Word16 pcm_out_flag,                        /* i  : Flag to indicate PCM output                     */
@@ -179,7 +179,7 @@ ivas_error ISAR_PRE_REND_open(
 *------------------------------------------------------------------------*/

void ISAR_PRE_REND_close(
    SPLIT_REND_WRAPPER *hSplitBinRend,         /* i/o: Split renderer pre-renerer handle    */
    SPLIT_REND_WRAPPER *hSplitBinRend,         /* i/o: Split renderer pre-renderer handle   */
    IVAS_REND_AudioBuffer *pSplitRendEncBuffer /* i/o: Split renderer data buffer           */
)
{
@@ -259,7 +259,7 @@ void ISAR_PRE_REND_close(
 *-------------------------------------------------------------------------*/

void ISAR_PRE_REND_GetMultiBinPoseData(
    const ISAR_SPLIT_REND_CONFIG_DATA *pSplit_rend_config, /* i  : Split renderer pre-renerer config    */
    const ISAR_SPLIT_REND_CONFIG_DATA *pSplit_rend_config, /* i  : Split renderer pre-renderer config   */
    MULTI_BIN_REND_POSE_DATA *pMultiBinPoseData,           /* i/o: pose correction data handle          */
    const ISAR_SPLIT_REND_ROT_AXIS rot_axis                /* i  : Rotation axis                        */
)
@@ -277,13 +277,13 @@ void ISAR_PRE_REND_GetMultiBinPoseData(
 *------------------------------------------------------------------------*/

ivas_error ISAR_PRE_REND_MultiBinToSplitBinaural(
    SPLIT_REND_WRAPPER *hSplitBin,                   /* i/o: Split renderer pre-renerer handle            */
    SPLIT_REND_WRAPPER *hSplitBin,                   /* i/o: Split renderer pre-renderer handle           */
    const IVAS_QUATERNION headPosition,              /* i  : head rotation QUATERNION                     */
    const Word32 SplitRendBitRate,                   /* i  : Split renderer bitrate                       */
    ISAR_SPLIT_REND_CODEC splitCodec,                /* i/o: Split renderer codec                         */
    const Word16 isar_frame_size_ms,                 /* i  : ISAR framesize                               */
    Word16 codec_frame_size_ms,                      /* i/o: ISAR transport codec framesize               */
    ISAR_SPLIT_REND_BITS_HANDLE pBits,               /* i/o: Split renderer bitstream handle              */
    ISAR_SPLIT_REND_BITS_HANDLE pBits,               /* i/o: ISAR bits handle                             */
    Word32 *Cldfb_In_BinReal_fx[][CLDFB_NO_COL_MAX], /* i/o: CLDFB real buffer                            */
    Word32 *Cldfb_In_BinImag_fx[][CLDFB_NO_COL_MAX], /* i/o: CLDFB imag buffer                            */
    const Word16 max_bands,                          /* i  : CLDFB bands                                  */
@@ -292,16 +292,17 @@ ivas_error ISAR_PRE_REND_MultiBinToSplitBinaural(
    const Word16 cldfb_in_flag,                      /* i  : Flag to indicate CLDFB or time domain input  */
    const Word16 pcm_out_flag,                       /* i  : Flag to indicate PCM output                  */
    const Word16 ro_md_flag,                         /* i  : Flag to indicate real only metadata for yaw  */
    Word16 Q_buff,
    const Word16 Q_buff,
    Word16 *Q_out )
{
    ivas_error error;
    Word32 bit_len, target_md_bits, available_bits, tmp_32;
    Word16 q1 = 31, q2 = 31, q_final, Q_cldfb, tmp, tmp_e;
    Word16 i, j;
    error = IVAS_ERR_OK;
    Word16 Q_buff_re, Q_buff_im;

    error = IVAS_ERR_OK;
    move16();
    push_wmops( "ISAR_PRE_REND_MultiBinToSplitBinaural" );

    Q_buff_re = Q_buff;
+20 −20
Original line number Diff line number Diff line
@@ -42,8 +42,8 @@
 *----------------------------------------------------------------------------------*/

ivas_error ISAR_PRE_REND_open(
    SPLIT_REND_WRAPPER *hSplitBinRend,                      /* i/o: Split renderer pre-renerer handle               */
    ISAR_SPLIT_REND_CONFIG_DATA *pSplitRendConfig,          /* i/o: Split renderer pre-renerer config               */
    SPLIT_REND_WRAPPER *hSplitBinRend,                      /* i/o: Split renderer pre-renderer handle              */
    ISAR_SPLIT_REND_CONFIG_DATA *pSplitRendConfig,          /* i/o: Split renderer pre-renderer config              */
    const Word32 output_Fs,                                 /* i  : output sampling rate                            */
    const Word16 cldfb_in_flag,                             /* i  : Flag to indicate CLDFB or time doamin input     */
    const Word16 pcm_out_flag,                              /* i  : Flag to indicate PCM output                     */
@@ -52,24 +52,24 @@ ivas_error ISAR_PRE_REND_open(
);

void ISAR_PRE_REND_close(
    SPLIT_REND_WRAPPER *hSplitBinRend,                      /* i/o: Split renderer pre-renerer handle               */
    SPLIT_REND_WRAPPER *hSplitBinRend,                      /* i/o: Split renderer pre-renderer handle              */
    IVAS_REND_AudioBuffer *pSplitRendEncBuffer              /* i/o: Split renderer data buffer                      */
);

void ISAR_PRE_REND_GetMultiBinPoseData(
    const ISAR_SPLIT_REND_CONFIG_DATA *pSplit_rend_config,  /* i  : Split renderer pre-renerer config               */
    const ISAR_SPLIT_REND_CONFIG_DATA *pSplit_rend_config,  /* i  : Split renderer pre-renderer config              */
    MULTI_BIN_REND_POSE_DATA *pMultiBinPoseData,            /* i/o: pose correction data handle                     */
    const ISAR_SPLIT_REND_ROT_AXIS rot_axis                 /* i  : Rotation axis                                   */
);

ivas_error ISAR_PRE_REND_MultiBinToSplitBinaural(
    SPLIT_REND_WRAPPER *hSplitBin,                                         /* i/o: Split renderer pre-renerer handle            */
    SPLIT_REND_WRAPPER *hSplitBin,                          /* i/o: Split renderer pre-renderer handle           */
    const IVAS_QUATERNION headPosition,                     /* i  : head rotation QUATERNION                     */
    const Word32 SplitRendBitRate,                          /* i  : Split renderer bitrate                       */
    ISAR_SPLIT_REND_CODEC splitCodec,                       /* i/o: Split renderer codec                         */
    const Word16 isar_frame_size_ms,                        /* i  : ISAR framesize                               */
    Word16 codec_frame_size_ms,                             /* i/o: Split renderer codec framesize               */
    ISAR_SPLIT_REND_BITS_HANDLE pBits,                                     /* i/o: Split renderer bitstream handle              */
    ISAR_SPLIT_REND_BITS_HANDLE pBits,                      /* i/o: ISAR bits handle                             */
    Word32* Cldfb_In_BinReal_fx[][CLDFB_NO_COL_MAX],        /* i/o: CLDFB real buffer                            */
    Word32* Cldfb_In_BinImag_fx[][CLDFB_NO_COL_MAX],        /* i/o: CLDFB imag buffer                            */
    const Word16 max_bands,                                 /* i  : CLDFB bands                                  */
@@ -78,7 +78,7 @@ ivas_error ISAR_PRE_REND_MultiBinToSplitBinaural(
    const Word16 cldfb_in_flag,                             /* i  : Flag to indicate CLDFB or time doamin input  */
    const Word16 pcm_out_flag,                              /* i  : Flag to indicate PCM output                  */
    const Word16 ro_md_flag,                                /* i  : Flag to indicate real only metadata for yaw  */
    Word16 Q_buff,
    const Word16 Q_buff,
    Word16 *Q_out 
);

+1 −1
Original line number Diff line number Diff line
@@ -11404,7 +11404,7 @@ static ivas_error printConfigInfo_rend(
        EQ_16( hIvasRend->outputConfig, IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED ) ||
        EQ_16( hIvasRend->outputConfig, IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) )
    {
        fprintf( stdout, "Render framesize:       %dms\n", i_mult( hIvasRend->num_subframes, 5 ) );
        fprintf( stdout, "Render framesize:       %dms\n", i_mult( hIvasRend->num_subframes, BINAURAL_RENDERING_FRAME_SIZE_MS ) );
    }

    return IVAS_ERR_OK;