Class Overview
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)
.
Summary
[Expand]
Inherited Methods |
From class
android.support.v8.renderscript.Script
void
|
bindAllocation(Allocation va, int slot)
Only intended for use by generated reflected code.
|
Script.FieldID
|
createFieldID(int slot, Element e)
Only to be used by generated reflected classes.
|
Script.KernelID
|
createKernelID(int slot, int sig, Element ein, Element eout)
Only to be used by generated reflected classes.
|
void
|
forEach(int slot, Allocation ain, Allocation aout, FieldPacker v)
Only intended for use by generated reflected code.
|
void
|
forEach(int slot, Allocation ain, Allocation aout, FieldPacker v, Script.LaunchOptions sc)
Only intended for use by generated reflected code.
|
void
|
invoke(int slot)
Only intended for use by generated reflected code.
|
void
|
invoke(int slot, FieldPacker v)
Only intended for use by generated reflected code.
|
void
|
setTimeZone(String timeZone)
|
void
|
setVar(int index, int v)
Only intended for use by generated reflected code.
|
void
|
setVar(int index, FieldPacker v, Element e, int[] dims)
Only intended for use by generated reflected code.
|
void
|
setVar(int index, double v)
Only intended for use by generated reflected code.
|
void
|
setVar(int index, boolean v)
Only intended for use by generated reflected code.
|
void
|
setVar(int index, float v)
Only intended for use by generated reflected code.
|
void
|
setVar(int index, long v)
Only intended for use by generated reflected code.
|
void
|
setVar(int index, FieldPacker v)
Only intended for use by generated reflected code.
|
void
|
setVar(int index, BaseObj o)
Only intended for use by generated reflected code.
|
|
From class
android.support.v8.renderscript.BaseObj
synchronized
void
|
destroy()
Frees any native resources associated with this object.
|
boolean
|
equals(Object obj)
Compare the current BaseObj with another BaseObj for equality.
|
void
|
finalize()
Invoked when the garbage collector has detected that this instance is no longer reachable.
|
int
|
hashCode()
Calculates the hash code value for a BaseObj.
|
|
From class
java.lang.Object
Object
|
clone()
Creates and returns a copy of this Object .
|
boolean
|
equals(Object o)
Compares this instance with the specified object and indicates if they
are equal.
|
void
|
finalize()
Invoked when the garbage collector has detected that this instance is no longer reachable.
|
final
Class<?>
|
getClass()
Returns the unique instance of Class that represents this
object's class.
|
int
|
hashCode()
Returns an integer hash code for this object.
|
final
void
|
notify()
Causes a thread which is waiting on this object's monitor (by means of
calling one of the wait() methods) to be woken up.
|
final
void
|
notifyAll()
Causes all threads which are waiting on this object's monitor (by means
of calling one of the wait() methods) to be woken up.
|
String
|
toString()
Returns a string containing a concise, human-readable description of this
object.
|
final
void
|
wait()
Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object.
|
final
void
|
wait(long millis, int nanos)
Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object or until the
specified timeout expires.
|
final
void
|
wait(long millis)
Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object or until the
specified timeout expires.
|
|
Protected Constructors
protected
ScriptIntrinsicColorMatrix
(int id, RenderScript rs)
Public Methods
Create an intrinsic for applying a color matrix to an
allocation.
Supported elements types are U8_4(RenderScript)
Parameters
rs
| The RenderScript context |
e
| Element type for intputs and outputs |
Returns
- ScriptIntrinsicColorMatrix
Invoke the kernel and apply the matrix to each cell of ain and copy to
aout.
Parameters
ain
| Input allocation |
aout
| Output allocation
|
Get a KernelID for this intrinsic kernel.
Returns
- Script.KernelID The KernelID object.
public
void
setColorMatrix
(Matrix3f m)
Set the color matrix which will be applied to each cell of the image.
This will set the alpha channel to be a copy.
public
void
setColorMatrix
(Matrix4f m)
Set the color matrix which will be applied to each cell of
the image.
public
void
setGreyscale
()
Set a color matrix to convert from RGB to luminance. The alpha channel
will be a copy.
public
void
setRGBtoYUV
()
Set the matrix to convert from RGB to YUV with a direct copy of the 4th
channel.
public
void
setYUVtoRGB
()
Set the matrix to convert from YUV to RGB with a direct copy of the 4th
channel.