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.

TDA4VM: H3A data

Part Number: TDA4VM


Hi TI experts

I am researching how to obtain H3A data.Encountering some unclear points, I would like to ask for advice.

The first image is H3A data and the second image is my own statistics based on my understanding of H3A data statistics in the raw image.

The statistical process is as follows:

1.Obtain a 12bit RAW image from DCC

2.Restore a 12bit image to 24bit through PWL decompression

3.The above parameters are set to 5 and extract 10 bits from the 9th bit of a 24bit image.

4.Set the same block area as H3A based on the .bin file

5.Calculate the cumulative sum of block regions

6.Using 16bit data to save cumulative sum

Why these two pictures are different?

  • Hi Peng,

    The steps look correct to me.

    For step 5, please follow TRM and check your H3A xml files for all H3A parameters such as  H/V skipping and "Sum Shift" (SUMSHFT).

  • <?xml version="1.0" encoding="utf-8"?>
    <VISS_H3A_AEWB_CFG xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
        <!--this is a comment-->
        <dcc_name>viss_h3a_aewb_cfg</dcc_name>
        <dcc_header>
            <camera_module_id>     233   </camera_module_id>
            <dcc_descriptor_id>    3    </dcc_descriptor_id>
            <algorithm_vendor_id>  1    </algorithm_vendor_id>
            <tunning_tool_version> 0    </tunning_tool_version>
        </dcc_header>
        <!--=======================================================================-->
        <typedef>
            <iss_h3a_grid_size type="struct">         
                <enable type="uint8"> </enable> <!-- enable h3a aewb-->
                <mode type="uint8"> </mode> <!-- 0 = SUM_SQ, 1=MINMAX, 2=SUM_ONLY-->
                <v_start type="uint16"> </v_start> <!-- Paxel_0 Start Coordinate Y in Pixels -->
                <h_start type="uint16"> </h_start> <!-- Paxel_0 Start Coordinate H in Pixels -->
                <v_size type="uint8"> </v_size> <!-- Paxel Height in Pixels -->
                <h_size type="uint8"> </h_size> <!-- Paxel Width in Pixels -->
                <v_count type="uint8"> </v_count> <!-- number of vertical paxels -->
                <h_count type="uint8"> </h_count> <!-- number of horizontal paxels -->
                <v_skip type="uint8"> </v_skip> <!--   vertical subsampling factor (0-15) -->
                <h_skip type="uint8"> </h_skip> <!--  horizontal subsampling factor (0-15) -->
                <saturation_limit type="uint16"> </saturation_limit> <!--  saturation_limit (0-1023) -->
                <blk_win_numlines type="uint16"> </blk_win_numlines> <!--  Win Height for the single black line of windows (2-256)-->
                <blk_row_vpos type="uint16"> </blk_row_vpos> <!--  Vertical Position of Black Row -->
                <sum_shift type="uint8"> </sum_shift> <!--  Sum Shift (0-15) -->
                <ALaw_En type="uint8"> </ALaw_En> <!--  A Law Enable (0/1) -->
                <MedFilt_En type="uint8"> </MedFilt_En> <!--  Median Filter Enable (0/1) -->
            </iss_h3a_grid_size>            
        </typedef>    
        <!--=======================================================================-->
        
        <use_case val="1023"> 
            <n-space>
                <region0 class="0">
                    <gain             val="0" min="0" max="10240">  </gain>
                    <exposure         val="1" min="0" max="10000000">  </exposure>
                    <colortemperature val="2" min="0" max="10000">  </colortemperature>
                </region0>
            </n-space>
        
            <parameter_package>
                <h3a_aewb_dcc type="iss_h3a_grid_size">
                    {
                           1,     // enable:   u8
                        
                           2,     // mode:     u8
                        
                           0,     // v_start:  u16
                           2,     // h_start:  u16
                        
                          30,     // v_size:   u8
                         118,     // h_size:   u8
                        
                          32,     // v_count:  u8
                          16,     // h_count:  u8
                        
                           4,     // v_skip:   u8
                           4,     // h_skip:   u8
                        
                        1000,     // saturation_limit: u16
                        
                           2,     // blk_win_numlines: u16
                        1078,     // blk_row_vpos:     u16
                        
                           2,     // Sum Shift:   u8
                        
                           0,     // ALaw_En:     u8
                           0,     // MedFilt_En:  u8
                    }
                </h3a_aewb_dcc>
            </parameter_package>
        </use_case>
        
        <!--=====================================================================-->
    </VISS_H3A_AEWB_CFG>
    

    This is my XML file.

    At present, we are uncertain about the specific meanings of the above parameters.This includes the parameters you mentioned.

    Could you please explain to me? Thank you.

  • <?xml version="1.0" encoding="utf-8"?>
    <VISS_H3A_AEWB_CFG xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
        <!--this is a comment-->
        <dcc_name>viss_h3a_aewb_cfg</dcc_name>
        <dcc_header>
            <camera_module_id>     233   </camera_module_id>
            <dcc_descriptor_id>    3    </dcc_descriptor_id>
            <algorithm_vendor_id>  1    </algorithm_vendor_id>
            <tunning_tool_version> 0    </tunning_tool_version>
        </dcc_header>
        <!--=======================================================================-->
        <typedef>
            <iss_h3a_grid_size type="struct">         
                <enable type="uint8"> </enable> <!-- enable h3a aewb-->
                <mode type="uint8"> </mode> <!-- 0 = SUM_SQ, 1=MINMAX, 2=SUM_ONLY-->
                <v_start type="uint16"> </v_start> <!-- Paxel_0 Start Coordinate Y in Pixels -->
                <h_start type="uint16"> </h_start> <!-- Paxel_0 Start Coordinate H in Pixels -->
                <v_size type="uint8"> </v_size> <!-- Paxel Height in Pixels -->
                <h_size type="uint8"> </h_size> <!-- Paxel Width in Pixels -->
                <v_count type="uint8"> </v_count> <!-- number of vertical paxels -->
                <h_count type="uint8"> </h_count> <!-- number of horizontal paxels -->
                <v_skip type="uint8"> </v_skip> <!--   vertical subsampling factor (0-15) -->
                <h_skip type="uint8"> </h_skip> <!--  horizontal subsampling factor (0-15) -->
                <saturation_limit type="uint16"> </saturation_limit> <!--  saturation_limit (0-1023) -->
                <blk_win_numlines type="uint16"> </blk_win_numlines> <!--  Win Height for the single black line of windows (2-256)-->
                <blk_row_vpos type="uint16"> </blk_row_vpos> <!--  Vertical Position of Black Row -->
                <sum_shift type="uint8"> </sum_shift> <!--  Sum Shift (0-15) -->
                <ALaw_En type="uint8"> </ALaw_En> <!--  A Law Enable (0/1) -->
                <MedFilt_En type="uint8"> </MedFilt_En> <!--  Median Filter Enable (0/1) -->
            </iss_h3a_grid_size>            
        </typedef>    
        <!--=======================================================================-->
        
        <use_case val="1023"> 
            <n-space>
                <region0 class="0">
                    <gain             val="0" min="0" max="10240">  </gain>
                    <exposure         val="1" min="0" max="10000000">  </exposure>
                    <colortemperature val="2" min="0" max="10000">  </colortemperature>
                </region0>
            </n-space>
        
            <parameter_package>
                <h3a_aewb_dcc type="iss_h3a_grid_size">
                    {
                           1,     // enable:   u8
                        
                           2,     // mode:     u8
                        
                           0,     // v_start:  u16
                           2,     // h_start:  u16
                        
                          30,     // v_size:   u8
                         118,     // h_size:   u8
                        
                          32,     // v_count:  u8
                          16,     // h_count:  u8
                        
                           4,     // v_skip:   u8
                           4,     // h_skip:   u8
                        
                        1000,     // saturation_limit: u16
                        
                           2,     // blk_win_numlines: u16
                        1078,     // blk_row_vpos:     u16
                        
                           2,     // Sum Shift:   u8
                        
                           0,     // ALaw_En:     u8
                           0,     // MedFilt_En:  u8
                    }
                </h3a_aewb_dcc>
            </parameter_package>
        </use_case>
        
        <!--=====================================================================-->
    </VISS_H3A_AEWB_CFG>
    

    This is my XML file.

    At present, we are uncertain about the specific meanings of the above parameters.This includes the parameters you mentioned.

    Could you please explain to me? Thank you.

  • At present, we are uncertain about the specific meanings of the above parameters.

    Hi Peng,

    The information is available in TDA4 TRM.
    Please refer to the following sections in "spruil1c.pdf".

    6.9.4.3.4.6.6 RAWFE H3A AE/AWB Engine

    6.9.4.3.4.6.6.1 RAWFE H3A Subsampler

    6.9.4.3.4.6.6.2 RAWFE H3A Additional Black Row of AE/AWB Windows

    6.9.4.3.4.6.6.3 RAWFE H3A Saturation Check

    6.9.4.3.4.6.6.4 RAWFE H3A AE/AWB Accumulators

    In PSDK, you may also take a look at the following funciton in "vx_vpac_viss_target_dcc.c".

    static void tivxVpacVissDccMapH3aParams(tivxVpacVissObj *vissObj, ...

  • Hi Gang

    I have carefully read these chapters.But there are still some doubts.

    Does the parameter "AEWINCH"and"AEWINCV" mentioned in the figure correspond to "h_skip"and"v_skip"?

    I haven't seen any relevant information about parameter “Sum Shift”.

    Can you briefly explain these two questions?Thank you.

  • Does the parameter "AEWINCH"and"AEWINCV" mentioned in the figure correspond to "h_skip"and"v_skip"?

    yes, please take a look at "static void tivxVpacVissDccMapH3aParams(tivxVpacVissObj *vissObj, ..."

    I haven't seen any relevant information about parameter “Sum Shift”.

    It is SUMSHFT in 6.9.4.3.4.6.6.4 RAWFE H3A AE/AWB Accumulators.

  • On the left is H3A data, and on the right is my own statistical results.

    There are still some differences.

    On the upper right is a lamp tube. These two images are not consistent. I think it may be a problem with windows.

    Do you think there may have been some factors that were not considered?

  • Hi peng,

    That looks close enough, so I believe you have down most things correctly.

    Please review the TRM and your code to see if you have any bugs.

  • Hi Gang

    After conducting H3A statistics on DPC and LSC, I did not perform these operations using raw plots for statistics.

    Is this the main reason for the subtle differences.

  • I cannot tell for sure.
    It also could be some alignment difference.

    The left side shows pure vertical features and the right side is slightly more horizontally spread.

  • I have also had such doubts. So I checked the code and didn't find any issues.

    The parameters that affect alignment include start position, block size, and number of blocks.

    What other parameters affect it?

  • Those are the ones.

    Pixel skipping should not affect much.

    Also, make sure your H3A input is the right 10 bits with clipping.

  • Hi Gang

    This flowchart shows that H3A data is calculated on a 16bit scale.

    There are also LUT (converted to 16bit) related settings on DCC. This is a nonlinear change.

    Is the statistics of H3A data really 16bit or 24bit?

  • This flowchart shows that H3A data is calculated on a 16bit scale.

    H3A input is 10-bit.

    Is the statistics of H3A data really 16bit or 24bit?

    H3A output in DDR is 16-bit (24-bit is H3A internal).

  • H3A input is 10-bit.

    Is the 10bit data obtained from 16bit or 24bit data?

    If it is 24bit, what is the role of LUT in the DCC-H3A module?

  • Is the 10bit data obtained from 16bit or 24bit data?

    H3A input connection, by s/w default, is from 16-bit which is a compressed form of 24-bit.

    If it is 24bit, what is the role of LUT in the DCC-H3A module?

    H3A input LUT is for extracting 10 linear bits from sensor raw image.

  • I want to know how to obtain 10bit data from 24bit data.

    My understanding now is that 24bit is compressed to 16bit based on LUT.

    Take another 10bit from 16bit for H3A.

  • Hi   Gang

    I would like to confirm with you if my idea is correct.

    May I ask if this LUT compresses a 24bit image to 16bit?

    If yes,H3A is extracting 10 bits from 16 bit raw image.

  • This is the LUT extracting 10 bits from the 16-bit VISS image that is a compressed form of the 24-bit linear raw.

  • Hi Gang

    What is the difference between the 10bit output of this parameter and the 10bit output of LUT?

    If different, which one is used for H3A data statistics?

  • this is for choosing which 10-bit for H3A input.

  • this is for choosing which 10-bit for H3A input.

    This 10bit is the input of H3A.

    May I ask what is the 10bit data output by LUT for ?

  • May I ask what is the 10bit data output by LUT for ?

    The 10-bit data output of LUT is for H3A's 10-bit input.

  • Could you please explain to me in detail the process from 24bit to H3A's 10-bit input..

    thanks.

    .

  • H3A input is 10-bit and we use the H3A input LUT to extract 10 linear bits from the sensor raw image.
    As we connect H3A input to LSC/DPC output (which is 16-bit compressed), the H3A LUT is a 16-bit to 10-bit mapping in order to achieve above.

    Please refer to the H3A plugin guide for more details.