cancel
Showing results for 
Search instead for 
Did you mean: 

USB Superspeed Peripherals

HuYa_4249091
Contributor

Hi, according to AN95779 example, I know that the color format is YUY2, and it's 8 bits data size for one channel(ex: Y, U or V). Therefore, each 2 pixels is comprised by 4 bytes(Y0 U0 Y1 V0), which can be simplified: per pixel is comprised by 2 bytes(16 bits).

Q1: Is it the reason for "Number of bits per pixel" field which is set to 0x10(=16) in "Class specific Uncompressed VS format" descriptor(cyfxuvcdscr.c)?

Number of bits per pixel.jpg 

Now, if my image sensor sends out 16 bits data for one channel, the order is Y0a Y0b U0a U0b Y0a Y0b V0a V0b by byte => each 2 pixel is comprised by 8 bytes => per pixel is comprised by 4 bytes(32 bits).

Q2: In this case, the "Number of bits per pixel" field needs to set to 0x20(=32). Is it correct?

Any help will be highly appreciated!

0 Likes
1 Solution
Rashi_Vatsa
Moderator
Moderator

Hello,

Q1: Is it the reason for "Number of bits per pixel" field which is set to 0x10(=16) in "Class specific Uncompressed VS format" descriptor(cyfxuvcdscr.c)?

>> Yes, your understanding is correct.

Q2: In this case, the "Number of bits per pixel" field needs to set to 0x20(=32). Is it correct?

>>  I understand that for 32 bits per pixel the video format is YUY2 itself. Is that correct? If yes, the GUID will remain the same (YUY2) otherwise if the video format is changed the GUID should also be changed. As you would know the USB descriptors describes the features supported by the device. If the bits per pixel is 16 bits then the host application will sample the data in the same way (16 bits per pixel). Similarly, when bits per pixel field is changed to 32 bits then the host application should support the 32 bits sampling. If you are changing the bits per pixel please heck if the host application supports it.

The host applications like AmCap, eCamView, MPC-HC support YUY2 format (16 bits/pixel)

Regards,
Rashi

View solution in original post

1 Reply
Rashi_Vatsa
Moderator
Moderator

Hello,

Q1: Is it the reason for "Number of bits per pixel" field which is set to 0x10(=16) in "Class specific Uncompressed VS format" descriptor(cyfxuvcdscr.c)?

>> Yes, your understanding is correct.

Q2: In this case, the "Number of bits per pixel" field needs to set to 0x20(=32). Is it correct?

>>  I understand that for 32 bits per pixel the video format is YUY2 itself. Is that correct? If yes, the GUID will remain the same (YUY2) otherwise if the video format is changed the GUID should also be changed. As you would know the USB descriptors describes the features supported by the device. If the bits per pixel is 16 bits then the host application will sample the data in the same way (16 bits per pixel). Similarly, when bits per pixel field is changed to 32 bits then the host application should support the 32 bits sampling. If you are changing the bits per pixel please heck if the host application supports it.

The host applications like AmCap, eCamView, MPC-HC support YUY2 format (16 bits/pixel)

Regards,
Rashi

View solution in original post