|
From: libvidcap c. m. <lib...@li...> - 2007-09-18 18:36:55
|
Revision: 24
http://libvidcap.svn.sourceforge.net/libvidcap/?rev=24&view=rev
Author: bcholew
Date: 2007-09-18 11:36:50 -0700 (Tue, 18 Sep 2007)
Log Message:
-----------
Don't mirror when converting bottom-up rgb24 to rgb32.
Modified Paths:
--------------
trunk/src/conv_to_rgb.c
trunk/src/directshow/DirectShowSource.cpp
Modified: trunk/src/conv_to_rgb.c
===================================================================
--- trunk/src/conv_to_rgb.c 2007-09-18 17:14:56 UTC (rev 23)
+++ trunk/src/conv_to_rgb.c 2007-09-18 18:36:50 UTC (rev 24)
@@ -206,17 +206,22 @@
int conv_bottom_up_rgb24_to_rgb32(int width, int height,
const char * src, char * dest)
{
- int i;
+ int i, j;
unsigned int * d = (unsigned int *)dest;
- const unsigned char * src_end = (const unsigned char *)src +
- width * height * 3 - 1;
+ const unsigned char * src_bot = (const unsigned char *)src +
+ width * (height - 1) * 3;
- for ( i = 0; i < width * height; ++i )
+ for ( i = 0; i < height; ++i )
{
- *d = 0xff000000;
- *d |= (*src_end--) << 16; /* red */
- *d |= (*src_end--) << 8; /* green */
- *d++ |= *src_end--; /* blue */
+ for ( j = 0; j < width; ++j )
+ {
+ *d = 0xff000000;
+ *d |= (*src_bot++) << 0; /* red */
+ *d |= (*src_bot++) << 8; /* green */
+ *d++ |= (*src_bot++) << 16; /* blue */
+ }
+
+ src_bot -= width * 6;
}
return 0;
Modified: trunk/src/directshow/DirectShowSource.cpp
===================================================================
--- trunk/src/directshow/DirectShowSource.cpp 2007-09-18 17:14:56 UTC (rev 23)
+++ trunk/src/directshow/DirectShowSource.cpp 2007-09-18 18:36:50 UTC (rev 24)
@@ -654,7 +654,7 @@
// set the dimensions
vih->bmiHeader.biWidth = fmtNative.width;
vih->bmiHeader.biHeight = fmtNative.height;
-
+log_info("will use NATIVE FOURCC '%s'\n", vidcap_fourcc_string_get(fmtNative.fourcc));
resetCapGraphFoo();
// set the stream's media type
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|