changeset 3184:39f88ed93dd1

added 32bpp output support
author alex
date Wed, 28 Nov 2001 15:19:14 +0000
parents ce9acee4e129
children a1205b22a5f4
files msvidc.c
diffstat 1 files changed, 22 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/msvidc.c	Wed Nov 28 14:55:56 2001 +0000
+++ b/msvidc.c	Wed Nov 28 15:19:14 2001 +0000
@@ -5,6 +5,8 @@
     
     The description of the algorithm you can read here:
       http://www.pcisys.net/~melanson/video1.txt
+
+    32bpp support (c) alex
 */
 
 #define LE_16(x) *(unsigned short *)(x)
@@ -131,12 +133,16 @@
                 decoded[pixel_ptr++] = quad[pixel_x >> 1][pixel_y >> 1].c1_r;
                 decoded[pixel_ptr++] = quad[pixel_x >> 1][pixel_y >> 1].c1_g;
                 decoded[pixel_ptr++] = quad[pixel_x >> 1][pixel_y >> 1].c1_b;
+		if (bytes_per_pixel == 4) /* 32bpp */
+		    pixel_ptr++;
               }
               else
               {
                 decoded[pixel_ptr++] = quad[pixel_x >> 1][pixel_y >> 1].c2_r;
                 decoded[pixel_ptr++] = quad[pixel_x >> 1][pixel_y >> 1].c2_g;
                 decoded[pixel_ptr++] = quad[pixel_x >> 1][pixel_y >> 1].c2_b;
+		if (bytes_per_pixel == 4) /* 32bpp */
+		    pixel_ptr++;
               }
 
               // get the next flag ready to go
@@ -157,12 +163,16 @@
                 decoded[pixel_ptr++] = quad[0][0].c1_r;
                 decoded[pixel_ptr++] = quad[0][0].c1_g;
                 decoded[pixel_ptr++] = quad[0][0].c1_b;
+		if (bytes_per_pixel == 4) /* 32bpp */
+		    pixel_ptr++;
               }
               else
               {
                 decoded[pixel_ptr++] = quad[0][0].c2_r;
                 decoded[pixel_ptr++] = quad[0][0].c2_g;
                 decoded[pixel_ptr++] = quad[0][0].c2_b;
+		if (bytes_per_pixel == 4) /* 32bpp */
+		    pixel_ptr++;
               }
 
               // get the next flag ready to go
@@ -186,6 +196,8 @@
             decoded[pixel_ptr++] = quad[0][0].c1_r;
             decoded[pixel_ptr++] = quad[0][0].c1_g;
             decoded[pixel_ptr++] = quad[0][0].c1_b;
+	    if (bytes_per_pixel == 4) /* 32bpp */
+		pixel_ptr++;
           }
           pixel_ptr -= row_dec;
         }
@@ -275,12 +287,16 @@
               decoded[pixel_ptr++] = quad[0][0].c1_r;
               decoded[pixel_ptr++] = quad[0][0].c1_g;
               decoded[pixel_ptr++] = quad[0][0].c1_b;
+	      if (bytes_per_pixel == 4) /* 32bpp */
+		pixel_ptr++;
             }
             else
             {
               decoded[pixel_ptr++] = quad[0][0].c2_r;
               decoded[pixel_ptr++] = quad[0][0].c2_g;
               decoded[pixel_ptr++] = quad[0][0].c2_b;
+	      if (bytes_per_pixel == 4) /* 32bpp */
+		pixel_ptr++;
             }
 
             // get the next flag ready to go
@@ -319,12 +335,16 @@
               decoded[pixel_ptr++] = quad[pixel_x >> 1][pixel_y >> 1].c1_r;
               decoded[pixel_ptr++] = quad[pixel_x >> 1][pixel_y >> 1].c1_g;
               decoded[pixel_ptr++] = quad[pixel_x >> 1][pixel_y >> 1].c1_b;
+	      if (bytes_per_pixel == 4) /* 32bpp */
+		pixel_ptr++;
             }
             else
             {
               decoded[pixel_ptr++] = quad[pixel_x >> 1][pixel_y >> 1].c2_r;
               decoded[pixel_ptr++] = quad[pixel_x >> 1][pixel_y >> 1].c2_g;
               decoded[pixel_ptr++] = quad[pixel_x >> 1][pixel_y >> 1].c2_b;
+	      if (bytes_per_pixel == 4) /* 32bpp */
+		pixel_ptr++;
             }
 
             // get the next flag ready to go
@@ -348,6 +368,8 @@
             decoded[pixel_ptr++] = quad[0][0].c1_r;
             decoded[pixel_ptr++] = quad[0][0].c1_g;
             decoded[pixel_ptr++] = quad[0][0].c1_b;
+	    if (bytes_per_pixel == 4) /* 32bpp */
+		pixel_ptr++;
           }
           pixel_ptr -= row_dec;
         }