Using YUV211 for streaming


Did some changes adding YUV211 (well, is half of YUV422), reducing the pixel colour information to only one byte: 4 bits Y, 4 bits U, 4 bits Y, 4 bits V, 2 pixels in 2 bytes… The image is still acceptable and I could get a bit over 1 fps for QVGA and 4-5 fps for QQVGA. bellow I posted the YUV422 sample and YUV211 sample:

YUV422

YUV211
Advertisements

4 thoughts on “Using YUV211 for streaming

  1. Hi,
    please share how did you change color depth for OV7670 camera?
    Does OV7670 support this in hardware (via configuration registers) or you implemented it in software (before sending image to PC)?

    Thanks,
    Oleg

    • Hi Oleg, I did this in software. By default, OV7670, sends 4 bytes: [Y][U][Y][V], all I did is to get the first 4 bits from each byte and pack them in only 2 bytes still keeping the same format [YU][YV].
      Code will look something like this:

      nibbleH = frameReadByte() & 0xF0;
      nibbleL = (frameReadByte() & 0xF0) >> 4;

      line[j] = nibbleH | nibbleL;

      Hope this helps!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s