C# Class QuadVideo.YCrCbProcessor

ファイルを表示 Open project: Wiladams/NewTOAPIA Class Usage Examples

Public Properties

Property Type Description
FixedVert string
YCrCb_Frag string

Public Methods

Method Description
SeparateChannels ( GLTexture2D currentTexture ) : void

Perform Color separation in one pass. There are a total of 4 texture objects involved, a RenderTarget, and fragment shader. The source texture, is assumed to be the video texture. That is what will be rendered as a quad into the RenderTarget. The Y, Cr, and Cb textures have been attached to the color buffer attachment points of the RenderTarget. The shader program simply takes the source fragment, and performs the Y, Cr, Cb separation calculations and places the output into the appropriate color buffers. And the end, the Y, Cr, Cb texture objects contain the results. All done in one pass, using a shader program, in the time that it takes to render a single quad into an offscreen buffer.

YCrCbProcessor ( GraphicsInterface gi, int width, int height ) : System

Method Details

SeparateChannels() public method

Perform Color separation in one pass. There are a total of 4 texture objects involved, a RenderTarget, and fragment shader. The source texture, is assumed to be the video texture. That is what will be rendered as a quad into the RenderTarget. The Y, Cr, and Cb textures have been attached to the color buffer attachment points of the RenderTarget. The shader program simply takes the source fragment, and performs the Y, Cr, Cb separation calculations and places the output into the appropriate color buffers. And the end, the Y, Cr, Cb texture objects contain the results. All done in one pass, using a shader program, in the time that it takes to render a single quad into an offscreen buffer.
public SeparateChannels ( GLTexture2D currentTexture ) : void
currentTexture NewTOAPIA.GL.GLTexture2D
return void

YCrCbProcessor() public method

public YCrCbProcessor ( GraphicsInterface gi, int width, int height ) : System
gi NewTOAPIA.GL.GraphicsInterface
width int
height int
return System

Property Details

FixedVert public_oe static_oe property

public static string FixedVert
return string

YCrCb_Frag public_oe static_oe property

This fragment shader will separate an incoming texture, as specified in the tex0 uniform variable, into a Y, Cr, and Cb channel. Its operation is dependent on the grahics driver support of the GL_ARB_draw_buffers extension. This will not operate on all machines.
public static string YCrCb_Frag
return string