Skip to content
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

Update load_video node for more accurate color conversion and chroma reconstruction #2532

Merged
merged 3 commits into from Jan 29, 2024

Conversation

mrjschulte
Copy link
Contributor

This PR updates the ffmpeg based load_video node to use a more accurate color decoding and chroma reconstruction path.

This node now uses lanczos filtering by default and also skips the previously present extra conversion from rgb24 to bgr24 by having ffmpeg send a bgr24 rawvideo pipe natively to chaiNNer

…construction

This PR updates the ffmpeg based load_video node to use a more accurate color decoding and chroma reconstruction path.  

This node now uses lanczos filtering by default and also skips the previously present extra conversion from rgb24 to bgr24 by having ffmpeg send a bgr24 rawvideo pipe natively to chaiNNer
joeyballentine
joeyballentine previously approved these changes Jan 29, 2024
Copy link
Member

@joeyballentine joeyballentine left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Videos process with a roughly 1.05x speed increase with this. That, combined with the better filtering, makes this a decent improvement.

@joeyballentine
Copy link
Member

We use a great package called ruff for formatting and linting, which found some small issues with this. This PR will be good to go once those detected issues are fixed. Thanks again!

remove cv2 import as this is no longer needed.
@mrjschulte
Copy link
Contributor Author

Ok, removed the dead cv2 import so should be good now.

@joeyballentine joeyballentine merged commit 7499738 into chaiNNer-org:main Jan 29, 2024
14 checks passed
@adegerard
Copy link
Contributor

question: sws flags are for scaling, why having added them?

@RunDevelopment
Copy link
Member

question: sws flags are for scaling, why having added them?

Chroma is typically stored at a low resolution, so it needs to be upsampled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants