Commit 6e2b1c2c authored by Dominik Weckbecker's avatar Dominik Weckbecker 💬
Browse files

implement mono signaling via the sba_order bits under...

implement mono signaling via the sba_order bits under FIX_527_SBA_MONO_INPUT_ORDER_BIT, currently disabled
parent 5a84a44a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -74,7 +74,7 @@ ivas_error ivas_qmetadata_open(
    ( *hQMetaData )->surcoh_band_data = NULL;
    ( *hQMetaData )->bandMap = NULL;

#ifdef FIX_527_MONO_HEURISTICS
#if defined( FIX_527_MONO_HEURISTICS ) || defined(FIX_527_SBA_MONO_INPUT_ORDER_BIT)
    ( *hQMetaData )->dirac_mono_flag = 0;
#endif

+2 −0
Original line number Diff line number Diff line
@@ -162,6 +162,8 @@
#define FIX_527_SBA_MONO_INPUT                          /* FhG: fix issue 527, artifacts in mono signals coded in SBA mode */
/*#define FIX_527_MONO_HEURISTICS*/

/*#define FIX_527_SBA_MONO_INPUT_ORDER_BIT*/

/* ################## End DEVELOPMENT switches ######################### */
/* clang-format on */

+2 −2
Original line number Diff line number Diff line
@@ -1672,7 +1672,7 @@ void ivas_dirac_dec_read_BS(
        b = st->bit_stream[( st->next_bit_pos )--];
        ( *nb_bits )++;

#if defined( FIX_527_SBA_MONO_INPUT ) && !defined( FIX_527_MONO_HEURISTICS )
#if defined( FIX_527_SBA_MONO_INPUT ) && !defined( FIX_527_MONO_HEURISTICS ) && !defined( FIX_527_SBA_MONO_INPUT_ORDER_BIT )
        hQMetaData->dirac_mono_flag = st->bit_stream[( st->next_bit_pos )--];
        ( *nb_bits )++;
#endif
@@ -1746,7 +1746,7 @@ void ivas_dirac_dec_read_BS(
        b = st->bit_stream[( st->next_bit_pos )--];
        ( *nb_bits )++;

#if defined( FIX_527_SBA_MONO_INPUT ) && !defined( FIX_527_MONO_HEURISTICS )
#if defined( FIX_527_SBA_MONO_INPUT ) && !defined( FIX_527_MONO_HEURISTICS )  && !defined( FIX_527_SBA_MONO_INPUT_ORDER_BIT )
        hQMetaData->dirac_mono_flag = st->bit_stream[( st->next_bit_pos )--];
        ( *nb_bits )++;
#endif
+23 −3
Original line number Diff line number Diff line
@@ -129,6 +129,26 @@ ivas_error ivas_dec_setup(
            st_ivas->sba_order = st_ivas->bit_stream[num_bits_read + 1];
            st_ivas->sba_order += 2 * st_ivas->bit_stream[num_bits_read];

#ifdef FIX_527_SBA_MONO_INPUT_ORDER_BIT
            if ( st_ivas->hQMetaData != NULL )
            {
                st_ivas->hQMetaData->dirac_mono_flag = 0;
                if ( st_ivas->sba_order == 0 )
                {
                    st_ivas->hQMetaData->dirac_mono_flag = 1;
                    st_ivas->sba_order = st_ivas->sba_order_nonmono;
                }
                else
                {
                    st_ivas->sba_order_nonmono = st_ivas->sba_order;
                }
            }
            else
            {
                st_ivas->sba_order_nonmono = st_ivas->sba_order;
            }
#endif

            /* 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 );

+4 −0
Original line number Diff line number Diff line
@@ -1320,6 +1320,10 @@ typedef struct Decoder_Struct
    int16_t ism_extmeta_active;                                /* Extended metadata active in decoder */
    int16_t ism_extmeta_cnt;                                   /* Change frame counter for extended metadata */

#ifdef FIX_527_SBA_MONO_INPUT_ORDER_BIT
	int16_t sba_order_nonmono;
#endif

} Decoder_Struct;

/* clang-format on */
Loading