-
Notifications
You must be signed in to change notification settings - Fork 35
Allow option to use the swscale library for color conversion instead of filtergraph #205
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 25 commits
Commits
Show all changes
33 commits
Select commit
Hold shift + click to select a range
740bf6b
Refactored
ahmadsharif1 6856623
SwsScale is working.
ahmadsharif1 2dfe9e9
.
ahmadsharif1 551a7fd
.
ahmadsharif1 74a563c
.
ahmadsharif1 99fd2b7
.
ahmadsharif1 cbdb7c8
.
ahmadsharif1 5c8344d
.
ahmadsharif1 5ec4e5d
.
ahmadsharif1 bdb8bf0
.
ahmadsharif1 167167c
.
ahmadsharif1 44fea81
.
ahmadsharif1 f98f50b
.
ahmadsharif1 9e0a087
.
ahmadsharif1 9cc01ea
.
ahmadsharif1 7c0f84f
.
ahmadsharif1 e126da6
.
ahmadsharif1 7b925cb
.
ahmadsharif1 e6eeac1
.
ahmadsharif1 0f67356
.
ahmadsharif1 b218730
.
ahmadsharif1 56f68eb
Merge branch 'main' of https://github.com/pytorch/torchcodec into sws
ahmadsharif1 01751c4
.
ahmadsharif1 dd86721
.
ahmadsharif1 29a0708
.
ahmadsharif1 14e043a
.
ahmadsharif1 73636a8
.
ahmadsharif1 e1e1f68
.
ahmadsharif1 e2e6cf8
.
ahmadsharif1 b1b09ea
.
ahmadsharif1 23c889f
Merge branch 'main' of https://github.com/pytorch/torchcodec into sws
ahmadsharif1 c899596
.
ahmadsharif1 9beaf98
Merge branch 'main' of https://github.com/pytorch/torchcodec into sws
ahmadsharif1 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you intending to time how long it takes to do the deallocations of memory on the C++ side? Note that
del reader
on the Python side will only decrement a reference counter. You can make an explicit call to the garbage collector (see https://docs.python.org/3/library/gc.html#gc.collect), but that's going to do a full collection of all garbage. If you're trying to time how long it takes to deallocate the objects on the C++ side, I don't know if there's a way to do that reliably from Python.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This code was for my own debugging/edification and is turned off by default. A private variable controls it.
I can delete it if you want. It's developer-only code -- not user-facing.
Let me know.
I timed the code btw -- when using pytorch to time it, the aggregate profile doesn't change when I call
del decoder
on it. It's just that if you print the iters, you can see a timing difference once in every few iters.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the benchmark is easier to understand without it, honestly. If we keep it, then we need a comment explaining that we know this would happen anyway when the function exits, and this does not actually cause the GC to happen, but doing this here before the function exists allows us to sometimes see the cost of GC.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed the del line now