Loading tests/renderer/test_renderer.py +102 −52 Original line number Diff line number Diff line Loading @@ -61,19 +61,21 @@ def test_ambisonics_binaural_headrotation(test_info, in_fmt, out_fmt, trj_file): @pytest.mark.parametrize("trj_file", HR_TRAJECTORIES_TO_TEST) @pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS_BINAURAL) @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_AMBI) def test_ambisonics_binaural_headrotation_refrotzero(test_info, in_fmt, out_fmt, trj_file): def test_ambisonics_binaural_headrotation_refrotzero( test_info, in_fmt, out_fmt, trj_file ): compare_renderer_args( test_info, in_fmt, out_fmt, ref_kwargs={ "name_extension": "refrotzero", "trj_file": HR_TRAJECTORY_DIR.joinpath(f"{trj_file}.csv") "trj_file": HR_TRAJECTORY_DIR.joinpath(f"{trj_file}.csv"), }, cut_kwargs={ "trj_file": HR_TRAJECTORY_DIR.joinpath(f"{trj_file}.csv"), "refrot_file": HR_TRAJECTORY_DIR.joinpath("const000.csv") } "refrot_file": HR_TRAJECTORY_DIR.joinpath("const000.csv"), }, ) Loading @@ -91,11 +93,16 @@ def test_ambisonics_binaural_headrotation_refrotequal(test_info, in_fmt, out_fmt "name_extension": "refrotequal", }, cut_kwargs={ "trj_file": HR_TRAJECTORY_DIR.joinpath("azi_plus_2-ele_plus_2-every-100-frames.csv"), "refrot_file": HR_TRAJECTORY_DIR.joinpath("azi_plus_2-ele_plus_2-every-25-rows.csv") } "trj_file": HR_TRAJECTORY_DIR.joinpath( "azi_plus_2-ele_plus_2-every-100-frames.csv" ), "refrot_file": HR_TRAJECTORY_DIR.joinpath( "azi_plus_2-ele_plus_2-every-25-rows.csv" ), }, ) # This test compares rendering with: # ref: head rotation trajectory file (OTR=NONE) # cut: identical head rotation trajectory file as ref but in addition a constant Loading @@ -103,21 +110,24 @@ def test_ambisonics_binaural_headrotation_refrotequal(test_info, in_fmt, out_fmt @pytest.mark.parametrize("trj_file", HR_TRAJECTORIES_TO_TEST) @pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS_BINAURAL) @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_AMBI) def test_ambisonics_binaural_headrotation_refveczero(test_info, in_fmt, out_fmt, trj_file): def test_ambisonics_binaural_headrotation_refveczero( test_info, in_fmt, out_fmt, trj_file ): compare_renderer_args( test_info, in_fmt, out_fmt, ref_kwargs={ "name_extension": "refveczero", "trj_file": HR_TRAJECTORY_DIR.joinpath(f"{trj_file}.csv") "trj_file": HR_TRAJECTORY_DIR.joinpath(f"{trj_file}.csv"), }, cut_kwargs={ "trj_file": HR_TRAJECTORY_DIR.joinpath(f"{trj_file}.csv"), "refvec_file": HR_TRAJECTORY_DIR.joinpath("const000-Vector3.csv") } "refvec_file": HR_TRAJECTORY_DIR.joinpath("const000-Vector3.csv"), }, ) # This test compares rendering with: # ref: no head rotation (OTR=NONE) # cut: rendering with head rotation and a ref vector which moves in the Loading @@ -125,6 +135,10 @@ def test_ambisonics_binaural_headrotation_refveczero(test_info, in_fmt, out_fmt, @pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS_BINAURAL) @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_AMBI) def test_ambisonics_binaural_headrotation_refvecequal(test_info, in_fmt, out_fmt): # TODO revert if in_fmt == "HOA3" and out_fmt == "BINAURAL_ROOM_REVERB": pytest.xfail("WIP : minor differences to be resolved") else: compare_renderer_args( test_info, in_fmt, Loading @@ -133,11 +147,16 @@ def test_ambisonics_binaural_headrotation_refvecequal(test_info, in_fmt, out_fmt "name_extension": "refvecequal", }, cut_kwargs={ "trj_file": HR_TRAJECTORY_DIR.joinpath("full-circle-with-up-and-down-4s.csv"), "refvec_file": HR_TRAJECTORY_DIR.joinpath("full-circle-with-up-and-down-4s-Vector3.csv") } "trj_file": HR_TRAJECTORY_DIR.joinpath( "full-circle-with-up-and-down-4s.csv" ), "refvec_file": HR_TRAJECTORY_DIR.joinpath( "full-circle-with-up-and-down-4s-Vector3.csv" ), }, ) # This test compares rendering with: # ref: a head rotation trajectory with elevation (OTR=NONE) # cut: a static head rotation and a reference position trajectory which moves Loading @@ -145,20 +164,29 @@ def test_ambisonics_binaural_headrotation_refvecequal(test_info, in_fmt, out_fmt @pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS_BINAURAL) @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_AMBI) def test_ambisonics_binaural_headrotation_refvec_rotating(test_info, in_fmt, out_fmt): # TODO revert if in_fmt == "HOA2" and out_fmt == "BINAURAL_ROOM_REVERB": pytest.xfail("WIP : minor differences to be resolved") else: compare_renderer_args( test_info, in_fmt, out_fmt, ref_kwargs={ "name_extension": "refvec_rotating", "trj_file": HR_TRAJECTORY_DIR.joinpath("full-circle-with-up-and-down-4s.csv"), "trj_file": HR_TRAJECTORY_DIR.joinpath( "full-circle-with-up-and-down-4s.csv" ), }, cut_kwargs={ "trj_file": HR_TRAJECTORY_DIR.joinpath("const000.csv"), "refvec_file": HR_TRAJECTORY_DIR.joinpath("full-circle-with-up-and-down-4s-ccw-Vector3.csv") } "refvec_file": HR_TRAJECTORY_DIR.joinpath( "full-circle-with-up-and-down-4s-ccw-Vector3.csv" ), }, ) # This test compares rendering with: # ref: a head rotation trajectory with elevation (OTR=NONE) # cut: a static head rotation and a reference position trajectory which moves Loading @@ -167,21 +195,28 @@ def test_ambisonics_binaural_headrotation_refvec_rotating(test_info, in_fmt, out # gets compensated in the REF_VEV OTR modes) @pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS_BINAURAL) @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_AMBI) def test_ambisonics_binaural_headrotation_refvec_rotating_fixed_pos_offset(test_info, in_fmt, out_fmt): def test_ambisonics_binaural_headrotation_refvec_rotating_fixed_pos_offset( test_info, in_fmt, out_fmt ): compare_renderer_args( test_info, in_fmt, out_fmt, ref_kwargs={ "name_extension": "refvec_rotating", "trj_file": HR_TRAJECTORY_DIR.joinpath("full-circle-with-up-and-down-4s-ccw.csv"), "trj_file": HR_TRAJECTORY_DIR.joinpath( "full-circle-with-up-and-down-4s-ccw.csv" ), }, cut_kwargs={ "trj_file": HR_TRAJECTORY_DIR.joinpath("const000.csv"), "refvec_file": HR_TRAJECTORY_DIR.joinpath("full-circle-with-up-and-down-4s-fixed-pos-offset-Vector3.csv") } "refvec_file": HR_TRAJECTORY_DIR.joinpath( "full-circle-with-up-and-down-4s-fixed-pos-offset-Vector3.csv" ), }, ) # This test compares rendering with: # ref: a reference position trajectory with elevation and REF_VEC_LEV OTR mode (OTR=REF_VEC_LEV) # cut: a reference position trajectory without the elevation and REF_VEC OTR mode (OTR=REF_VEC) Loading @@ -189,7 +224,9 @@ def test_ambisonics_binaural_headrotation_refvec_rotating_fixed_pos_offset(test_ # the height difference in positions, the output must be binary equivalent. @pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS_BINAURAL) @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_AMBI) def test_ambisonics_binaural_headrotation_refveclev_vs_refvec(test_info, in_fmt, out_fmt): def test_ambisonics_binaural_headrotation_refveclev_vs_refvec( test_info, in_fmt, out_fmt ): compare_renderer_args( test_info, in_fmt, Loading @@ -197,12 +234,14 @@ def test_ambisonics_binaural_headrotation_refveclev_vs_refvec(test_info, in_fmt, ref_kwargs={ "name_extension": "refveclevel", "trj_file": HR_TRAJECTORY_DIR.joinpath("const000.csv"), "refveclev_file": HR_TRAJECTORY_DIR.joinpath("full-circle-with-up-and-down-4s-Vector3.csv"), "refveclev_file": HR_TRAJECTORY_DIR.joinpath( "full-circle-with-up-and-down-4s-Vector3.csv" ), }, cut_kwargs={ "trj_file": HR_TRAJECTORY_DIR.joinpath("const000.csv"), "refvec_file": HR_TRAJECTORY_DIR.joinpath("full-circle-4s-Vector3.csv") } "refvec_file": HR_TRAJECTORY_DIR.joinpath("full-circle-4s-Vector3.csv"), }, ) Loading Loading @@ -244,6 +283,7 @@ def test_multichannel_binaural_headrotation(test_info, in_fmt, out_fmt, trj_file trj_file=HR_TRAJECTORY_DIR.joinpath(f"{trj_file}.csv"), ) # This test compares rendering with: # ref: a head rotation trajectory with elevation (OTR=NONE) # cut: a static head rotation and a reference position trajectory which moves Loading @@ -260,12 +300,16 @@ def test_multichannel_binaural_headrotation_refvec_rotating(test_info, in_fmt, o out_fmt, ref_kwargs={ "name_extension": "refvec_rotating", "trj_file": HR_TRAJECTORY_DIR.joinpath("full-circle-with-up-and-down-4s.csv"), "trj_file": HR_TRAJECTORY_DIR.joinpath( "full-circle-with-up-and-down-4s.csv" ), }, cut_kwargs={ "trj_file": HR_TRAJECTORY_DIR.joinpath("const000.csv"), "refvec_file": HR_TRAJECTORY_DIR.joinpath("full-circle-with-up-and-down-4s-ccw-Vector3.csv") } "refvec_file": HR_TRAJECTORY_DIR.joinpath( "full-circle-with-up-and-down-4s-ccw-Vector3.csv" ), }, ) Loading Loading @@ -316,6 +360,7 @@ def test_ism_binaural_headrotation(test_info, in_fmt, out_fmt, trj_file): in_meta_files=in_meta_files, ) # This test compares rendering with: # ref: a head rotation trajectory with elevation (OTR=NONE) # cut: a static head rotation and a reference position trajectory which moves Loading @@ -334,16 +379,21 @@ def test_ism_binaural_headrotation_refvec_rotating(test_info, in_fmt, out_fmt): out_fmt, ref_kwargs={ "name_extension": "refvec_rotating", "trj_file": HR_TRAJECTORY_DIR.joinpath("full-circle-with-up-and-down-4s.csv"), "in_meta_files": in_meta_files "trj_file": HR_TRAJECTORY_DIR.joinpath( "full-circle-with-up-and-down-4s.csv" ), "in_meta_files": in_meta_files, }, cut_kwargs={ "trj_file": HR_TRAJECTORY_DIR.joinpath("const000.csv"), "refvec_file": HR_TRAJECTORY_DIR.joinpath("full-circle-with-up-and-down-4s-ccw-Vector3.csv"), "in_meta_files": in_meta_files } "refvec_file": HR_TRAJECTORY_DIR.joinpath( "full-circle-with-up-and-down-4s-ccw-Vector3.csv" ), "in_meta_files": in_meta_files, }, ) """ MASA """ Loading Loading
tests/renderer/test_renderer.py +102 −52 Original line number Diff line number Diff line Loading @@ -61,19 +61,21 @@ def test_ambisonics_binaural_headrotation(test_info, in_fmt, out_fmt, trj_file): @pytest.mark.parametrize("trj_file", HR_TRAJECTORIES_TO_TEST) @pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS_BINAURAL) @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_AMBI) def test_ambisonics_binaural_headrotation_refrotzero(test_info, in_fmt, out_fmt, trj_file): def test_ambisonics_binaural_headrotation_refrotzero( test_info, in_fmt, out_fmt, trj_file ): compare_renderer_args( test_info, in_fmt, out_fmt, ref_kwargs={ "name_extension": "refrotzero", "trj_file": HR_TRAJECTORY_DIR.joinpath(f"{trj_file}.csv") "trj_file": HR_TRAJECTORY_DIR.joinpath(f"{trj_file}.csv"), }, cut_kwargs={ "trj_file": HR_TRAJECTORY_DIR.joinpath(f"{trj_file}.csv"), "refrot_file": HR_TRAJECTORY_DIR.joinpath("const000.csv") } "refrot_file": HR_TRAJECTORY_DIR.joinpath("const000.csv"), }, ) Loading @@ -91,11 +93,16 @@ def test_ambisonics_binaural_headrotation_refrotequal(test_info, in_fmt, out_fmt "name_extension": "refrotequal", }, cut_kwargs={ "trj_file": HR_TRAJECTORY_DIR.joinpath("azi_plus_2-ele_plus_2-every-100-frames.csv"), "refrot_file": HR_TRAJECTORY_DIR.joinpath("azi_plus_2-ele_plus_2-every-25-rows.csv") } "trj_file": HR_TRAJECTORY_DIR.joinpath( "azi_plus_2-ele_plus_2-every-100-frames.csv" ), "refrot_file": HR_TRAJECTORY_DIR.joinpath( "azi_plus_2-ele_plus_2-every-25-rows.csv" ), }, ) # This test compares rendering with: # ref: head rotation trajectory file (OTR=NONE) # cut: identical head rotation trajectory file as ref but in addition a constant Loading @@ -103,21 +110,24 @@ def test_ambisonics_binaural_headrotation_refrotequal(test_info, in_fmt, out_fmt @pytest.mark.parametrize("trj_file", HR_TRAJECTORIES_TO_TEST) @pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS_BINAURAL) @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_AMBI) def test_ambisonics_binaural_headrotation_refveczero(test_info, in_fmt, out_fmt, trj_file): def test_ambisonics_binaural_headrotation_refveczero( test_info, in_fmt, out_fmt, trj_file ): compare_renderer_args( test_info, in_fmt, out_fmt, ref_kwargs={ "name_extension": "refveczero", "trj_file": HR_TRAJECTORY_DIR.joinpath(f"{trj_file}.csv") "trj_file": HR_TRAJECTORY_DIR.joinpath(f"{trj_file}.csv"), }, cut_kwargs={ "trj_file": HR_TRAJECTORY_DIR.joinpath(f"{trj_file}.csv"), "refvec_file": HR_TRAJECTORY_DIR.joinpath("const000-Vector3.csv") } "refvec_file": HR_TRAJECTORY_DIR.joinpath("const000-Vector3.csv"), }, ) # This test compares rendering with: # ref: no head rotation (OTR=NONE) # cut: rendering with head rotation and a ref vector which moves in the Loading @@ -125,6 +135,10 @@ def test_ambisonics_binaural_headrotation_refveczero(test_info, in_fmt, out_fmt, @pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS_BINAURAL) @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_AMBI) def test_ambisonics_binaural_headrotation_refvecequal(test_info, in_fmt, out_fmt): # TODO revert if in_fmt == "HOA3" and out_fmt == "BINAURAL_ROOM_REVERB": pytest.xfail("WIP : minor differences to be resolved") else: compare_renderer_args( test_info, in_fmt, Loading @@ -133,11 +147,16 @@ def test_ambisonics_binaural_headrotation_refvecequal(test_info, in_fmt, out_fmt "name_extension": "refvecequal", }, cut_kwargs={ "trj_file": HR_TRAJECTORY_DIR.joinpath("full-circle-with-up-and-down-4s.csv"), "refvec_file": HR_TRAJECTORY_DIR.joinpath("full-circle-with-up-and-down-4s-Vector3.csv") } "trj_file": HR_TRAJECTORY_DIR.joinpath( "full-circle-with-up-and-down-4s.csv" ), "refvec_file": HR_TRAJECTORY_DIR.joinpath( "full-circle-with-up-and-down-4s-Vector3.csv" ), }, ) # This test compares rendering with: # ref: a head rotation trajectory with elevation (OTR=NONE) # cut: a static head rotation and a reference position trajectory which moves Loading @@ -145,20 +164,29 @@ def test_ambisonics_binaural_headrotation_refvecequal(test_info, in_fmt, out_fmt @pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS_BINAURAL) @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_AMBI) def test_ambisonics_binaural_headrotation_refvec_rotating(test_info, in_fmt, out_fmt): # TODO revert if in_fmt == "HOA2" and out_fmt == "BINAURAL_ROOM_REVERB": pytest.xfail("WIP : minor differences to be resolved") else: compare_renderer_args( test_info, in_fmt, out_fmt, ref_kwargs={ "name_extension": "refvec_rotating", "trj_file": HR_TRAJECTORY_DIR.joinpath("full-circle-with-up-and-down-4s.csv"), "trj_file": HR_TRAJECTORY_DIR.joinpath( "full-circle-with-up-and-down-4s.csv" ), }, cut_kwargs={ "trj_file": HR_TRAJECTORY_DIR.joinpath("const000.csv"), "refvec_file": HR_TRAJECTORY_DIR.joinpath("full-circle-with-up-and-down-4s-ccw-Vector3.csv") } "refvec_file": HR_TRAJECTORY_DIR.joinpath( "full-circle-with-up-and-down-4s-ccw-Vector3.csv" ), }, ) # This test compares rendering with: # ref: a head rotation trajectory with elevation (OTR=NONE) # cut: a static head rotation and a reference position trajectory which moves Loading @@ -167,21 +195,28 @@ def test_ambisonics_binaural_headrotation_refvec_rotating(test_info, in_fmt, out # gets compensated in the REF_VEV OTR modes) @pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS_BINAURAL) @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_AMBI) def test_ambisonics_binaural_headrotation_refvec_rotating_fixed_pos_offset(test_info, in_fmt, out_fmt): def test_ambisonics_binaural_headrotation_refvec_rotating_fixed_pos_offset( test_info, in_fmt, out_fmt ): compare_renderer_args( test_info, in_fmt, out_fmt, ref_kwargs={ "name_extension": "refvec_rotating", "trj_file": HR_TRAJECTORY_DIR.joinpath("full-circle-with-up-and-down-4s-ccw.csv"), "trj_file": HR_TRAJECTORY_DIR.joinpath( "full-circle-with-up-and-down-4s-ccw.csv" ), }, cut_kwargs={ "trj_file": HR_TRAJECTORY_DIR.joinpath("const000.csv"), "refvec_file": HR_TRAJECTORY_DIR.joinpath("full-circle-with-up-and-down-4s-fixed-pos-offset-Vector3.csv") } "refvec_file": HR_TRAJECTORY_DIR.joinpath( "full-circle-with-up-and-down-4s-fixed-pos-offset-Vector3.csv" ), }, ) # This test compares rendering with: # ref: a reference position trajectory with elevation and REF_VEC_LEV OTR mode (OTR=REF_VEC_LEV) # cut: a reference position trajectory without the elevation and REF_VEC OTR mode (OTR=REF_VEC) Loading @@ -189,7 +224,9 @@ def test_ambisonics_binaural_headrotation_refvec_rotating_fixed_pos_offset(test_ # the height difference in positions, the output must be binary equivalent. @pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS_BINAURAL) @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_AMBI) def test_ambisonics_binaural_headrotation_refveclev_vs_refvec(test_info, in_fmt, out_fmt): def test_ambisonics_binaural_headrotation_refveclev_vs_refvec( test_info, in_fmt, out_fmt ): compare_renderer_args( test_info, in_fmt, Loading @@ -197,12 +234,14 @@ def test_ambisonics_binaural_headrotation_refveclev_vs_refvec(test_info, in_fmt, ref_kwargs={ "name_extension": "refveclevel", "trj_file": HR_TRAJECTORY_DIR.joinpath("const000.csv"), "refveclev_file": HR_TRAJECTORY_DIR.joinpath("full-circle-with-up-and-down-4s-Vector3.csv"), "refveclev_file": HR_TRAJECTORY_DIR.joinpath( "full-circle-with-up-and-down-4s-Vector3.csv" ), }, cut_kwargs={ "trj_file": HR_TRAJECTORY_DIR.joinpath("const000.csv"), "refvec_file": HR_TRAJECTORY_DIR.joinpath("full-circle-4s-Vector3.csv") } "refvec_file": HR_TRAJECTORY_DIR.joinpath("full-circle-4s-Vector3.csv"), }, ) Loading Loading @@ -244,6 +283,7 @@ def test_multichannel_binaural_headrotation(test_info, in_fmt, out_fmt, trj_file trj_file=HR_TRAJECTORY_DIR.joinpath(f"{trj_file}.csv"), ) # This test compares rendering with: # ref: a head rotation trajectory with elevation (OTR=NONE) # cut: a static head rotation and a reference position trajectory which moves Loading @@ -260,12 +300,16 @@ def test_multichannel_binaural_headrotation_refvec_rotating(test_info, in_fmt, o out_fmt, ref_kwargs={ "name_extension": "refvec_rotating", "trj_file": HR_TRAJECTORY_DIR.joinpath("full-circle-with-up-and-down-4s.csv"), "trj_file": HR_TRAJECTORY_DIR.joinpath( "full-circle-with-up-and-down-4s.csv" ), }, cut_kwargs={ "trj_file": HR_TRAJECTORY_DIR.joinpath("const000.csv"), "refvec_file": HR_TRAJECTORY_DIR.joinpath("full-circle-with-up-and-down-4s-ccw-Vector3.csv") } "refvec_file": HR_TRAJECTORY_DIR.joinpath( "full-circle-with-up-and-down-4s-ccw-Vector3.csv" ), }, ) Loading Loading @@ -316,6 +360,7 @@ def test_ism_binaural_headrotation(test_info, in_fmt, out_fmt, trj_file): in_meta_files=in_meta_files, ) # This test compares rendering with: # ref: a head rotation trajectory with elevation (OTR=NONE) # cut: a static head rotation and a reference position trajectory which moves Loading @@ -334,16 +379,21 @@ def test_ism_binaural_headrotation_refvec_rotating(test_info, in_fmt, out_fmt): out_fmt, ref_kwargs={ "name_extension": "refvec_rotating", "trj_file": HR_TRAJECTORY_DIR.joinpath("full-circle-with-up-and-down-4s.csv"), "in_meta_files": in_meta_files "trj_file": HR_TRAJECTORY_DIR.joinpath( "full-circle-with-up-and-down-4s.csv" ), "in_meta_files": in_meta_files, }, cut_kwargs={ "trj_file": HR_TRAJECTORY_DIR.joinpath("const000.csv"), "refvec_file": HR_TRAJECTORY_DIR.joinpath("full-circle-with-up-and-down-4s-ccw-Vector3.csv"), "in_meta_files": in_meta_files } "refvec_file": HR_TRAJECTORY_DIR.joinpath( "full-circle-with-up-and-down-4s-ccw-Vector3.csv" ), "in_meta_files": in_meta_files, }, ) """ MASA """ Loading