Commit f4d9f8bc authored by Archit Tamarapu's avatar Archit Tamarapu
Browse files

Merge branch 'hrtf_float_tables_fx_file_format' of...

Merge branch 'hrtf_float_tables_fx_file_format' of forge.3gpp.org:ivas-codec-pc/ivas-codec into 1146-optimize-fastconv-hrtf-struct
parents 7da995a4 913b5025
Loading
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1958,7 +1958,7 @@ int32_t compute_crend_hrtf_data_size( crend_hrtf_tables_pointers *hrtf_table_ptr
        {
            for ( iIter = 0; iIter < hrtf_table_ptrs->num_iterations[iIR * BINAURAL_CHANNELS + iChan]; iIter++ )
            {
#ifdef FIX_1123_CREND_16BIT_ROM
#ifdef FIX_1123_CREND_16BIT_FMT
                hrtf_data_size += 2 * hrtf_table_ptrs->pIndex_frequency_max[iIndex++] * sizeof( int16_t ); // 2* : re & im
#else
                hrtf_data_size += 2 * hrtf_table_ptrs->pIndex_frequency_max[iIndex++] * sizeof( int32_t ); // 2* : re & im
@@ -1975,7 +1975,7 @@ int32_t compute_crend_hrtf_data_size( crend_hrtf_tables_pointers *hrtf_table_ptr
        {
            for ( iIter = 0; iIter < hrtf_table_ptrs->num_iterations_diffuse[iChan]; iIter++ )
            {
#ifdef FIX_1123_CREND_16BIT_ROM
#ifdef FIX_1123_CREND_16BIT_FMT
                hrtf_data_size += 2 * hrtf_table_ptrs->pIndex_frequency_max_diffuse[iIndex++] * sizeof( int16_t ); // 2* : re & im
#else
                hrtf_data_size += 2 * hrtf_table_ptrs->pIndex_frequency_max_diffuse[iIndex++] * sizeof( int32_t ); // 2* : re & im
+17 −2
Original line number Diff line number Diff line
@@ -46,9 +46,15 @@ end
if ~exist("writeRomFileOutput",'var')
    writeRomFileOutput = true;
end
if ~exist("writeRomFileFx",'var')
    writeRomFileFx = false;
end
if ~exist("writeBinaryOutput",'var')
    writeBinaryOutput = true;
end
if ~exist("makeFxFltBE",'var')
    makeFxFltBE = true;
end
if ~exist("generateCustomBinaryFile",'var')
    generateCustomBinaryFile = false;
end
@@ -124,9 +130,18 @@ FastConv_SD_BRIR = FastConv_SD_BRIR_float;
[FastConv_SD_BRIR.rev_param.nrgLr, FastConv_SD_BRIR.rev_param.factorQ_nrgLr] = make_be_with_fx(FastConv_SD_BRIR_float.rev_param.nrgLr,15);

if writeRomFileOutput
    write_fastconv_rom_table(rom_file, FastConv_SHD_IR_FOA, FastConv_SHD_IR_HOA2, FastConv_SHD_IR_HOA3, FastConv_SD_IR, FastConv_SD_BRIR);
    if writeRomFileFx
        write_fastconv_rom_table_fx(rom_file, FastConv_SHD_IR_FOA, FastConv_SHD_IR_HOA2, FastConv_SHD_IR_HOA3, FastConv_SD_IR, FastConv_SD_BRIR);
    else
        if makeFxFltBE
            write_fastconv_rom_table_flt(rom_file, FastConv_SHD_IR_FOA, FastConv_SHD_IR_HOA2, FastConv_SHD_IR_HOA3, FastConv_SD_IR, FastConv_SD_BRIR);
        else
            write_fastconv_rom_table_flt(rom_file, FastConv_SHD_IR_FOA_float, FastConv_SHD_IR_HOA2_float, FastConv_SHD_IR_HOA3_float, FastConv_SD_IR_float, FastConv_SD_BRIR_float);
        end
    end
end

% binary format is always FX
if writeBinaryOutput
   write_fastconv_binary_data_fx(ivas_path, bin_file, FastConv_SHD_IR_FOA, FastConv_SHD_IR_HOA2, FastConv_SHD_IR_HOA3, FastConv_SD_IR, FastConv_SD_BRIR);
end
Loading