Search in sources :

Example 16 with ShaderProgram

use of android.filterfw.core.ShaderProgram in project platform_frameworks_base by android.

the class FillLightFilter method initProgram.

public void initProgram(FilterContext context, int target) {
    switch(target) {
        case FrameFormat.TARGET_GPU:
            ShaderProgram shaderProgram = new ShaderProgram(context, mFillLightShader);
            Log.e("FillLight", "tile size: " + mTileSize);
            shaderProgram.setMaximumTileSize(mTileSize);
            mProgram = shaderProgram;
            break;
        default:
            throw new RuntimeException("Filter FillLight does not support frames of " + "target " + target + "!");
    }
    mTarget = target;
}
Also used : ShaderProgram(android.filterfw.core.ShaderProgram)

Example 17 with ShaderProgram

use of android.filterfw.core.ShaderProgram in project platform_frameworks_base by android.

the class FisheyeFilter method initProgram.

public void initProgram(FilterContext context, int target) {
    switch(target) {
        case FrameFormat.TARGET_GPU:
            ShaderProgram shaderProgram = new ShaderProgram(context, mFisheyeShader);
            shaderProgram.setMaximumTileSize(mTileSize);
            mProgram = shaderProgram;
            break;
        default:
            throw new RuntimeException("Filter FisheyeFilter does not support frames of " + "target " + target + "!");
    }
    mTarget = target;
}
Also used : ShaderProgram(android.filterfw.core.ShaderProgram)

Example 18 with ShaderProgram

use of android.filterfw.core.ShaderProgram in project platform_frameworks_base by android.

the class BitmapOverlayFilter method initProgram.

public void initProgram(FilterContext context, int target) {
    switch(target) {
        case FrameFormat.TARGET_GPU:
            ShaderProgram shaderProgram = new ShaderProgram(context, mOverlayShader);
            shaderProgram.setMaximumTileSize(mTileSize);
            mProgram = shaderProgram;
            break;
        default:
            throw new RuntimeException("Filter FisheyeFilter does not support frames of " + "target " + target + "!");
    }
    mTarget = target;
}
Also used : ShaderProgram(android.filterfw.core.ShaderProgram)

Example 19 with ShaderProgram

use of android.filterfw.core.ShaderProgram in project platform_frameworks_base by android.

the class BlackWhiteFilter method initProgram.

public void initProgram(FilterContext context, int target) {
    switch(target) {
        case FrameFormat.TARGET_GPU:
            ShaderProgram shaderProgram = new ShaderProgram(context, mBlackWhiteShader);
            shaderProgram.setMaximumTileSize(mTileSize);
            mProgram = shaderProgram;
            updateParameters();
            break;
        default:
            throw new RuntimeException("Filter Sharpen does not support frames of " + "target " + target + "!");
    }
    mTarget = target;
}
Also used : ShaderProgram(android.filterfw.core.ShaderProgram)

Example 20 with ShaderProgram

use of android.filterfw.core.ShaderProgram in project platform_frameworks_base by android.

the class MediaSource method prepare.

@Override
protected void prepare(FilterContext context) {
    if (mLogVerbose)
        Log.v(TAG, "Preparing MediaSource");
    mFrameExtractor = new ShaderProgram(context, mFrameShader);
    // SurfaceTexture defines (0,0) to be bottom-left. The filter framework
    // defines (0,0) as top-left, so do the flip here.
    mFrameExtractor.setSourceRect(0, 1, 1, -1);
    createFormats();
}
Also used : ShaderProgram(android.filterfw.core.ShaderProgram)

Aggregations

ShaderProgram (android.filterfw.core.ShaderProgram)198 Frame (android.filterfw.core.Frame)18 MutableFrameFormat (android.filterfw.core.MutableFrameFormat)18 Quad (android.filterfw.geometry.Quad)18 FrameFormat (android.filterfw.core.FrameFormat)12 Point (android.filterfw.geometry.Point)12 NativeFrame (android.filterfw.core.NativeFrame)1