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
db403023
Commit
db403023
authored
Feb 08, 2014
by
Lukasz Marek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavd/opengl_enc: add gray8/16 formats
Signed-off-by:
Lukasz Marek
<
lukasz.m.luki@gmail.com
>
parent
c107769c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
0 deletions
+14
-0
opengl_enc.c
libavdevice/opengl_enc.c
+2
-0
opengl_enc_shaders.h
libavdevice/opengl_enc_shaders.h
+12
-0
No files found.
libavdevice/opengl_enc.c
View file @
db403023
...
...
@@ -265,6 +265,8 @@ static const struct OpenGLFormatDesc {
{
AV_PIX_FMT_GBRP16
,
&
FF_OPENGL_FRAGMENT_SHADER_RGB_PLANAR
,
FF_GL_RED_COMPONENT
,
GL_UNSIGNED_SHORT
},
{
AV_PIX_FMT_GBRAP
,
&
FF_OPENGL_FRAGMENT_SHADER_RGBA_PLANAR
,
FF_GL_RED_COMPONENT
,
GL_UNSIGNED_BYTE
},
{
AV_PIX_FMT_GBRAP16
,
&
FF_OPENGL_FRAGMENT_SHADER_RGBA_PLANAR
,
FF_GL_RED_COMPONENT
,
GL_UNSIGNED_SHORT
},
{
AV_PIX_FMT_GRAY8
,
&
FF_OPENGL_FRAGMENT_SHADER_GRAY
,
FF_GL_RED_COMPONENT
,
GL_UNSIGNED_BYTE
},
{
AV_PIX_FMT_GRAY16
,
&
FF_OPENGL_FRAGMENT_SHADER_GRAY
,
FF_GL_RED_COMPONENT
,
GL_UNSIGNED_SHORT
},
{
AV_PIX_FMT_NONE
,
NULL
}
};
...
...
libavdevice/opengl_enc_shaders.h
View file @
db403023
...
...
@@ -173,4 +173,16 @@ static const char * const FF_OPENGL_FRAGMENT_SHADER_YUVA_PLANAR =
"1.5958, -0.81290, 0.0) * yuv, texture2D(u_texture3, texture_coordinate).r), 0.0, 1.0);"
"}"
;
static
const
char
*
const
FF_OPENGL_FRAGMENT_SHADER_GRAY
=
#if defined(GL_ES_VERSION_2_0)
"precision mediump float;"
#endif
"uniform sampler2D u_texture0;"
"varying vec2 texture_coordinate;"
"void main()"
"{"
"float c = texture2D(u_texture0, texture_coordinate);"
"gl_FragColor = vec4(c, c, c, 1.0);"
"}"
;
#endif
/* AVDEVICE_OPENGL_SHADERS_H */
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