Commit a8112f43 authored by vaclav's avatar vaclav
Browse files

formatting

parent 75c605d8
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -4133,7 +4133,7 @@ void ivas_spar_config(
    const int16_t sid_format                                    /* i  : IVAS format indicator from SID frame    */
);

void ivas_sba_upmixer_renderer(
ivas_error ivas_sba_upmixer_renderer(
    Decoder_Struct *st_ivas,                                    /* i/o: IVAS decoder struct                     */
    float output[][L_FRAME48k],                                 /* i/o: transport/output audio channels         */
    const int16_t output_frame                                  /* i  : output frame length                     */
@@ -5771,7 +5771,7 @@ ivas_error ivas_osba_ism_metadata_dec(
    int16_t nb_bits_metadata[]                                  /* o  : number of ISM metadata bits             */
);

void ivas_osba_render(
ivas_error ivas_osba_render(
    Decoder_Struct *st_ivas,                                    /* i/o: IVAS decoder structure                      */
    float output_f[][L_FRAME48k],                               /* i/o: core-coder transport channels/object output */
    const int16_t output_frame                                  /* i  : output frame length per channel             */
+18 −6
Original line number Diff line number Diff line
@@ -555,7 +555,10 @@ ivas_error ivas_dec(
        }
        else if ( !st_ivas->sba_dirac_stereo_flag && nchan_out != 1 )
        {
            ivas_sba_upmixer_renderer( st_ivas, output, output_frame ); /* Note: ivas_sba_linear_renderer() or ivas_dirac_dec() are called internally */
            if ( ( error = ivas_sba_upmixer_renderer( st_ivas, output, output_frame ) ) != IVAS_ERR_OK ) /* Note: ivas_sba_linear_renderer() or ivas_dirac_dec() are called internally */
            {
                return error;
            }
        }
    }
#ifdef MASA_AND_OBJECTS
@@ -782,8 +785,8 @@ ivas_error ivas_dec(
        if ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM )
        {
#ifdef VLBR_20MS_MD
            num_md_sub_frames = ivas_get_spar_dec_md_num_subframes( st_ivas->sba_analysis_order, st_ivas->hDecoderConfig->ivas_total_brate,
                                                                    st_ivas->last_active_ivas_total_brate );
            num_md_sub_frames = ivas_get_spar_dec_md_num_subframes( st_ivas->sba_analysis_order, st_ivas->hDecoderConfig->ivas_total_brate, st_ivas->last_active_ivas_total_brate );

            ivas_sba_mix_matrix_determiner( st_ivas->hSpar, &output[sba_ch_idx], st_ivas->bfi, nchan_remapped, output_frame, num_md_sub_frames );
#else
            ivas_sba_mix_matrix_determiner( st_ivas->hSpar, output, st_ivas->bfi, nchan_remapped, output_frame );
@@ -861,11 +864,17 @@ ivas_error ivas_dec(
        }
        else if ( st_ivas->renderer_type == RENDERER_OSBA_AMBI || st_ivas->renderer_type == RENDERER_OSBA_LS )
        {
            ivas_osba_render( st_ivas, output, output_frame );
            if ( ( error = ivas_osba_render( st_ivas, output, output_frame ) ) != IVAS_ERR_OK )
            {
                return error;
            }
        }
        else if ( st_ivas->hDecoderConfig->output_config != AUDIO_CONFIG_EXTERNAL && !st_ivas->sba_dirac_stereo_flag && nchan_out != 1 )
        {
            ivas_sba_upmixer_renderer( st_ivas, output, output_frame ); /* Note: ivas_sba_linear_renderer() or ivas_dirac_dec() are called internally */
            if ( ( error = ivas_sba_upmixer_renderer( st_ivas, output, output_frame ) ) != IVAS_ERR_OK )
            {
                return error;
            }
        }
        else if ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_EXTERNAL ) /*EXT output = individual objects + HOA3*/
        {
@@ -877,7 +886,10 @@ ivas_error ivas_dec(
                }
            }

            ivas_sba_upmixer_renderer( st_ivas, &output[sba_ch_idx], output_frame );
            if ( ( error = ivas_sba_upmixer_renderer( st_ivas, &output[sba_ch_idx], output_frame ) ) != IVAS_ERR_OK )
            {
                return error;
            }

            if ( st_ivas->ism_mode == ISM_MODE_NONE )
            {
+4 −1
Original line number Diff line number Diff line
@@ -445,7 +445,6 @@ ivas_error ivas_dec_setup(
                st_ivas->sba_order = 3;
            }


            /* set Ambisonic (SBA) order used for analysis and coding */
            st_ivas->sba_analysis_order = ivas_sba_get_analysis_order( ivas_total_brate, st_ivas->sba_order );

@@ -474,6 +473,7 @@ ivas_error ivas_dec_setup(
                st_ivas->nCPE += ( st_ivas->nchan_ism + 1 ) >> 1;
            }
#endif

            if ( ivas_total_brate >= IVAS_256k )
            {
                st_ivas->ism_mode = ISM_SBA_MODE_DISC;
@@ -757,6 +757,7 @@ static ivas_error ivas_read_format(
#ifdef SBA_AND_OBJECTS
                    /* read Ambisonic (SBA) planar flag */
                    st_ivas->sba_planar = st_ivas->bit_stream[( *num_bits_read ) + 1];

                    /* read Ambisonic (SBA) order */
                    st_ivas->sba_order = st_ivas->bit_stream[( *num_bits_read ) + 2 + SBA_PLANAR_BITS];
                    st_ivas->sba_order += 2 * st_ivas->bit_stream[( *num_bits_read ) + 1 + SBA_PLANAR_BITS];
@@ -2094,6 +2095,7 @@ ivas_error ivas_init_decoder(
            return error;
        }
    }

#ifdef SBA_AND_OBJECTS
    if ( st_ivas->ivas_format == SBA_ISM_FORMAT )
    {
@@ -2772,6 +2774,7 @@ void ivas_init_dec_get_num_cldfb_instances(
            {
                *numCldfbAnalyses = st_ivas->nchan_transport + 1;
            }

#ifdef SBA_AND_OBJECTS
            if ( ivas_format == SBA_ISM_FORMAT )
            {
+1 −0
Original line number Diff line number Diff line
@@ -100,6 +100,7 @@ void ivas_mono_downmix_render_passive(
        numInputChannels = st_ivas->nchan_ism;
    }
#endif

#ifdef MASA_AND_OBJECTS
    if ( st_ivas->ivas_format == MASA_ISM_FORMAT )
    {
+11 −4
Original line number Diff line number Diff line
@@ -177,7 +177,10 @@ ivas_error ivas_osba_dirac_td_binaural(

    if ( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV )
    {
        ivas_sba_upmixer_renderer( st_ivas, &output[channel_offset], output_frame );
        if ( ( error = ivas_sba_upmixer_renderer( st_ivas, &output[channel_offset], output_frame ) ) != IVAS_ERR_OK )
        {
            return error;
        }
    }
    else
    {
@@ -296,7 +299,7 @@ ivas_error ivas_osba_ism_metadata_dec(
 * Object + SBA rendering process.
 *-------------------------------------------------------------------------*/

void ivas_osba_render(
ivas_error ivas_osba_render(
    Decoder_Struct *st_ivas,      /* i/o: IVAS decoder structure                      */
    float output_f[][L_FRAME48k], /* i/o: core-coder transport channels/object output */
    const int16_t output_frame    /* i  : output frame length per channel             */
@@ -305,6 +308,7 @@ void ivas_osba_render(
    float tmp_ism_out[MAX_OUTPUT_CHANNELS][L_FRAME48k];
    float *p_tmp_ism_out[MAX_OUTPUT_CHANNELS];
    int16_t n, nchan_out, nchan_ism, sba_ch_idx;
    ivas_error error;

    nchan_out = st_ivas->hDecoderConfig->nchan_out;
    nchan_ism = st_ivas->nchan_ism;
@@ -340,7 +344,10 @@ void ivas_osba_render(
        }
    }

    ivas_sba_upmixer_renderer( st_ivas, &output_f[sba_ch_idx], output_frame );
    if ( ( error = ivas_sba_upmixer_renderer( st_ivas, &output_f[sba_ch_idx], output_frame ) ) != IVAS_ERR_OK )
    {
        return error;
    }

    if ( st_ivas->ism_mode == ISM_SBA_MODE_DISC )
    {
@@ -351,6 +358,6 @@ void ivas_osba_render(
        }
    }

    return;
    return IVAS_ERR_OK;
}
#endif
Loading