Skip to content

Commit 567243d

Browse files
authored
PR with benchmark results (#410)
1 parent 08236be commit 567243d

File tree

4 files changed

+348
-156
lines changed

4 files changed

+348
-156
lines changed

benchmarks/decoders/benchmark_decoders_library.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ def __init__(self, backend):
104104

105105
def get_frames_from_video(self, video_file, pts_list):
106106
self.torchvision.set_video_backend(self._backend)
107-
reader = self.torchvision.io.VideoReader(video_file, "video")
107+
reader = self.torchvision.io.VideoReader(video_file, "video", num_threads=0)
108108
frames = []
109109
for pts in pts_list:
110110
reader.seek(pts)
@@ -114,7 +114,7 @@ def get_frames_from_video(self, video_file, pts_list):
114114

115115
def get_consecutive_frames_from_video(self, video_file, numFramesToDecode):
116116
self.torchvision.set_video_backend(self._backend)
117-
reader = self.torchvision.io.VideoReader(video_file, "video")
117+
reader = self.torchvision.io.VideoReader(video_file, "video", num_threads=0)
118118
frames = []
119119
for _ in range(numFramesToDecode):
120120
frame = next(reader)
51.9 KB
Loading

0 commit comments

Comments
 (0)