Commit 492c1add authored by TYAGIRIS's avatar TYAGIRIS
Browse files

Merge branch 'rtyag_corridor_changes' into 'main'

update corridor changes

See merge request !2403
parents 4f559fad 01d2ecb5
Loading
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -31,7 +31,6 @@ cp -r tests/split_rendering/error_patterns testvec/testv/split_rendering/error_p

python3 scripts/cleanup_26252.py

cp -r tests/conformance-test testvec/
cp Readme_IVAS_dec.txt testvec
cp Readme_IVAS_enc.txt testvec
cp Readme_IVAS_rend.txt testvec
+21 −2
Original line number Diff line number Diff line
@@ -910,7 +910,7 @@ class MLDConformance:
                else:
                    print(f"<{tag}> PASSED BE TEST")

    def computeCorridor(self, mldRefWithTags, mldCutWithTags, tag, threshold=1.0):
    def computeCorridor(self, mldRefWithTags, mldCutWithTags, tag, threshold=0.0):
        mldDict = dict[str, list]()
        failed = False

@@ -921,11 +921,30 @@ class MLDConformance:
        )
        refMLD = mldRefWithTags["MLD"][indRef]
        dutMLD = mldCutWithTags["MLD"][indDut]

        diff = dutMLD - refMLD
      
        if diff.max() > threshold:
            print(
                f"\033[91mMLD Corridor failed for {tag} with max MLD diff of {diff.max()} \033[00m"
            )
            maxMLD = np.maximum(dutMLD, refMLD)
            mldWithTags = np.column_stack(
                (
                    maxMLD,
                    intersection,
                )
            )      
            new_mld_dir = os.path.join(
                        self.testvDir, "mld_ref2")
            if not os.path.exists(new_mld_dir):
                os.makedirs(new_mld_dir, exist_ok=True) 
                
            refMldFile2 = os.path.join(
                self.testvDir, "mld_ref2", ReferenceMldFiles[tag]
            )
            with open(refMldFile2, "w") as f:
                np.savetxt(f, mldWithTags, fmt="%s", delimiter=",")              
        else:
            print(
                f"\033[92mMLD Corridor passed for {tag} with max MLD diff of {diff.max()} \033[00m"
@@ -989,7 +1008,7 @@ class MLDConformance:
                        mldRefWithTags = np.loadtxt(
                            refMldFile,
                            delimiter=",",
                            dtype=[("MLD", "f8"), ("pyTestTag", "<U90")],
                            dtype=[("MLD", "f8"), ("pyTestTag", "<U256")],
                        )
                        self.computeCorridor(mldRefWithTags, mdlCutWithTags, tag)
                    else: