Public Member Functions | Static Public Member Functions
android::RSC::ScriptIntrinsicColorMatrix Class Reference

#include <rsCppStructs.h>

Inheritance diagram for android::RSC::ScriptIntrinsicColorMatrix:
android::RSC::ScriptIntrinsic android::RSC::Script android::RSC::BaseObj

Public Member Functions

void forEach (sp< Allocation > in, sp< Allocation > out)
void setAdd (float *add)
void setColorMatrix3 (float *m)
void setColorMatrix4 (float *m)
void setGreyscale ()
void setRGBtoYUV ()
void setYUVtoRGB ()

Static Public Member Functions

static sp
< ScriptIntrinsicColorMatrix
create (sp< RS > rs)

Detailed Description

Intrinsic for applying a color matrix to allocations. This has the same effect as loading each element and converting it to a F32_N, multiplying the result by the 4x4 color matrix as performed by rsMatrixMultiply() and writing it to the output after conversion back to U8_N or F32_N.

Definition at line 1577 of file rsCppStructs.h.


Member Function Documentation

static sp<ScriptIntrinsicColorMatrix> android::RSC::ScriptIntrinsicColorMatrix::create ( sp< RS rs) [static]

Creates a new intrinsic.

Parameters:
[in]rsRenderScript context
Returns:
new ScriptIntrinsicColorMatrix
void android::RSC::ScriptIntrinsicColorMatrix::forEach ( sp< Allocation in,
sp< Allocation out 
)

Applies the color matrix. Supported types are U8 and F32 with vector lengths between 1 and 4.

Parameters:
[in]ininput Allocation
[out]outoutput Allocation
void android::RSC::ScriptIntrinsicColorMatrix::setAdd ( float *  add)

Set the value to be added after the color matrix has been applied. The default value is {0, 0, 0, 0}.

Parameters:
[in]addfloat[4] of values
void android::RSC::ScriptIntrinsicColorMatrix::setColorMatrix3 ( float *  m)

Set the color matrix which will be applied to each cell of the image. The alpha channel will be copied.

Parameters:
[in]mfloat[9] of values
void android::RSC::ScriptIntrinsicColorMatrix::setColorMatrix4 ( float *  m)

Set the color matrix which will be applied to each cell of the image.

Parameters:
[in]mfloat[16] of values
void android::RSC::ScriptIntrinsicColorMatrix::setGreyscale ( )

Set a color matrix to convert from RGB to luminance. The alpha channel will be a copy.

void android::RSC::ScriptIntrinsicColorMatrix::setRGBtoYUV ( )

Set the matrix to convert from RGB to YUV with a direct copy of the 4th channel.

void android::RSC::ScriptIntrinsicColorMatrix::setYUVtoRGB ( )

Set the matrix to convert from YUV to RGB with a direct copy of the 4th channel.


The documentation for this class was generated from the following file: