From 6f7e69b0a030cbea415916d6cbfd4f52f8487d0e Mon Sep 17 00:00:00 2001 From: Ahmad Sharif Date: Wed, 16 Oct 2024 08:08:34 -0700 Subject: [PATCH 1/4] Add Nvidia licenses link to README.md --- README.md | 4 ++++ src/torchcodec/decoders/_core/VideoDecoder.cpp | 3 ++- src/torchcodec/decoders/_core/VideoDecoder.h | 5 ++++- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 7aadbc652..4a80b85af 100644 --- a/README.md +++ b/README.md @@ -139,3 +139,7 @@ guide](CONTRIBUTING.md) for more details. ## License TorchCodec is released under the [BSD 3 license](./LICENSE). + +If you build TorchCodec with ENABLE_CUDA=1 or use the CUDA-enabled release of +torchcodec please review +[Nvidia licenses](https://docs.nvidia.com/cuda/eula/index.html). diff --git a/src/torchcodec/decoders/_core/VideoDecoder.cpp b/src/torchcodec/decoders/_core/VideoDecoder.cpp index 58a605fd3..bca593fb3 100644 --- a/src/torchcodec/decoders/_core/VideoDecoder.cpp +++ b/src/torchcodec/decoders/_core/VideoDecoder.cpp @@ -980,7 +980,8 @@ void VideoDecoder::validateFrameIndex( VideoDecoder::DecodedOutput VideoDecoder::getFrameAtIndex( int streamIndex, - int64_t frameIndex) { + int64_t frameIndex, + std::optional t) { validateUserProvidedStreamIndex(streamIndex); validateScannedAllStreams("getFrameAtIndex"); diff --git a/src/torchcodec/decoders/_core/VideoDecoder.h b/src/torchcodec/decoders/_core/VideoDecoder.h index 8535a61ea..38f26eb4b 100644 --- a/src/torchcodec/decoders/_core/VideoDecoder.h +++ b/src/torchcodec/decoders/_core/VideoDecoder.h @@ -222,7 +222,10 @@ class VideoDecoder { // i.e. it will be returned when this function is called with seconds=5.0 or // seconds=5.999, etc. DecodedOutput getFrameDisplayedAtTimestampNoDemux(double seconds); - DecodedOutput getFrameAtIndex(int streamIndex, int64_t frameIndex); + DecodedOutput getFrameAtIndex( + int streamIndex, + int64_t frameIndex, + std::optional t = std::nullopt); struct BatchDecodedOutput { torch::Tensor frames; torch::Tensor ptsSeconds; From 5cc4e1f167e5eb9d6c5e5b08f4a65fb93ca877b7 Mon Sep 17 00:00:00 2001 From: Ahmad Sharif Date: Wed, 16 Oct 2024 08:09:32 -0700 Subject: [PATCH 2/4] . --- src/torchcodec/decoders/_core/VideoDecoder.cpp | 3 +-- src/torchcodec/decoders/_core/VideoDecoder.h | 5 +---- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/torchcodec/decoders/_core/VideoDecoder.cpp b/src/torchcodec/decoders/_core/VideoDecoder.cpp index bca593fb3..58a605fd3 100644 --- a/src/torchcodec/decoders/_core/VideoDecoder.cpp +++ b/src/torchcodec/decoders/_core/VideoDecoder.cpp @@ -980,8 +980,7 @@ void VideoDecoder::validateFrameIndex( VideoDecoder::DecodedOutput VideoDecoder::getFrameAtIndex( int streamIndex, - int64_t frameIndex, - std::optional t) { + int64_t frameIndex) { validateUserProvidedStreamIndex(streamIndex); validateScannedAllStreams("getFrameAtIndex"); diff --git a/src/torchcodec/decoders/_core/VideoDecoder.h b/src/torchcodec/decoders/_core/VideoDecoder.h index 38f26eb4b..8535a61ea 100644 --- a/src/torchcodec/decoders/_core/VideoDecoder.h +++ b/src/torchcodec/decoders/_core/VideoDecoder.h @@ -222,10 +222,7 @@ class VideoDecoder { // i.e. it will be returned when this function is called with seconds=5.0 or // seconds=5.999, etc. DecodedOutput getFrameDisplayedAtTimestampNoDemux(double seconds); - DecodedOutput getFrameAtIndex( - int streamIndex, - int64_t frameIndex, - std::optional t = std::nullopt); + DecodedOutput getFrameAtIndex(int streamIndex, int64_t frameIndex); struct BatchDecodedOutput { torch::Tensor frames; torch::Tensor ptsSeconds; From 95ba65fa69f9d9d377776cc01400b9c1559e39b1 Mon Sep 17 00:00:00 2001 From: Ahmad Sharif Date: Wed, 16 Oct 2024 09:34:27 -0700 Subject: [PATCH 3/4] . --- README.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 4a80b85af..c60ba4c21 100644 --- a/README.md +++ b/README.md @@ -140,6 +140,7 @@ guide](CONTRIBUTING.md) for more details. TorchCodec is released under the [BSD 3 license](./LICENSE). -If you build TorchCodec with ENABLE_CUDA=1 or use the CUDA-enabled release of -torchcodec please review -[Nvidia licenses](https://docs.nvidia.com/cuda/eula/index.html). +However, TorchCodec may be used with code not written by Meta which may be +distributed under different licenses. + +For example, if you build TorchCodec with ENABLE_CUDA=1 or use the CUDA-enabled release of torchcodec, please review CUDA's license here: [Nvidia licenses](https://docs.nvidia.com/cuda/eula/index.html). From a6b34247c45342b68a633fd3c5bfd8a85ccfcb0d Mon Sep 17 00:00:00 2001 From: Ahmad Sharif Date: Thu, 14 Nov 2024 08:46:19 -0800 Subject: [PATCH 4/4] . --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 2d0736a72..14b32452e 100644 --- a/README.md +++ b/README.md @@ -216,4 +216,6 @@ TorchCodec is released under the [BSD 3 license](./LICENSE). However, TorchCodec may be used with code not written by Meta which may be distributed under different licenses. -For example, if you build TorchCodec with ENABLE_CUDA=1 or use the CUDA-enabled release of torchcodec, please review CUDA's license here: [Nvidia licenses](https://docs.nvidia.com/cuda/eula/index.html). +For example, if you build TorchCodec with ENABLE_CUDA=1 or use the CUDA-enabled +release of torchcodec, please review CUDA's license here: +[Nvidia licenses](https://docs.nvidia.com/cuda/eula/index.html).