Most visited

Recently visited

ScriptIntrinsicYuvToRGB

public class ScriptIntrinsicYuvToRGB
extends ScriptIntrinsic

java.lang.Object
   ↳ android.support.v8.renderscript.BaseObj
     ↳ android.support.v8.renderscript.Script
       ↳ android.support.v8.renderscript.ScriptIntrinsic
         ↳ android.support.v8.renderscript.ScriptIntrinsicYuvToRGB


Intrinsic for converting an Android YUV buffer to RGB. The input allocation is supplied in NV21 format as a U8 element type. 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).

Inherited methods

From class android.support.v8.renderscript.Script
From class android.support.v8.renderscript.BaseObj
From class java.lang.Object

Public methods

create

ScriptIntrinsicYuvToRGB create (RenderScript rs, 
                Element e)

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

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

forEach

void forEach (Allocation aout)

Convert the image to RGB.

Parameters
aout Allocation: Output allocation. Must match creation element type.

getFieldID_Input

Script.FieldID getFieldID_Input ()

Get a FieldID for the input field of this intrinsic.

Returns
Script.FieldID Script.FieldID The FieldID object.

getKernelID

Script.KernelID getKernelID ()

Get a KernelID for this intrinsic kernel.

Returns
Script.KernelID Script.KernelID The KernelID object.

setInput

void setInput (Allocation ain)

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

Parameters
ain Allocation: The input allocation.

Hooray!