git.asbjorn.biz
/
swftools.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4031e38
)
added 16 bit support (yet untested).
author
kramm
<kramm>
Tue, 19 Oct 2004 17:58:52 +0000
(17:58 +0000)
committer
kramm
<kramm>
Tue, 19 Oct 2004 17:58:52 +0000
(17:58 +0000)
avi2swf/videoreader_vfw.cc
patch
|
blob
|
history
diff --git
a/avi2swf/videoreader_vfw.cc
b/avi2swf/videoreader_vfw.cc
index
a5d2483
..
f9558b9
100644
(file)
--- a/
avi2swf/videoreader_vfw.cc
+++ b/
avi2swf/videoreader_vfw.cc
@@
-133,6
+133,18
@@
static int bitmap_to_rgba(BITMAPINFOHEADER*bi, void*buffer, const int dest_width
line++;
}
}
+ } else if(bi->biBitCount==16) {
+ UCHAR*img = data;
+ int y;
+ for(y=starty;y!=endy;y+=yinc) {
+ UCHAR*line = &img[linex*y];
+ int x;
+ for(x=0;x<dest_width;x++) {
+ U16 c = line[0]|line[1]<<8;
+ *dest++ = 255|(c&0x1f)<<(8+3)|(c>>5&0x1f)<<(16+3)|(c>>10&0x1f)<<(24+3);
+ line+=2;
+ }
+ }
} else if(bi->biBitCount==24) {
UCHAR*img = data;
int y;