[asterisk-commits] rizzo: branch rizzo/video_v2 r84157 - /team/rizzo/video_v2/channels/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Oct 1 08:40:58 CDT 2007
Author: rizzo
Date: Mon Oct 1 08:40:58 2007
New Revision: 84157
URL: http://svn.digium.com/view/asterisk?view=rev&rev=84157
Log:
differentiate between RGB565 and RGB555
Modified:
team/rizzo/video_v2/channels/console_video.c
Modified: team/rizzo/video_v2/channels/console_video.c
URL: http://svn.digium.com/view/asterisk/team/rizzo/video_v2/channels/console_video.c?view=diff&rev=84157&r1=84156&r2=84157
==============================================================================
--- team/rizzo/video_v2/channels/console_video.c (original)
+++ team/rizzo/video_v2/channels/console_video.c Mon Oct 1 08:40:58 2007
@@ -329,18 +329,19 @@
ast_log(LOG_WARNING, "error creating Ximage\n");
goto error;
}
- ast_log(LOG_NOTICE, "image: data %p %d bpp, mask 0x%lx 0x%lx 0x%lx\n",
- im->data,
- im->bits_per_pixel,
- im->red_mask, im->green_mask, im->blue_mask);
switch (im->bits_per_pixel) {
case 32:
b->pix_fmt = PIX_FMT_RGBA32;
break;
case 16:
- b->pix_fmt = PIX_FMT_RGB565;
+ b->pix_fmt = (im->green_mask == 0x7e0) ? PIX_FMT_RGB565 : PIX_FMT_RGB555;
break;
}
+ ast_log(LOG_NOTICE, "image: data %p %d bpp fmt %d, mask 0x%lx 0x%lx 0x%lx\n",
+ im->data,
+ im->bits_per_pixel,
+ b->pix_fmt,
+ im->red_mask, im->green_mask, im->blue_mask);
/* set the pointer but not the size as this is not malloc'ed */
b->data = (uint8_t *)im->data;
v->fd = -2;
More information about the asterisk-commits
mailing list