NV12 USB description reference

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
xigu_1705831
Level 2
Level 2
Welcome! 10 replies posted 5 replies posted

hi
      is there an sample code which configure the sub device as NV12 camera ? i tried to configure in our usb  description, but cannot work.

    /* Class specific Uncompressed VS format descriptor */

     0x1B,                           /* Descriptor size */

     0x24,                           /* Class-specific VS I/f Type */

     0x04,                           /* Subtype : uncompressed format I/F */

     0x01,                           /* Format desciptor index (only one format is supported) */

     SENSOR_RESOLUTION_MODE_NUM_HS,  /* number of frame descriptor followed */

#if (SENSOR_TYPE == IMG_OV10650_OV495)

     0x55,0x59,0x56,0x59,            /* UYVY */

#else

     //0x59,0x55,0x59,0x32,            /* GUID used to identify streaming-encoding format: YUY2  */

     0x4E,0x56,0x31,0x32,            /* GUID used to identify streaming-encoding format: NV12  */

#endif

     0x00,0x00,0x10,0x00,

     0x80,0x00,0x00,0xAA,

     0x00,0x38,0x9B,0x71,

     16,/*0x10,*/                           /* Number of bits per pixel used to specify color in the decoded video frame.

                                        0 if not applicable: 10 bit per pixel */

     0x01,                           /* Optimum Frame Index for this stream: 1 */

     0x08,                           /* X dimension of the picture aspect ratio: Non-interlaced in

            progressive scan */

     0x06,                           /* Y dimension of the picture aspect ratio: Non-interlaced in

    progressive scan*/

     0x00,                           /* Interlace Flags: Progressive scanning, no interlace */

     0x00,                           /* duplication of the video stream restriction: 0 - no restriction */

xingxing

thanks

0 Likes
1 Solution
Hemanth
Moderator
Moderator
Moderator
First like given First question asked 750 replies posted

Please try with MPC-HC player (https://mpc-hc.org/) and 12(i.e 0x0C) as bits per pixel.

Regards,

Hemanth

Hemanth

View solution in original post

0 Likes
4 Replies
Hemanth
Moderator
Moderator
Moderator
First like given First question asked 750 replies posted

Hi xingxing,

The above snippet looks correct. Is the entire frame data going to the Host? Are you getting any enumeration issues?

Regards,

Hemanth

Hemanth
0 Likes

hi Hemanth,
   thanks for your reply. i did not get any enumeration issues.
one point i want to confirm with you is that the YUV420 image size is width*height*3/2, what is the correct value for Number of bits per pixel?

16,/*0x10,*/                           /* Number of bits per pixel used to specify color in the decoded video frame.

     do you have any recommended windows software which can support yuv420 uvc camera? i cannot get streaming using Amcap. not sure it is our fiwmare issue or windows software issue?

0 Likes
Hemanth
Moderator
Moderator
Moderator
First like given First question asked 750 replies posted

Please try with MPC-HC player (https://mpc-hc.org/) and 12(i.e 0x0C) as bits per pixel.

Regards,

Hemanth

Hemanth
0 Likes

hi Hemanth,
     it works now. thanks for your great support.
thanks
xingxing

0 Likes