Commit 163ff341 authored by emerit's avatar emerit
Browse files

return error if non_diegetic_pan and output not stereo, binaural

parent 8c42a212
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -145,6 +145,8 @@
#define FIX_CRASH_EVS_BITSTREAM_WITH_OUTPUT
#define ISM_NON_DIEGETIC_PAN_AS_EXTENDED
#define ISM_NON_DIEGETIC_PAN
//#define                    ISM_NON_DIEGETIC_PAN_EROOR_ON_WRONG_OUTPUT_FORMAT


#define FIX_CLANG_WARNING

+7 −0
Original line number Diff line number Diff line
@@ -163,6 +163,13 @@ ivas_error ivas_dec(
            }
        }

#ifdef ISM_NON_DIEGETIC_PAN_EROOR_ON_WRONG_OUTPUT_FORMAT
        if ( ( st_ivas->ism_extmeta_active & 0x2 ) && ( st_ivas->ism_mode != ISM_MODE_ISM || ( st_ivas->hDecoderConfig->output_config != AUDIO_CONFIG_BINAURAL && st_ivas->hDecoderConfig->output_config != AUDIO_CONFIG_BINAURAL_ROOM && st_ivas->hDecoderConfig->output_config != AUDIO_CONFIG_STEREO ) ) ) /* non diegetic input stream but unsupported output format*/
        {
            return IVAS_ERR_INVALID_OUTPUT_FORMAT;
        }
#endif

        for ( n = 0; n < st_ivas->nchan_transport; n++ )
        {
            if ( ( error = ivas_sce_dec( st_ivas, n, &output[n], output_frame, nb_bits_metadata[n] ) ) != IVAS_ERR_OK )