*
* Sample pipeline:
* |[
- * gst-launch-1.0 videotestsrc pattern=smpte75 ! alpha method=green ! \
- * videomixer name=mixer ! videoconvert ! autovideosink \
- * videotestsrc pattern=snow ! mixer.
+ * gst-launch-1.0 videotestsrc pattern=snow ! mixer.sink_0 \
+ * videotestsrc pattern=smpte75 ! alpha method=green ! mixer.sink_1 \
+ * videomixer name=mixer sink_0::zorder=0 sink_1::zorder=1 ! \
+ * videoconvert ! autovideosink
* ]| This pipeline adds a alpha channel to the SMPTE color bars
- * with green as the transparent color and mixes the output with
- * a snow video stream.
+ * with green as the transparent color and overlays the output on
+ * top of a snow video stream.
*/
PROP_NOISE_LEVEL,
PROP_BLACK_SENSITIVITY,
PROP_WHITE_SENSITIVITY,
- PROP_PREFER_PASSTHROUGH,
- PROP_LAST
+ PROP_PREFER_PASSTHROUGH
};
static GstStaticPadTemplate gst_alpha_src_template =
"Edward Hervey <edward.hervey@collabora.co.uk>\n"
"Jan Schmidt <thaytan@noraisin.net>");
- gst_element_class_add_pad_template (gstelement_class,
- gst_static_pad_template_get (&gst_alpha_sink_template));
- gst_element_class_add_pad_template (gstelement_class,
- gst_static_pad_template_get (&gst_alpha_src_template));
+ gst_element_class_add_static_pad_template (gstelement_class,
+ &gst_alpha_sink_template);
+ gst_element_class_add_static_pad_template (gstelement_class,
+ &gst_alpha_src_template);
btrans_class->before_transform =
GST_DEBUG_FUNCPTR (gst_alpha_before_transform);
width = GST_VIDEO_FRAME_WIDTH (in_frame);
height = GST_VIDEO_FRAME_HEIGHT (in_frame);
- o[0] = GST_VIDEO_FRAME_COMP_OFFSET (in_frame, 3);
- o[1] = GST_VIDEO_FRAME_COMP_OFFSET (in_frame, 0);
- o[2] = GST_VIDEO_FRAME_COMP_OFFSET (in_frame, 1);
- o[3] = GST_VIDEO_FRAME_COMP_OFFSET (in_frame, 2);
+ o[0] = GST_VIDEO_FRAME_COMP_POFFSET (in_frame, 3);
+ o[1] = GST_VIDEO_FRAME_COMP_POFFSET (in_frame, 0);
+ o[2] = GST_VIDEO_FRAME_COMP_POFFSET (in_frame, 1);
+ o[3] = GST_VIDEO_FRAME_COMP_POFFSET (in_frame, 2);
memcpy (matrix,
alpha->out_sdtv ? cog_rgb_to_ycbcr_matrix_8bit_sdtv :
width = GST_VIDEO_FRAME_WIDTH (in_frame);
height = GST_VIDEO_FRAME_HEIGHT (in_frame);
- o[0] = GST_VIDEO_FRAME_COMP_OFFSET (in_frame, 3);
- o[1] = GST_VIDEO_FRAME_COMP_OFFSET (in_frame, 0);
- o[2] = GST_VIDEO_FRAME_COMP_OFFSET (in_frame, 1);
- o[3] = GST_VIDEO_FRAME_COMP_OFFSET (in_frame, 2);
+ o[0] = GST_VIDEO_FRAME_COMP_POFFSET (in_frame, 3);
+ o[1] = GST_VIDEO_FRAME_COMP_POFFSET (in_frame, 0);
+ o[2] = GST_VIDEO_FRAME_COMP_POFFSET (in_frame, 1);
+ o[3] = GST_VIDEO_FRAME_COMP_POFFSET (in_frame, 2);
smin = 128 - alpha->black_sensitivity;
smax = 128 + alpha->white_sensitivity;
width = GST_VIDEO_FRAME_WIDTH (in_frame);
height = GST_VIDEO_FRAME_HEIGHT (in_frame);
- p[0] = GST_VIDEO_FRAME_COMP_OFFSET (out_frame, 3);
- p[1] = GST_VIDEO_FRAME_COMP_OFFSET (out_frame, 0);
- p[2] = GST_VIDEO_FRAME_COMP_OFFSET (out_frame, 1);
- p[3] = GST_VIDEO_FRAME_COMP_OFFSET (out_frame, 2);
+ p[0] = GST_VIDEO_FRAME_COMP_POFFSET (out_frame, 3);
+ p[1] = GST_VIDEO_FRAME_COMP_POFFSET (out_frame, 0);
+ p[2] = GST_VIDEO_FRAME_COMP_POFFSET (out_frame, 1);
+ p[3] = GST_VIDEO_FRAME_COMP_POFFSET (out_frame, 2);
- o[0] = GST_VIDEO_FRAME_COMP_OFFSET (in_frame, 3);
- o[1] = GST_VIDEO_FRAME_COMP_OFFSET (in_frame, 0);
- o[2] = GST_VIDEO_FRAME_COMP_OFFSET (in_frame, 1);
- o[3] = GST_VIDEO_FRAME_COMP_OFFSET (in_frame, 2);
+ o[0] = GST_VIDEO_FRAME_COMP_POFFSET (in_frame, 3);
+ o[1] = GST_VIDEO_FRAME_COMP_POFFSET (in_frame, 0);
+ o[2] = GST_VIDEO_FRAME_COMP_POFFSET (in_frame, 1);
+ o[3] = GST_VIDEO_FRAME_COMP_POFFSET (in_frame, 2);
for (i = 0; i < height; i++) {
for (j = 0; j < width; j++) {
width = GST_VIDEO_FRAME_WIDTH (in_frame);
height = GST_VIDEO_FRAME_HEIGHT (in_frame);
- p[0] = GST_VIDEO_FRAME_COMP_OFFSET (out_frame, 3);
- p[1] = GST_VIDEO_FRAME_COMP_OFFSET (out_frame, 0);
- p[2] = GST_VIDEO_FRAME_COMP_OFFSET (out_frame, 1);
- p[3] = GST_VIDEO_FRAME_COMP_OFFSET (out_frame, 2);
+ p[0] = GST_VIDEO_FRAME_COMP_POFFSET (out_frame, 3);
+ p[1] = GST_VIDEO_FRAME_COMP_POFFSET (out_frame, 0);
+ p[2] = GST_VIDEO_FRAME_COMP_POFFSET (out_frame, 1);
+ p[3] = GST_VIDEO_FRAME_COMP_POFFSET (out_frame, 2);
- o[0] = GST_VIDEO_FRAME_COMP_OFFSET (in_frame, 3);
- o[1] = GST_VIDEO_FRAME_COMP_OFFSET (in_frame, 0);
- o[2] = GST_VIDEO_FRAME_COMP_OFFSET (in_frame, 1);
- o[3] = GST_VIDEO_FRAME_COMP_OFFSET (in_frame, 2);
+ o[0] = GST_VIDEO_FRAME_COMP_POFFSET (in_frame, 3);
+ o[1] = GST_VIDEO_FRAME_COMP_POFFSET (in_frame, 0);
+ o[2] = GST_VIDEO_FRAME_COMP_POFFSET (in_frame, 1);
+ o[3] = GST_VIDEO_FRAME_COMP_POFFSET (in_frame, 2);
smin = 128 - alpha->black_sensitivity;
smax = 128 + alpha->white_sensitivity;
width = GST_VIDEO_FRAME_WIDTH (in_frame);
height = GST_VIDEO_FRAME_HEIGHT (in_frame);
- p[0] = GST_VIDEO_FRAME_COMP_OFFSET (out_frame, 3);
- p[1] = GST_VIDEO_FRAME_COMP_OFFSET (out_frame, 0);
- p[2] = GST_VIDEO_FRAME_COMP_OFFSET (out_frame, 1);
- p[3] = GST_VIDEO_FRAME_COMP_OFFSET (out_frame, 2);
+ p[0] = GST_VIDEO_FRAME_COMP_POFFSET (out_frame, 3);
+ p[1] = GST_VIDEO_FRAME_COMP_POFFSET (out_frame, 0);
+ p[2] = GST_VIDEO_FRAME_COMP_POFFSET (out_frame, 1);
+ p[3] = GST_VIDEO_FRAME_COMP_POFFSET (out_frame, 2);
memcpy (matrix,
alpha->in_sdtv ? cog_ycbcr_to_rgb_matrix_8bit_sdtv :
width = GST_VIDEO_FRAME_WIDTH (in_frame);
height = GST_VIDEO_FRAME_HEIGHT (in_frame);
- p[0] = GST_VIDEO_FRAME_COMP_OFFSET (out_frame, 3);
- p[1] = GST_VIDEO_FRAME_COMP_OFFSET (out_frame, 0);
- p[2] = GST_VIDEO_FRAME_COMP_OFFSET (out_frame, 1);
- p[3] = GST_VIDEO_FRAME_COMP_OFFSET (out_frame, 2);
+ p[0] = GST_VIDEO_FRAME_COMP_POFFSET (out_frame, 3);
+ p[1] = GST_VIDEO_FRAME_COMP_POFFSET (out_frame, 0);
+ p[2] = GST_VIDEO_FRAME_COMP_POFFSET (out_frame, 1);
+ p[3] = GST_VIDEO_FRAME_COMP_POFFSET (out_frame, 2);
smin = 128 - alpha->black_sensitivity;
smax = 128 + alpha->white_sensitivity;
height = GST_VIDEO_FRAME_HEIGHT (in_frame);
bpp = GST_VIDEO_FRAME_COMP_PSTRIDE (in_frame, 0);
- o[0] = GST_VIDEO_FRAME_COMP_OFFSET (in_frame, 0);
- o[1] = GST_VIDEO_FRAME_COMP_OFFSET (in_frame, 1);
- o[2] = GST_VIDEO_FRAME_COMP_OFFSET (in_frame, 2);
+ o[0] = GST_VIDEO_FRAME_COMP_POFFSET (in_frame, 0);
+ o[1] = GST_VIDEO_FRAME_COMP_POFFSET (in_frame, 1);
+ o[2] = GST_VIDEO_FRAME_COMP_POFFSET (in_frame, 2);
memcpy (matrix,
alpha->out_sdtv ? cog_rgb_to_ycbcr_matrix_8bit_sdtv :
bpp = GST_VIDEO_FRAME_COMP_PSTRIDE (in_frame, 0);
- o[0] = GST_VIDEO_FRAME_COMP_OFFSET (in_frame, 0);
- o[1] = GST_VIDEO_FRAME_COMP_OFFSET (in_frame, 1);
- o[2] = GST_VIDEO_FRAME_COMP_OFFSET (in_frame, 2);
+ o[0] = GST_VIDEO_FRAME_COMP_POFFSET (in_frame, 0);
+ o[1] = GST_VIDEO_FRAME_COMP_POFFSET (in_frame, 1);
+ o[2] = GST_VIDEO_FRAME_COMP_POFFSET (in_frame, 2);
smin = 128 - alpha->black_sensitivity;
smax = 128 + alpha->white_sensitivity;
bpp = GST_VIDEO_FRAME_COMP_PSTRIDE (in_frame, 0);
- o[0] = GST_VIDEO_FRAME_COMP_OFFSET (in_frame, 0);
- o[1] = GST_VIDEO_FRAME_COMP_OFFSET (in_frame, 1);
- o[2] = GST_VIDEO_FRAME_COMP_OFFSET (in_frame, 2);
+ o[0] = GST_VIDEO_FRAME_COMP_POFFSET (in_frame, 0);
+ o[1] = GST_VIDEO_FRAME_COMP_POFFSET (in_frame, 1);
+ o[2] = GST_VIDEO_FRAME_COMP_POFFSET (in_frame, 2);
- p[0] = GST_VIDEO_FRAME_COMP_OFFSET (out_frame, 3);
- p[1] = GST_VIDEO_FRAME_COMP_OFFSET (out_frame, 0);
- p[2] = GST_VIDEO_FRAME_COMP_OFFSET (out_frame, 1);
- p[3] = GST_VIDEO_FRAME_COMP_OFFSET (out_frame, 2);
+ p[0] = GST_VIDEO_FRAME_COMP_POFFSET (out_frame, 3);
+ p[1] = GST_VIDEO_FRAME_COMP_POFFSET (out_frame, 0);
+ p[2] = GST_VIDEO_FRAME_COMP_POFFSET (out_frame, 1);
+ p[3] = GST_VIDEO_FRAME_COMP_POFFSET (out_frame, 2);
for (i = 0; i < height; i++) {
for (j = 0; j < width; j++) {
bpp = GST_VIDEO_FRAME_COMP_PSTRIDE (in_frame, 0);
- o[0] = GST_VIDEO_FRAME_COMP_OFFSET (in_frame, 0);
- o[1] = GST_VIDEO_FRAME_COMP_OFFSET (in_frame, 1);
- o[2] = GST_VIDEO_FRAME_COMP_OFFSET (in_frame, 2);
+ o[0] = GST_VIDEO_FRAME_COMP_POFFSET (in_frame, 0);
+ o[1] = GST_VIDEO_FRAME_COMP_POFFSET (in_frame, 1);
+ o[2] = GST_VIDEO_FRAME_COMP_POFFSET (in_frame, 2);
- p[0] = GST_VIDEO_FRAME_COMP_OFFSET (out_frame, 3);
- p[1] = GST_VIDEO_FRAME_COMP_OFFSET (out_frame, 0);
- p[2] = GST_VIDEO_FRAME_COMP_OFFSET (out_frame, 1);
- p[3] = GST_VIDEO_FRAME_COMP_OFFSET (out_frame, 2);
+ p[0] = GST_VIDEO_FRAME_COMP_POFFSET (out_frame, 3);
+ p[1] = GST_VIDEO_FRAME_COMP_POFFSET (out_frame, 0);
+ p[2] = GST_VIDEO_FRAME_COMP_POFFSET (out_frame, 1);
+ p[3] = GST_VIDEO_FRAME_COMP_POFFSET (out_frame, 2);
smin = 128 - alpha->black_sensitivity;
smax = 128 + alpha->white_sensitivity;
gst_alpha_set_planar_yuv_ayuv (const GstVideoFrame * in_frame,
GstVideoFrame * out_frame, GstAlpha * alpha)
{
- const guint8 *src;
guint8 *dest;
gint width, height;
gint b_alpha = CLAMP ((gint) (alpha->alpha * 255), 0, 255);
gint y_stride, uv_stride;
gint v_subs, h_subs;
- src = GST_VIDEO_FRAME_PLANE_DATA (in_frame, 0);
dest = GST_VIDEO_FRAME_PLANE_DATA (out_frame, 0);
width = GST_VIDEO_FRAME_WIDTH (in_frame);
y_stride = GST_VIDEO_FRAME_COMP_STRIDE (in_frame, 0);
uv_stride = GST_VIDEO_FRAME_COMP_STRIDE (in_frame, 1);
- srcY_tmp = srcY = src;
- srcU_tmp = srcU = src + GST_VIDEO_FRAME_COMP_OFFSET (in_frame, 1);
- srcV_tmp = srcV = src + GST_VIDEO_FRAME_COMP_OFFSET (in_frame, 2);
+ srcY_tmp = srcY = GST_VIDEO_FRAME_COMP_DATA (in_frame, 0);
+ srcU_tmp = srcU = GST_VIDEO_FRAME_COMP_DATA (in_frame, 1);
+ srcV_tmp = srcV = GST_VIDEO_FRAME_COMP_DATA (in_frame, 2);
switch (GST_VIDEO_FRAME_FORMAT (in_frame)) {
case GST_VIDEO_FORMAT_I420:
gst_alpha_chroma_key_planar_yuv_ayuv (const GstVideoFrame * in_frame,
GstVideoFrame * out_frame, GstAlpha * alpha)
{
- const guint8 *src;
guint8 *dest;
gint width, height;
gint b_alpha = CLAMP ((gint) (alpha->alpha * 255), 0, 255);
guint8 kfgy_scale = alpha->kfgy_scale;
guint noise_level2 = alpha->noise_level2;
- src = GST_VIDEO_FRAME_PLANE_DATA (in_frame, 0);
dest = GST_VIDEO_FRAME_PLANE_DATA (out_frame, 0);
width = GST_VIDEO_FRAME_WIDTH (in_frame);
y_stride = GST_VIDEO_FRAME_COMP_STRIDE (in_frame, 0);
uv_stride = GST_VIDEO_FRAME_COMP_STRIDE (in_frame, 1);
- srcY_tmp = srcY = src;
- srcU_tmp = srcU = src + GST_VIDEO_FRAME_COMP_OFFSET (in_frame, 1);
- srcV_tmp = srcV = src + GST_VIDEO_FRAME_COMP_OFFSET (in_frame, 2);
+ srcY_tmp = srcY = GST_VIDEO_FRAME_COMP_DATA (in_frame, 0);
+ srcU_tmp = srcU = GST_VIDEO_FRAME_COMP_DATA (in_frame, 1);
+ srcV_tmp = srcV = GST_VIDEO_FRAME_COMP_DATA (in_frame, 2);
switch (GST_VIDEO_FRAME_FORMAT (in_frame)) {
case GST_VIDEO_FORMAT_I420:
gst_alpha_set_planar_yuv_argb (const GstVideoFrame * in_frame,
GstVideoFrame * out_frame, GstAlpha * alpha)
{
- const guint8 *src;
guint8 *dest;
gint width, height;
gint b_alpha = CLAMP ((gint) (alpha->alpha * 255), 0, 255);
gint r, g, b;
gint p[4];
- src = GST_VIDEO_FRAME_PLANE_DATA (in_frame, 0);
dest = GST_VIDEO_FRAME_PLANE_DATA (out_frame, 0);
width = GST_VIDEO_FRAME_WIDTH (in_frame);
height = GST_VIDEO_FRAME_HEIGHT (in_frame);
- p[0] = GST_VIDEO_FRAME_COMP_OFFSET (out_frame, 3);
- p[1] = GST_VIDEO_FRAME_COMP_OFFSET (out_frame, 0);
- p[2] = GST_VIDEO_FRAME_COMP_OFFSET (out_frame, 1);
- p[3] = GST_VIDEO_FRAME_COMP_OFFSET (out_frame, 2);
+ p[0] = GST_VIDEO_FRAME_COMP_POFFSET (out_frame, 3);
+ p[1] = GST_VIDEO_FRAME_COMP_POFFSET (out_frame, 0);
+ p[2] = GST_VIDEO_FRAME_COMP_POFFSET (out_frame, 1);
+ p[3] = GST_VIDEO_FRAME_COMP_POFFSET (out_frame, 2);
y_stride = GST_VIDEO_FRAME_COMP_STRIDE (in_frame, 0);
uv_stride = GST_VIDEO_FRAME_COMP_STRIDE (in_frame, 1);
- srcY_tmp = srcY = src;
- srcU_tmp = srcU = src + GST_VIDEO_FRAME_COMP_OFFSET (in_frame, 1);
- srcV_tmp = srcV = src + GST_VIDEO_FRAME_COMP_OFFSET (in_frame, 2);
+ srcY_tmp = srcY = GST_VIDEO_FRAME_COMP_DATA (in_frame, 0);
+ srcU_tmp = srcU = GST_VIDEO_FRAME_COMP_DATA (in_frame, 1);
+ srcV_tmp = srcV = GST_VIDEO_FRAME_COMP_DATA (in_frame, 2);
switch (GST_VIDEO_FRAME_FORMAT (in_frame)) {
case GST_VIDEO_FORMAT_I420:
gst_alpha_chroma_key_planar_yuv_argb (const GstVideoFrame * in_frame,
GstVideoFrame * out_frame, GstAlpha * alpha)
{
- const guint8 *src;
guint8 *dest;
gint width, height;
gint b_alpha = CLAMP ((gint) (alpha->alpha * 255), 0, 255);
gint matrix[12];
gint p[4];
- src = GST_VIDEO_FRAME_PLANE_DATA (in_frame, 0);
dest = GST_VIDEO_FRAME_PLANE_DATA (out_frame, 0);
width = GST_VIDEO_FRAME_WIDTH (in_frame);
height = GST_VIDEO_FRAME_HEIGHT (in_frame);
- p[0] = GST_VIDEO_FRAME_COMP_OFFSET (out_frame, 3);
- p[1] = GST_VIDEO_FRAME_COMP_OFFSET (out_frame, 0);
- p[2] = GST_VIDEO_FRAME_COMP_OFFSET (out_frame, 1);
- p[3] = GST_VIDEO_FRAME_COMP_OFFSET (out_frame, 2);
+ p[0] = GST_VIDEO_FRAME_COMP_POFFSET (out_frame, 3);
+ p[1] = GST_VIDEO_FRAME_COMP_POFFSET (out_frame, 0);
+ p[2] = GST_VIDEO_FRAME_COMP_POFFSET (out_frame, 1);
+ p[3] = GST_VIDEO_FRAME_COMP_POFFSET (out_frame, 2);
y_stride = GST_VIDEO_FRAME_COMP_STRIDE (in_frame, 0);
uv_stride = GST_VIDEO_FRAME_COMP_STRIDE (in_frame, 1);
- srcY_tmp = srcY = src;
- srcU_tmp = srcU = src + GST_VIDEO_FRAME_COMP_OFFSET (in_frame, 1);
- srcV_tmp = srcV = src + GST_VIDEO_FRAME_COMP_OFFSET (in_frame, 2);
+ srcY_tmp = srcY = GST_VIDEO_FRAME_COMP_DATA (in_frame, 0);
+ srcU_tmp = srcU = GST_VIDEO_FRAME_COMP_DATA (in_frame, 1);
+ srcV_tmp = srcV = GST_VIDEO_FRAME_COMP_DATA (in_frame, 2);
switch (GST_VIDEO_FRAME_FORMAT (in_frame)) {
case GST_VIDEO_FORMAT_I420:
src_stride = GST_VIDEO_FRAME_COMP_STRIDE (in_frame, 0);
- p[0] = GST_VIDEO_FRAME_COMP_OFFSET (in_frame, 0);
+ p[0] = GST_VIDEO_FRAME_COMP_POFFSET (in_frame, 0);
p[2] = p[0] + 2;
- p[1] = GST_VIDEO_FRAME_COMP_OFFSET (in_frame, 1);
- p[3] = GST_VIDEO_FRAME_COMP_OFFSET (in_frame, 2);
+ p[1] = GST_VIDEO_FRAME_COMP_POFFSET (in_frame, 1);
+ p[3] = GST_VIDEO_FRAME_COMP_POFFSET (in_frame, 2);
if (alpha->in_sdtv != alpha->out_sdtv) {
gint matrix[12];
y = src[p[0]];
u = src[p[1]];
- v = src[p[3]];;
+ v = src[p[3]];
dest[1] = y;
dest[2] = u;
y = src[p[0]];
u = src[p[1]];
- v = src[p[3]];;
+ v = src[p[3]];
dest[1] = y;
dest[2] = u;
src_stride = GST_VIDEO_FRAME_COMP_STRIDE (in_frame, 0);
- p[0] = GST_VIDEO_FRAME_COMP_OFFSET (in_frame, 0);
+ p[0] = GST_VIDEO_FRAME_COMP_POFFSET (in_frame, 0);
p[2] = p[0] + 2;
- p[1] = GST_VIDEO_FRAME_COMP_OFFSET (in_frame, 1);
- p[3] = GST_VIDEO_FRAME_COMP_OFFSET (in_frame, 2);
+ p[1] = GST_VIDEO_FRAME_COMP_POFFSET (in_frame, 1);
+ p[3] = GST_VIDEO_FRAME_COMP_POFFSET (in_frame, 2);
smin = 128 - alpha->black_sensitivity;
smax = 128 + alpha->white_sensitivity;
src_stride = GST_VIDEO_FRAME_COMP_STRIDE (in_frame, 0);
- o[0] = GST_VIDEO_FRAME_COMP_OFFSET (in_frame, 0);
+ o[0] = GST_VIDEO_FRAME_COMP_POFFSET (in_frame, 0);
o[2] = o[0] + 2;
- o[1] = GST_VIDEO_FRAME_COMP_OFFSET (in_frame, 1);
- o[3] = GST_VIDEO_FRAME_COMP_OFFSET (in_frame, 2);
+ o[1] = GST_VIDEO_FRAME_COMP_POFFSET (in_frame, 1);
+ o[3] = GST_VIDEO_FRAME_COMP_POFFSET (in_frame, 2);
- p[0] = GST_VIDEO_FRAME_COMP_OFFSET (out_frame, 3);
- p[1] = GST_VIDEO_FRAME_COMP_OFFSET (out_frame, 0);
- p[2] = GST_VIDEO_FRAME_COMP_OFFSET (out_frame, 1);
- p[3] = GST_VIDEO_FRAME_COMP_OFFSET (out_frame, 2);
+ p[0] = GST_VIDEO_FRAME_COMP_POFFSET (out_frame, 3);
+ p[1] = GST_VIDEO_FRAME_COMP_POFFSET (out_frame, 0);
+ p[2] = GST_VIDEO_FRAME_COMP_POFFSET (out_frame, 1);
+ p[3] = GST_VIDEO_FRAME_COMP_POFFSET (out_frame, 2);
memcpy (matrix,
alpha->in_sdtv ? cog_ycbcr_to_rgb_matrix_8bit_sdtv :
src_stride = GST_VIDEO_FRAME_COMP_STRIDE (in_frame, 0);
- o[0] = GST_VIDEO_FRAME_COMP_OFFSET (in_frame, 0);
+ o[0] = GST_VIDEO_FRAME_COMP_POFFSET (in_frame, 0);
o[2] = o[0] + 2;
- o[1] = GST_VIDEO_FRAME_COMP_OFFSET (in_frame, 1);
- o[3] = GST_VIDEO_FRAME_COMP_OFFSET (in_frame, 2);
+ o[1] = GST_VIDEO_FRAME_COMP_POFFSET (in_frame, 1);
+ o[3] = GST_VIDEO_FRAME_COMP_POFFSET (in_frame, 2);
- p[0] = GST_VIDEO_FRAME_COMP_OFFSET (out_frame, 3);
- p[1] = GST_VIDEO_FRAME_COMP_OFFSET (out_frame, 0);
- p[2] = GST_VIDEO_FRAME_COMP_OFFSET (out_frame, 1);
- p[3] = GST_VIDEO_FRAME_COMP_OFFSET (out_frame, 2);
+ p[0] = GST_VIDEO_FRAME_COMP_POFFSET (out_frame, 3);
+ p[1] = GST_VIDEO_FRAME_COMP_POFFSET (out_frame, 0);
+ p[2] = GST_VIDEO_FRAME_COMP_POFFSET (out_frame, 1);
+ p[3] = GST_VIDEO_FRAME_COMP_POFFSET (out_frame, 2);
memcpy (matrix,
alpha->in_sdtv ? cog_ycbcr_to_rgb_matrix_8bit_sdtv :
tmp = MIN (tmp, 255);
alpha->accept_angle_ctg = tmp;
tmp = 1 / (kgl);
- alpha->one_over_kc = 255 * 2 * tmp - 255;
+ alpha->one_over_kc = (gint) (255 * 2 * tmp - 255);
tmp = 15 * y / kgl;
tmp = MIN (tmp, 255);
alpha->kfgy_scale = tmp;
break;
}
break;
- break;
default:
break;
}
break;
}
break;
- break;
default:
break;
}