Commit a77ea0ca authored by vaclav's avatar vaclav
Browse files

move parameter "sba_order" from "hDecoderConfig" to "st_ivas" as it is not a...

move parameter "sba_order" from "hDecoderConfig" to "st_ivas" as it is not a parameter related to the command-line set-up
parent 1767dc6f
Loading
Loading
Loading
Loading
+4 −7
Original line number Diff line number Diff line
@@ -1978,21 +1978,18 @@ ivas_error preview_indices(

            /* Read SBA planar flag and SBA order */
            st_ivas->sba_planar = ( bit_stream[IVAS_FORMAT_SIGNALING_NBITS_SBA] == 1 );
#ifndef SBA_ORDER_BITSTREAM
            st_ivas->sba_order = ( bit_stream[IVAS_FORMAT_SIGNALING_NBITS_SBA + 2] == 1 );
            st_ivas->sba_order += 2 * ( bit_stream[IVAS_FORMAT_SIGNALING_NBITS_SBA + 1] == 1 );
#else
            st_ivas->hDecoderConfig->sba_order = ( bit_stream[IVAS_FORMAT_SIGNALING_NBITS_SBA + 2] == 1 );
            st_ivas->hDecoderConfig->sba_order += 2 * ( bit_stream[IVAS_FORMAT_SIGNALING_NBITS_SBA + 1] == 1 );
            st_ivas->sba_analysis_order = st_ivas->hDecoderConfig->sba_order;
#endif
#ifdef SBA_ORDER_BITSTREAM
            /*Hard coding the sba_order as 1 as higher not supported below SBA_MIN_BRATE_HOA bitrate*/

            st_ivas->sba_analysis_order = st_ivas->sba_order;            
            if ( total_brate < SBA_MIN_BRATE_HOA )
            {
                /* Hard coding the sba_analysis_order as 1 as higher not supported below SBA_MIN_BRATE_HOA bitrate */
                st_ivas->sba_analysis_order = 1;
            }
#endif

#ifdef SBA_ORDER_BITSTREAM
            ivas_sba_config( total_brate, st_ivas->sba_analysis_order, -1, &( st_ivas->nchan_transport ), st_ivas->sba_planar, &( st_ivas->nSCE ), &( st_ivas->nCPE ), &( st_ivas->element_mode_init ), st_ivas->sba_mode );
#else
+5 −6
Original line number Diff line number Diff line
@@ -119,19 +119,18 @@ ivas_error ivas_dec_setup(
            num_bits_read += SBA_PLANAR_BITS;

            /* read Ambisonic (SBA) order */
#ifndef SBA_ORDER_BITSTREAM
            st_ivas->sba_order = st_ivas->bit_stream[num_bits_read + 1];
            st_ivas->sba_order += 2 * st_ivas->bit_stream[num_bits_read];
#else
            st_ivas->hDecoderConfig->sba_order = st_ivas->bit_stream[num_bits_read + 1];
            st_ivas->hDecoderConfig->sba_order += 2 * st_ivas->bit_stream[num_bits_read];
            st_ivas->sba_analysis_order = st_ivas->hDecoderConfig->sba_order;

#ifdef SBA_ORDER_BITSTREAM
            st_ivas->sba_analysis_order = st_ivas->sba_order;
            if ( ivas_total_brate < SBA_MIN_BRATE_HOA )
            {
                /* Hard coding the sba_analysis_order as 1 as higher not supported below SBA_MIN_BRATE_HOA bitrate */
                st_ivas->sba_analysis_order = 1;
            }
#endif

            num_bits_read += SBA_ORDER_BITS;
            if ( st_ivas->ini_frame > 0 && ivas_total_brate != st_ivas->hDecoderConfig->last_ivas_total_brate && ivas_total_brate > IVAS_SID_4k4 )
            {
+2 −6
Original line number Diff line number Diff line
@@ -1908,9 +1908,6 @@ typedef struct decoder_config_structure
    int32_t output_Fs;             /* output signal sampling frequency in Hz */
    int16_t nchan_out;             /* number of output audio channels */
    AUDIO_CONFIG output_config;    /* output audio configuration */
#ifdef SBA_ORDER_BITSTREAM
    int16_t sba_order;
#endif
    int16_t Opt_LsCustom;         /* indicates whether loudspeaker custom setup is used */
    int16_t Opt_HRTF_binary;      /* indicates whether HRTF binary file is used */
    int16_t Opt_Headrotation;     /* indicates whether head-rotation is used */
@@ -1984,10 +1981,9 @@ typedef struct Decoder_Struct
    SBA_MODE sba_mode;                                      /* SBA format mode */
    MC_MODE mc_mode;                                        /* MC format mode */
#ifdef SBA_ORDER_BITSTREAM
    int16_t sba_analysis_order;                                      /* Ambisonic (SBA) order */
#else
    int16_t sba_order;                                      /* Ambisonic (SBA) order */
    int16_t sba_analysis_order;                             /* Ambisonic (SBA) order used for analysis and coding */
#endif
    int16_t sba_order;                                      /* Ambisonic (SBA) order */
    int16_t sba_planar;                                     /* Ambisonic (SBA) planar flag */
    int16_t sba_dirac_stereo_flag;                          /* flag indicating stereo output for SBA DirAC modes with 1 TC */

+1 −1
Original line number Diff line number Diff line
@@ -1043,7 +1043,7 @@ typedef struct
    /* high-level encoder parameters */
    int16_t nchan_transport;                           /* number of transport channels */
#ifdef SBA_ORDER_BITSTREAM
    int16_t sba_analysis_order;                                   /*Ambisonic(SBA) order*/
    int16_t sba_analysis_order;                        /* Ambisonic (SBA) order used for analysis and coding */
#endif
    int16_t codec_mode;                                /* Mode1 or Mode2 of core codec */
    int16_t last_codec_mode;                           /* previous frame Mode 1 or 2 */