Skip to content

Commit 9304540

Browse files
committed
remove remaining python transform uses
1 parent 21f1e86 commit 9304540

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

benchmarks/decoders/benchmark_transforms.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,15 +66,15 @@ def decoder_native_resize(
6666
path: Path, pts_seconds: list[float], dims: tuple[int, int]
6767
) -> None:
6868
decoder = create_from_file(str(path), seek_mode="approximate")
69-
add_video_stream(decoder, transform_specs=f"resize, {dims[0]}, {dims[1]}")
69+
add_video_stream(decoder)
7070
return get_frames_by_pts(decoder, timestamps=pts_seconds)[0]
7171

7272

7373
def decoder_native_crop(
7474
path: Path, pts_seconds: list[float], dims: tuple[int, int], x: int, y: int
7575
) -> None:
7676
decoder = create_from_file(str(path), seek_mode="approximate")
77-
add_video_stream(decoder, transform_specs=f"crop, {dims[0]}, {dims[1]}, {x}, {y}")
77+
add_video_stream(decoder)
7878
return get_frames_by_pts(decoder, timestamps=pts_seconds)[0]
7979

8080

benchmarks/decoders/gpu_benchmark.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,11 @@ def decode_full_video(video_path, decode_device_string, resize_device_string):
3030
if "cuda" in decode_device_string:
3131
num_threads = 1
3232

33-
resize_spec = ""
34-
if "native" in resize_device_string:
35-
resize_spec = f"resize, {RESIZED_HEIGHT}, {RESIZED_WIDTH}"
36-
3733
torchcodec._core._add_video_stream(
3834
decoder,
3935
stream_index=-1,
4036
device=decode_device_string,
4137
num_threads=num_threads,
42-
transform_specs=resize_spec,
4338
)
4439

4540
start_time = time.time()

0 commit comments

Comments
 (0)