Commit fed917e1 authored by Gregory Pallone's avatar Gregory Pallone
Browse files

Merge branch...

Merge branch 'Float-1134-BRIR-Level-differences-between-MC-rendering-to-stereo-and-binaural' of https://forge.3gpp.org/rep/ivas-codec-pc/ivas-codec into Float-1134-BRIR-Level-differences-between-MC-rendering-to-stereo-and-binaural
parents 3eeb9282 20b05d68
Loading
Loading
Loading
Loading
Loading
+0 −10
Original line number Diff line number Diff line
@@ -60,27 +60,17 @@ inFilesPath_HOA = {
};

inFilesPath_TD = {
    {'5_1','../testv/voices_5.1.wav', 'uncorrelated'},...
    {'5_1','../testv/6_Channel_ID_48khz_pn.wav', 'uncorrelated'},...
    {'5_1','../testv/6_Channel_ID_48khz_pn_duplicated.wav', 'correlated'},...
    {'5_1', '../testv/stv51MC48c.wav', 'correlated'}, ...
};

inFilesPath_MC = {
    {'5_1','../testv/voices_5.1.wav', 'uncorrelated'},...
    {'5_1','../testv/6_Channel_ID_48khz_pn.wav', 'uncorrelated'},...
    {'7_1_4','../testv/FL_FR_C_LFE_Lss_Rss_Ls_Rs_Lv_Rv_Lvr_Rvr_714_48k.wav', 'uncorrelated'},...
    {'5_1','../testv/6_Channel_ID_48khz_pn_duplicated.wav', 'correlated'},...
    {'5_1', '../testv/stv51MC48c.wav','correlated'}, ...
    {'7_1_4', '../testv/stv714MC48c.wav','correlated'}};

%   contents with decorrelated channels 
%    {'5_1','../testv/6_Channel_ID_48khz.wav'},...
%    {'5_1','../testv/6_Channel_ID_48khz_pn_different.wav'},...
    % {'5_1','../testv/voice_LS_5.1.wav'},...
    % {'5_1','../testv/voice_L_5.1.wav'},...
    % {'5_1','../testv/voice_C_5.1.wav'},...

level_hoa2bin = zeros(size(inFilesPath_HOA,2),size(bitrates_SBA,2),2);
level_hoa2bin_bin = zeros(size(inFilesPath_HOA,2),size(bitrates_SBA,2),2);
gain_hoa2bin = zeros(size(inFilesPath_HOA,2),size(bitrates_SBA,2),2);
+0 −22
Original line number Diff line number Diff line
@@ -55,33 +55,11 @@ inFilesPath = {
    {'MONO_L','../testv/stv71MC48c_to_mono.wav','music mono'},...
    {'MONO_C','../testv/stv71MC48c_to_mono.wav','music mono'},...
    {'MONO_LS','../testv/stv71MC48c_to_mono.wav','music mono'},...
    {'MONO_L','../testv/voice_L_mono.wav','voice mono'},...
    {'MONO_C','../testv/voice_L_mono.wav','voice mono'},...
    {'MONO_LS','../testv/voice_L_mono.wav','voice mono'},...
    {'MONO_L','../testv/voice_C_mono.wav','voice mono'},...
    {'MONO_C','../testv/voice_C_mono.wav','voice mono'},...
    {'MONO_LS','../testv/voice_C_mono.wav','voice mono'},...
    {'MONO_L','../testv/voice_LS_mono.wav','voice mono'},...
    {'MONO_C','../testv/voice_LS_mono.wav','voice mono'},...
    {'MONO_LS','../testv/voice_LS_mono.wav','voice mono'},...
    {'5_1','../testv/voice_LS_5.1.wav','voice mc uncorrelated'},...
    {'5_1','../testv/voice_L_5.1.wav','voice mc uncorrelated'},...
    {'5_1','../testv/voice_C_5.1.wav','voice mc uncorrelated'},...
    {'5_1','../testv/voices_5.1.wav','voice mc uncorrelated'},...
    {'5_1','../testv/6_Channel_ID_48khz_pn.wav','pink noise mc uncorrelated'},...
    {'5_1','../testv/6_Channel_ID_48khz_pn_duplicated.wav','pink noise mc correlated'},...
    {'5_1','../testv/6_Channel_ID_48khz_pn_different.wav','pink noise mc uncorrelated'},...
    {'5_1', '../testv/6_Channel_ID_48khz_pn.wav','pink noise mc uncorrelated'}, ...
    {'5_1','../testv/6_Channel_ID_48khz.wav','voice mc uncorrelated'},...
    {'7_1_4','../testv/FL_FR_C_LFE_Lss_Rss_Ls_Rs_Lv_Rv_Lvr_Rvr_714_48k.wav','voice mc uncorrelated'},...
    {'5_1', '../testv/stv51MC48c.wav','music mc correlated'}, ...
    {'7_1_4', '../testv/stv714MC48c.wav','music mc correlated'}};

    % same content as '../testv/stv714MC48c.wav'
       % { '5_1_2', '../testv/stv512MC48c.wav'}, ...
       %  {'5_1_4', '../testv/stv514MC48c.wav'}, ...
       %  {'7_1', '../testv/stv71MC48c.wav'}, ...

%hrir  

gains_hrir_under_test = [10^(0/20) 10^(-3/20) ]; % diffuse field equalized should have a gain of -3dB 
+1 −1
Original line number Diff line number Diff line
@@ -104,7 +104,7 @@ if generateCustomBinaryFile

    %% Generate C-code tables for RENDERER_BINAURAL_FASTCONV (SD)
    disp('Processing HRIRs (SD) for FastConv renderer...');
    FastConv_SD_IR_float = SD_2_ROM(hrir_file, 5, normalize);    
    FastConv_SD_IR_float = SD_2_ROM(hrir_file, 5, normalize,hrir_gain);    
else
    disp('Processing HRIRs (FOA) for FastConv renderer...');
    FastConv_SHD_IR_FOA_float = SHD_2_ROM(hrir_file, 1, 128,3, normalize, hrir_gain);
+3 −4
Original line number Diff line number Diff line
@@ -66,9 +66,11 @@ ivas_path = ['..' filesep '..' filesep];
if generateCustomBinaryFile
    output_bin_name = 'ivas_binaural_auditorium2';
    brir_file_name = 'BRIR_Auditorium_S2_R1_All.sofa';
	brir_gain = 10^(6.5/20);
else 
    output_bin_name = 'ivas_binaural';
    brir_file_name = 'IIS_BRIR_officialMPEG_Combined.sofa';
    brir_gain = 10^(0/20);
end
brir_path = fullfile ('.','BRIRs_sofa');
%% Set output files
@@ -84,7 +86,7 @@ if ~(exist(binary_path, 'dir'))
end

%% generate crend rom  or binary values
SOFA_save_to_mat(brir_file,'Combined');
SOFA_save_to_mat(brir_file,'Combined',brir_gain);

command = ['.' filesep() 'generate_crend_ivas_tables'];

@@ -108,8 +110,6 @@ command = [command ...
                    ' 5 ' ...
                    erase(brir_file,'.sofa') '.mat ' ];

disp(command);

[status, cmdout] = system(command);
if status ~= 0
    error(cmdout)
@@ -128,7 +128,6 @@ if writeBinaryOutput == true
                    ' -input_mixerconv_brir_file_name ' binary_name ...
                    ];
    
        disp(command);
        [status, cmdout] = system(command);
        if status ~= 0
            error(cmdout)
+8 −3
Original line number Diff line number Diff line
@@ -82,10 +82,14 @@ if generateCustomBinaryFile
    %hrir_file_name = 'RIEC_hrir_subject_001.sofa'; % fail for TD renderer
   % output_bin_name = 'ivas_binaural_custom_no_optim';
    %brir_file_name = 'IIS_BRIR_officialMPEG_Combined.sofa'   
    hrir_gain = 10^(-3.0/20);
	brir_gain = 10^(10/20);
else 
    hrir_file_name = 'HRIR_128_Meth5_IRC_53_Q10_symL_Itrp1_48000.sofa';
    output_bin_name = 'ivas_binaural';
    brir_file_name = 'IIS_BRIR_officialMPEG_Combined.sofa';
    hrir_gain = 10^(-3.0/20);
	brir_gain = 10^(6.5/20);
end
hrir_path = fullfile ('.','HRIRs_sofa');
brir_path = fullfile ('.','BRIRs_sofa');
@@ -120,6 +124,7 @@ dataSpec.genBinaryFile = writeBinaryOutput;
dataSpec.makeFxFltBE = true;
dataSpec.romOutDir = rom_path;
dataSpec.romOutDir_fx = rom_path_fx;
dataSpec.hrirGain = hrir_gain;
Mod_Hrf_Itd_Main(dataSpec);

%% generate crend rom  or binary values
@@ -127,9 +132,9 @@ SOFA_save_to_mat(hrir_file);
SOFA_save_to_mat(brir_file,'Combined');

if generateCustomBinaryFile
    convert_SD2SHD_HRIRs(hrir_path,hrir_file_name,-1,normalize);
    convert_SD2SHD_HRIRs(hrir_path,hrir_file_name,-1,normalize, hrir_gain);
else
    convert_SD2SHD_HRIRs(hrir_path,hrir_file_name,128,normalize);
    convert_SD2SHD_HRIRs(hrir_path,hrir_file_name,128,normalize,hrir_gain);
end


Loading