Draft
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/meta-pytorch/torchcodec/1242
Note: Links to docs will display an error until the docs builds have been completed. ❌ 28 New FailuresAs of commit f55a9a1 with merge base cc15044 ( NEW FAILURES - The following jobs have failed:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
NicolasHug
commented
Feb 16, 2026
| {INITIAL_TENSOR_SIZE}, | ||
| kStableUInt8, | ||
| kStableStrided, | ||
| StableDevice(kStableCPU)), |
Contributor
Author
There was a problem hiding this comment.
TODO: rely on defaults?
Comment on lines
+65
to
+66
| // We double the size of the outpout tensor. Calling stableCat() may not be | ||
| // the most efficient, but it's simple. |
| // For Decoding: enables users to pass in the entire video or audio as bytes. | ||
| // Our read and seek functions then traverse the bytes in memory. | ||
| class AVIOFromTensorContext : public AVIOContextHolder { | ||
| class TORCHCODEC_API AVIOFromTensorContext : public AVIOContextHolder { |
Contributor
Author
There was a problem hiding this comment.
TODO: why is TORCHCODEC_API needed?
| torch::stable::copy_( | ||
| preAllocatedOutputTensor.value(), | ||
| frameOutput.data, | ||
| /*non_blocking=*/std::nullopt); |
Contributor
Author
There was a problem hiding this comment.
TODO rely on default?
Comment on lines
+504
to
+505
| kStableStrided, | ||
| StableDevice(kStableCPU)); |
Contributor
Author
There was a problem hiding this comment.
TODO rely on default?
| // AVFrame::data requires uint8_t* (non-const). We use const_data_ptr and | ||
| // const_cast since FFmpeg's sws_scale treats the source as const internally. | ||
| uint8_t* tensorData = | ||
| const_cast<uint8_t*>(static_cast<const uint8_t*>(frame.const_data_ptr())); |
Contributor
Author
There was a problem hiding this comment.
TODO understand this
|
|
||
| #include <fmt/format.h> | ||
| #include <pybind11/pybind11.h> | ||
| #include <torch/types.h> |
Contributor
Author
There was a problem hiding this comment.
TODO review entire file
| UniqueAVFrame avFrameToDelete(it->second); | ||
| g_avframe_map.erase(it); | ||
| } | ||
| } |
| // Returns an optional tensor containing the flushed samples, or std::nullopt | ||
| // if there are no buffered samples or audio is not supported. | ||
| virtual std::optional<torch::Tensor> maybeFlushAudioBuffers() { | ||
| virtual std::optional<StableTensor> maybeFlushAudioBuffers() { |
Contributor
Author
There was a problem hiding this comment.
TODO review everything below this file.
|
|
||
| // ============================================================================ | ||
| // Tensor types | ||
| // ============================================================================ |
Contributor
Author
There was a problem hiding this comment.
Consider removing most aliases
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.