![]() |
![]() |
![]() |
GStreamer Base Plugins 1.0 Library Reference Manual | ![]() |
---|---|---|---|---|
Top | Description |
#include <gst/video/video-dither.h> GstVideoDither; enum GstVideoDitherFlags; enum GstVideoDitherMethod; void gst_video_dither_free (GstVideoDither *dither
); void gst_video_dither_line (GstVideoDither *dither
,gpointer line
,guint x
,guint y
,guint width
); GstVideoDither * gst_video_dither_new (GstVideoDitherMethod method
,GstVideoDitherFlags flags
,GstVideoFormat format
,guint quantizer[GST_VIDEO_MAX_COMPONENTS]
,guint width
);
GstVideoDither provides implementations of several dithering algorithms that can be applied to lines of video pixels to quantize and dither them.
typedef enum { GST_VIDEO_DITHER_FLAG_NONE = 0, GST_VIDEO_DITHER_FLAG_INTERLACED = (1 << 0), GST_VIDEO_DITHER_FLAG_QUANTIZE = (1 << 1), } GstVideoDitherFlags;
Extra flags that influence the result from gst_video_chroma_resample_new()
.
typedef enum { GST_VIDEO_DITHER_NONE, GST_VIDEO_DITHER_VERTERR, GST_VIDEO_DITHER_FLOYD_STEINBERG, GST_VIDEO_DITHER_SIERRA_LITE, GST_VIDEO_DITHER_BAYER, } GstVideoDitherMethod;
Different dithering methods to use.
no dithering | |
propagate rounding errors downwards | |
Dither with floyd-steinberg error diffusion | |
Dither with Sierra Lite error diffusion | |
ordered dither using a bayer pattern |
void gst_video_dither_free (GstVideoDither *dither
);
Free dither
|
a GstVideoDither |
void gst_video_dither_line (GstVideoDither *dither
,gpointer line
,guint x
,guint y
,guint width
);
Dither width
pixels starting from offset x
in line
using dither
.
y
is the line number of line
in the output image.
|
a GstVideoDither |
|
pointer to the pixels of the line |
|
x coordinate |
|
y coordinate |
|
the width |
GstVideoDither * gst_video_dither_new (GstVideoDitherMethod method
,GstVideoDitherFlags flags
,GstVideoFormat format
,guint quantizer[GST_VIDEO_MAX_COMPONENTS]
,guint 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 achived when quantizer
is a power of 2.
width
is the width of the lines that this ditherer will handle.
|
a GstVideoDitherMethod |
|
a GstVideoDitherFlags |
|
a GstVideoFormat |
|
quantizer |
|
the width of the lines |
Returns : |
a new GstVideoDither |