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.

Definition of "pixel" in VPFE

Anonymous
Anonymous

Hi All,

 

I would like to ask a question on the precise definition of “pixel” in VPFE:

 

According to 643x VPFE user’s guide, document SPRU977A, page 25, Figure 6. - BT.656 Mode Data Format in SDRAM:

 

Four bytes (4 × 8bits) data are placed in the SDRAM in the following arrangement:

 

34-31

Pixel3 (Y1/Cr0)

16-23

Pixel2 (Cr0/Y1)

8-15

Pixel1 (Y0/Cb0)

0-7

Pixel0 (Cb0/Y0)

 

There are some ambiguities on the definition of “pixel” here. Inferring from this table we see that every 8 bits are counted as a pixel, but this definition of “pixel” is somehow a mixed, heterogeneous type. This is because:

1.      Although every “pixel” contains luminance (Y) portion, it also contains either of the two types of chrominance (blue or red).

2.      No single 8-bit “pixel” contains the complete information to form a “geometric pixel” in the usual sense such as on a picture.

 

This might bring a further confusion:

 

According to BT.656 standard, in each line there are, counting only active samples,

1.      720 luminance samples

2.      360 Cb samples

3.      360 Cr samples

 

But it seems that by the abovementioned “nonconventional” definition, there should be 720 + 360 + 360 = 1440 pixels per line.

 

Is this true?

 

 

 

Another question is on the exact arrangement of bits within each 8-bit data. Referring to the table above:

 

 

From low (LSB) to high (MSB)

34-31

Y1   (4 5 6 7) Cr0 (4 5 6 7)

16-23

Cr0 (0 1 2 3)   Y1 (0 1 2 3)

8-15

Y0   (4 5 6 7) Cb0 (4 5 6 7)

0-7

Cb0 (0 1 2 3)   Y0 (0 1 2 3)

 

Or

 

 

From low (LSB) to high (MSB)

34-31

Cr0 (4 5 6 7)  Y1   (4 5 6 7)

16-23

Y1 (0 1 2 3)   Cr0 (0 1 2 3)   

8-15

Cb0 (4 5 6 7) Y0   (4 5 6 7)

0-7

Y0 (0 1 2 3)   Cb0 (0 1 2 3)   

 

 

Which of them is correct? Or none, and the actual arrangement is somehow otherwise?

 

 

 

I would appreciate any one who would give his opinion.

 

 

 

Zheng

  • Hi,

    The above tables shows the YUV422 color space. I would suggest you to understand the YUV422 color space first.

    To simplify the concept: basically every 2 pixels is represented by 4 bytes in memory. Unlike in YUV444 ( which means every pixel is represented by 3 bytes, i.e., Y, U, and V), in YUV422, every two pixels share the same U and V.

    One thing you need to understand is one pixel doesn't equal to one byte. YUV444 = 3 bytes/pixel, RGB888 = 3bytes/pixel, RGB565=2bytes/pixel, and YUV422=2bytes/pixel (or to better explain it, 4 bytes/2pixel).

     

    Both ordering you mentioend are ok.

  • Anonymous
    0 Anonymous in reply to Paul.Yin

    Dear Paul,

    I certainly would agree with you on that "one pixel doesn't equal one byte". But please refer to the fist table, in which I copied Fig. 6 from the VPFE document (SPRU977a), p. 25 in verbatium. It is in that table four bytes are marked as four "pixel".  This is why all the confusion come from.

    And if here no agreement on "pixel" could be reached, on page 129 of the same document, Table 61, it is required to set NPH (number of pixels, horizontal) to the number of pixels per line. Should we understand it 

    1. The number of bytes, therefore since "four bytes for every two pixel", there should be 1440 bytes for BT.656 sampling, so we set NPH to 1440. 
    2. Or the number of pixels as you mentioned, so set NPH to 720.

    ?

    It appears to me a very important problem and all questions arise from the "four bytes for pixel 0-3" numbering in Fig. 6.

    Which one on earth is the right definition for "pixel"? I strongly suspect that there is something wrong with the SPRU977a document in that part.

    Sincerely,

    Zheng

     

  • Anonymous
    0 Anonymous in reply to Paul.Yin

    Dear Paul,

    "Both ordering you mentioend are ok."

    In theory, both ordering are logically correct. But since the VPFE is a hard-wired component, there should be only one of the two ordering (or my guess is incorrect and VPFE uses a different ordering ?) corresponding to the actual working mode of VPFE. This is my question, rather than on all the possible logical arrangement alternatives: What is the actual bit ordering used in VPFE? I would wish to get a detailed answer pinning down each of the bits (not merely byte, which is too macroscopic).

    Sincerely,

    Zheng

     

     

  • Zheng,

    I agree with you. There seems to be a typo with that table. That table should be "byte" instead of "pixel"

    NPH should also be byte, so 1440 for YUV422.

     

    I am not sure if I understood your latest email, but basically I have been under the impression that table 8 on page 28 of VPFE UG shows the correct ordering.

    Actually, for a quick reference, you can look at the loop back test case of the spectrum digital testing code available here:

    http://c6000.spectrumdigital.com/davincievm/revd/files/SetupDavinciEVM-Release321.exe

  • Anonymous
    0 Anonymous in reply to Paul.Yin

    Dear Paul,

     

    Thanks for referring me to Table 8. I think the ambiguity has been clarified.

     

    I still have another question on the link you provided. After I downloaded and installed the package, it turned out it actually contains a bundle of .out files, which according to ReadMe.html:

     

    “This directory contains tests to help you check the integrity of your board. They are a subset of the tests which every board must pass before they leave the factory. Each test is a single .out file that can be run to isolate a particular subsystem.”

     

    I then went to http://www.spectrumdigital.com/ trying to find the source code of these examples. To my disappointment, it seems that all links are pointing to “purchase” or “cart” options.

     

    I wish to study Spectrum’s examples. Are these proprietary? If not, could you provide me links to the source file of these examples?

     

     

    Sincerely,

    Zheng

     

  • Zheng, please try this: http://c6000.spectrumdigital.com/davincievm/revf/files/davincievm.zip

    For questions related to Spectrum, please contact them directly.