Commit 056dff50 authored by TYAGIRIS's avatar TYAGIRIS
Browse files

workaround for failing rtp cases

parent 30ae168d
Loading
Loading
Loading
Loading
Loading
+12 −7
Original line number Diff line number Diff line
@@ -383,6 +383,8 @@ class MLDConformance:
        command = self.reformatCommand(
            command=self.Commands[decTag][decCommandIdx], ref=True
        )
        
        if "-VOIP_hf_only" not in command:
            command = command.replace("-VOIP", "")
        if encTag == "ISAR_ENC":
            refDecCmd = [self.RefBins[decTag]] + command.split()[1:]
@@ -435,6 +437,7 @@ class MLDConformance:
        dutDecOutputFile = dutEncOutput.replace(".192", "_CUT_REFDECODED.wav")
        decCommandIdx = self.EncoderToDecoderCmdMap[encCommandIdx]
        command = self.reformatCommand(command=self.Commands["DEC"][decCommandIdx])
        if "-VOIP_hf_only" not in command:
            command = command.replace("-VOIP", "")
        dutDecCmd = (
            [self.RefBins["DEC"]]
@@ -547,10 +550,10 @@ class MLDConformance:
    def reformatCommand(self, command: str, ref: bool = False) -> str:
        command = command.replace("$TESTV_PATH", self.testvecDir)
        ################   HACKS #########################
        command = command.replace("_cut.192.fer", ".192")
        command = command.replace("_cut.192", ".192")
        command = command.replace(".fer.192", ".192")
        command = command.replace(".192.fer", ".192")
        #command = command.replace("_cut.192.fer", ".192")
        #command = command.replace("_cut.192", ".192")
        #command = command.replace(".fer.192", ".192")
        #command = command.replace(".192.fer", ".192")
        ##################################################

        if ref:
@@ -761,6 +764,7 @@ class MLDConformance:
                if N == 0:
                    continue
                m0 = np.sum(mdlValues == 0)
                m05 = np.sum(mdlValues <= 0.5)
                m1 = np.sum(mdlValues <= 1.0)
                m2 = np.sum(mdlValues <= 2.0)
                m5 = np.sum(mdlValues <= 5.0)
@@ -770,10 +774,11 @@ class MLDConformance:
                print(f"<{tag}> Total Frames: {N}")
                print(f"<{tag}> MAX MLD across all frames : {mdlValues.max()}")
                print(f"<{tag}> Frames with MLD == 0 : {m0} frames ({PCNT(m0)}%)")
                print(f"<{tag}> Frames with MLD <= 0.5 : {m05} frames ({PCNT(m05)}%)")
                print(f"<{tag}> Frames with MLD <= 1 : {m1} frames ({PCNT(m1)}%)")
                print(f"<{tag}> Frames with MLD <= 2 : {m2} frames ({PCNT(m2)}%)")
                print(f"<{tag}> Frames with MLD <= 5 : {m5} frames ({PCNT(m5)}%)")
                print(f"<{tag}> BE frames percentage = {bePercentAvg}")
                print(f"<{tag}> BE samples percentage = {bePercentAvg}")
                print(f"<{tag}> max absolute diff = {maxDiffmax}, sample range (-32768, 32767)")
                print("##########################################################\n")