Search in sources :

Example 51 with MutableFrameFormat

use of android.filterfw.core.MutableFrameFormat in project android_frameworks_base by crdroidandroid.

the class PrimitiveFormat method createFormat.

private static MutableFrameFormat createFormat(int baseType, int target) {
    MutableFrameFormat result = new MutableFrameFormat(baseType, target);
    result.setDimensionCount(1);
    return result;
}
Also used : MutableFrameFormat(android.filterfw.core.MutableFrameFormat)

Example 52 with MutableFrameFormat

use of android.filterfw.core.MutableFrameFormat in project android_frameworks_base by crdroidandroid.

the class FrameManager method duplicateFrameToTarget.

public Frame duplicateFrameToTarget(Frame frame, int newTarget) {
    MutableFrameFormat newFormat = frame.getFormat().mutableCopy();
    newFormat.setTarget(newTarget);
    Frame result = newFrame(newFormat);
    result.setDataFromFrame(frame);
    return result;
}
Also used : Frame(android.filterfw.core.Frame) MutableFrameFormat(android.filterfw.core.MutableFrameFormat)

Example 53 with MutableFrameFormat

use of android.filterfw.core.MutableFrameFormat in project android_frameworks_base by AOSPA.

the class FrameManager method duplicateFrameToTarget.

public Frame duplicateFrameToTarget(Frame frame, int newTarget) {
    MutableFrameFormat newFormat = frame.getFormat().mutableCopy();
    newFormat.setTarget(newTarget);
    Frame result = newFrame(newFormat);
    result.setDataFromFrame(frame);
    return result;
}
Also used : Frame(android.filterfw.core.Frame) MutableFrameFormat(android.filterfw.core.MutableFrameFormat)

Example 54 with MutableFrameFormat

use of android.filterfw.core.MutableFrameFormat in project android_frameworks_base by AOSPA.

the class ToRGBFilter method setupPorts.

@Override
public void setupPorts() {
    MutableFrameFormat mask = new MutableFrameFormat(FrameFormat.TYPE_BYTE, FrameFormat.TARGET_NATIVE);
    mask.setDimensionCount(2);
    addMaskedInputPort("image", mask);
    addOutputBasedOnInput("image", "image");
}
Also used : MutableFrameFormat(android.filterfw.core.MutableFrameFormat)

Example 55 with MutableFrameFormat

use of android.filterfw.core.MutableFrameFormat in project android_frameworks_base by AOSPA.

the class ToRGBFilter method getConvertedFormat.

public FrameFormat getConvertedFormat(FrameFormat format) {
    MutableFrameFormat result = format.mutableCopy();
    result.setMetaValue(ImageFormat.COLORSPACE_KEY, ImageFormat.COLORSPACE_RGB);
    result.setBytesPerSample(3);
    return result;
}
Also used : MutableFrameFormat(android.filterfw.core.MutableFrameFormat)

Aggregations

MutableFrameFormat (android.filterfw.core.MutableFrameFormat)126 Frame (android.filterfw.core.Frame)36 FrameFormat (android.filterfw.core.FrameFormat)24 ShaderProgram (android.filterfw.core.ShaderProgram)12 Point (android.filterfw.geometry.Point)12 Quad (android.filterfw.geometry.Quad)12 GLFrame (android.filterfw.core.GLFrame)6 KeyValueMap (android.filterfw.core.KeyValueMap)6 MediaRecorder (android.media.MediaRecorder)6 IOException (java.io.IOException)6 NativeFrame (android.filterfw.core.NativeFrame)2