Added in API level 17
Deprecated in API level 31

ScriptIntrinsicLUT

public final class ScriptIntrinsicLUT
extends ScriptIntrinsic

java.lang.Object
   ↳ android.renderscript.BaseObj
     ↳ android.renderscript.Script
       ↳ android.renderscript.ScriptIntrinsic
         ↳ android.renderscript.ScriptIntrinsicLUT


This class was deprecated in API level 31.
Renderscript has been deprecated in API level 31. Please refer to the migration guide for the proposed alternatives.

Intrinsic for applying a per-channel lookup table. Each channel of the input has an independant lookup table. The tables are 256 entries in size and can cover the full value range of Element#U8_4.

Summary

Public methods

static ScriptIntrinsicLUT create(RenderScript rs, Element e)

Supported elements types are Element#U8_4 The defaults tables are identity.

void destroy()

Frees any native resources associated with this object.

void forEach(Allocation ain, Allocation aout)

Invoke the kernel and apply the lookup to each cell of ain and copy to aout.

void forEach(Allocation ain, Allocation aout, Script.LaunchOptions opt)

Invoke the kernel and apply the lookup to each cell of ain and copy to aout.

Script.KernelID getKernelID()

Get a KernelID for this intrinsic kernel.

void setAlpha(int index, int value)

Set an entry in the alpha channel lookup table

void setBlue(int index, int value)

Set an entry in the blue channel lookup table

void setGreen(int index, int value)

Set an entry in the green channel lookup table

void setRed(int index, int value)

Set an entry in the red channel lookup table

Inherited methods

Public methods

create

Added in API level 17
public static ScriptIntrinsicLUT create (RenderScript rs, 
                Element e)

Supported elements types are Element#U8_4 The defaults tables are identity.

Parameters
rs RenderScript: The RenderScript context

e Element: Element type for intputs and outputs

Returns
ScriptIntrinsicLUT ScriptIntrinsicLUT

destroy

Added in API level 17
public void destroy ()

Frees any native resources associated with this object. The primary use is to force immediate cleanup of resources when it is believed the GC will not respond quickly enough.

forEach

Added in API level 17
public void forEach (Allocation ain, 
                Allocation aout)

Invoke the kernel and apply the lookup to each cell of ain and copy to aout.

Parameters
ain Allocation: Input allocation

aout Allocation: Output allocation

forEach

Added in API level 21
Deprecated in API level 31
public void forEach (Allocation ain, 
                Allocation aout, 
                Script.LaunchOptions opt)

Invoke the kernel and apply the lookup to each cell of ain and copy to aout.

Parameters
ain Allocation: Input allocation

aout Allocation: Output allocation

opt Script.LaunchOptions: Options for clipping

getKernelID

Added in API level 17
public Script.KernelID getKernelID ()

Get a KernelID for this intrinsic kernel.

Returns
Script.KernelID Script.KernelID The KernelID object.

setAlpha

Added in API level 17
public void setAlpha (int index, 
                int value)

Set an entry in the alpha channel lookup table

Parameters
index int: Must be 0-255

value int: Must be 0-255

setBlue

Added in API level 17
public void setBlue (int index, 
                int value)

Set an entry in the blue channel lookup table

Parameters
index int: Must be 0-255

value int: Must be 0-255

setGreen

Added in API level 17
public void setGreen (int index, 
                int value)

Set an entry in the green channel lookup table

Parameters
index int: Must be 0-255

value int: Must be 0-255

setRed

Added in API level 17
public void setRed (int index, 
                int value)

Set an entry in the red channel lookup table

Parameters
index int: Must be 0-255

value int: Must be 0-255