Ideas?
Thanks in advance.
Do you already have a USB Class driver for hte device? If not then that is
the first port of call. MAkeit simple and offload the image processing to
the application. If you get the choice use a bulk endpoint as it makes
things simpler then isochromous.
Anyway, if you do not have hardware help or DirectDraw then it needs to be
done the hard way - get the DDCAPS struct and look for blitting
capabilities, specifically look for a YUV surface that you can draw to in
native YUV. (Have a look at the AlphaBlt function it might be helpful).
The hard way
-------------
From PB Help:
Converting 8-bit YUV to RGB888
The following coefficients are used in conversion process:
C = Y - 16
D = U - 128
E = V - 128
Using the previous coefficients and noting that clip() denotes clipping a
value to the range of 0 to 255, the following formulas provide the
conversion from YUV to RGB:
R = clip(( 298 * C + 409 * E + 128) >> 8)
G = clip(( 298 * C - 100 * D - 208 * E + 128) >> 8)
B = clip(( 298 * C + 516 * D + 128) >> 8)
These formulas use some coefficients that require more than 8 bits of
precision to produce each 8-bit result, and intermediate results require
more than 16 bits of precision.
Note All units range from 0 (zero) to 1.0 (one). In DirectDraw, they range
from 0 to 255. Overflow and underflow can (and does) occur, and the results
must be saturated.
To convert 4:2:0 or 4:2:2 YUV to RGB, convert the YUV data to 4:4:4 YUV, and
then convert from 4:4:4 YUV to RGB.
fourcc.org has a bunch of info too.
Regards,
Geoff
--
A few questions
You have develope usb driver in isochronous mode ?
which chip is the your target ? Empia ? Syntek ? Other ?
I have serius problem to receive all data from empia 2820 chip
maybe only DATA0 receive and other data remaining into the EMPIA
because wince not ping for the next part of microframe :(
Now i sniffing and testing for discovery the problem
problem in YUV2 conversion is the next problem :)
"Kenny ODell" <kenny dot odell at afltele dot com> ha scritto nel messaggio
news:307C7BD2-7FDB-458B...@microsoft.com...