mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-07-14 19:16:59 +00:00
FS-10050: [core] chromakey
This commit is contained in:
parent
40687ccb6a
commit
06bd37b623
@ -346,6 +346,10 @@ SWITCH_DECLARE(void) switch_img_attenuate(switch_image_t *img)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (img->user_priv) return;
|
||||||
|
|
||||||
|
img->user_priv = (void *)(intptr_t)1;
|
||||||
|
|
||||||
ARGBAttenuate(img->planes[SWITCH_PLANE_PACKED], img->stride[SWITCH_PLANE_PACKED],
|
ARGBAttenuate(img->planes[SWITCH_PLANE_PACKED], img->stride[SWITCH_PLANE_PACKED],
|
||||||
img->planes[SWITCH_PLANE_PACKED], img->stride[SWITCH_PLANE_PACKED], img->d_w, img->d_h);
|
img->planes[SWITCH_PLANE_PACKED], img->stride[SWITCH_PLANE_PACKED], img->d_w, img->d_h);
|
||||||
}
|
}
|
||||||
@ -370,10 +374,7 @@ SWITCH_DECLARE(void) switch_img_patch_rgb(switch_image_t *IMG, switch_image_t *i
|
|||||||
int height = MIN(img->d_h, IMG->d_h - abs(y));
|
int height = MIN(img->d_h, IMG->d_h - abs(y));
|
||||||
void (*ARGBBlendRow)(const uint8* src_argb, const uint8* src_argb1, uint8* dst_argb, int width) = GetARGBBlend();
|
void (*ARGBBlendRow)(const uint8* src_argb, const uint8* src_argb1, uint8* dst_argb, int width) = GetARGBBlend();
|
||||||
|
|
||||||
if (!img->user_priv) {
|
switch_img_attenuate(img);
|
||||||
img->user_priv = (void *)(intptr_t)1;
|
|
||||||
ARGBAttenuate(src_argb0, src_stride_argb0, src_argb0, src_stride_argb0, img->d_w, img->d_h);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Coalesce rows. we have same size images, treat as a single row
|
// Coalesce rows. we have same size images, treat as a single row
|
||||||
if (src_stride_argb0 == width * 4 &&
|
if (src_stride_argb0 == width * 4 &&
|
||||||
|
Loading…
x
Reference in New Issue
Block a user