static void Resize(CaptureBox * capBox, LPBYTE output, LPBYTE input) { if (!capBox->swresize) { int depth = capBox->bitDepth / 8; int inoffset = 0, outoffset = (capBox->height-1) * capBox->width * depth; int ow = capBox->width * depth; while (outoffset >= 0) { int x; outoffset -= ow; for (x = 0; x < ow; x++) output[outoffset + x] = input[inoffset + x]; inoffset += ow; } } else { FIXME("Software scaling not supported, I got no clue how and no-one wants to help so adding gray instead...\n"); memset(output, 128, capBox->outputwidth * capBox->outputheight * capBox->bitDepth / 8); } }
I want to copy from a raw bitmap stream which is (capBox->width) x (capBox->height) (24 bits) to (capBox->outputwidth) x (capBox->outputheight) (also 24 bits), if you can argue about HAVE_V4L2 this should be easy :) I *really* need this fixed, any info is greatly appreciated.. gluScaleImage seemed ideal, but a qcap linking to glu32 would never make it to the wine source.. so a more windows-compliant(TM) solution(R) is required, since I'm a disaster in win32 programming best would be instant code of which i only need to change variable names or something (yet ironically enough i know too much of com, directshow & devenum already :-\ )
THANKS!!
Maarten
Maarten Lankhorst wrote:
I want to copy from a raw bitmap stream which is (capBox->width) x (capBox->height) (24 bits) to (capBox->outputwidth) x (capBox->outputheight) (also 24 bits), if you can argue about HAVE_V4L2 this should be easy :) I *really* need this fixed, any info is greatly appreciated.. gluScaleImage seemed ideal, but a qcap linking to glu32 would never make it to the wine source.. so a more windows-compliant(TM) solution(R) is required, since I'm a disaster in win32 programming best would be instant code of which i only need to change variable names or something (yet ironically enough i know too much of com, directshow & devenum already :-\ )
This shouldn't be needed. A filter should any resizing, but I don't remember there being a resize filter in DirectShow.
Rob
Robert Shearman wrote:
Maarten Lankhorst wrote:
I want to copy from a raw bitmap stream which is (capBox->width) x (capBox->height) (24 bits) to (capBox->outputwidth) x (capBox->outputheight) (also 24 bits), if you can argue about HAVE_V4L2 this should be easy :) I *really* need this fixed, any info is greatly appreciated.. gluScaleImage seemed ideal, but a qcap linking to glu32 would never make it to the wine source.. so a more windows-compliant(TM) solution(R) is required, since I'm a disaster in win32 programming best would be instant code of which i only need to change variable names or something (yet ironically enough i know too much of com, directshow & devenum already :-\ )
This shouldn't be needed. A filter should any resizing, but I don't remember there being a resize filter in DirectShow.
Rob
As far as I can tell, there is no resize filter, I checked graphedit and couldn't find one in the filter list even with native quartz, so I'm still interested in software resizing, I could just do clipping or filling with nulls, but there should be a better way, if I can't find it though I'll use clip/zero fill, my webcam doesn't need it but it would be nice for others...