Skip to content

Commit

Permalink
gl: add shader license
Browse files Browse the repository at this point in the history
  • Loading branch information
wang-bin committed Apr 18, 2014
1 parent 6f4bbf7 commit 6b6f8bb
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 0 deletions.
21 changes: 21 additions & 0 deletions src/shaders/rgb.f.glsl
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
/******************************************************************************
QtAV: Media play library based on Qt and FFmpeg
Copyright (C) 2012-2014 Wang Bin <[email protected]>
* This file is part of QtAV
This library 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.
This library 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 this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
******************************************************************************/

#ifdef GL_ES
// Set default precision to medium
precision mediump int;
Expand Down
22 changes: 22 additions & 0 deletions src/shaders/yuv_rgb.f.glsl
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
/******************************************************************************
QtAV: Media play library based on Qt and FFmpeg
Copyright (C) 2012-2014 Wang Bin <[email protected]>
* This file is part of QtAV
This library 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.
This library 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 this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
******************************************************************************/

#ifdef GL_ES
// Set default precision to medium
precision mediump int;
Expand Down Expand Up @@ -57,6 +78,7 @@ void main()
(texture2D(u_Texture1, v_TexCoords).r*256.0 + texture2D(u_Texture1, v_TexCoords).a)*255.0/range,
(texture2D(u_Texture2, v_TexCoords).r*256.0 + texture2D(u_Texture2, v_TexCoords).a)*255.0/range,
#else
// use r, g, a to work for both yv12 and nv12. idea from xbmc
texture2D(u_Texture0, v_TexCoords).r,
texture2D(u_Texture1, v_TexCoords).g,
texture2D(u_Texture2, v_TexCoords).a,
Expand Down

0 comments on commit 6b6f8bb

Please sign in to comment.