Commit efeb609e authored by emerit's avatar emerit
Browse files

Merge branch 'main' into fix_hrtf_processing_scripts_for_3rd_party_sofa_support

parents 04fdcbf2 300a2d13
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -233,7 +233,11 @@ typedef enum
#define SID_MDCT_STEREO                         0x1                         /*      1|      0|     0 */
#define SID_ISM                                 0x2                         /*      0|      1|     0 */
#define SID_MASA_1TC                            0x3                         /*      1|      1|     0 */
#ifdef FIX_1209_SID_SIGNALING
/*reserved*/                                  /*0x4*/                       /*      0|      0|     1 */
#else
#define SID_MULTICHANNEL                        0x4                         /*      0|      0|     1 */
#endif
#define SID_SBA_1TC                             0x5                         /*      1|      0|     1 */
#define SID_SBA_2TC                             0x6                         /*      0|      1|     1 */
#define SID_MASA_2TC                            0x7                         /*      1|      1|     1 */
+1 −0
Original line number Diff line number Diff line
@@ -174,6 +174,7 @@
#define FIX_587_DEFAULT_REVERB                          /* Philips: issue 587: inconsistent default reverb parameters across renderers */

#define FIX_HRTF_LOAD                                   /* VA: issue 1187: fix memory issue when HRTFs are loaded from a binary file */
#define FIX_1209_SID_SIGNALING                          /* VA: issue 1209: remove dead code in IVAS SID signaling */


/* #################### End BE switches ################################## */
+21 −1
Original line number Diff line number Diff line
@@ -109,6 +109,9 @@ ivas_error ivas_dec_get_format(
    int32_t ivas_total_brate;
    uint16_t *bit_stream_orig;
    AUDIO_CONFIG signaled_config;
#ifdef FIX_1209_SID_SIGNALING
    ivas_error error;
#endif

    num_bits_read = 0;
    element_mode_flag = 0;
@@ -120,7 +123,14 @@ ivas_error ivas_dec_get_format(
     * Read IVAS format
     *-------------------------------------------------------------------*/

#ifdef FIX_1209_SID_SIGNALING
    if ( ( error = ivas_read_format( st_ivas, &num_bits_read ) ) != IVAS_ERR_OK )
    {
        return error;
    }
#else
    ivas_read_format( st_ivas, &num_bits_read );
#endif

    if ( st_ivas->ini_frame > 0 && st_ivas->ivas_format != st_ivas->last_ivas_format &&
         !( st_ivas->ivas_format == MASA_FORMAT && st_ivas->last_ivas_format == MASA_ISM_FORMAT ) &&
@@ -485,7 +495,14 @@ ivas_error ivas_dec_setup(
     * Read IVAS format
     *-------------------------------------------------------------------*/

#ifdef FIX_1209_SID_SIGNALING
    if ( ( error = ivas_read_format( st_ivas, &num_bits_read ) ) != IVAS_ERR_OK )
    {
        return error;
    }
#else
    ivas_read_format( st_ivas, &num_bits_read );
#endif

    /*-------------------------------------------------------------------*
     * Read other signling (ISM/MC mode, number of channels, etc.)
@@ -1048,11 +1065,12 @@ static ivas_error ivas_read_format(
                break;
            case SID_ISM:
                st_ivas->ivas_format = ISM_FORMAT;

                break;
#ifndef FIX_1209_SID_SIGNALING
            case SID_MULTICHANNEL:
                st_ivas->ivas_format = MC_FORMAT;
                break;
#endif
            case SID_SBA_1TC:
                st_ivas->ivas_format = SBA_FORMAT;
                st_ivas->element_mode_init = IVAS_SCE;
@@ -1077,7 +1095,9 @@ static ivas_error ivas_read_format(
                }
                break;
            default:
#ifndef FIX_1209_SID_SIGNALING
                /* This should actually be impossible, since only 3 bits are read, so if this happens something is broken */
#endif
                return IVAS_ERROR( IVAS_ERR_INTERNAL_FATAL, "Invalid value %c found in SID format field.", st_ivas->sid_format );
        }

+2 −0
Original line number Diff line number Diff line
@@ -161,9 +161,11 @@ void ivas_write_format_sid(
        case ISM_FORMAT:
            ind = SID_ISM;
            break;
#ifndef FIX_1209_SID_SIGNALING
        case MC_FORMAT:
            ind = SID_MULTICHANNEL;
            break;
#endif
        case SBA_FORMAT:
            switch ( element_mode )
            {
+37 −2
Original line number Diff line number Diff line
@@ -32,6 +32,7 @@

import os.path
import sys
import platform

import pyivastest.constants as constants
from pyivastest import IvasScriptsCommon
@@ -39,6 +40,19 @@ from pyivastest.IvasSvnBuilder import *

RET_CODE_FAILURE = 101

bin_ext = ""
if platform.system() == "Windows":
    bin_ext = ".exe"

default_encdec_bin_path = constants.WC_BASE_DIR
default_enc = os.path.realpath(
    os.path.join(default_encdec_bin_path, "IVAS_cod" + bin_ext)
)
default_dec = os.path.realpath(
    os.path.join(default_encdec_bin_path, "IVAS_dec" + bin_ext)
)
default_out = os.path.join(".", "out")  # change that to something else?


class IvasBuildAndRunChecks(IvasScriptsCommon.IvasScript):
    def __init__(self):
@@ -100,9 +114,25 @@ class IvasBuildAndRunChecks(IvasScriptsCommon.IvasScript):
            help="pass the '-s' argument to the wmc tool to only measure memory",
            action="store_true",
        )
        self.parser.add_argument(
            "--basop",
            help="build the basop version for instrumentation",
            action="store_true",
        )
        self.parser.add_argument(
            "-e",
            "--enc",
            help="Encoder binary to use instead of instrumenting and building it anew",
            default=None,
        )
        self.parser.add_argument(
            "-d",
            "--dec",
            help="Decoder binary to use instead of instrumenting and building it anew",
            default=None,
        )

    def run(self):

        self.parse_args()
        if self.args["error"] or self.args["exit"]:
            exit()
@@ -142,6 +172,8 @@ class IvasBuildAndRunChecks(IvasScriptsCommon.IvasScript):
                sample_rate_dec_out=self.args["srout"],
                enable_logging=True,
                logger_name="{}.br".format(self.logger.name),
                enc_ext=self.args["enc"],
                dec_ext=self.args["dec"],
            )

        elif self.args["srcdir"]:
@@ -152,6 +184,8 @@ class IvasBuildAndRunChecks(IvasScriptsCommon.IvasScript):
                sample_rate_dec_out=self.args["srout"],
                enable_logging=True,
                logger_name="{}.br".format(self.logger.name),
                enc_ext=self.args["enc"],
                dec_ext=self.args["dec"],
            )

        modes = self.args["formats"]
@@ -165,6 +199,7 @@ class IvasBuildAndRunChecks(IvasScriptsCommon.IvasScript):
                    formats_fname=self.args["format_file"],
                    max_workers=self.args["max_workers"],
                    mem_only=self.args["wmc_tool_mem_only"],
                    basop=self.args["basop"],
                )
            else:
                br.add_check(
@@ -181,7 +216,7 @@ class IvasBuildAndRunChecks(IvasScriptsCommon.IvasScript):
                br.build_and_run_dict[check]["analyzer"], self.args
            )

        if self.args["rebuild"] == True:
        if self.args["rebuild"]:
            br.force_build = True

        checks_ret_val = list()
Loading