ScriptIntrinsicYuvToRGBpublic class ScriptIntrinsicYuvToRGB extends ScriptIntrinsic 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. |
Fields Summary |
---|
private Allocation | mInput |
Constructors Summary |
---|
ScriptIntrinsicYuvToRGB(int id, RenderScript rs)
super(id, rs);
|
Methods Summary |
---|
public static android.support.v8.renderscript.ScriptIntrinsicYuvToRGB | create(RenderScript rs, Element e)Create an intrinsic for converting YUV to RGB.
Supported elements types are {@link Element#U8_4}
if (rs.isNative) {
RenderScriptThunker rst = (RenderScriptThunker) rs;
return ScriptIntrinsicYuvToRGBThunker.create(rs, e);
}
// 6 comes from RS_SCRIPT_INTRINSIC_YUV_TO_RGB in rsDefines.h
int id = rs.nScriptIntrinsicCreate(6, e.getID(rs));
ScriptIntrinsicYuvToRGB si = new ScriptIntrinsicYuvToRGB(id, rs);
return si;
| public void | forEach(Allocation aout)Convert the image to RGB.
forEach(0, null, aout, null);
| public Script.FieldID | getFieldID_Input()Get a FieldID for the input field of this intrinsic.
return createFieldID(0, null);
| public Script.KernelID | getKernelID()Get a KernelID for this intrinsic kernel.
return createKernelID(0, 2, null, null);
| public void | setInput(Allocation ain)Set the input yuv allocation, must be {@link Element#U8}.
mInput = ain;
setVar(0, ain);
|
|