Loading tests/cmp_pcm.py +7 −0 Original line number Diff line number Diff line Loading @@ -41,6 +41,7 @@ def cmp_pcm( ref_jbm_tf: Optional[Path] = None, cut_jbm_tf: Optional[Path] = None, quiet: Optional[bool] = False, input_scaling=1, ) -> tuple[int, str]: """ Compare 2 PCM files for bitexactness Loading Loading @@ -89,6 +90,11 @@ def cmp_pcm( return 1, reason # If input_scaling is applied, revert the scaling if input_scaling != 1: s1 = np.round(s1/input_scaling, 0) # Need rounding for max abs diff search s2 = np.round(s2/input_scaling, 0) cmp_result = pyaudio3dtools.audioarray.compare( s1, s2, Loading Loading @@ -256,6 +262,7 @@ if __name__ == "__main__": parser.add_argument("--get_odg", action="store_true") parser.add_argument("--get_ssnr", action="store_true") parser.add_argument("--allow_differing_lengths", action="store_true") parser.add_argument("--input_scaling", type=float, default=1, dest="input_scaling", help="If input scaling is applied, apply the INVERSE scaling before comparison") parser.add_argument("--quiet", action="store_true") args = vars(parser.parse_args()) Loading tests/codec_be_on_mr_nonselection/test_param_file.py +1 −0 Original line number Diff line number Diff line Loading @@ -605,6 +605,7 @@ def run_test( odg_ref=odg_ref, ref_jbm_tf=ref_tracefile_dec, cut_jbm_tf=dut_tracefile_dec, input_scaling=test_info.config.option.input_scaling, ) cmp_result_msg += reason Loading tests/codec_be_on_mr_nonselection/test_sba.py +1 −0 Original line number Diff line number Diff line Loading @@ -1266,6 +1266,7 @@ def sba_dec( odg_input=odg_input, odg_test=odg_test, odg_ref=odg_ref, input_scaling=test_info.config.option.input_scaling, ) text_to_parse = reason Loading tests/conftest.py +7 −0 Original line number Diff line number Diff line Loading @@ -298,6 +298,13 @@ def pytest_addoption(parser): default=False, ) parser.addoption( "--input_scaling", action="store", help="If input scaling is applied, apply the INVERSE scaling before comparison.", type=float, default=1, ) @pytest.fixture(scope="session", autouse=True) def update_ref(request): Loading tests/renderer/utils.py +2 −1 Original line number Diff line number Diff line Loading @@ -387,6 +387,7 @@ def run_renderer( odg_input=odg_input, odg_test=odg_test, odg_ref=odg_ref, input_scaling=test_info.config.option.input_scaling, ) props = parse_properties(reason, output_differs, props_to_record) Loading Loading
tests/cmp_pcm.py +7 −0 Original line number Diff line number Diff line Loading @@ -41,6 +41,7 @@ def cmp_pcm( ref_jbm_tf: Optional[Path] = None, cut_jbm_tf: Optional[Path] = None, quiet: Optional[bool] = False, input_scaling=1, ) -> tuple[int, str]: """ Compare 2 PCM files for bitexactness Loading Loading @@ -89,6 +90,11 @@ def cmp_pcm( return 1, reason # If input_scaling is applied, revert the scaling if input_scaling != 1: s1 = np.round(s1/input_scaling, 0) # Need rounding for max abs diff search s2 = np.round(s2/input_scaling, 0) cmp_result = pyaudio3dtools.audioarray.compare( s1, s2, Loading Loading @@ -256,6 +262,7 @@ if __name__ == "__main__": parser.add_argument("--get_odg", action="store_true") parser.add_argument("--get_ssnr", action="store_true") parser.add_argument("--allow_differing_lengths", action="store_true") parser.add_argument("--input_scaling", type=float, default=1, dest="input_scaling", help="If input scaling is applied, apply the INVERSE scaling before comparison") parser.add_argument("--quiet", action="store_true") args = vars(parser.parse_args()) Loading
tests/codec_be_on_mr_nonselection/test_param_file.py +1 −0 Original line number Diff line number Diff line Loading @@ -605,6 +605,7 @@ def run_test( odg_ref=odg_ref, ref_jbm_tf=ref_tracefile_dec, cut_jbm_tf=dut_tracefile_dec, input_scaling=test_info.config.option.input_scaling, ) cmp_result_msg += reason Loading
tests/codec_be_on_mr_nonselection/test_sba.py +1 −0 Original line number Diff line number Diff line Loading @@ -1266,6 +1266,7 @@ def sba_dec( odg_input=odg_input, odg_test=odg_test, odg_ref=odg_ref, input_scaling=test_info.config.option.input_scaling, ) text_to_parse = reason Loading
tests/conftest.py +7 −0 Original line number Diff line number Diff line Loading @@ -298,6 +298,13 @@ def pytest_addoption(parser): default=False, ) parser.addoption( "--input_scaling", action="store", help="If input scaling is applied, apply the INVERSE scaling before comparison.", type=float, default=1, ) @pytest.fixture(scope="session", autouse=True) def update_ref(request): Loading
tests/renderer/utils.py +2 −1 Original line number Diff line number Diff line Loading @@ -387,6 +387,7 @@ def run_renderer( odg_input=odg_input, odg_test=odg_test, odg_ref=odg_ref, input_scaling=test_info.config.option.input_scaling, ) props = parse_properties(reason, output_differs, props_to_record) Loading