Commit 3d7cdf03 authored by norvell's avatar norvell
Browse files

Merge branch 'main' into 'basop-ci-branch'

[BASOP CI] Add detailed report to basop-ci-branch

See merge request !1673
parents 1b1f108e af1ba8b2
Loading
Loading
Loading
Loading
+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" />
+48 −0
Original line number Diff line number Diff line
@@ -128,7 +128,11 @@ 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;
@@ -148,7 +152,11 @@ 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;
@@ -407,8 +415,12 @@ 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;
@@ -427,8 +439,14 @@ 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;
@@ -594,8 +612,12 @@ 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;
@@ -1066,12 +1088,20 @@ 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;
@@ -1410,7 +1440,11 @@ 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 );
@@ -1507,7 +1541,11 @@ 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 )
@@ -1587,7 +1625,12 @@ static bool parseCmdlIVAS_dec(
            arg->customLsSetupFilename = argv[i];
        }
        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();
@@ -1605,7 +1648,12 @@ 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;
        }
+55 −5
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>
@@ -34,6 +35,13 @@ Comparing:
    <li><a href="{job_name}--merged_csv--{id_current}.csv">Merged csv data</a></li>
</ul>

{images_mld}

{images_diff}

{images_ssnr}


<br>
<b>How is the table sorted?</b>
<ul>
@@ -92,9 +100,17 @@ 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",
]
COLUMNS_GLOBAL = COLUMNS[:1]
COLUMNS_DIFFERENTIAL = COLUMNS[1:]
COLUMNS_DIFFERENTIAL = COLUMNS[3:]
COLUMNS_DIFFERENTIAL_NOT_MLD = COLUMNS_DIFFERENTIAL[2:]


@@ -106,6 +122,7 @@ def create_subpage(
    id_current: int,
    id_previous: int,
    job_name: str,
    histogram,
):
    merged_reports = merge_and_cleanup_mld_reports(
        csv_current, csv_previous, id_current, id_previous
@@ -128,6 +145,33 @@ def create_subpage(
    table_body = "\n".join(
        tr_from_row(row, id_current, id_previous) for row in merged_reports
    )
    if histogram:
        images_mld = (
            f"<h2>MLD summary {job_name}</h2>\n"
            + " ".join(
                [f"<img src=images/summary_{id_current}_MLD_{x}.png>" for x in FORMATS]
            )
            + f'\n<br><a href="images/summary_{id_current}_MLD.csv">summary_{id_current}_MLD.csv</a>'
        )
        images_ssnr = (
            f"<h2>MIN_SSNR summary {job_name}</h2>\n"
            + " ".join(
                [f"<img src=images/summary_{id_current}_SSNR_{x}.png>" for x in FORMATS]
            )
            + f'\n<br><a href="images/summary_{id_current}_SSNR.csv">summary_{id_current}_SSNR.csv</a>'
        )
        images_diff = (
            f"<h2>MAX ABS DIFFERENCE summary {job_name}</h2>\n"
            + " ".join(
                [f"<img src=images/summary_{id_current}_DIFF_{x}.png>" for x in FORMATS]
            )
            + f'\n<br><a href="images/summary_{id_current}_DIFF.csv">summary_{id_current}_DIFF.csv</a>'
        )
    else:
        images_mld = ""
        images_ssnr = ""
        images_diff = ""

    new_subpage = SUBPAGE_TMPL_CSS + SUBPAGE_TMPL_HTML.format(
        id_current=id_current,
        id_previous=id_previous,
@@ -135,6 +179,9 @@ def create_subpage(
        job_name=job_name,
        table_header_a=table_header_a,
        table_header_b=table_header_b,
        images_mld=images_mld,
        images_ssnr=images_ssnr,
        images_diff=images_diff,
    )
    with open(html_out, "w") as f:
        f.write(new_subpage)
@@ -228,8 +275,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")
@@ -300,6 +348,7 @@ if __name__ == "__main__":
    parser.add_argument("id_current", type=int)
    parser.add_argument("id_previous", type=int)
    parser.add_argument("job_name")
    parser.add_argument("--histogram", action="store_true")
    args = parser.parse_args()

    create_subpage(
@@ -310,4 +359,5 @@ if __name__ == "__main__":
        args.id_current,
        args.id_previous,
        args.job_name,
        args.histogram,
    )
+1 −1
Original line number Diff line number Diff line
@@ -42,7 +42,7 @@ def main():

    project_id = int(os.environ["CI_PROJECT_ID"])
    jobs = JOBS_FOR_PROJECT_ID[project_id]
    success_only = project_id == PROJECT_ID_FLOAT_REPO
    success_only = False
    failed_count = get_artifacts_for_jobs_and_return_num_failed(
        jobs, project_id, success_only
    )
+0 −9
Original line number Diff line number Diff line
@@ -179,9 +179,6 @@ typedef enum

typedef enum
{
#ifndef FIX_1101_CLEANING_JBM_CALL
    TC_BUFFER_MODE_NONE = 0,
#endif
    TC_BUFFER_MODE_RENDERER,
    TC_BUFFER_MODE_BUFFER
} TC_BUFFER_MODE;
@@ -1292,14 +1289,8 @@ typedef enum
#define LFE_CHANNEL                             3

#define MIN_LFE_NRG                             0.5f
#ifdef ADJUST_MCT_CHANNELS_MAX   
#define MCT_MAX_CHANNELS                        11                          /* == 7.1.4 LS channels without the LFE channel */
#define MCT_MAX_BLOCKS                          ( ( MCT_MAX_CHANNELS + 1 ) / CPE_CHANNELS )    /* max. number of channel pairs (MCT_MAX_CHANNELS/2) within MCT*/
#else
#define MCT_MAX_CHANNELS                        12
#define MCT_MAX_BLOCKS                          ( MCT_MAX_CHANNELS / CPE_CHANNELS )    /* max. number of channel pairs (MCT_MAX_CHANNELS/2) within MCT*/
#define MAX_NUM_DATA                            max( MCT_MAX_CHANNELS, 4 )
#endif

#define NBBITS_MCT_RATIO                        4
#define BITRATE_MCT_RATIO_RANGE                 ( 1 << NBBITS_MCT_RATIO )   /* Range of the coded bitrate distribution ratio */
Loading