Class VideoDither

java.lang.Object
org.javagi.base.ProxyInstance
org.freedesktop.gstreamer.video.VideoDither
All Implemented Interfaces:
Proxy

@Generated("org.javagi.JavaGI") public class VideoDither extends ProxyInstance
GstVideoDither provides implementations of several dithering algorithms that can be applied to lines of video pixels to quantize and dither them.
  • Constructor Details

    • VideoDither

      public VideoDither(MemorySegment address)
      Create a VideoDither proxy instance for the provided memory address.
      Parameters:
      address - the memory address of the native object
  • Method Details

    • getMemoryLayout

      public static MemoryLayout getMemoryLayout()
      The memory layout of the native struct.
      Returns:
      the memory layout
    • new_

      public static VideoDither new_(VideoDitherMethod method, Set<VideoDitherFlags> flags, VideoFormat format, MemorySegment quantizer, int width)

      Make a new dither object for dithering lines of format using the algorithm described by method.

      Each component will be quantized to a multiple of quantizer. Better performance is achieved when quantizer is a power of 2.

      width is the width of the lines that this ditherer will handle.

      Parameters:
      method - a GstVideoDitherMethod
      flags - a GstVideoDitherFlags
      format - a GstVideoFormat
      quantizer - quantizer
      width - the width of the lines
      Returns:
      a new GstVideoDither
    • new_

      public static VideoDither new_(VideoDitherMethod method, VideoDitherFlags flags, VideoFormat format, MemorySegment quantizer, int width)

      Make a new dither object for dithering lines of format using the algorithm described by method.

      Each component will be quantized to a multiple of quantizer. Better performance is achieved when quantizer is a power of 2.

      width is the width of the lines that this ditherer will handle.

      Parameters:
      method - a GstVideoDitherMethod
      flags - a GstVideoDitherFlags
      format - a GstVideoFormat
      quantizer - quantizer
      width - the width of the lines
      Returns:
      a new GstVideoDither
    • free

      public void free()
      Free this VideoDither
    • line

      public void line(@Nullable MemorySegment line, int x, int y, int width)

      Dither width pixels starting from offset x in line using dither.

      y is the line number of line in the output image.

      Parameters:
      line - pointer to the pixels of the line
      x - x coordinate
      y - y coordinate
      width - the width