![]() |
![]() |
![]() |
GStreamer Base Plugins 1.0 Library Reference Manual | ![]() |
---|---|---|---|---|
Top | Description |
#include <gst/video/video-chroma.h> enum GstVideoChromaSite; GstVideoChromaSite gst_video_chroma_from_string (const gchar *s
); const gchar * gst_video_chroma_to_string (GstVideoChromaSite site
); enum GstVideoChromaFlags; enum GstVideoChromaMethod; GstVideoChromaResample; void gst_video_chroma_resample (GstVideoChromaResample *resample
,gpointer lines[]
,gint width
); void gst_video_chroma_resample_free (GstVideoChromaResample *resample
); void gst_video_chroma_resample_get_info (GstVideoChromaResample *resample
,guint *n_lines
,gint *offset
); GstVideoChromaResample * gst_video_chroma_resample_new (GstVideoChromaMethod method
,GstVideoChromaSite site
,GstVideoChromaFlags flags
,GstVideoFormat format
,gint h_factor
,gint v_factor
);
The functions gst_video_chroma_from_string()
and gst_video_chroma_to_string()
convert
between GstVideoChromaSite and string descriptions.
GstVideoChromaResample is a utility object for resampling chroma planes and converting between different chroma sampling sitings.
typedef enum { GST_VIDEO_CHROMA_SITE_UNKNOWN = 0, GST_VIDEO_CHROMA_SITE_NONE = (1 << 0), GST_VIDEO_CHROMA_SITE_H_COSITED = (1 << 1), GST_VIDEO_CHROMA_SITE_V_COSITED = (1 << 2), GST_VIDEO_CHROMA_SITE_ALT_LINE = (1 << 3), /* some common chroma cositing */ GST_VIDEO_CHROMA_SITE_COSITED = (GST_VIDEO_CHROMA_SITE_H_COSITED | GST_VIDEO_CHROMA_SITE_V_COSITED), GST_VIDEO_CHROMA_SITE_JPEG = (GST_VIDEO_CHROMA_SITE_NONE), GST_VIDEO_CHROMA_SITE_MPEG2 = (GST_VIDEO_CHROMA_SITE_H_COSITED), GST_VIDEO_CHROMA_SITE_DV = (GST_VIDEO_CHROMA_SITE_COSITED | GST_VIDEO_CHROMA_SITE_ALT_LINE), } GstVideoChromaSite;
Various Chroma sitings.
unknown cositing | |
no cositing | |
chroma is horizontally cosited | |
chroma is vertically cosited | |
choma samples are sited on alternate lines | |
chroma samples cosited with luma samples | |
jpeg style cositing, also for mpeg1 and mjpeg | |
mpeg2 style cositing | |
DV style cositing |
GstVideoChromaSite gst_video_chroma_from_string (const gchar *s
);
Convert s
to a GstVideoChromaSite
|
a chromasite string |
Returns : |
a GstVideoChromaSite or GST_VIDEO_CHROMA_SITE_UNKNOWN when s does
not contain a valid chroma description. |
const gchar * gst_video_chroma_to_string (GstVideoChromaSite site
);
Converts site
to its string representation.
|
a GstVideoChromaSite |
Returns : |
a string describing site . |
typedef enum { GST_VIDEO_CHROMA_FLAG_NONE = 0, GST_VIDEO_CHROMA_FLAG_INTERLACED = (1 << 0), } GstVideoChromaFlags;
Extra flags that influence the result from gst_video_chroma_resample_new()
.
typedef enum { GST_VIDEO_CHROMA_METHOD_NEAREST, GST_VIDEO_CHROMA_METHOD_LINEAR } GstVideoChromaMethod;
Different subsampling and upsampling methods
void gst_video_chroma_resample (GstVideoChromaResample *resample
,gpointer lines[]
,gint width
);
Perform resampling of width
chroma pixels in lines
.
|
a GstVideoChromaResample |
|
pixel lines |
|
the number of pixels on one line |
void gst_video_chroma_resample_free (GstVideoChromaResample *resample
);
Free resample
|
a GstVideoChromaResample |
void gst_video_chroma_resample_get_info (GstVideoChromaResample *resample
,guint *n_lines
,gint *offset
);
The resampler must be fed n_lines
at a time. The first line should be
at offset
.
|
a GstVideoChromaResample |
|
the number of input lines |
|
the first line |
GstVideoChromaResample * gst_video_chroma_resample_new (GstVideoChromaMethod method
,GstVideoChromaSite site
,GstVideoChromaFlags flags
,GstVideoFormat format
,gint h_factor
,gint v_factor
);
Create a new resampler object for the given parameters. When h_factor
or
v_factor
is > 0, upsampling will be used, otherwise subsampling is
performed.
|
a GstVideoChromaMethod |
|
a GstVideoChromaSite |
|
GstVideoChromaFlags |
|
the GstVideoFormat |
|
horizontal resampling factor |
|
vertical resampling factor |
Returns : |
a new GstVideoChromaResample that should be freed with
gst_video_chroma_resample_free() after usage. |