Commit 1c340c37 authored by norvell's avatar norvell
Browse files

Record clipping in xml report

parent 61176f36
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -48,7 +48,7 @@
/* ################### Start DEBUGGING switches ########################### */

#ifndef RELEASE
/*#define DEBUGGING*/                           /* Activate debugging part of the code */
#define DEBUGGING                           /* Activate debugging part of the code */
#endif
/*#define WMOPS*/                               /* Activate complexity and memory counters */
/*#define WMOPS_PER_FRAME*/                     /* Output per-frame complexity (writes one float value per frame to the file "wmops_analysis") */
(133 B)

File changed.

No diff preview for this file type.

+4 −0
Original line number Diff line number Diff line
@@ -200,6 +200,7 @@ def test_param_file_tests(

    if not decoder_only:
        encode(
            record_property,
            dut_encoder_frontend,
            ref_encoder_frontend,
            reference_path,
@@ -476,6 +477,7 @@ def test_param_file_tests(


def encode(
    record_property,
    dut_encoder_frontend,
    ref_encoder_frontend,
    reference_path,
@@ -511,6 +513,7 @@ def encode(

        # call REF encoder
        ref_encoder_frontend.run(
            record_property,
            bitrate,
            sampling_rate,
            testv_file,
@@ -524,6 +527,7 @@ def encode(

        # call DUT encoder
        dut_encoder_frontend.run(
            record_property,
            bitrate,
            sampling_rate,
            testv_file,
+3 −0
Original line number Diff line number Diff line
@@ -901,6 +901,7 @@ def test_sba_plc_system(


def sba_enc(
    record_property,
    dut_encoder_frontend,
    test_vector_path,
    ref_encoder_frontend,
@@ -977,6 +978,7 @@ def sba_enc(
    if update_ref == 1:
        # call REF encoder
        ref_encoder_frontend.run(
            record_property,
            bitrate,
            sampling_rate,
            input_path,
@@ -991,6 +993,7 @@ def sba_enc(
    if update_ref == 0:
        # call DUT encoder
        dut_encoder_frontend.run(
            record_property,
            bitrate,
            sampling_rate,
            input_path,
+12 −3
Original line number Diff line number Diff line
@@ -57,6 +57,8 @@ from .constants import (
    ODG,
    MAX_ENC_DIFF,
    MAX_ENC_DIFF_PATTERN,
    ENC_CORE_CLIPPING,
    CLIPPING_PATTERN,
    SCRIPTS_DIR,
)

@@ -316,11 +318,10 @@ def get_enc_stats(request) -> bool:
@pytest.fixture(scope="session", autouse=True)
def get_odg(request):
    """
    Return indication to compute ssnr during ref/dut comparison.
    Return indication to compute PEAQ ODG during ref/dut comparison.
    """
    return request.config.option.odg


@pytest.fixture(scope="session")
def abs_tol(request) -> int:
    """
@@ -456,6 +457,7 @@ class EncoderFrontend:

    def run(
        self,
        record_property,
        bitrate: Union[int, Path],
        input_sampling_rate: int,
        input_path: Path,
@@ -527,6 +529,14 @@ class EncoderFrontend:
        self.returncode = result.returncode
        self.stderr = result.stderr.decode("ascii")
        self.stdout = result.stdout.decode("ascii")

        # Record core encoder clipping
        clipping = 0
        search_result = re.search(CLIPPING_PATTERN, self.stdout)
        if search_result:
            clipping = search_result.group(1)
        record_property( ENC_CORE_CLIPPING, clipping )

        if self.stdout:
            stdout_str = textwrap.indent(self.stdout, prefix="\t")
            log_dbg_msg(f"{self._type} encoder stdout:\n{stdout_str}")
@@ -1047,7 +1057,6 @@ def parse_properties(text_to_parse: str, output_differs: bool, props_to_record:
                if max_enc_diff:
                    max_enc_diff = float(max_enc_diff)
            props[MAX_ENC_DIFF] = max_enc_diff

    return props


Loading