Commit 5de4cf7f authored by malenov's avatar malenov
Browse files

fix USAN issue in GSC

parent 49573a9a
Loading
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -159,6 +159,7 @@
#define FIX_998_UNUSED_FUNCTION                         /* FhG: issue 998: delete unused funtion ivas_dirac_dec_get_response_split_order */ 
#define FIX_1009_ISM_NONDIEGETIC_PANNING                /* FhG: issue #1009: use correct object buffer for ISM1 non-diegetic pan      */
#define FIX_993_REMOVE_SBA_GET_ORDER                    /* VA: issue 993: remove unused function ivas_sba_get_order() */
#define FIX_1027_GSC_INT_OVERFLOW                    /* VA: issue 2207: overflow in GSC */

/* #################### End BE switches ################################## */

+4 −0
Original line number Diff line number Diff line
@@ -643,7 +643,11 @@ void gsc_dec(
                }
                if ( concat_out[j] < 0 )
                {
#ifdef FIX_1027_GSC_INT_OVERFLOW
                    seed_init = ( int16_t )( (int32_t) seed_init + 3 );
#else
                    seed_init += 3;
#endif
                }
            }

+4 −0
Original line number Diff line number Diff line
@@ -545,7 +545,11 @@ void gsc_enc(
            }
            if ( concat_out[j] < 0 )
            {
#ifdef FIX_1027_GSC_INT_OVERFLOW
                seed_init = ( int16_t )( (int32_t) seed_init + 3 );
#else
                seed_init += 3;
#endif
            }
        }