Class GDFUpscaler

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable

    public class GDFUpscaler
    extends java.lang.Object
    implements java.io.Closeable
    GDFUpscaler class upscale image and enhance image quality.
    • Field Detail

      • VERBOSE

        public static boolean VERBOSE
        Detail logging enabled/disabled.
    • Method Detail

      • initialize

        public static boolean initialize​(android.content.Context context)
                                  throws GDFUpscaleException
        Initialize with android context. Needed for validate OpenGL ES version, and get device model name to select appropriate model. Must be called before use of any API.
        Parameters:
        context - Android context instance(getApplicationContext() from any Activity).
        Throws:
        GDFUpscaleException - When device is not supported.
      • getUpscaler

        public static GDFUpscaler getUpscaler​(int scale,
                                              int width,
                                              int height)
                                       throws GDFUpscaleException
        Get GDFUpscaler instance from upscaling scale and input video resolution.
        Parameters:
        scale - Upscaling scale.
        width - Input video width.
        height - Input video height.
        Returns:
        GDFUpscaler instance.
        Throws:
        GDFUpscaleException - When can't get appropriate model or not initialized.
      • clearBuffers

        public void clearBuffers()
      • close

        public void close()
                   throws java.io.IOException
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Throws:
        java.io.IOException
      • getScale

        public int getScale()