Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
59d65293
Commit
59d65293
authored
Sep 10, 2017
by
Mark Thompson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavfi: Add infrastructure for building OpenCL source into libavfilter
parent
5c21c41b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
48 additions
and
0 deletions
+48
-0
Makefile
libavfilter/Makefile
+6
-0
opencl_source.h
libavfilter/opencl_source.h
+22
-0
cl2c
tools/cl2c
+20
-0
No files found.
libavfilter/Makefile
View file @
59d65293
...
...
@@ -405,3 +405,9 @@ TOOLS-$(CONFIG_LIBZMQ) += zmqsend
clean
::
$(RM)
$
(
CLEANSUFFIXES:%
=
libavfilter/libmpcodecs/%
)
OPENCL
=
$
(
subst
$(SRC_PATH)
/,,
$
(
wildcard
$(SRC_PATH)
/libavfilter/opencl/
*
.cl
))
.SECONDARY
:
$(OPENCL:.cl=.c)
libavfilter/opencl/%.c
:
TAG = OPENCL
libavfilter/opencl/%.c
:
$(SRC_PATH)/libavfilter/opencl/%.cl
$(M)$(SRC_PATH)
/tools/cl2c
$<
$@
libavfilter/opencl_source.h
0 → 100644
View file @
59d65293
/*
* This file is part of FFmpeg.
*
* FFmpeg is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* FFmpeg is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with FFmpeg; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef AVFILTER_OPENCL_SOURCE_H
#define AVFILTER_OPENCL_SOURCE_H
#endif
/* AVFILTER_OPENCL_SOURCE_H */
tools/cl2c
0 → 100755
View file @
59d65293
#!/bin/sh
# Convert an OpenCL source file into a C source file containing the
# OpenCL source as a C string. Also adds a #line directive so that
# compiler messages are useful.
input
=
"
$1
"
output
=
"
$2
"
name
=
$(
basename
"
$input
"
|
sed
's/.cl$//'
)
cat
>
$output
<<
EOF
// Generated from
$input
const char *ff_opencl_source_
$name
=
"#line 1 \"
$input
\"\n"
EOF
# Convert \ to \\ and " to \", then add " to the start and end of the line.
cat
"
$input
"
|
sed
's/\\/\\\\/g;s/\"/\\\"/g;s/^/\"/;s/$/\\n\"/'
>>
$output
echo
";"
>>
$output
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment