Skip to content

Commit

Permalink
Added half frame before rounding down frame checkes for switching set.
Browse files Browse the repository at this point in the history
  • Loading branch information
yanj-github committed Mar 24, 2023
1 parent 4058952 commit 41b7140
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions observations/every_sample_rendered.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,8 +287,11 @@ def observe_switching_mid_frame(
# the expected frame number position in the content being switched from is
# the expected relative time of the switch
# (derived from the test config) * that content's frames per second
half_duration_frame = (
(1000 / mezzanine_qr_codes[starting_index - 1].frame_rate) / 2
)
previous_ending_frame_num = math.floor(
switching_positions[i]
(switching_positions[i] + half_duration_frame)
/ 1000
* mezzanine_qr_codes[starting_index - 1].frame_rate
)
Expand All @@ -309,9 +312,12 @@ def observe_switching_mid_frame(
# the expected relative time of the switch
# (derived from the test config) * that content's frames per second
# compare expected with the actual frame number detected at this switch point
half_duration_frame = (
(1000 / mezzanine_qr_codes[starting_index].frame_rate) / 2
)
current_starting_frame_num = (
math.floor(
switching_positions[i]
(switching_positions[i] + half_duration_frame)
/ 1000
* mezzanine_qr_codes[starting_index].frame_rate
)
Expand Down

0 comments on commit 41b7140

Please sign in to comment.