java.lang.Object | ||||
↳ | android.support.v8.renderscript.BaseObj | |||
↳ | android.support.v8.renderscript.Script | |||
↳ | android.support.v8.renderscript.ScriptIntrinsic | |||
↳ | android.support.v8.renderscript.ScriptIntrinsicColorMatrix |
Intrinsic for applying a color matrix to allocations.
This has the same effect as loading each element and
converting it to a F32_4(RenderScript)
, multiplying the
result by the 4x4 color matrix as performed by
rsMatrixMultiply() and writing it to the output after
conversion back to U8_4(RenderScript)
.
Protected Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Create an intrinsic for applying a color matrix to an
allocation.
| |||||||||||
Invoke the kernel and apply the matrix to each cell of ain and copy to
aout.
| |||||||||||
Invoke the kernel and apply the matrix to each cell of input
Allocation and copy to the output Allocation .
| |||||||||||
Get a KernelID for this intrinsic kernel.
| |||||||||||
Set the value to be added after the color matrix has been
applied.
| |||||||||||
Set the value to be added after the color matrix has been
applied.
| |||||||||||
Set the color matrix which will be applied to each cell of the image.
| |||||||||||
Set the color matrix which will be applied to each cell of
the image.
| |||||||||||
Set a color matrix to convert from RGB to luminance.
| |||||||||||
Set the matrix to convert from RGB to YUV with a direct copy of the 4th
channel.
| |||||||||||
Set the matrix to convert from YUV to RGB with a direct copy of the 4th
channel.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
android.support.v8.renderscript.Script
| |||||||||||
From class
android.support.v8.renderscript.BaseObj
| |||||||||||
From class
java.lang.Object
|
Create an intrinsic for applying a color matrix to an
allocation.
Supported elements types are U8_4(RenderScript)
rs | The RenderScript context |
---|---|
e | Element type for intputs and outputs |
Invoke the kernel and apply the matrix to each cell of ain and copy to aout.
ain | Input allocation |
---|---|
aout | Output allocation |
Invoke the kernel and apply the matrix to each cell of input
Allocation
and copy to the output Allocation
.
If the vector size of the input is less than four, the
remaining components are treated as zero for the matrix
multiply.
If the output vector size is less than four, the unused
vector components are discarded.
ain | Input allocation |
---|---|
aout | Output allocation |
opt | LaunchOptions for clipping |
Get a KernelID for this intrinsic kernel.
Set the value to be added after the color matrix has been applied. The default value is {0, 0, 0, 0}
r | The red add value. |
---|---|
g | The green add value. |
b | The blue add value. |
a | The alpha add value. |
Set the value to be added after the color matrix has been applied. The default value is {0, 0, 0, 0}
f | The float4 value to be added. |
---|
Set the color matrix which will be applied to each cell of the image. This will set the alpha channel to be a copy.
m | The 3x3 matrix to set. |
---|
Set the color matrix which will be applied to each cell of the image.
m | The 4x4 matrix to set. |
---|
Set a color matrix to convert from RGB to luminance. The alpha channel will be a copy.
Set the matrix to convert from RGB to YUV with a direct copy of the 4th channel.
Set the matrix to convert from YUV to RGB with a direct copy of the 4th channel.