YUV_111 Format video

Hello,

I am writing a program to receive uncompressed video over a Gigabit ethernet link.

The data arrives ok and is depacketized by a custom depacketizer that I have written. At this point the image data appears to be ok - I can write the Y U and V components of the depacketizer output Buffer to an image file and they appear ok.

However, when rendering this Buffer to screen, the image appears to be "stretched" and the colors are all wrong - I get green vertical lines.

My image data is in a format, which I believe JMF calls YUVFormat.YUV_111. The image is an array of bytes in the order YUVYUVYUV...

Hence the VideoFormat I am using is:

Dimension yuvSize =new Dimension(VIDEO_WIDTH, VIDEO_HEIGHT);

outFormat =new YUVFormat(yuvSize,

yuvSize.width * yuvSize.height * 3,

Format.byteArray,

25,

YUVFormat.YUV_111,

yuvSize.width*3,

yuvSize.width*3,

0,

1,

2);

Any ideas where I might have gone wrong? I do not profess to have mastered JMF by a long way - this is my first project using it!

Thanks in advance for any help

Jon

[1217 byte] By [jonbretta] at [2007-11-15]