We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f4cadbb commit 6c92e94Copy full SHA for 6c92e94
test/test_videoapi.py
@@ -76,14 +76,8 @@ def test_frame_reading(self, test_video):
76
77
# compare the frames and ptss
78
for i in range(len(vr_frames)):
79
- assert float(av_pts[i]) == approx(vr_pts[i], abs=0.1)
80
-
81
- mean_delta = torch.mean(torch.abs(av_frames[i].float() - vr_frames[i].float()))
82
- # on average the difference is very small and caused
83
- # by decoding (around 1%)
84
- # TODO: asses empirically how to set this? atm it's 1%
85
- # averaged over all frames
86
- assert mean_delta.item() < 2.55
+ assert av_pts[i] == vr_pts[i]
+ torch.test.assert_equal(av_frames[i], vr_frames[i])
87
88
del vr_frames, av_frames, vr_pts, av_pts
89
0 commit comments