Search in sources :

Example 31 with Signature

use of androidx.media.filterfw.Signature in project android_frameworks_base by crdroidandroid.

the class CropFilter method getSignature.

@Override
public Signature getSignature() {
    FrameType imageIn = FrameType.image2D(FrameType.ELEMENT_RGBA8888, FrameType.READ_GPU);
    FrameType imageOut = FrameType.image2D(FrameType.ELEMENT_RGBA8888, FrameType.WRITE_GPU);
    return new Signature().addInputPort("image", Signature.PORT_REQUIRED, imageIn).addInputPort("cropRect", Signature.PORT_REQUIRED, FrameType.single(Quad.class)).addInputPort("outputWidth", Signature.PORT_OPTIONAL, FrameType.single(int.class)).addInputPort("outputHeight", Signature.PORT_OPTIONAL, FrameType.single(int.class)).addInputPort("useMipmaps", Signature.PORT_OPTIONAL, FrameType.single(boolean.class)).addOutputPort("image", Signature.PORT_REQUIRED, imageOut).disallowOtherPorts();
}
Also used : FrameType(androidx.media.filterfw.FrameType) Signature(androidx.media.filterfw.Signature)

Example 32 with Signature

use of androidx.media.filterfw.Signature in project android_frameworks_base by crdroidandroid.

the class BrightnessFilter method getSignature.

@Override
public Signature getSignature() {
    FrameType imageIn = FrameType.image2D(FrameType.ELEMENT_RGBA8888, FrameType.READ_GPU);
    FrameType imageOut = FrameType.image2D(FrameType.ELEMENT_RGBA8888, FrameType.WRITE_GPU);
    return new Signature().addInputPort("image", Signature.PORT_REQUIRED, imageIn).addInputPort("brightness", Signature.PORT_OPTIONAL, FrameType.single(float.class)).addOutputPort("image", Signature.PORT_REQUIRED, imageOut).disallowOtherPorts();
}
Also used : FrameType(androidx.media.filterfw.FrameType) Signature(androidx.media.filterfw.Signature)

Example 33 with Signature

use of androidx.media.filterfw.Signature in project android_frameworks_base by crdroidandroid.

the class StatsFilter method getSignature.

@Override
public Signature getSignature() {
    FrameType inputFrame = FrameType.buffer2D(FrameType.ELEMENT_INT8);
    FrameType floatT = FrameType.single(float.class);
    return new Signature().addInputPort("buffer", Signature.PORT_REQUIRED, inputFrame).addInputPort("cropRect", Signature.PORT_OPTIONAL, FrameType.single(Quad.class)).addOutputPort("mean", Signature.PORT_REQUIRED, floatT).addOutputPort("stdev", Signature.PORT_REQUIRED, floatT).disallowOtherPorts();
}
Also used : FrameType(androidx.media.filterfw.FrameType) Signature(androidx.media.filterfw.Signature)

Example 34 with Signature

use of androidx.media.filterfw.Signature in project platform_frameworks_base by android.

the class CropFilter method getSignature.

@Override
public Signature getSignature() {
    FrameType imageIn = FrameType.image2D(FrameType.ELEMENT_RGBA8888, FrameType.READ_GPU);
    FrameType imageOut = FrameType.image2D(FrameType.ELEMENT_RGBA8888, FrameType.WRITE_GPU);
    return new Signature().addInputPort("image", Signature.PORT_REQUIRED, imageIn).addInputPort("cropRect", Signature.PORT_REQUIRED, FrameType.single(Quad.class)).addInputPort("outputWidth", Signature.PORT_OPTIONAL, FrameType.single(int.class)).addInputPort("outputHeight", Signature.PORT_OPTIONAL, FrameType.single(int.class)).addInputPort("useMipmaps", Signature.PORT_OPTIONAL, FrameType.single(boolean.class)).addOutputPort("image", Signature.PORT_REQUIRED, imageOut).disallowOtherPorts();
}
Also used : FrameType(androidx.media.filterfw.FrameType) Signature(androidx.media.filterfw.Signature)

Example 35 with Signature

use of androidx.media.filterfw.Signature in project platform_frameworks_base by android.

the class SobelFilter method getSignature.

@Override
public Signature getSignature() {
    // TODO: we will address the issue of READ_GPU / WRITE_GPU when using CPU filters later.
    FrameType imageIn = FrameType.image2D(FrameType.ELEMENT_RGBA8888, FrameType.READ_GPU);
    FrameType imageOut = FrameType.image2D(FrameType.ELEMENT_RGBA8888, FrameType.WRITE_GPU);
    return new Signature().addInputPort("image", Signature.PORT_REQUIRED, imageIn).addOutputPort("direction", Signature.PORT_OPTIONAL, imageOut).addOutputPort("magnitude", Signature.PORT_OPTIONAL, imageOut).disallowOtherPorts();
}
Also used : FrameType(androidx.media.filterfw.FrameType) Signature(androidx.media.filterfw.Signature)

Aggregations

FrameType (androidx.media.filterfw.FrameType)64 Signature (androidx.media.filterfw.Signature)64 Camera (android.hardware.Camera)4 Quad (androidx.media.filterfw.geometry.Quad)4