-
Notifications
You must be signed in to change notification settings - Fork 78
Add OpenCL support #32
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 all commits
Commits
Show all changes
33 commits
Select commit
Hold shift + click to select a range
c9000ef
Add optional OpenCL support
soreau c96a739
Various fixes
soreau f4f9242
Warn when unfavorable dimensions are found
soreau 4c1e0ac
Add copyright headers to opencl source files
soreau fd07f0b
Choose hardware path for rgb to yuv conversion when applicable
soreau 9ddad65
Fix bug
soreau c93ee70
Choose correct format when opencl is disabled and -t is specified
soreau d99dac4
s/yuv/nv12/
soreau f84d51c
Style nitpicks
soreau 99faeff
Use yuv420p instead of nv12 when using sws_scale() since it is faster
soreau b698fbc
Fix memleak
soreau a81c014
Get rid of some #ifdef nonsense
soreau fdb6b0f
Make ret variable private again
soreau 7d9befb
Use faster yuv420p when converting rgb in vaapi path without opencl
soreau 1c71f0a
More error handling
soreau e65a480
More error handling
soreau 6f5d0de
Switch opencl shader from nv12 to yuv420p and introduce --no-opencl o…
soreau 1f96239
Fix pixel averaging
soreau ed653af
Fix vaapi encoding when opencl and sws_scale are not used
soreau 9e19cd5
Use string literal for opencl program
soreau 4ebb6a3
Move duplicated code into function
ammen99 ad7e3eb
Rename options
soreau 5a9b073
Remove debug messages
soreau 6ebad8e
Couple fixups
soreau 7192114
Fixups
soreau fe3c2ae
Update README.md
soreau 4ef0ae7
Allow user to specify opencl device
soreau b620a5c
Don't allocate more memory than needed
soreau 889a972
Actually, reading 4 x the data gives better perf without vaapi
soreau 4c67933
Fix-up
soreau cd01576
Remove which no longer causes segfault
soreau bd250b0
Update help and README.md
soreau 6c1d4fa
Fix mistake in help
soreau 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,4 @@ | ||
| #pragma once | ||
|
|
||
| #define DEFAULT_CODEC "@default_codec@" | ||
| #define DEFAULT_CODEC "@default_codec@" | ||
| #mesondefine HAVE_OPENCL |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,3 @@ | ||
| option('default_codec', type: 'string', value: 'libx264', description: 'Codec that will be used by default') | ||
| option('man-pages', type: 'feature', value: 'auto', description: 'Generate and install man pages') | ||
| option('opencl', type: 'feature', value: 'auto', description: 'Enable OpenCL') |
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.
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.
we can move this inside the #ifdef
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.
The point of this is to not leave y_invert variable declared but not used in the case where opencl is disabled. If we put it inside the ifdef, the warning still happens.