Hi,
I don't have a code exactly for YUV411, but you can reference to this
one, which is converting planar YUV420P to packed YUV422 (that's very
simular for YUV411):
static void yuv420p_to_yuv422(UINT8 *yuv422, UINT8 *lum, UINT8 *cb,
UINT8 *cr, int width, int height)
{
int x, y;
UINT8 *dest = yuv422;
for(y = 0; y < height; y += 2)
{
//odd line
for(x = 0; x < width; x += 2)
{
dest[0] = lum[0];
dest[1] = cb[0];
dest[2] = lum[1];
dest[3] = cr[0];
dest += 4;
lum += 2;
cb++;
cr++;
}
//even lines; Cb and Cr duplicated
cb = cb - width/2;
cr = cr - width/2;
for(x = 0; x < width; x += 2)
{
dest[0] = lum[0];
dest[1] = cb[0];
dest[2] = lum[1];
dest[3] = cr[0];
dest += 4;
lum += 2;
cb++;
cr++;
}
}
}
Regards,
Yurij
sting sting wrote:
Hello ,
My camera supports VIDEO_PALETTE_YUV420P ;
is there a reliable code for converting the buffe in this format
(grabbed from the camera though v4l API) to YUV411 ?
regards
qwe john
_________________________________________________________________
Add photos to your messages with MSN 8. Get 2 months FREE*.
http://join.msn.com/?page=features/featuredemail
--
video4linux-list mailing list
Unsubscribe
mailto:video4linux-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list