Lines Matching refs:alpha
150 #define GST_ALPHA_LOCK(alpha) G_STMT_START { \ argument
151 GST_LOG_OBJECT (alpha, "Locking alpha from thread %p", g_thread_self ()); \
152 g_mutex_lock (&alpha->lock); \
153 GST_LOG_OBJECT (alpha, "Locked alpha from thread %p", g_thread_self ()); \
156 #define GST_ALPHA_UNLOCK(alpha) G_STMT_START { \ argument
157 GST_LOG_OBJECT (alpha, "Unlocking alpha from thread %p", g_thread_self ()); \
158 g_mutex_unlock (&alpha->lock); \
172 static void gst_alpha_init_params_full (GstAlpha * alpha,
174 static void gst_alpha_init_params (GstAlpha * alpha);
175 static void gst_alpha_set_process_function (GstAlpha * alpha);
176 static gboolean gst_alpha_set_process_function_full (GstAlpha * alpha,
187 GST_ELEMENT_REGISTER_DEFINE (alpha, "alpha", GST_RANK_NONE, GST_TYPE_ALPHA);
295 gst_alpha_init (GstAlpha * alpha) in gst_alpha_init() argument
297 alpha->alpha = DEFAULT_ALPHA; in gst_alpha_init()
298 alpha->method = DEFAULT_METHOD; in gst_alpha_init()
299 alpha->target_r = DEFAULT_TARGET_R; in gst_alpha_init()
300 alpha->target_g = DEFAULT_TARGET_G; in gst_alpha_init()
301 alpha->target_b = DEFAULT_TARGET_B; in gst_alpha_init()
302 alpha->angle = DEFAULT_ANGLE; in gst_alpha_init()
303 alpha->noise_level = DEFAULT_NOISE_LEVEL; in gst_alpha_init()
304 alpha->black_sensitivity = DEFAULT_BLACK_SENSITIVITY; in gst_alpha_init()
305 alpha->white_sensitivity = DEFAULT_WHITE_SENSITIVITY; in gst_alpha_init()
307 g_mutex_init (&alpha->lock); in gst_alpha_init()
313 GstAlpha *alpha = GST_ALPHA (object); in gst_alpha_finalize() local
315 g_mutex_clear (&alpha->lock); in gst_alpha_finalize()
324 GstAlpha *alpha = GST_ALPHA (object); in gst_alpha_set_property() local
327 GST_ALPHA_LOCK (alpha); in gst_alpha_set_property()
332 reconfigure = (method != alpha->method) && (method == ALPHA_METHOD_SET in gst_alpha_set_property()
333 || alpha->method == ALPHA_METHOD_SET) && (alpha->alpha == 1.0) in gst_alpha_set_property()
334 && (alpha->prefer_passthrough); in gst_alpha_set_property()
335 alpha->method = method; in gst_alpha_set_property()
337 gst_alpha_set_process_function (alpha); in gst_alpha_set_property()
338 gst_alpha_init_params (alpha); in gst_alpha_set_property()
344 reconfigure = (a != alpha->alpha) && (a == 1.0 || alpha->alpha == 1.0) in gst_alpha_set_property()
345 && (alpha->method == ALPHA_METHOD_SET) && (alpha->prefer_passthrough); in gst_alpha_set_property()
346 alpha->alpha = a; in gst_alpha_set_property()
350 alpha->target_r = g_value_get_uint (value); in gst_alpha_set_property()
351 gst_alpha_init_params (alpha); in gst_alpha_set_property()
354 alpha->target_g = g_value_get_uint (value); in gst_alpha_set_property()
355 gst_alpha_init_params (alpha); in gst_alpha_set_property()
358 alpha->target_b = g_value_get_uint (value); in gst_alpha_set_property()
359 gst_alpha_init_params (alpha); in gst_alpha_set_property()
362 alpha->angle = g_value_get_float (value); in gst_alpha_set_property()
363 gst_alpha_init_params (alpha); in gst_alpha_set_property()
366 alpha->noise_level = g_value_get_float (value); in gst_alpha_set_property()
367 gst_alpha_init_params (alpha); in gst_alpha_set_property()
370 alpha->black_sensitivity = g_value_get_uint (value); in gst_alpha_set_property()
373 alpha->white_sensitivity = g_value_get_uint (value); in gst_alpha_set_property()
378 reconfigure = ((! !prefer_passthrough) != (! !alpha->prefer_passthrough)) in gst_alpha_set_property()
379 && (alpha->method == ALPHA_METHOD_SET) && (alpha->alpha == 1.0); in gst_alpha_set_property()
380 alpha->prefer_passthrough = prefer_passthrough; in gst_alpha_set_property()
389 gst_base_transform_reconfigure_src (GST_BASE_TRANSFORM_CAST (alpha)); in gst_alpha_set_property()
391 GST_ALPHA_UNLOCK (alpha); in gst_alpha_set_property()
398 GstAlpha *alpha = GST_ALPHA (object); in gst_alpha_get_property() local
402 g_value_set_enum (value, alpha->method); in gst_alpha_get_property()
405 g_value_set_double (value, alpha->alpha); in gst_alpha_get_property()
408 g_value_set_uint (value, alpha->target_r); in gst_alpha_get_property()
411 g_value_set_uint (value, alpha->target_g); in gst_alpha_get_property()
414 g_value_set_uint (value, alpha->target_b); in gst_alpha_get_property()
417 g_value_set_float (value, alpha->angle); in gst_alpha_get_property()
420 g_value_set_float (value, alpha->noise_level); in gst_alpha_get_property()
423 g_value_set_uint (value, alpha->black_sensitivity); in gst_alpha_get_property()
426 g_value_set_uint (value, alpha->white_sensitivity); in gst_alpha_get_property()
429 g_value_set_boolean (value, alpha->prefer_passthrough); in gst_alpha_get_property()
441 GstAlpha *alpha = GST_ALPHA (btrans); in gst_alpha_transform_caps() local
448 GST_ALPHA_LOCK (alpha); in gst_alpha_transform_caps()
467 if (alpha->prefer_passthrough && alpha->method == ALPHA_METHOD_SET in gst_alpha_transform_caps()
468 && alpha->alpha == 1.0) { in gst_alpha_transform_caps()
481 GST_DEBUG_OBJECT (alpha, in gst_alpha_transform_caps()
487 GST_DEBUG_OBJECT (alpha, "Using filter caps %" GST_PTR_FORMAT, filter); in gst_alpha_transform_caps()
492 GST_DEBUG_OBJECT (alpha, "Intersection %" GST_PTR_FORMAT, ret); in gst_alpha_transform_caps()
496 GST_ALPHA_UNLOCK (alpha); in gst_alpha_transform_caps()
506 GstAlpha *alpha = GST_ALPHA (filter); in gst_alpha_set_info() local
509 GST_ALPHA_LOCK (alpha); in gst_alpha_set_info()
511 alpha->in_sdtv = in_info->colorimetry.matrix == GST_VIDEO_COLOR_MATRIX_BT601; in gst_alpha_set_info()
512 alpha->out_sdtv = in gst_alpha_set_info()
515 passthrough = alpha->prefer_passthrough && in gst_alpha_set_info()
517 && alpha->in_sdtv == alpha->out_sdtv && alpha->method == ALPHA_METHOD_SET in gst_alpha_set_info()
518 && alpha->alpha == 1.0; in gst_alpha_set_info()
520 GST_DEBUG_OBJECT (alpha, in gst_alpha_set_info()
526 if (!gst_alpha_set_process_function_full (alpha, in_info, out_info) in gst_alpha_set_info()
530 gst_alpha_init_params_full (alpha, in_info->finfo, out_info->finfo); in gst_alpha_set_info()
532 GST_ALPHA_UNLOCK (alpha); in gst_alpha_set_info()
539 GST_WARNING_OBJECT (alpha, in gst_alpha_set_info()
541 GST_ALPHA_UNLOCK (alpha); in gst_alpha_set_info()
627 GstVideoFrame * out_frame, GstAlpha * alpha) in gst_alpha_set_argb_ayuv() argument
629 gint s_alpha = CLAMP ((gint) (alpha->alpha * 256), 0, 256); in gst_alpha_set_argb_ayuv()
650 alpha->out_sdtv ? cog_rgb_to_ycbcr_matrix_8bit_sdtv : in gst_alpha_set_argb_ayuv()
673 GstVideoFrame * out_frame, GstAlpha * alpha) in gst_alpha_chroma_key_argb_ayuv() argument
682 gint pa = CLAMP ((gint) (alpha->alpha * 256), 0, 256); in gst_alpha_chroma_key_argb_ayuv()
683 gint8 cb = alpha->cb, cr = alpha->cr; in gst_alpha_chroma_key_argb_ayuv()
684 gint8 kg = alpha->kg; in gst_alpha_chroma_key_argb_ayuv()
685 guint8 accept_angle_tg = alpha->accept_angle_tg; in gst_alpha_chroma_key_argb_ayuv()
686 guint8 accept_angle_ctg = alpha->accept_angle_ctg; in gst_alpha_chroma_key_argb_ayuv()
687 guint8 one_over_kc = alpha->one_over_kc; in gst_alpha_chroma_key_argb_ayuv()
688 guint8 kfgy_scale = alpha->kfgy_scale; in gst_alpha_chroma_key_argb_ayuv()
689 guint noise_level2 = alpha->noise_level2; in gst_alpha_chroma_key_argb_ayuv()
704 smin = 128 - alpha->black_sensitivity; in gst_alpha_chroma_key_argb_ayuv()
705 smax = 128 + alpha->white_sensitivity; in gst_alpha_chroma_key_argb_ayuv()
708 alpha->out_sdtv ? cog_rgb_to_ycbcr_matrix_8bit_sdtv : in gst_alpha_chroma_key_argb_ayuv()
742 GstVideoFrame * out_frame, GstAlpha * alpha) in gst_alpha_set_argb_argb() argument
747 gint s_alpha = CLAMP ((gint) (alpha->alpha * 256), 0, 256); in gst_alpha_set_argb_argb()
783 GstVideoFrame * out_frame, GstAlpha * alpha) in gst_alpha_chroma_key_argb_argb() argument
792 gint pa = CLAMP ((gint) (alpha->alpha * 256), 0, 256); in gst_alpha_chroma_key_argb_argb()
793 gint8 cb = alpha->cb, cr = alpha->cr; in gst_alpha_chroma_key_argb_argb()
794 gint8 kg = alpha->kg; in gst_alpha_chroma_key_argb_argb()
795 guint8 accept_angle_tg = alpha->accept_angle_tg; in gst_alpha_chroma_key_argb_argb()
796 guint8 accept_angle_ctg = alpha->accept_angle_ctg; in gst_alpha_chroma_key_argb_argb()
797 guint8 one_over_kc = alpha->one_over_kc; in gst_alpha_chroma_key_argb_argb()
798 guint8 kfgy_scale = alpha->kfgy_scale; in gst_alpha_chroma_key_argb_argb()
799 guint noise_level2 = alpha->noise_level2; in gst_alpha_chroma_key_argb_argb()
819 smin = 128 - alpha->black_sensitivity; in gst_alpha_chroma_key_argb_argb()
820 smax = 128 + alpha->white_sensitivity; in gst_alpha_chroma_key_argb_argb()
860 GstVideoFrame * out_frame, GstAlpha * alpha) in gst_alpha_set_ayuv_argb() argument
865 gint s_alpha = CLAMP ((gint) (alpha->alpha * 256), 0, 256); in gst_alpha_set_ayuv_argb()
883 alpha->in_sdtv ? cog_ycbcr_to_rgb_matrix_8bit_sdtv : in gst_alpha_set_ayuv_argb()
906 GstVideoFrame * out_frame, GstAlpha * alpha) in gst_alpha_chroma_key_ayuv_argb() argument
915 gint pa = CLAMP ((gint) (alpha->alpha * 256), 0, 256); in gst_alpha_chroma_key_ayuv_argb()
916 gint8 cb = alpha->cb, cr = alpha->cr; in gst_alpha_chroma_key_ayuv_argb()
917 gint8 kg = alpha->kg; in gst_alpha_chroma_key_ayuv_argb()
918 guint8 accept_angle_tg = alpha->accept_angle_tg; in gst_alpha_chroma_key_ayuv_argb()
919 guint8 accept_angle_ctg = alpha->accept_angle_ctg; in gst_alpha_chroma_key_ayuv_argb()
920 guint8 one_over_kc = alpha->one_over_kc; in gst_alpha_chroma_key_ayuv_argb()
921 guint8 kfgy_scale = alpha->kfgy_scale; in gst_alpha_chroma_key_ayuv_argb()
922 guint noise_level2 = alpha->noise_level2; in gst_alpha_chroma_key_ayuv_argb()
937 smin = 128 - alpha->black_sensitivity; in gst_alpha_chroma_key_ayuv_argb()
938 smax = 128 + alpha->white_sensitivity; in gst_alpha_chroma_key_ayuv_argb()
941 alpha->in_sdtv ? cog_ycbcr_to_rgb_matrix_8bit_sdtv : in gst_alpha_chroma_key_ayuv_argb()
975 GstVideoFrame * out_frame, GstAlpha * alpha) in gst_alpha_set_ayuv_ayuv() argument
980 gint s_alpha = CLAMP ((gint) (alpha->alpha * 256), 0, 256); in gst_alpha_set_ayuv_ayuv()
989 if (alpha->in_sdtv == alpha->out_sdtv) { in gst_alpha_set_ayuv_ayuv()
1005 alpha->out_sdtv ? cog_ycbcr_hdtv_to_ycbcr_sdtv_matrix_8bit : in gst_alpha_set_ayuv_ayuv()
1024 GstVideoFrame * out_frame, GstAlpha * alpha) in gst_alpha_chroma_key_ayuv_ayuv() argument
1032 gint pa = CLAMP ((gint) (alpha->alpha * 256), 0, 256); in gst_alpha_chroma_key_ayuv_ayuv()
1033 gint8 cb = alpha->cb, cr = alpha->cr; in gst_alpha_chroma_key_ayuv_ayuv()
1034 gint8 kg = alpha->kg; in gst_alpha_chroma_key_ayuv_ayuv()
1035 guint8 accept_angle_tg = alpha->accept_angle_tg; in gst_alpha_chroma_key_ayuv_ayuv()
1036 guint8 accept_angle_ctg = alpha->accept_angle_ctg; in gst_alpha_chroma_key_ayuv_ayuv()
1037 guint8 one_over_kc = alpha->one_over_kc; in gst_alpha_chroma_key_ayuv_ayuv()
1038 guint8 kfgy_scale = alpha->kfgy_scale; in gst_alpha_chroma_key_ayuv_ayuv()
1039 guint noise_level2 = alpha->noise_level2; in gst_alpha_chroma_key_ayuv_ayuv()
1047 smin = 128 - alpha->black_sensitivity; in gst_alpha_chroma_key_ayuv_ayuv()
1048 smax = 128 + alpha->white_sensitivity; in gst_alpha_chroma_key_ayuv_ayuv()
1050 if (alpha->in_sdtv == alpha->out_sdtv) { in gst_alpha_chroma_key_ayuv_ayuv()
1078 alpha->out_sdtv ? cog_ycbcr_hdtv_to_ycbcr_sdtv_matrix_8bit : in gst_alpha_chroma_key_ayuv_ayuv()
1109 GstVideoFrame * out_frame, GstAlpha * alpha) in gst_alpha_set_rgb_ayuv() argument
1114 gint s_alpha = CLAMP ((gint) (alpha->alpha * 255), 0, 255); in gst_alpha_set_rgb_ayuv()
1133 alpha->out_sdtv ? cog_rgb_to_ycbcr_matrix_8bit_sdtv : in gst_alpha_set_rgb_ayuv()
1156 GstVideoFrame * out_frame, GstAlpha * alpha) in gst_alpha_chroma_key_rgb_ayuv() argument
1165 gint pa = CLAMP ((gint) (alpha->alpha * 255), 0, 255); in gst_alpha_chroma_key_rgb_ayuv()
1166 gint8 cb = alpha->cb, cr = alpha->cr; in gst_alpha_chroma_key_rgb_ayuv()
1167 gint8 kg = alpha->kg; in gst_alpha_chroma_key_rgb_ayuv()
1168 guint8 accept_angle_tg = alpha->accept_angle_tg; in gst_alpha_chroma_key_rgb_ayuv()
1169 guint8 accept_angle_ctg = alpha->accept_angle_ctg; in gst_alpha_chroma_key_rgb_ayuv()
1170 guint8 one_over_kc = alpha->one_over_kc; in gst_alpha_chroma_key_rgb_ayuv()
1171 guint8 kfgy_scale = alpha->kfgy_scale; in gst_alpha_chroma_key_rgb_ayuv()
1172 guint noise_level2 = alpha->noise_level2; in gst_alpha_chroma_key_rgb_ayuv()
1189 smin = 128 - alpha->black_sensitivity; in gst_alpha_chroma_key_rgb_ayuv()
1190 smax = 128 + alpha->white_sensitivity; in gst_alpha_chroma_key_rgb_ayuv()
1193 alpha->out_sdtv ? cog_rgb_to_ycbcr_matrix_8bit_sdtv : in gst_alpha_chroma_key_rgb_ayuv()
1227 GstVideoFrame * out_frame, GstAlpha * alpha) in gst_alpha_set_rgb_argb() argument
1232 gint s_alpha = CLAMP ((gint) (alpha->alpha * 255), 0, 255); in gst_alpha_set_rgb_argb()
1270 GstVideoFrame * out_frame, GstAlpha * alpha) in gst_alpha_chroma_key_rgb_argb() argument
1279 gint pa = CLAMP ((gint) (alpha->alpha * 255), 0, 255); in gst_alpha_chroma_key_rgb_argb()
1280 gint8 cb = alpha->cb, cr = alpha->cr; in gst_alpha_chroma_key_rgb_argb()
1281 gint8 kg = alpha->kg; in gst_alpha_chroma_key_rgb_argb()
1282 guint8 accept_angle_tg = alpha->accept_angle_tg; in gst_alpha_chroma_key_rgb_argb()
1283 guint8 accept_angle_ctg = alpha->accept_angle_ctg; in gst_alpha_chroma_key_rgb_argb()
1284 guint8 one_over_kc = alpha->one_over_kc; in gst_alpha_chroma_key_rgb_argb()
1285 guint8 kfgy_scale = alpha->kfgy_scale; in gst_alpha_chroma_key_rgb_argb()
1286 guint noise_level2 = alpha->noise_level2; in gst_alpha_chroma_key_rgb_argb()
1308 smin = 128 - alpha->black_sensitivity; in gst_alpha_chroma_key_rgb_argb()
1309 smax = 128 + alpha->white_sensitivity; in gst_alpha_chroma_key_rgb_argb()
1349 GstVideoFrame * out_frame, GstAlpha * alpha) in gst_alpha_set_planar_yuv_ayuv() argument
1353 gint b_alpha = CLAMP ((gint) (alpha->alpha * 255), 0, 255); in gst_alpha_set_planar_yuv_ayuv()
1394 if (alpha->in_sdtv == alpha->out_sdtv) { in gst_alpha_set_planar_yuv_ayuv()
1424 alpha->out_sdtv ? cog_ycbcr_hdtv_to_ycbcr_sdtv_matrix_8bit : in gst_alpha_set_planar_yuv_ayuv()
1461 GstVideoFrame * out_frame, GstAlpha * alpha) in gst_alpha_chroma_key_planar_yuv_ayuv() argument
1465 gint b_alpha = CLAMP ((gint) (alpha->alpha * 255), 0, 255); in gst_alpha_chroma_key_planar_yuv_ayuv()
1473 gint smin = 128 - alpha->black_sensitivity; in gst_alpha_chroma_key_planar_yuv_ayuv()
1474 gint smax = 128 + alpha->white_sensitivity; in gst_alpha_chroma_key_planar_yuv_ayuv()
1475 gint8 cb = alpha->cb, cr = alpha->cr; in gst_alpha_chroma_key_planar_yuv_ayuv()
1476 gint8 kg = alpha->kg; in gst_alpha_chroma_key_planar_yuv_ayuv()
1477 guint8 accept_angle_tg = alpha->accept_angle_tg; in gst_alpha_chroma_key_planar_yuv_ayuv()
1478 guint8 accept_angle_ctg = alpha->accept_angle_ctg; in gst_alpha_chroma_key_planar_yuv_ayuv()
1479 guint8 one_over_kc = alpha->one_over_kc; in gst_alpha_chroma_key_planar_yuv_ayuv()
1480 guint8 kfgy_scale = alpha->kfgy_scale; in gst_alpha_chroma_key_planar_yuv_ayuv()
1481 guint noise_level2 = alpha->noise_level2; in gst_alpha_chroma_key_planar_yuv_ayuv()
1516 if (alpha->in_sdtv == alpha->out_sdtv) { in gst_alpha_chroma_key_planar_yuv_ayuv()
1557 alpha->out_sdtv ? cog_ycbcr_hdtv_to_ycbcr_sdtv_matrix_8bit : in gst_alpha_chroma_key_planar_yuv_ayuv()
1598 GstVideoFrame * out_frame, GstAlpha * alpha) in gst_alpha_set_planar_yuv_argb() argument
1602 gint b_alpha = CLAMP ((gint) (alpha->alpha * 255), 0, 255); in gst_alpha_set_planar_yuv_argb()
1653 alpha->in_sdtv ? cog_ycbcr_to_rgb_matrix_8bit_sdtv : in gst_alpha_set_planar_yuv_argb()
1692 GstVideoFrame * out_frame, GstAlpha * alpha) in gst_alpha_chroma_key_planar_yuv_argb() argument
1696 gint b_alpha = CLAMP ((gint) (alpha->alpha * 255), 0, 255); in gst_alpha_chroma_key_planar_yuv_argb()
1705 gint smin = 128 - alpha->black_sensitivity; in gst_alpha_chroma_key_planar_yuv_argb()
1706 gint smax = 128 + alpha->white_sensitivity; in gst_alpha_chroma_key_planar_yuv_argb()
1707 gint8 cb = alpha->cb, cr = alpha->cr; in gst_alpha_chroma_key_planar_yuv_argb()
1708 gint8 kg = alpha->kg; in gst_alpha_chroma_key_planar_yuv_argb()
1709 guint8 accept_angle_tg = alpha->accept_angle_tg; in gst_alpha_chroma_key_planar_yuv_argb()
1710 guint8 accept_angle_ctg = alpha->accept_angle_ctg; in gst_alpha_chroma_key_planar_yuv_argb()
1711 guint8 one_over_kc = alpha->one_over_kc; in gst_alpha_chroma_key_planar_yuv_argb()
1712 guint8 kfgy_scale = alpha->kfgy_scale; in gst_alpha_chroma_key_planar_yuv_argb()
1713 guint noise_level2 = alpha->noise_level2; in gst_alpha_chroma_key_planar_yuv_argb()
1756 alpha->in_sdtv ? cog_ycbcr_to_rgb_matrix_8bit_sdtv : in gst_alpha_chroma_key_planar_yuv_argb()
1802 GstVideoFrame * out_frame, GstAlpha * alpha) in gst_alpha_set_packed_422_ayuv() argument
1807 gint s_alpha = CLAMP ((gint) (alpha->alpha * 255), 0, 255); in gst_alpha_set_packed_422_ayuv()
1827 if (alpha->in_sdtv != alpha->out_sdtv) { in gst_alpha_set_packed_422_ayuv()
1831 alpha->in_sdtv ? cog_ycbcr_sdtv_to_ycbcr_hdtv_matrix_8bit : in gst_alpha_set_packed_422_ayuv()
1924 GstVideoFrame * out_frame, GstAlpha * alpha) in gst_alpha_chroma_key_packed_422_ayuv() argument
1932 gint pa = CLAMP ((gint) (alpha->alpha * 255), 0, 255); in gst_alpha_chroma_key_packed_422_ayuv()
1933 gint8 cb = alpha->cb, cr = alpha->cr; in gst_alpha_chroma_key_packed_422_ayuv()
1934 gint8 kg = alpha->kg; in gst_alpha_chroma_key_packed_422_ayuv()
1935 guint8 accept_angle_tg = alpha->accept_angle_tg; in gst_alpha_chroma_key_packed_422_ayuv()
1936 guint8 accept_angle_ctg = alpha->accept_angle_ctg; in gst_alpha_chroma_key_packed_422_ayuv()
1937 guint8 one_over_kc = alpha->one_over_kc; in gst_alpha_chroma_key_packed_422_ayuv()
1938 guint8 kfgy_scale = alpha->kfgy_scale; in gst_alpha_chroma_key_packed_422_ayuv()
1939 guint noise_level2 = alpha->noise_level2; in gst_alpha_chroma_key_packed_422_ayuv()
1957 smin = 128 - alpha->black_sensitivity; in gst_alpha_chroma_key_packed_422_ayuv()
1958 smax = 128 + alpha->white_sensitivity; in gst_alpha_chroma_key_packed_422_ayuv()
1960 if (alpha->in_sdtv != alpha->out_sdtv) { in gst_alpha_chroma_key_packed_422_ayuv()
1964 alpha->in_sdtv ? cog_ycbcr_sdtv_to_ycbcr_hdtv_matrix_8bit : in gst_alpha_chroma_key_packed_422_ayuv()
2079 GstVideoFrame * out_frame, GstAlpha * alpha) in gst_alpha_set_packed_422_argb() argument
2084 gint s_alpha = CLAMP ((gint) (alpha->alpha * 255), 0, 255); in gst_alpha_set_packed_422_argb()
2111 alpha->in_sdtv ? cog_ycbcr_to_rgb_matrix_8bit_sdtv : in gst_alpha_set_packed_422_argb()
2159 GstVideoFrame * out_frame, GstAlpha * alpha) in gst_alpha_chroma_key_packed_422_argb() argument
2168 gint pa = CLAMP ((gint) (alpha->alpha * 255), 0, 255); in gst_alpha_chroma_key_packed_422_argb()
2169 gint8 cb = alpha->cb, cr = alpha->cr; in gst_alpha_chroma_key_packed_422_argb()
2170 gint8 kg = alpha->kg; in gst_alpha_chroma_key_packed_422_argb()
2171 guint8 accept_angle_tg = alpha->accept_angle_tg; in gst_alpha_chroma_key_packed_422_argb()
2172 guint8 accept_angle_ctg = alpha->accept_angle_ctg; in gst_alpha_chroma_key_packed_422_argb()
2173 guint8 one_over_kc = alpha->one_over_kc; in gst_alpha_chroma_key_packed_422_argb()
2174 guint8 kfgy_scale = alpha->kfgy_scale; in gst_alpha_chroma_key_packed_422_argb()
2175 guint noise_level2 = alpha->noise_level2; in gst_alpha_chroma_key_packed_422_argb()
2200 alpha->in_sdtv ? cog_ycbcr_to_rgb_matrix_8bit_sdtv : in gst_alpha_chroma_key_packed_422_argb()
2203 smin = 128 - alpha->black_sensitivity; in gst_alpha_chroma_key_packed_422_argb()
2204 smax = 128 + alpha->white_sensitivity; in gst_alpha_chroma_key_packed_422_argb()
2281 gst_alpha_init_params_full (GstAlpha * alpha, in gst_alpha_init_params_full() argument
2288 guint target_r = alpha->target_r; in gst_alpha_init_params_full()
2289 guint target_g = alpha->target_g; in gst_alpha_init_params_full()
2290 guint target_b = alpha->target_b; in gst_alpha_init_params_full()
2293 switch (alpha->method) { in gst_alpha_init_params_full()
2319 (alpha->in_sdtv) ? cog_rgb_to_ycbcr_matrix_8bit_sdtv : in gst_alpha_init_params_full()
2324 (alpha->out_sdtv) ? cog_rgb_to_ycbcr_matrix_8bit_sdtv : in gst_alpha_init_params_full()
2328 (alpha->out_sdtv) ? cog_rgb_to_ycbcr_matrix_8bit_sdtv : in gst_alpha_init_params_full()
2345 alpha->cb = 127 * (tmp1 / kgl); in gst_alpha_init_params_full()
2346 alpha->cr = 127 * (tmp2 / kgl); in gst_alpha_init_params_full()
2348 tmp = 15 * tan (M_PI * alpha->angle / 180); in gst_alpha_init_params_full()
2350 alpha->accept_angle_tg = tmp; in gst_alpha_init_params_full()
2351 tmp = 15 / tan (M_PI * alpha->angle / 180); in gst_alpha_init_params_full()
2353 alpha->accept_angle_ctg = tmp; in gst_alpha_init_params_full()
2355 alpha->one_over_kc = (gint) (255 * 2 * tmp - 255); in gst_alpha_init_params_full()
2358 alpha->kfgy_scale = tmp; in gst_alpha_init_params_full()
2359 alpha->kg = MIN (kgl, 127); in gst_alpha_init_params_full()
2361 alpha->noise_level2 = alpha->noise_level * alpha->noise_level; in gst_alpha_init_params_full()
2365 gst_alpha_init_params (GstAlpha * alpha) in gst_alpha_init_params() argument
2369 finfo_in = GST_VIDEO_FILTER (alpha)->in_info.finfo; in gst_alpha_init_params()
2370 finfo_out = GST_VIDEO_FILTER (alpha)->out_info.finfo; in gst_alpha_init_params()
2373 gst_alpha_init_params_full (alpha, finfo_in, finfo_out); in gst_alpha_init_params()
2375 GST_DEBUG_OBJECT (alpha, "video formats not set yet"); in gst_alpha_init_params()
2381 gst_alpha_set_process_function_full (GstAlpha * alpha, GstVideoInfo * in_info, in gst_alpha_set_process_function_full() argument
2384 alpha->process = NULL; in gst_alpha_set_process_function_full()
2386 switch (alpha->method) { in gst_alpha_set_process_function_full()
2392 alpha->process = gst_alpha_set_ayuv_ayuv; in gst_alpha_set_process_function_full()
2399 alpha->process = gst_alpha_set_planar_yuv_ayuv; in gst_alpha_set_process_function_full()
2404 alpha->process = gst_alpha_set_packed_422_ayuv; in gst_alpha_set_process_function_full()
2410 alpha->process = gst_alpha_set_argb_ayuv; in gst_alpha_set_process_function_full()
2418 alpha->process = gst_alpha_set_rgb_ayuv; in gst_alpha_set_process_function_full()
2430 alpha->process = gst_alpha_set_ayuv_argb; in gst_alpha_set_process_function_full()
2437 alpha->process = gst_alpha_set_planar_yuv_argb; in gst_alpha_set_process_function_full()
2442 alpha->process = gst_alpha_set_packed_422_argb; in gst_alpha_set_process_function_full()
2448 alpha->process = gst_alpha_set_argb_argb; in gst_alpha_set_process_function_full()
2456 alpha->process = gst_alpha_set_rgb_argb; in gst_alpha_set_process_function_full()
2473 alpha->process = gst_alpha_chroma_key_ayuv_ayuv; in gst_alpha_set_process_function_full()
2480 alpha->process = gst_alpha_chroma_key_planar_yuv_ayuv; in gst_alpha_set_process_function_full()
2485 alpha->process = gst_alpha_chroma_key_packed_422_ayuv; in gst_alpha_set_process_function_full()
2491 alpha->process = gst_alpha_chroma_key_argb_ayuv; in gst_alpha_set_process_function_full()
2499 alpha->process = gst_alpha_chroma_key_rgb_ayuv; in gst_alpha_set_process_function_full()
2511 alpha->process = gst_alpha_chroma_key_ayuv_argb; in gst_alpha_set_process_function_full()
2518 alpha->process = gst_alpha_chroma_key_planar_yuv_argb; in gst_alpha_set_process_function_full()
2523 alpha->process = gst_alpha_chroma_key_packed_422_argb; in gst_alpha_set_process_function_full()
2529 alpha->process = gst_alpha_chroma_key_argb_argb; in gst_alpha_set_process_function_full()
2537 alpha->process = gst_alpha_chroma_key_rgb_argb; in gst_alpha_set_process_function_full()
2550 return alpha->process != NULL; in gst_alpha_set_process_function_full()
2554 gst_alpha_set_process_function (GstAlpha * alpha) in gst_alpha_set_process_function() argument
2558 info_in = &GST_VIDEO_FILTER (alpha)->in_info; in gst_alpha_set_process_function()
2559 info_out = &GST_VIDEO_FILTER (alpha)->out_info; in gst_alpha_set_process_function()
2562 gst_alpha_set_process_function_full (alpha, info_in, info_out); in gst_alpha_set_process_function()
2564 GST_DEBUG_OBJECT (alpha, "video formats not set yet"); in gst_alpha_set_process_function()
2571 GstAlpha *alpha = GST_ALPHA (btrans); in gst_alpha_before_transform() local
2578 gst_object_sync_values (GST_OBJECT (alpha), timestamp); in gst_alpha_before_transform()
2585 GstAlpha *alpha = GST_ALPHA (filter); in gst_alpha_transform_frame() local
2587 GST_ALPHA_LOCK (alpha); in gst_alpha_transform_frame()
2589 if (G_UNLIKELY (!alpha->process)) in gst_alpha_transform_frame()
2592 alpha->process (in_frame, out_frame, alpha); in gst_alpha_transform_frame()
2594 GST_ALPHA_UNLOCK (alpha); in gst_alpha_transform_frame()
2601 GST_ERROR_OBJECT (alpha, "Not negotiated yet"); in gst_alpha_transform_frame()
2602 GST_ALPHA_UNLOCK (alpha); in gst_alpha_transform_frame()
2610 return GST_ELEMENT_REGISTER (alpha, plugin); in plugin_init()
2615 alpha,