use of androidx.media.filterfw.Signature in project platform_frameworks_base by android.
the class NewChromaHistogramFilter method getSignature.
@Override
public Signature getSignature() {
FrameType imageIn = FrameType.image2D(FrameType.ELEMENT_RGBA8888, FrameType.READ_CPU);
FrameType dataOut = FrameType.buffer2D(FrameType.ELEMENT_FLOAT32);
return new Signature().addInputPort("image", Signature.PORT_REQUIRED, imageIn).addInputPort("huebins", Signature.PORT_OPTIONAL, FrameType.single(int.class)).addInputPort("saturationbins", Signature.PORT_OPTIONAL, FrameType.single(int.class)).addInputPort("saturationthreshold", Signature.PORT_OPTIONAL, FrameType.single(int.class)).addInputPort("valuethreshold", Signature.PORT_OPTIONAL, FrameType.single(int.class)).addOutputPort("histogram", Signature.PORT_REQUIRED, dataOut).disallowOtherPorts();
}
use of androidx.media.filterfw.Signature in project platform_frameworks_base by android.
the class ScaleFilter 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("scale", Signature.PORT_OPTIONAL, FrameType.single(float.class)).addInputPort("useMipmaps", Signature.PORT_OPTIONAL, FrameType.single(boolean.class)).addOutputPort("image", Signature.PORT_REQUIRED, imageOut).disallowOtherPorts();
}
use of androidx.media.filterfw.Signature in project platform_frameworks_base by android.
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();
}
use of androidx.media.filterfw.Signature in project android_frameworks_base by DirtyUnicorns.
the class FloatArrayToSizeFilter method getSignature.
@Override
public Signature getSignature() {
FrameType intT = FrameType.single(int.class);
FrameType floatType = FrameType.array(float.class);
return new Signature().addInputPort("array", Signature.PORT_REQUIRED, floatType).addOutputPort("size", Signature.PORT_REQUIRED, intT).disallowOtherPorts();
}
use of androidx.media.filterfw.Signature in project android_frameworks_base by DirtyUnicorns.
the class IfElseFilter method getSignature.
@Override
public Signature getSignature() {
FrameType imageIn = FrameType.image2D(FrameType.ELEMENT_RGBA8888, FrameType.READ_GPU);
FrameType videoIn = FrameType.image2D(FrameType.ELEMENT_RGBA8888, FrameType.READ_GPU);
FrameType imageOut = FrameType.image2D(FrameType.ELEMENT_RGBA8888, FrameType.WRITE_GPU);
return new Signature().addInputPort("falseResult", Signature.PORT_REQUIRED, imageIn).addInputPort("trueResult", Signature.PORT_REQUIRED, videoIn).addInputPort("condition", Signature.PORT_REQUIRED, FrameType.single(boolean.class)).addOutputPort("output", Signature.PORT_REQUIRED, imageOut).disallowOtherPorts();
}