openglvideo.cpp File Reference

Go to the source code of this file.

Classes

class  OpenGLFilter

Variables

static const QString attrib_fast
static const QString tex_fast
static const QString var_fast
static const QString var_col
static const QString select_col
static const QString end_fast
static const QString var_deint
static const QString field_calc
static const QString bobdeint [2]
static const QString deint_end_top
static const QString deint_end_bot
static const QString linearblend [2]
static const QString kerneldeint [2]
static const QString bicubic
static const QString YUV2RGBVertexShader
static const QString SelectColumn
static const QString YUV2RGBFragmentShader
static const QString OneFieldShader [2]
static const QString LinearBlendShader [2]
static const QString KernelShader [2]
static const QString BicubicShader

Variable Documentation

const QString attrib_fast [static]
Initial value:
"ATTRIB tex   = fragment.texcoord[0];\n"
"PARAM yuv[3] = { program.local[0..2] };\n"

Definition at line 1144 of file openglvideo.cpp.

Referenced by OpenGLVideo::GetProgramString().

const QString tex_fast [static]
Initial value:
"TEX res, tex, texture[0], %1;\n"

Definition at line 1148 of file openglvideo.cpp.

Referenced by OpenGLVideo::GetProgramString().

const QString var_fast [static]
Initial value:
"TEMP tmp, res;\n"

Definition at line 1151 of file openglvideo.cpp.

Referenced by OpenGLVideo::GetProgramString().

const QString var_col [static]
Initial value:
"TEMP col;\n"

Definition at line 1154 of file openglvideo.cpp.

Referenced by OpenGLVideo::GetProgramString().

const QString select_col [static]
Initial value:
"MUL col, tex.xxxx, %8;\n"
"FRC col, col;\n"
"SUB col, col, 0.5;\n"
"CMP res, col, res.rabg, res.rgba;\n"

Definition at line 1157 of file openglvideo.cpp.

Referenced by OpenGLVideo::GetProgramString().

const QString end_fast [static]
Initial value:
"DPH tmp.r, res.arbg, yuv[0];\n"
"DPH tmp.g, res.arbg, yuv[1];\n"
"DPH tmp.b, res.arbg, yuv[2];\n"
"MOV tmp.a, 1.0;\n"
"MOV result.color, tmp;\n"

Definition at line 1163 of file openglvideo.cpp.

Referenced by OpenGLVideo::GetProgramString().

const QString var_deint [static]
Initial value:
"TEMP other, current, mov, prev;\n"

Definition at line 1170 of file openglvideo.cpp.

Referenced by OpenGLVideo::GetProgramString().

const QString field_calc [static]
Initial value:
"MUL prev, tex.yyyy, %2;\n"
"FRC prev, prev;\n"
"SUB prev, prev, 0.5;\n"

Definition at line 1173 of file openglvideo.cpp.

const QString bobdeint[2] [static]
Initial value:
 {
field_calc +
"ADD other, tex, {0.0, %3, 0.0, 0.0};\n"
"MIN other, other, {10000.0, %9, 10000.0, 10000.0};\n"
"TEX other, other, texture[0], %1;\n"
"CMP res, prev, res, other;\n",
field_calc +
"SUB other, tex, {0.0, %3, 0.0, 0.0};\n"
"TEX other, other, texture[0], %1;\n"
"CMP res, prev, other, res;\n"
}

Definition at line 1178 of file openglvideo.cpp.

Referenced by OpenGLVideo::GetProgramString().

const QString deint_end_top [static]
Initial value:
"CMP res,  prev, current, other;\n"

Definition at line 1190 of file openglvideo.cpp.

const QString deint_end_bot [static]
Initial value:
"CMP res,  prev, other, current;\n"

Definition at line 1193 of file openglvideo.cpp.

const QString linearblend[2] [static]
Initial value:
 {
"TEX current, tex, texture[0], %1;\n"
"ADD other, tex, {0.0, %3, 0.0, 0.0};\n"
"MIN other, other, {10000.0, %9, 10000.0, 10000.0};\n"
"TEX other, other, texture[0], %1;\n"
"SUB mov, tex, {0.0, %3, 0.0, 0.0};\n"
"TEX mov, mov, texture[0], %1;\n"
"LRP other, 0.5, other, mov;\n"
+ field_calc + deint_end_top,

"TEX current, tex, texture[0], %1;\n"
"SUB other, tex, {0.0, %3, 0.0, 0.0};\n"
"TEX other, other, texture[0], %1;\n"
"ADD mov, tex, {0.0, %3, 0.0, 0.0};\n"
"TEX mov, mov, texture[0], %1;\n"
"LRP other, 0.5, other, mov;\n"
+ field_calc + deint_end_bot
}

Definition at line 1196 of file openglvideo.cpp.

Referenced by OpenGLVideo::GetProgramString().

const QString kerneldeint[2] [static]

Definition at line 1215 of file openglvideo.cpp.

Referenced by OpenGLVideo::GetProgramString().

const QString bicubic [static]
Initial value:
"TEMP coord, coord2, cdelta, parmx, parmy, a, b, c, d;\n"
"MAD coord.xy, fragment.texcoord[0], {%6, %7}, {0.5, 0.5};\n"
"TEX parmx, coord.x, texture[1], 1D;\n"
"TEX parmy, coord.y, texture[1], 1D;\n"
"MUL cdelta.xz, parmx.rrgg, {-%5, 0, %5, 0};\n"
"MUL cdelta.yw, parmy.rrgg, {0, -%3, 0, %3};\n"
"ADD coord, fragment.texcoord[0].xyxy, cdelta.xyxw;\n"
"ADD coord2, fragment.texcoord[0].xyxy, cdelta.zyzw;\n"
"TEX a, coord.xyxy, texture[0], 2D;\n"
"TEX b, coord.zwzw, texture[0], 2D;\n"
"TEX c, coord2.xyxy, texture[0], 2D;\n"
"TEX d, coord2.zwzw, texture[0], 2D;\n"
"LRP a, parmy.b, a, b;\n"
"LRP c, parmy.b, c, d;\n"
"LRP result.color, parmx.b, a, c;\n"

Definition at line 1261 of file openglvideo.cpp.

Referenced by OpenGLVideo::GetProgramString().

const QString YUV2RGBVertexShader [static]
Initial value:
"GLSL_DEFINES"
"attribute vec2 a_position;\n"
"attribute vec2 a_texcoord0;\n"
"varying   vec2 v_texcoord0;\n"
"uniform   mat4 u_projection;\n"
"void main() {\n"
"    gl_Position = u_projection * vec4(a_position, 0.0, 1.0);\n"
"    v_texcoord0 = a_texcoord0;\n"
"}\n"

Definition at line 1394 of file openglvideo.cpp.

Referenced by OpenGLVideo::GetProgramStrings().

const QString SelectColumn [static]
Initial value:
"    if (fract(v_texcoord0.x * %8) < 0.5)\n"
"        yuva = yuva.rabg;\n"

Definition at line 1405 of file openglvideo.cpp.

Referenced by OpenGLVideo::GetProgramStrings().

const QString YUV2RGBFragmentShader [static]
Initial value:
"GLSL_DEFINES"
"uniform GLSL_SAMPLER s_texture0;\n"
"uniform mat4 COLOUR_UNIFORM;\n"
"varying vec2 v_texcoord0;\n"
"void main(void)\n"
"{\n"
"    vec4 yuva    = GLSL_TEXTURE(s_texture0, v_texcoord0);\n"
"SELECT_COLUMN"
"    gl_FragColor = vec4(yuva.arb, 1.0) * COLOUR_UNIFORM;\n"
"}\n"

Definition at line 1409 of file openglvideo.cpp.

Referenced by OpenGLVideo::GetProgramStrings().

const QString OneFieldShader[2] [static]
Initial value:
 {
"GLSL_DEFINES"
"uniform GLSL_SAMPLER s_texture0;\n"
"uniform mat4 COLOUR_UNIFORM;\n"
"varying vec2 v_texcoord0;\n"
"void main(void)\n"
"{\n"
"    float field = v_texcoord0.y + (step(0.5, fract(v_texcoord0.y * %2)) * %3);\n"
"    field       = clamp(field, 0.0, %9);\n"
"    vec4 yuva   = GLSL_TEXTURE(s_texture0, vec2(v_texcoord0.x, field));\n"
"SELECT_COLUMN"
"    gl_FragColor = vec4(yuva.arb, 1.0) * COLOUR_UNIFORM;\n"
"}\n",

"GLSL_DEFINES"
"uniform GLSL_SAMPLER s_texture0;\n"
"uniform mat4 COLOUR_UNIFORM;\n"
"varying vec2 v_texcoord0;\n"
"void main(void)\n"
"{\n"
"    vec2 field   = vec2(0.0, step(0.5, 1.0 - fract(v_texcoord0.y * %2)) * %3);\n"
"    vec4 yuva    = GLSL_TEXTURE(s_texture0, v_texcoord0 + field);\n"
"SELECT_COLUMN"
"    gl_FragColor = vec4(yuva.arb, 1.0) * COLOUR_UNIFORM;\n"
"}\n"
}

Definition at line 1421 of file openglvideo.cpp.

Referenced by OpenGLVideo::GetProgramStrings().

const QString LinearBlendShader[2] [static]

Definition at line 1448 of file openglvideo.cpp.

Referenced by OpenGLVideo::GetProgramStrings().

const QString KernelShader[2] [static]

Definition at line 1483 of file openglvideo.cpp.

Referenced by OpenGLVideo::GetProgramStrings().

const QString BicubicShader [static]
Initial value:
"GLSL_DEFINES"
"uniform sampler2D s_texture0;\n"
"uniform sampler1D s_texture1;\n"
"varying vec2 v_texcoord0;\n"
"void main(void)\n"
"{\n"
"    vec2 coord = (v_texcoord0 * vec2(%6, %7)) - vec2(0.5, 0.5);\n"
"    vec4 parmx = texture1D(s_texture1, coord.x);\n"
"    vec4 parmy = texture1D(s_texture1, coord.y);\n"
"    vec2 e_x = vec2(%5, 0.0);\n"
"    vec2 e_y = vec2(0.0, %3);\n"
"    vec2 coord10 = v_texcoord0 + parmx.x * e_x;\n"
"    vec2 coord00 = v_texcoord0 - parmx.y * e_x;\n"
"    vec2 coord11 = coord10     + parmy.x * e_y;\n"
"    vec2 coord01 = coord00     + parmy.x * e_y;\n"
"    coord10      = coord10     - parmy.y * e_y;\n"
"    coord00      = coord00     - parmy.y * e_y;\n"
"    vec4 tex00   = texture2D(s_texture0, coord00);\n"
"    vec4 tex10   = texture2D(s_texture0, coord10);\n"
"    vec4 tex01   = texture2D(s_texture0, coord01);\n"
"    vec4 tex11   = texture2D(s_texture0, coord11);\n"
"    tex00        = mix(tex00, tex01, parmy.z);\n"
"    tex10        = mix(tex10, tex11, parmy.z);\n"
"    gl_FragColor = mix(tex00, tex10, parmx.z);\n"
"}\n"

Definition at line 1550 of file openglvideo.cpp.

Referenced by OpenGLVideo::GetProgramStrings().

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends
Generated on Sun May 27 06:41:46 2012 for MythTV by  doxygen 1.6.3