use of androidx.media.filterfw.Signature in project android_frameworks_base by DirtyUnicorns.
the class ImageGoodnessFilter method getSignature.
@Override
public Signature getSignature() {
FrameType floatT = FrameType.single(float.class);
FrameType imageIn = FrameType.image2D(FrameType.ELEMENT_RGBA8888, FrameType.READ_GPU);
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("motionValues", Signature.PORT_REQUIRED, FrameType.array(float.class)).addInputPort("brightness", Signature.PORT_REQUIRED, floatT).addInputPort("capturing", Signature.PORT_REQUIRED, FrameType.single(boolean.class)).addInputPort("image", Signature.PORT_REQUIRED, imageIn).addOutputPort("goodOrBadPic", Signature.PORT_REQUIRED, FrameType.single(String.class)).addOutputPort("score", Signature.PORT_OPTIONAL, floatT).disallowOtherPorts();
}
use of androidx.media.filterfw.Signature in project android_frameworks_base by DirtyUnicorns.
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();
}
use of androidx.media.filterfw.Signature in project android_frameworks_base by DirtyUnicorns.
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 android_frameworks_base by ResurrectionRemix.
the class ToGrayValuesFilter method getSignature.
@Override
public Signature getSignature() {
mImageInType = FrameType.image2D(FrameType.ELEMENT_RGBA8888, FrameType.READ_GPU);
FrameType imageOut = FrameType.buffer2D(FrameType.ELEMENT_INT8);
return new Signature().addInputPort("image", Signature.PORT_REQUIRED, mImageInType).addOutputPort("image", Signature.PORT_REQUIRED, imageOut).disallowOtherPorts();
}
use of androidx.media.filterfw.Signature in project android_frameworks_base by ResurrectionRemix.
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();
}