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.

VPSS Front-end

I am using the VPSS to convert from a RGB bayer image to yuv422.

The following parameters are used for white balancing.  I cannot find any information explaining how these are used.  Can someone explain?

    prevParams.whiteBalanceParam.wbDgain = 0x100;
    prevParams.whiteBalanceParam.wbGain[0] = 0x40;
    prevParams.whiteBalanceParam.wbGain[1] = 0x50;
    prevParams.whiteBalanceParam.wbGain[2] = 0x40;
    prevParams.whiteBalanceParam.wbGain[3] = 0x50;

    prevParams.whiteBalanceParam.position[0][0] = 0;
    prevParams.whiteBalanceParam.position[0][1] = 1;
    prevParams.whiteBalanceParam.position[0][2] = 0;
    prevParams.whiteBalanceParam.position[0][3] = 1;

    prevParams.whiteBalanceParam.position[1][0] = 2;
    prevParams.whiteBalanceParam.position[1][1] = 3;
    prevParams.whiteBalanceParam.position[1][2] = 2;
    prevParams.whiteBalanceParam.position[1][3] = 3;

    prevParams.whiteBalanceParam.position[2][0] = 0;
    prevParams.whiteBalanceParam.position[2][1] = 1;
    prevParams.whiteBalanceParam.position[2][2] = 0;
    prevParams.whiteBalanceParam.position[2][3] = 1;

    prevParams.whiteBalanceParam.position[3][0] = 2;
    prevParams.whiteBalanceParam.position[3][1] = 3;
    prevParams.whiteBalanceParam.position[3][2] = 2;
    prevParams.whiteBalanceParam.position[3][3] = 3;

 

 

  • Hi abtreelph,

    Are you using any of the BIOS PSP? If yes, please mention the BIOS PSP version and also other tool versions being used.

    With respect to H/W setup, please mention the HW platform which you are using. Also mention whether it is a custom board or the EVM.

    Thanks and Regards,

    Sandeep K

     

  • BIOS PSP 1.0.2

    Customer board with DM6435

    Everything works.  Images are acquired and converted properly to yuv422.  Changes can be made in the parameters to achieve a good quailty image.  However, we are guessing on the paramter changes.  The question is how are the gain settings applied to each channel value.  In other words, a value of 0x30 in wbGain[0] results in what operation being applied to channel 0 pixels?

        prevParams.whiteBalanceParam.wbDgain = 180;
        prevParams.whiteBalanceParam.wbGain[0] = 0x30;
        prevParams.whiteBalanceParam.wbGain[1] = 0x75;
        prevParams.whiteBalanceParam.wbGain[2] = 0x30;
        prevParams.whiteBalanceParam.wbGain[3] = 0x30;

  • Hi abtreelph,

    abtreelph said:

        prevParams.whiteBalanceParam.wbGain[0] = 0x40;
        prevParams.whiteBalanceParam.wbGain[1] = 0x50;
        prevParams.whiteBalanceParam.wbGain[2] = 0x40;
        prevParams.whiteBalanceParam.wbGain[3] = 0x50;

    These are the wbgain coefficients. This has been explained in section 4.3.3.7 o the http://www.ti.com/lit/ug/spru977d/spru977d.pdf document.

    abtreelph said:

        prevParams.whiteBalanceParam.position[0][0] = 0;
        prevParams.whiteBalanceParam.position[0][1] = 1;
        prevParams.whiteBalanceParam.position[0][2] = 0;
        prevParams.whiteBalanceParam.position[0][3] = 1;

        prevParams.whiteBalanceParam.position[1][0] = 2;
        prevParams.whiteBalanceParam.position[1][1] = 3;
        prevParams.whiteBalanceParam.position[1][2] = 2;
        prevParams.whiteBalanceParam.position[1][3] = 3;

        prevParams.whiteBalanceParam.position[2][0] = 0;
        prevParams.whiteBalanceParam.position[2][1] = 1;
        prevParams.whiteBalanceParam.position[2][2] = 0;
        prevParams.whiteBalanceParam.position[2][3] = 1;

        prevParams.whiteBalanceParam.position[3][0] = 2;
        prevParams.whiteBalanceParam.position[3][1] = 3;
        prevParams.whiteBalanceParam.position[3][2] = 2;
        prevParams.whiteBalanceParam.position[3][3] = 3;

    These parameter are corresponds to the register WBSEL (white balance coefficient selection register). Each pixel of each line can be configured with a coeffient and those coeffients are selected as 0,1,2 and 3 corresponds to COEF0, COEF1, COEF2 and COEF3 (i.e wbgain[0], wbgain[1], wbgain[2] and wbgain[3]).

    More information on the WBSEL, WBGAIN register can be found in the section 6.2.16 and 6.2.15 respectively of the document http://www.ti.com/lit/ug/spru977d/spru977d.pdf

    Thanks and Regards,

    Sandeep K

  • Thanks, Sandeep.

    Can you verify the multiplication of the coeeficient by the pixel value.  Is it straigt multipication or is there any scalling applied.  For example, if the following are inputs:

     

    coeefficient = 0x40

    pixel value = 0x80

    What is the output value for 0x40 x 0x80 =

    I am assuming the result is divided by 256.

    Thanks and Regards,

    Ralph

  • Hi ,

    abtreelph said:
    Can you verify the multiplication of the coeeficient by the pixel value

    This has been explained in section 4.3.3.7 o the http://www.ti.com/lit/ug/spru977d/spru977d.pdf document. The statement says "In the white balance gain adjuster (WBGAIN), the raw data is multiplied by a selected gain corresponding to the color of the processed pixel"

     

    For more information on this, you need to post the query on DM64xx Forum http://e2e.ti.com/support/dsp/davinci_digital_media_processors/f/99.aspx .

    Thanks and Regards,

    Sandeep K

  • Sandeep,

     

    you are correct.  However, the document does not explain the overflow.  Two eight bit values are being multiplied and stored in an 8 bit result.  Please verify that the result is divided by 256 for proper scaling prior to storing the result.

     

    Thankyou