This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

DS90UB960-Q1: Register to check video size (height and width)

Part Number: DS90UB960-Q1

Hello, Team,

Our customer would like to check for both 960 and 953 capability on how to check a video size (height and width) using a register.

What they want to do is to check whether the video image does not exceed the default setting, or monitor the video image size (height and width).
It seems that by using LINE_LEN_MISMATCH, we can monitor width; is this correct?:

The way to check the size could be either actual received size or just a packet header.

Best Regards,
Masaru 

  • Hello Masaru-san,

    In the 960, you can check the number of video lines and the length of each video line in the video frame that was sent from the Imager->953->960. Once you confirmed that the Imager is sending video data and the 960 has a stable LOCK with the 953, you can read the following registers on the 960 to check this information.

    1. Read registers 0x73-0x74 to read the number of active video lines that was received at the selected RX Port during the most recent video frame that was received. These two registers form a 16-bit counter value. When receiving CSI-2 packets, the 960 will count each long CSI-2 packet as a line of video data. Make sure you set the RX_READ_PORT bit to the appropriate value in register 0x4C, before you read these registers.
    2. Read registers 0x75-0x76 to read the number of bytes that the 960 read in the last line of video data it received. If you want to find out how many pixels were in the line of video, then you need to convert the bytes to pixels. A byte is 8 bits. Take the 16-bit value stored in registers 0x75 - 0x76 and multiply by 8. Then, divide the value by the Bits-Per-Pixel of the data type in the packets. The result is the number of pixels in the video line.
      1. For example, if registers 0x75-0x76 = 2560 bytes, multiple by 8 bits/byte to get 20,480 bits per video line received. If data type is YUV422 (8-bit), then that is 16-bits per pixel.
      2. 20,480 bits / (16 bits / pixel) = 1280 pixels in the received line of video data.

    Customer may also monitor the RX Port error registers for issues with the received video data. For example, in register 0x4E in the 960, there is a LINE_LEN_UNSTABLE bit that will be set to 1 if the length of the video lines that was received in the video frame are inconsistent.

    Keep in mind all of these registers are RX Port specific, so make sure to set the appropriate value in register 0x4C in the 960, before reading the other registers.

    Best,

    Justin Phan

  • Hello, Justin,

    Thank you for your quick answer.

    Best Regards,
    Masaru