use of androidx.media.filterfw.Signature in project android_frameworks_base by ResurrectionRemix.
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();
}
use of androidx.media.filterfw.Signature in project android_frameworks_base by ResurrectionRemix.
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 android_frameworks_base by ResurrectionRemix.
the class CSVWriterFilter method getSignature.
@Override
public Signature getSignature() {
FrameType floatT = FrameType.single(float.class);
FrameType stringT = FrameType.single(String.class);
FrameType floatArrayT = FrameType.array(float.class);
return new Signature().addInputPort("sharpness", Signature.PORT_REQUIRED, floatT).addInputPort("overExposure", Signature.PORT_REQUIRED, floatT).addInputPort("underExposure", Signature.PORT_REQUIRED, floatT).addInputPort("colorfulness", Signature.PORT_REQUIRED, floatT).addInputPort("contrastRating", Signature.PORT_REQUIRED, floatT).addInputPort("brightness", Signature.PORT_REQUIRED, floatT).addInputPort("motionValues", Signature.PORT_REQUIRED, floatArrayT).addInputPort("imageFileName", Signature.PORT_REQUIRED, stringT).addInputPort("csvFilePath", Signature.PORT_REQUIRED, stringT).disallowOtherPorts();
}
use of androidx.media.filterfw.Signature in project android_frameworks_base by ResurrectionRemix.
the class ContrastRatioFilter method getSignature.
@Override
public Signature getSignature() {
FrameType imageIn = FrameType.image2D(FrameType.ELEMENT_RGBA8888, FrameType.READ_CPU);
FrameType floatT = FrameType.single(float.class);
return new Signature().addInputPort("image", Signature.PORT_REQUIRED, imageIn).addOutputPort("contrastRatingToGoodness", Signature.PORT_REQUIRED, floatT).disallowOtherPorts();
}
use of androidx.media.filterfw.Signature in project android_frameworks_base by ResurrectionRemix.
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();
}