Android APIs
public final class

ScriptIntrinsicYuvToRGB

extends ScriptIntrinsic
java.lang.Object
   ↳ android.renderscript.BaseObj
     ↳ android.renderscript.Script
       ↳ android.renderscript.ScriptIntrinsic
         ↳ android.renderscript.ScriptIntrinsicYuvToRGB

Class Overview

Intrinsic for converting an Android YUV buffer to RGB. The input allocation should be supplied in a supported YUV format as a YUV element Allocation. The output is RGBA; the alpha channel will be set to 255.

Summary

Public Methods
static ScriptIntrinsicYuvToRGB create(RenderScript rs, Element e)
Create an intrinsic for converting YUV to RGB.
void forEach(Allocation aout)
Convert the image to RGB.
Script.FieldID getFieldID_Input()
Get a FieldID for the input field of this intrinsic.
Script.KernelID getKernelID()
Get a KernelID for this intrinsic kernel.
void setInput(Allocation ain)
Set the input yuv allocation, must be U8(RenderScript).
[Expand]
Inherited Methods
From class android.renderscript.Script
From class android.renderscript.BaseObj
From class java.lang.Object

Public Methods

public static ScriptIntrinsicYuvToRGB create (RenderScript rs, Element e)

Added in API level 17

Create an intrinsic for converting YUV to RGB. Supported elements types are U8_4(RenderScript)

Parameters
rs The RenderScript context
e Element type for output
Returns
  • ScriptIntrinsicYuvToRGB

public void forEach (Allocation aout)

Added in API level 17

Convert the image to RGB.

Parameters
aout Output allocation. Must match creation element type.

public Script.FieldID getFieldID_Input ()

Added in API level 17

Get a FieldID for the input field of this intrinsic.

Returns
  • Script.FieldID The FieldID object.

public Script.KernelID getKernelID ()

Added in API level 17

Get a KernelID for this intrinsic kernel.

Returns
  • Script.KernelID The KernelID object.

public void setInput (Allocation ain)

Added in API level 17

Set the input yuv allocation, must be U8(RenderScript).

Parameters
ain The input allocation.