Commit c872fd0a authored by Dominik Weckbecker's avatar Dominik Weckbecker 💬
Browse files

move OSBA method decission to the new function ivas_osba_ism_mode_select

parent 7c293a90
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -275,6 +275,7 @@
    <ClCompile Include="..\lib_com\window.c" />
    <ClCompile Include="..\lib_com\window_ola.c" />
    <ClCompile Include="..\lib_com\wtda.c" />
    <ClCompile Include="ivas_osba_com.c" />
  </ItemGroup>
  <ItemGroup>
    <ClInclude Include="..\lib_com\basop32.h" />
+3 −0
Original line number Diff line number Diff line
@@ -469,6 +469,9 @@
    <ClCompile Include="..\lib_com\ivas_lfe_com.c">
      <Filter>common_ivas_c</Filter>
    </ClCompile>
    <ClCompile Include="ivas_osba_com.c">
      <Filter>common_ivas_c</Filter>
    </ClCompile>
  </ItemGroup>
  <ItemGroup>
    <ClInclude Include="..\lib_com\basop_proto_func.h">
+1 −3
Original line number Diff line number Diff line
@@ -363,9 +363,7 @@ typedef enum
#define ISM_DTX_ELE_BITS_LOW                    5
#define ISM_Q_STEP_LOW                          (ISM_Q_STEP * 2)
#define ISM_Q_STEP_BORDER_LOW                   (ISM_Q_STEP_BORDER * 2)
#ifdef NONBE_FIX_ISM_XOVER_BR
#define IVAS_OSBA_DISCRETE_ISM_MIN_BR           IVAS_256k
#endif

/* ISM modes */
typedef enum 
{
+8 −1
Original line number Diff line number Diff line
@@ -3018,6 +3018,10 @@ void ivas_mct_core_enc(
    const int16_t switch_bw,                                    /* i  : flag bandwidth switch occurance         */
    const int16_t lfe_bits,                                     /* i  : bits spent for LFE                      */
    const int16_t sba_order                                     /* i  : Ambisonic (SBA) order                   */
#ifdef NONBE_FIX_ISM_XOVER_BR
    ,
    const int16_t nchan_ism                                     /* i  : number of input ISM's           */
#endif
);

void ivas_mdct_quant_coder(
@@ -5619,7 +5623,10 @@ void ivas_osba_data_close(
    SBA_ISM_DATA_HANDLE *hSbaIsmData                            /* i/o: OSBA rendering handle                   */
);


int16_t ivas_osba_ism_mode_select(
    const int32_t ivas_total_brate,                             /* i  : IVAS total bitrate      */
    const int16_t nchan_ism                                     /* i  : number of input ISM's   */
);
/*----------------------------------------------------------------------------------*
* OMASA prototypes
*---------------------------------------------------------------------------------*/
+3 −3
Original line number Diff line number Diff line
@@ -469,7 +469,7 @@ ivas_error ivas_dec_setup(
            st_ivas->nchan_ism = 2 * st_ivas->bit_stream[ivas_total_brate / FRAMES_PER_SEC - 1] + st_ivas->bit_stream[ivas_total_brate / FRAMES_PER_SEC - 2] + 1;

#ifdef NONBE_FIX_ISM_XOVER_BR
            if ( ivas_total_brate < IVAS_24k4 || ivas_total_brate >= IVAS_OSBA_DISCRETE_ISM_MIN_BR )
            if ( ivas_total_brate < IVAS_24k4 || ivas_osba_ism_mode_select(ivas_total_brate,st_ivas->nchan_ism) )
#else
            if ( ivas_total_brate < IVAS_24k4 || ivas_total_brate >= IVAS_256k )
#endif
@@ -485,7 +485,7 @@ ivas_error ivas_dec_setup(

            /* read Ambisonic (SBA) order */
#ifdef NONBE_FIX_ISM_XOVER_BR
            if ( ivas_total_brate < IVAS_OSBA_DISCRETE_ISM_MIN_BR )
            if ( !ivas_osba_ism_mode_select( ivas_total_brate, st_ivas->nchan_ism ) )
#else
            if ( ivas_total_brate < IVAS_256k )
#endif
@@ -527,7 +527,7 @@ ivas_error ivas_dec_setup(
                }
            }
#ifdef NONBE_FIX_ISM_XOVER_BR
            if ( ivas_total_brate >= IVAS_OSBA_DISCRETE_ISM_MIN_BR )
            if ( ivas_osba_ism_mode_select(ivas_total_brate,st_ivas->nchan_ism) )
#else
            if ( ivas_total_brate >= IVAS_256k )
#endif
Loading