Commit 37f862e5 authored by emerit's avatar emerit
Browse files

Merge branch 'main' into orange/fixpoint_crend_hrtf_file_format

parents c7d47e84 461b000d
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2233,7 +2233,7 @@ coverage-test-on-main-scheduled:
  &complexity-measurements-setup # create necessary environment
  - mkdir -p wmops/logs

  - job_id=$(python3 ci/get_id_of_last_job_occurence.py $CI_COMMIT_REF_NAME $CI_JOB_NAME $CI_PROJECT_ID --success_only)
  - job_id=$(python3 ci/get_id_of_last_job_occurence.py $CI_COMMIT_REF_NAME $CI_JOB_NAME $CI_PROJECT_ID)
  - echo $job_id
  - curl --request GET "https://forge.3gpp.org/rep/api/v4/projects/$CI_PROJECT_ID/jobs/$job_id/artifacts" --output artifacts.zip
  - unzip artifacts.zip || true # this may fail on first run, when there are no artifacts there and the zip file is actually just "404"-html
+2 −0
Original line number Diff line number Diff line
@@ -101,6 +101,7 @@
  </ItemDefinitionGroup>
  <ItemGroup>
    <ClCompile Include="..\lib_util\aeid_file_reader.c" />
    <ClCompile Include="..\lib_util\ambi_convert.c" />
    <ClCompile Include="..\lib_util\audio_file_reader.c" />
    <ClCompile Include="..\lib_util\audio_file_writer.c" />
    <ClCompile Include="..\lib_util\bitstream_reader.c" />
@@ -128,6 +129,7 @@
  </ItemGroup>
  <ItemGroup>
    <ClInclude Include="..\lib_util\aeid_file_reader.h" />
    <ClInclude Include="..\lib_util\ambi_convert.h" />
    <ClInclude Include="..\lib_util\audio_file_reader.h" />
    <ClInclude Include="..\lib_util\audio_file_writer.h" />
    <ClInclude Include="..\lib_util\bitstream_reader.h" />
+0 −47
Original line number Diff line number Diff line
@@ -128,11 +128,7 @@ typedef struct
    bool customLsOutputEnabled;
    char *customLsSetupFilename;
    int16_t orientation_tracking;
#ifdef FIX_745_FIX_DATA_TYPE_CONVERSION
    bool non_diegetic_pan_enabled;
#else
    int16_t Opt_non_diegetic_pan;
#endif
    float non_diegetic_pan_gain;
    bool renderConfigEnabled;
    char *renderConfigFilename;
@@ -152,11 +148,7 @@ typedef struct
#endif
#endif
    AcousticEnvironmentSequence aeSequence;
#ifdef FIX_745_FIX_DATA_TYPE_CONVERSION
    bool dpidEnabled;
#else
    int16_t Opt_dpid_on;
#endif
    uint16_t directivityPatternId[IVAS_MAX_NUM_OBJECTS];

} DecArguments;
@@ -415,12 +407,7 @@ int main(
    if ( arg.renderConfigEnabled )
    {
        /* sanity check */
#ifdef FIX_745_FIX_DATA_TYPE_CONVERSION
        if ( arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL && arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_ROOM_IR && arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB && arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED && arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM && arg.non_diegetic_pan_enabled == false )
#else
        if ( arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL && arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_ROOM_IR && arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB && arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED && arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM &&
             arg.Opt_non_diegetic_pan == 0 )
#endif
        {
            fprintf( stderr, "\nError: Renderer configuration file cannot be used in this output configuration.\n\n" );
            goto cleanup;
@@ -440,13 +427,8 @@ int main(
    asked_frame_size = arg.renderFramesize;
    uint16_t aeID = arg.aeSequence.count > 0 ? arg.aeSequence.pID[0] : 65535;

#ifdef FIX_745_FIX_DATA_TYPE_CONVERSION
    if ( ( error = IVAS_DEC_Configure( hIvasDec, arg.output_Fs, arg.outputConfig, arg.tsmEnabled, arg.renderFramesize, arg.customLsOutputEnabled, arg.hrtfReaderEnabled, arg.enableHeadRotation, arg.enableExternalOrientation, arg.orientation_tracking, arg.renderConfigEnabled, arg.non_diegetic_pan_enabled, arg.non_diegetic_pan_gain,
                                       arg.dpidEnabled, aeID, arg.delayCompensationEnabled ) ) != IVAS_ERR_OK )
#else
    if ( ( error = IVAS_DEC_Configure( hIvasDec, arg.output_Fs, arg.outputConfig, arg.tsmEnabled, arg.renderFramesize, arg.customLsOutputEnabled, arg.hrtfReaderEnabled, arg.enableHeadRotation, arg.enableExternalOrientation, arg.orientation_tracking, arg.renderConfigEnabled, arg.Opt_non_diegetic_pan, arg.non_diegetic_pan_gain,
                                       arg.Opt_dpid_on, aeID, arg.delayCompensationEnabled ) ) != IVAS_ERR_OK )
#endif
    {
        fprintf( stderr, "\nConfigure failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) );
        goto cleanup;
@@ -612,12 +594,7 @@ int main(

        /* sanity check */
        if ( arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL && arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_ROOM_IR && arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB &&
#ifdef FIX_745_FIX_DATA_TYPE_CONVERSION
             arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED && arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM && arg.non_diegetic_pan_enabled == false )
#else
             arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED && arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM &&
             arg.Opt_non_diegetic_pan == 0 )
#endif
        {
            fprintf( stderr, "\nExternal Renderer Config is supported only when binaural output configurations is used as output OR when Split rendering mode is enabled. Exiting. \n" );
            goto cleanup;
@@ -1088,20 +1065,12 @@ static bool parseCmdlIVAS_dec(

    arg->renderConfigEnabled = false;
    arg->renderConfigFilename = NULL;
#ifdef FIX_745_FIX_DATA_TYPE_CONVERSION
    arg->dpidEnabled = false;
#else
    arg->Opt_dpid_on = 0;
#endif

    arg->outputMdFilename = NULL;

    arg->inputFormat = IVAS_DEC_INPUT_FORMAT_G192;
#ifdef FIX_745_FIX_DATA_TYPE_CONVERSION
    arg->non_diegetic_pan_enabled = false;
#else
    arg->Opt_non_diegetic_pan = 0;
#endif
    arg->non_diegetic_pan_gain = 0.f;
    arg->tsmEnabled = false;
    arg->renderFramesize = IVAS_RENDER_FRAMESIZE_20MS;
@@ -1440,11 +1409,7 @@ static bool parseCmdlIVAS_dec(
        else if ( strcmp( argv_to_upper, "-NON_DIEGETIC_PAN" ) == 0 )
        {
            i++;
#ifdef FIX_745_FIX_DATA_TYPE_CONVERSION
            arg->non_diegetic_pan_enabled = true;
#else
            arg->Opt_non_diegetic_pan = 1;
#endif
            strncpy( argv_to_upper, argv[i], sizeof( argv_to_upper ) - 1 );
            argv_to_upper[sizeof( argv_to_upper ) - 1] = '\0';
            to_upper( argv_to_upper );
@@ -1541,11 +1506,7 @@ static bool parseCmdlIVAS_dec(
        {
            int16_t id, tmp;

#ifdef FIX_745_FIX_DATA_TYPE_CONVERSION
            arg->dpidEnabled = true;
#else
            arg->Opt_dpid_on = 1;
#endif
            ++i;
            tmp = 0;
            while ( is_number( argv[i + tmp] ) && tmp < IVAS_MAX_NUM_OBJECTS )
@@ -1626,11 +1587,7 @@ static bool parseCmdlIVAS_dec(
        }
        i++;

#ifdef FIX_745_FIX_DATA_TYPE_CONVERSION
        if ( arg->non_diegetic_pan_enabled && arg->outputConfig != IVAS_AUDIO_CONFIG_STEREO )
#else
        if ( ( arg->Opt_non_diegetic_pan ) && ( arg->outputConfig != IVAS_AUDIO_CONFIG_STEREO ) )
#endif
        {
            fprintf( stderr, "Error: non-diegetic panning is supported in stereo only\n\n" );
            usage_dec();
@@ -1649,11 +1606,7 @@ static bool parseCmdlIVAS_dec(
        arg->outputConfig = IVAS_AUDIO_CONFIG_MONO;
        arg->decMode = IVAS_DEC_MODE_EVS;

#ifdef FIX_745_FIX_DATA_TYPE_CONVERSION
        if ( arg->non_diegetic_pan_enabled )
#else
        if ( ( arg->Opt_non_diegetic_pan ) )
#endif
        {
            arg->outputConfig = IVAS_AUDIO_CONFIG_STEREO;
        }
+26 −6
Original line number Diff line number Diff line
@@ -3,6 +3,7 @@ import pathlib
import argparse
from functools import partial

FORMATS = ["Stereo", "ISM", "Multichannel", "MASA", "SBA", "OSBA", "OMASA", "Renderer"]

CSV_DELIM = ";"
SUBPAGE_TMPL_CSS = """
@@ -25,7 +26,7 @@ SUBPAGE_TMPL_CSS = """

SUBPAGE_TMPL_HTML = """

<h1>Report for job {job_name}</h1
<h1>Report for job {job_name}</h1>

Comparing:
<ul>
@@ -35,6 +36,10 @@ Comparing:
</ul>

<br>
<h2><a href="summary_{job_name}.html">Summary page</a></h2>
<br>
<br>

<b>How is the table sorted?</b>
<ul>
    <li>Cases with result ERROR or invalid/missing values for the numerical measures are given first</li>
@@ -92,9 +97,18 @@ ARROW_DOWN = '<span class="arrowdown">&#11010;</span>'

# expected columns. actual columns are filtered from the incoming data later, this
# is mainly for controlling the order in the output table
COLUMNS = ["testcase", "Result", "MLD", "MAXIMUM ABS DIFF", "MIN_SSNR"]
COLUMNS = [
    "testcase",
    "Format",
    "Category",
    "Result",
    "MLD",
    "MAXIMUM ABS DIFF",
    "MIN_SSNR",
    "MIN_ODG",
]
COLUMNS_GLOBAL = COLUMNS[:1]
COLUMNS_DIFFERENTIAL = COLUMNS[1:]
COLUMNS_DIFFERENTIAL = COLUMNS[3:]
COLUMNS_DIFFERENTIAL_NOT_MLD = COLUMNS_DIFFERENTIAL[2:]


@@ -128,6 +142,7 @@ def create_subpage(
    table_body = "\n".join(
        tr_from_row(row, id_current, id_previous) for row in merged_reports
    )

    new_subpage = SUBPAGE_TMPL_CSS + SUBPAGE_TMPL_HTML.format(
        id_current=id_current,
        id_previous=id_previous,
@@ -226,8 +241,9 @@ def merge_and_cleanup_mld_reports(
        are uninteresting and are put last.
        """
        try:
            float(x[mld_col_curr])
            float(x[mld_col_prev])
            cols = [mld_col_curr, mld_col_prev] + [p[1] for p in other_col_pairs]
            for c in cols:
                float(x[c])
        except ValueError:
            # Value is no valid floating point value
            return float("inf")
@@ -276,7 +292,10 @@ def merge_tables(tbl1, tbl2, suffix1, suffix2, merge_key, other_keys):
            if row1[merge_key] == row2[merge_key]:
                new_row[merge_key] = row1[merge_key]
                for key in other_keys:
                    if key in row2: # In case key is missing, just insert a blank
                        new_row[f"{key}-{suffix2}"] = row2[key]
                    else:
                        new_row[f"{key}-{suffix2}"] = ""
                break

        merged.append(new_row)
@@ -284,6 +303,7 @@ def merge_tables(tbl1, tbl2, suffix1, suffix2, merge_key, other_keys):
    return merged



if __name__ == "__main__":
    parser = argparse.ArgumentParser()
    parser.add_argument("html_out")
+55 −0
Original line number Diff line number Diff line
import argparse

from create_report_pages import SUBPAGE_TMPL_CSS, FORMATS

MEASURES = ["MLD","DIFF","SSNR"]

SUMMARY_PAGE_TMPL_HTML = """

<h1>Summary for job {job_name}, ID: {id_current}</h1>

{images}

"""

def create_summary_page(
    html_out,
    id_current: int,
    job_name: str,
):
    images = histogram_summary(job_name)

    new_summary_page = SUBPAGE_TMPL_CSS + SUMMARY_PAGE_TMPL_HTML.format(
        id_current=id_current,
        job_name=job_name,
        images=images,
    )
    with open(html_out, "w") as f:
        f.write(new_summary_page)

def histogram_summary(
    job_name:str,
    ):
    images = "<hr>"
    for m in MEASURES:
        images += (
            f"<h2>{m} summary {job_name}</h2>\n"
            + " ".join(
                [f"<img src=images_{job_name}/summary_{m}_{x}.png>" for x in FORMATS]
            )
            + f'\n<br><a href="images_{job_name}/summary_{m}.csv">summary_{m}.csv</a><hr>\n\n'
        )
    return images

if __name__ == "__main__":
    parser = argparse.ArgumentParser()
    parser.add_argument("html_out")
    parser.add_argument("id_current", type=int)
    parser.add_argument("job_name")
    args = parser.parse_args()

    create_summary_page(
        args.html_out,
        args.id_current,
        args.job_name,
    )
Loading