mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-10-28 22:24:16 +00:00
FS-10205: [freeswitch-core,mod_conference,mod_video_filter] Add 8 bit filter #resolve
This commit is contained in:
1 parent
95b3011614
commit
e26e873268
4 files changed
+80
-1
No files matched your search
@@ -2586,6 +2586,15 @@ void conference_video_pop_next_image(conference_member_t *member, switch_image_t
|
||||
if (member->video_filters & SCV_FILTER_SEPIA_FG) {
|
||||
switch_img_sepia(img, 0, 0, img->d_w, img->d_h);
|
||||
}
|
||||
|
||||
if (member->video_filters & SCV_FILTER_8BIT_FG) {
|
||||
switch_image_t *tmp = NULL;
|
||||
int w = img->d_w, h = img->d_h;
|
||||
|
||||
switch_img_scale(img, &tmp, w/8 ,h/8);
|
||||
switch_img_scale(tmp, &img, w,h);
|
||||
switch_img_8bit(img);
|
||||
}
|
||||
}
|
||||
|
||||
*imgP = img;
|
||||
|
||||
@@ -318,6 +318,16 @@ static switch_status_t video_thread_callback(switch_core_session_t *session, swi
|
||||
|
||||
patch_data = context->data;
|
||||
|
||||
if (context->video_filters & SCV_FILTER_8BIT_FG) {
|
||||
switch_image_t *tmp = NULL;
|
||||
int w = frame->img->d_w, h = frame->img->d_h;
|
||||
|
||||
switch_img_scale(frame->img, &tmp, w/8 ,h/8);
|
||||
switch_img_scale(tmp, &frame->img, w,h);
|
||||
switch_img_8bit(frame->img);
|
||||
}
|
||||
|
||||
|
||||
switch_img_to_raw(frame->img, context->data, frame->img->d_w * 4, SWITCH_IMG_FMT_ARGB);
|
||||
img = switch_img_wrap(NULL, SWITCH_IMG_FMT_ARGB, frame->img->d_w, frame->img->d_h, 1, context->data);
|
||||
|
||||
@@ -333,6 +343,7 @@ static switch_status_t video_thread_callback(switch_core_session_t *session, swi
|
||||
switch_img_sepia(img, 0, 0, img->d_w, img->d_h);
|
||||
}
|
||||
|
||||
|
||||
if (context->bgimg) {
|
||||
switch_image_t *tmp = NULL;
|
||||
|
||||
|
||||
Reference in new issue
Block a user