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: DCC Tuning flow

Part Number: TDA4VM


Hi Team, 

I am trying to understand which is the recommended flow here for DCC Tuning. 


I will tell you the problem first, 
I did tuning using DCC tool, create xmls,
Copy that to the sdk folder  ti-processor-sdk-rtos-j721e-evm-08_06_01_03/imaging/sensor_drv/src/ar0233/dcc_xmls/wdr  ,
Run the ./gUploadenerate_dcc.sh script, 

I can see only there binaries here /ti-processor-sdk-rtos-j721e-evm-08_06_01_03/imaging/sensor_drv/src/ar0233/dcc_bins  everytime i run this script, i wonder if this is the correct way to do it. Because my changes are not reflecting completely in the Pipeline. 

or Should i generate binaries from my dcc tool and directly copy them all to the  /ti-processor-sdk-rtos-j721e-evm-08_06_01_03/imaging/sensor_drv/src/ar0233/dcc_bins  folder?

Regards,
Dinesh

  • Hi Dinesh,

    I typically copy the xml files to PSDK, re-run "./generate_dcc.sh" (modify before running as necessary),  and re-compile psdk.
    That should be the safest way.

  • And after running "Generate Script"  the Binaries should reflect only in the Dcc_bins or it may be there in other folders too? Everytime i update some plugins for example glbce, i dont see the same getting created in the dcc_bins folder

  • You may take a look at "generate_dcc.sh" for details.
    The binary files are generated first and then converted to header files.

    Re-compiling PSDK will get the data in header files into the cam app.

  • 1)I did both for creating rgb2rgb But it doesn't show me any change in the output image(PC emulation). The values I have set are bit extreme and should show visual difference but it is not. I could see the difference in the DCC tool preview though.

    <?xml version="1.0" encoding="utf-8"?>
    <cfg_rgb2rgb_xml xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    	<!--this is comment-->
    	<dcc_name>cfg_rgb2rgb</dcc_name>
    	<dcc_header>
    		<camera_module_id>    233 </camera_module_id>
    		<dcc_descriptor_id>   10 </dcc_descriptor_id>
    		<algorithm_vendor_id>  1 </algorithm_vendor_id>
    		<tunning_tool_version> 0 </tunning_tool_version>
    	</dcc_header>
    	<!--=======================================================================-->
    	<typedef>
    		<cfg_rgb2rgb type="struct">
    			<!-- [RR] [GR] [BR] [CR]
    			     [RG] [GG] [BG] [CG]
    			     [RB] [GB] [BB] [CB] -->
    			<!-- Blending + Chroma values (S12Q8 format) -->
    			<ccm type="int16[3][4]"> </ccm> <!-- ipipe rgb2rgb matrix: S12Q8 -->
    			<!-- [OR] [OG] [OB] -->
    			<!-- Blending offset value for R,G,B - (S13) -->
    			<offset type="int16[3]"> </offset> <!-- ipipe rgb2rgb1 offset: S13 -->
    		</cfg_rgb2rgb>
    	</typedef>
    	<!--=======================================================================-->
    	
    	<use_case val="1023">
    		<n-space>
    		
    			<region0 class="0">
    				<colortemperature val="2" min="0" max="20000">  </colortemperature>
    				<exposure val="1" min="0" max="10000000">  </exposure>
    				<gain val="0" min="0" max="1024">  </gain>
    			</region0>
    		
    		</n-space>
    	
    		<parameter_package>
    			<rgb2rgb type="cfg_rgb2rgb">
    			{
    				{
    					{337, -81, 0, 0},
    					{-49, 345, -40, 0},
    					{368, -56, -56, 0}
    				},
    				{0, 0, 0}
    			}
    			</rgb2rgb>
    		</parameter_package>
    		  
    	
    	</use_case>
    	<!--=====================================================================-->
    </cfg_rgb2rgb_xml> 
    


    2) I was tuning on pc emulation mode using the dcc binaries generated from the dcc tool, the output was looking good in the pc emulation. But when i try to run the same using xmls its kind of over exposed and not properly there, the output looks really bad. Attaching all the relevant files here. 
    <?xml version="1.0" encoding="utf-8"?>
    <RAWFE_cfg_pwl_vshort_xml xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    	<!--this is a comment-->
        <dcc_name>rawfe_decompand</dcc_name>
        <dcc_header>
    		<camera_module_id> 233 </camera_module_id>
    	    <dcc_descriptor_id> 4 </dcc_descriptor_id>
    	    <algorithm_vendor_id>  1 </algorithm_vendor_id>
    	    <tunning_tool_version> 0 </tunning_tool_version>
        </dcc_header>
    	
    	<!--=======================================================================-->
        
    	<typedef>
    		<cfg_rawfe_decompand type="struct">
    		<!--=================================cfg pwl long======================================-->
    			<pwl_vshort_lut_en type="uint16"> </pwl_vshort_lut_en>
    			<pwl_vshort_mask type="uint16"> </pwl_vshort_mask>
    			<pwl_vshort_shift type="uint16"> </pwl_vshort_shift>
    			<pwl_vshort_lut_bitdepth type="uint16"> </pwl_vshort_lut_bitdepth>
    			<pwl_vshort_lut_clip type="uint16"> </pwl_vshort_lut_clip>
    			<pwl_vshort_lut type="uint16[639]"> </pwl_vshort_lut>
    		</cfg_rawfe_decompand>
    	</typedef>
    
    	<!--=======================================================================-->
    	
    	<use_case val="1023">
    		<n-space>
    			<region0 class="0">
    				<exposure val="1" min="0" max="2000000">  </exposure>
    				<gain val="0" min="0" max="100000">  </gain>
    			</region0>
    		</n-space>
    
    		<parameter_package>
    			<cfg_rawfe_decompand type="cfg_rawfe_decompand">
    			{
    				1     // enable
    				4095    // mask
    				0     // shift
    				12    // lutBitdepth
    				65535 // lutClip
    				{
    				  #include "asamplesensor_lut_wdr_overall_pwl_global.txt"
    				}
    			}
    		</cfg_rawfe_decompand>
    	</parameter_package>
    	</use_case>
    	
    	<!--=====================================================================-->
    
    </RAWFE_cfg_pwl_vshort_xml>
    
    <?xml version="1.0" encoding="utf-8"?>
    <GLBCE_xml xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    	<!--this is a comment-->
    	<dcc_name>glbce</dcc_name>
    	<dcc_header>
    		<camera_module_id>    233 </camera_module_id>
    		<dcc_descriptor_id>   6 </dcc_descriptor_id>
    		<algorithm_vendor_id>  1 </algorithm_vendor_id>
    		<tunning_tool_version> 0 </tunning_tool_version>
    	</dcc_header>
    	<!--=======================================================================-->
    
    	<typedef>
    		<iss_glbce type="struct">
                <strength      type="uint32"> </strength>
                <intensity_var type="uint32"> </intensity_var>
                <space_var     type="uint32"> </space_var>
                <slope_min_lim type="uint32">  </slope_min_lim>
                <slope_max_lim type="uint32">  </slope_max_lim>
                <fwd_prcpt_en  type="uint32">  </fwd_prcpt_en>
                <fwd_prcpt_lut type="uint32[65]"> </fwd_prcpt_lut>
                <rev_prcpt_en  type="uint32">  </rev_prcpt_en>
                <rev_prcpt_lut type="uint32[65]"> </rev_prcpt_lut>
                <asym_lut      type="uint32[33]"> </asym_lut>
    		</iss_glbce>
    	</typedef>
    	<!--=======================================================================-->
    	<use_case val="65535"> <!-- DCC_USE_CASE_PREVIEW_ALL -->
    		<n-space>
    			<region0 class="0">
    			<gain val="0" min="0" max="100">  </gain>
    			</region0>
    		</n-space>
    
    		<parameter_package>
    		<!-- parameters for photospace class 0-->
    			<glbce_params type="iss_glbce" >
    			{
    				0, // strength_ir: u8
    				2, // intensity_var: u4
    				7, // spatial_var: u4
    				12, // slope_min_limit: u8
    				15, // slope_max_limit: u8
    				0, // fwd_prcpt_lut_enable
    				{   // fwd_prcpt_lut
    				  #include "fwd_prcpt_lut.txt"
    				},
    				0, // rev_prcpt_lut_enable
    				{   // rev_prcpt_lut
    				  #include "rev_prcpt_lut.txt"
    				},
    				{   // asym_lut
    				  #include "asym_lut.txt"
    				}
    			}
    			</glbce_params>
    		</parameter_package>
    	</use_case>
    	<!--=====================================================================-->
    </GLBCE_xml>
    
    0,
    6648,
    12399,
    17421,
    21845,
    25772,
    29282,
    32437,
    35288,
    37878,
    40241,
    42405,
    44395,
    46230,
    47929,
    49505,
    50972,
    52340,
    53620,
    54819,
    55945,
    57004,
    58002,
    58945,
    59836,
    60681,
    61481,
    62242,
    62965,
    63654,
    64310,
    64937,
    65535,
    
    0
    2
    4
    6
    8
    10
    12
    14
    16
    18
    20
    22
    24
    26
    28
    30
    32
    34
    36
    38
    40
    42
    44
    46
    48
    50
    52
    54
    56
    58
    60
    62
    64
    66
    68
    70
    72
    74
    76
    78
    80
    82
    84
    86
    88
    90
    92
    94
    96
    98
    100
    102
    104
    106
    108
    110
    112
    114
    116
    118
    120
    122
    124
    126
    128
    130
    132
    134
    136
    138
    140
    142
    144
    146
    148
    150
    152
    154
    156
    158
    160
    162
    164
    166
    168
    170
    172
    174
    176
    178
    180
    182
    184
    186
    188
    190
    192
    194
    196
    198
    200
    202
    204
    206
    208
    210
    212
    214
    216
    218
    220
    222
    224
    226
    228
    230
    232
    234
    236
    238
    240
    242
    244
    246
    248
    250
    252
    254
    256
    264
    272
    280
    288
    296
    304
    312
    320
    328
    336
    344
    352
    360
    368
    376
    384
    392
    400
    408
    416
    424
    432
    440
    448
    456
    464
    472
    480
    488
    496
    504
    512
    520
    528
    536
    544
    552
    560
    568
    576
    584
    592
    600
    608
    616
    624
    632
    640
    648
    656
    664
    672
    680
    688
    696
    704
    712
    720
    728
    736
    744
    752
    760
    768
    776
    784
    792
    800
    808
    816
    824
    832
    840
    848
    856
    864
    872
    880
    888
    896
    904
    912
    920
    928
    936
    944
    952
    960
    968
    976
    984
    992
    1000
    1008
    1016
    1024
    1032
    1040
    1048
    1056
    1064
    1072
    1080
    1088
    1096
    1104
    1112
    1120
    1128
    1136
    1144
    1152
    1160
    1168
    1176
    1184
    1192
    1200
    1208
    1216
    1224
    1232
    1240
    1248
    1256
    1264
    1272
    1280
    1288
    1296
    1304
    1312
    1320
    1328
    1336
    1344
    1352
    1360
    1368
    1376
    1384
    1392
    1400
    1408
    1416
    1424
    1432
    1440
    1448
    1456
    1464
    1472
    1480
    1488
    1496
    1504
    1512
    1520
    1528
    1536
    1544
    1552
    1560
    1568
    1576
    1584
    1592
    1600
    1608
    1616
    1624
    1632
    1640
    1648
    1656
    1664
    1672
    1680
    1688
    1696
    1704
    1712
    1720
    1728
    1736
    1744
    1752
    1760
    1768
    1776
    1784
    1792
    1800
    1808
    1816
    1824
    1832
    1840
    1848
    1856
    1864
    1872
    1880
    1888
    1896
    1904
    1912
    1920
    1928
    1936
    1944
    1952
    1960
    1968
    1976
    1984
    1992
    2000
    2008
    2016
    2024
    2032
    2040
    2048
    2056
    2064
    2072
    2080
    2088
    2096
    2104
    2112
    2120
    2128
    2136
    2144
    2152
    2160
    2168
    2176
    2184
    2191
    2199
    2207
    2215
    2223
    2231
    2239
    2247
    2255
    2263
    2271
    2279
    2287
    2295
    2303
    2311
    2319
    2327
    2335
    2343
    2351
    2359
    2367
    2375
    2383
    2391
    2399
    2407
    2415
    2423
    2431
    2439
    2447
    2455
    2463
    2471
    2479
    2487
    2495
    2503
    2511
    2519
    2527
    2535
    2543
    2551
    2559
    2567
    2575
    2583
    2591
    2599
    2607
    2615
    2623
    2631
    2639
    2647
    2655
    2663
    2671
    2679
    2687
    2695
    2703
    2711
    2719
    2727
    2735
    2743
    2751
    2759
    2767
    2775
    2783
    2791
    2799
    2807
    2815
    2823
    2831
    2839
    2847
    2855
    2863
    2871
    2879
    2887
    2895
    2903
    2911
    2919
    2927
    2935
    2943
    2951
    2959
    2967
    2975
    2983
    2991
    2999
    3007
    3015
    3023
    3031
    3039
    3047
    3055
    3063
    3071
    3079
    3087
    3095
    3103
    3111
    3119
    3127
    3135
    3143
    3151
    3159
    3167
    3175
    3183
    3191
    3199
    3207
    3215
    3223
    3231
    3239
    3247
    3255
    3263
    3271
    3279
    3287
    3295
    3303
    3311
    3319
    3327
    3335
    3343
    3351
    3359
    3367
    3375
    3383
    3391
    3399
    3407
    3415
    3423
    3431
    3439
    3447
    3455
    3463
    3471
    3479
    3487
    3495
    3503
    3511
    3519
    3527
    3535
    3543
    3551
    3559
    3567
    3575
    3583
    3591
    3599
    3607
    3615
    3623
    3631
    3639
    3647
    3655
    3663
    3671
    3679
    3687
    3695
    3703
    3711
    3719
    3727
    3735
    3743
    3751
    3759
    3767
    3775
    3783
    3791
    3799
    3807
    3815
    3823
    3831
    3839
    3847
    3855
    3863
    3871
    3879
    3887
    3895
    3903
    3911
    3919
    3927
    3935
    3943
    3951
    3959
    3967
    3975
    3983
    3991
    3999
    4007
    4015
    4023
    4031
    4039
    4047
    4055
    4063
    4071
    4079
    4087
    4095
    4095
    4095
    4095
    4095
    4095
    4095
    4095
    4095
    4095
    4095
    4095
    4095
    4095
    4095
    4095
    4095
    4095
    4095
    4095
    4095
    4095
    4095
    4095
    4095
    4095
    4095
    4095
    4095
    4095
    4095
    0,
    228,
    455,
    683,
    910,
    1138,
    1369,
    1628,
    1912,
    2221,
    2556,
    2916,
    3304,
    3717,
    4158,
    4626,
    5122,
    5645,
    6197,
    6777,
    7386,
    8024,
    8691,
    9387,
    10113,
    10869,
    11654,
    12471,
    13317,
    14194,
    15103,
    16042,
    17012,
    18014,
    19048,
    20113,
    21210,
    22340,
    23501,
    24696,
    25922,
    27182,
    28475,
    29800,
    31159,
    32552,
    33977,
    35437,
    36930,
    38458,
    40019,
    41615,
    43245,
    44910,
    46609,
    48343,
    50112,
    51916,
    53755,
    55630,
    57539,
    59485,
    61466,
    63482,
    65535,
    
    <?xml version="1.0" encoding="utf-8"?>
    <cfg_flxd_cfa_xml xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xmlns:xsd="http://www.w3.org/2001/xmlschema">
      <!--this is a comment-->
        <dcc_name>cfg_flxd_cfa</dcc_name>
        <dcc_header>
    		<camera_module_id> 233 </camera_module_id>
    	    <dcc_descriptor_id> 9 </dcc_descriptor_id>
    	    <algorithm_vendor_id>  1 </algorithm_vendor_id>
    	    <tunning_tool_version> 0 </tunning_tool_version>
        </dcc_header>
      <!--=======================================================================-->
    
    	<typedef>
    		<FLXD_FirCoefs type="struct">
    			<matrix type="uint32[4][36]"></matrix>
    		</FLXD_FirCoefs>
    	</typedef>
    
    	<typedef>
    		<cfg_flxd_cfa_vars type="struct">
    			
    			<image_bits type="uint32"> </image_bits>
    			<lut_enable type="uint32"> </lut_enable>
    
    			<Set0GradHzMask type="uint32[4]"> </Set0GradHzMask>
    			<Set0GradVtMask type="uint32[4]"> </Set0GradVtMask>
    			<Set0IntensityMask type="uint32[4]"> </Set0IntensityMask>
    			<Set0IntensityShift type="uint32[4]"> </Set0IntensityShift>
    			<Set0Thr type="uint32[7]"> </Set0Thr>
    	
    			<Set1GradHzMask type="uint32[4]"> </Set1GradHzMask>
    			<Set1GradVtMask type="uint32[4]"> </Set1GradVtMask>
    			<Set1IntensityMask type="uint32[4]"> </Set1IntensityMask>
    			<Set1IntensityShift type="uint32[4]"> </Set1IntensityShift>
    			<Set1Thr type="uint32[7]"> </Set1Thr>
    
    			<blendMode type="uint32[4]"> </blendMode>
    			<bitMaskSel type="uint32[4]"> </bitMaskSel>
    			
    			<FirCoefs type="FLXD_FirCoefs[12]"> </FirCoefs>
    			<cfa_lut type="uint32[639]"> </cfa_lut>
    
    
    		
    		</cfg_flxd_cfa_vars>
        </typedef>
    	<!--=======================================================================-->
        
        <use_case val="1023">
            <n-space>
    		
                <region0 class="0">
    				<gain val="0" min="0" max="0">  </gain>
    			</region0>
    		
    		</n-space>
    		
            <parameter_package>
                <cfg_flxd_cfa_vars_dcc type="cfg_flxd_cfa_vars">
                    {
    					 16,   // image bits
    					 1,    // lut_enable
    
    					{255, 255, 255, 255}, //Set0GradHzMask
    					{255, 255, 255, 255}, //Set0GradVtMask
    					{15, 15, 15, 15},     //Set0IntensityMask
    					{5, 5, 5, 5},         //Set0IntensityShift
    					{500,500,500,500,500,500,500}, //Set0Thr
    
    					{255, 255, 255, 255}, //Set1GradHzMask
    					{255, 255, 255, 255}, //Set1GradVtMask
    					{15, 15, 15, 15},     //Set1IntensityMask
    					{5, 5, 5, 5},         //Set1IntensityShift
    					{500,500,500,500,500,500,500}, //Set1Thr
    
    					{2,2,2,2},//blendMode
    					{0,0,0,0},//bitMaskSel
    
    					//FirCoefs
    					{
    						//FirCoef 0 - Rh
    						{      
    							{
    							  { 0,  1,  3,  4,  1,  0,
    							   0,  -19,  0,  -48,  0,  -1,
    							   1,  51,  45,  123,  18,  4,
    							   0,  18,  0,  45,  0,  1,
    							   -1,  21,  -48,  51,  -19,  1,
    							   0,  1,  0,  3,  0,  0},
    					 
    							  { 0,  1,  4,  3,  1,  0,
    							   -1,  0,  -48,  0,  -19,  0,
    							   4,  18,  123,  45,  51,  1,
    							   1,  0,  45,  0,  18,  0,
    							   1,  -19,  51,  -48,  21,  -1,
    							   0,  0,  3,  0,  1,  0},
    					 
    							  { 0,  1,  0,  3,  0,  0,
    							   -1,  21,  -48,  51,  -19,  1,
    							   0,  18,  0,  45,  0,  1,
    							   1,  51,  45,  123,  18,  4,
    							   0,  -19,  0,  -48,  0,  -1,
    							   0,  1,  3,  4,  1,  0},
    					 
    							  { 0,  0,  3,  0,  1,  0,
    							   1,  -19,  51,  -48,  21,  -1,
    							   1,  0,  45,  0,  18,  0,
    							   4,  18,  123,  45,  51,  1,
    							   -1,  0,  -48,  0,  -19,  0,
    							   0,  1,  4,  3,  1,  0}
    							},
    						},						      
    
    						//FirCoef 1 : RV
    						{
    							{
    							  { 0,  1,  1,  4,  -1,  0,
    							   0,  -19,  0,  18,  0,  1,
    							   3,  51,  45,  123,  -48,  4,
    							   0,  -48,  0,  45,  0,  3,
    							   1,  21,  18,  51,  -19,  1,
    							   0,  -1,  0,  1,  0,  0},
    					 
    							  { 0,  -1,  4,  1,  1,  0,
    							   1,  0,  18,  0,  -19,  0,
    							   4,  -48,  123,  45,  51,  3,
    							   3,  0,  45,  0,  -48,  0,
    							   1,  -19,  51,  18,  21,  1,
    							   0,  0,  1,  0,  -1,  0},
    					 
    							  { 0,  -1,  0,  1,  0,  0,
    							   1,  21,  18,  51,  -19,  1,
    							   0,  -48,  0,  45,  0,  3,
    							   3,  51,  45,  123,  -48,  4,
    							   0,  -19,  0,  18,  0,  1,
    							   0,  1,  1,  4,  -1,  0},
    					 
    							  { 0,  0,  1,  0,  -1,  0,
    							   1,  -19,  51,  18,  21,  1,
    							   3,  0,  45,  0,  -48,  0,
    							   4,  -48,  123,  45,  51,  3,
    							   1,  0,  18,  0,  -19,  0,
    							   0,  -1,  4,  1,  1,  0}
    							},
    						},
    
    						//FirCoef 2 : RN
    						{
    							{
    							  { 0,  1,  0,  4,  0,  0,
    							   0,  0,  0,  0,  0,  0,
    							   0,  51,  0,  123,  0,  4,
    							   0,  0,  0,  0,  0,  0,
    							   0,  21,  0,  51,  0,  1,
    							   0,  0,  0,  0,  0,  0},
    					 
    							  { 0,  0,  4,  0,  1,  0,
    							   0,  0,  0,  0,  0,  0,
    							   4,  0,  123,  0,  51,  0,
    							   0,  0,  0,  0,  0,  0,
    							   1,  0,  51,  0,  21,  0,
    							   0,  0,  0,  0,  0,  0},
    					 
    							  { 0,  0,  0,  0,  0,  0,
    							   0,  21,  0,  51,  0,  1,
    							   0,  0,  0,  0,  0,  0,
    							   0,  51,  0,  123,  0,  4,
    							   0,  0,  0,  0,  0,  0,
    							   0,  1,  0,  4,  0,  0},
    					 
    							  { 0,  0,  0,  0,  0,  0,
    							   1,  0,  51,  0,  21,  0,
    							   0,  0,  0,  0,  0,  0,
    							   4,  0,  123,  0,  51,  0,
    							   0,  0,  0,  0,  0,  0,
    							   0,  0,  4,  0,  1,  0}
    							},
    						},
    
    						//FirCoef 3 : Gh
    						{
    							{
    							  { 0,  0,  4,  0,  2,  0,
    							   0,  -9,  0,  -22,  0,  -1,
    							   3,  0,  107,  0,  44,  0,
    							   0,  44,  0,  107,  0,  3,
    							   -1,  0,  -22,  0,  -9,  0,
    							   0,  2,  0,  4,  0,  0},
    					 
    							  { 0,  2,  0,  4,  0,  0,
    							   -1,  0,  -22,  0,  -9,  0,
    							   0,  44,  0,  107,  0,  3,
    							   3,  0,  107,  0,  44,  0,
    							   0,  -9,  0,  -22,  0,  -1,
    							   0,  0,  4,  0,  2,  0},
    					 
    							  { 0,  2,  0,  4,  0,  0,
    							   -1,  0,  -22,  0,  -9,  0,
    							   0,  44,  0,  107,  0,  3,
    							   3,  0,  107,  0,  44,  0,
    							   0,  -9,  0,  -22,  0,  -1,
    							   0,  0,  4,  0,  2,  0},
    					 
    							  { 0,  0,  4,  0,  2,  0,
    							   0,  -9,  0,  -22,  0,  -1,
    							   3,  0,  107,  0,  44,  0,
    							   0,  44,  0,  107,  0,  3,
    							   -1,  0,  -22,  0,  -9,  0,
    							   0,  2,  0,  4,  0,  0}
    							},
    						},
    
    						//FirCoef 4 : GV
    						{
    							{
    							  { 0,  0,  3,  0,  -1,  0,
    							   0,  -9,  0,  44,  0,  2,
    							   4,  0,  107,  0,  -22,  0,
    							   0,  -22,  0,  107,  0,  4,
    							   2,  0,  44,  0,  -9,  0,
    							   0,  -1,  0,  3,  0,  0},
    					 
    							  { 0,  -1,  0,  3,  0,  0,
    							   2,  0,  44,  0,  -9,  0,
    							   0,  -22,  0,  107,  0,  4,
    							   4,  0,  107,  0,  -22,  0,
    							   0,  -9,  0,  44,  0,  2,
    							   0,  0,  3,  0,  -1,  0},
    					 
    							  { 0,  -1,  0,  3,  0,  0,
    							   2,  0,  44,  0,  -9,  0,
    							   0,  -22,  0,  107,  0,  4,
    							   4,  0,  107,  0,  -22,  0,
    							   0,  -9,  0,  44,  0,  2,
    							   0,  0,  3,  0,  -1,  0},
    					 
    							  { 0,  0,  3,  0,  -1,  0,
    							   0,  -9,  0,  44,  0,  2,
    							   4,  0,  107,  0,  -22,  0,
    							   0,  -22,  0,  107,  0,  4,
    							   2,  0,  44,  0,  -9,  0,
    							   0,  -1,  0,  3,  0,  0}
    							},
    						},
    
    						//FirCoef 5 : GN
    						{
    							{
    							  { 0,  0,  2,  0,  0,  0,
    							   0,  -5,  0,  15,  0,  0,
    							   2,  0,  99,  0,  15,  0,
    							   0,  15,  0,  99,  0,  2,
    							   0,  0,  15,  0,  -5,  0,
    							   0,  0,  0,  2,  0,  0},
    					 
    							  { 0,  0,  0,  2,  0,  0,
    							   0,  0,  15,  0,  -5,  0,
    							   0,  15,  0,  99,  0,  2,
    							   2,  0,  99,  0,  15,  0,
    							   0,  -5,  0,  15,  0,  0,
    							   0,  0,  2,  0,  0,  0},
    					 
    							  { 0,  0,  0,  2,  0,  0,
    							   0,  0,  15,  0,  -5,  0,
    							   0,  15,  0,  99,  0,  2,
    							   2,  0,  99,  0,  15,  0,
    							   0,  -5,  0,  15,  0,  0,
    							   0,  0,  2,  0,  0,  0},
    					 
    							  { 0,  0,  2,  0,  0,  0,
    							   0,  -5,  0,  15,  0,  0,
    							   2,  0,  99,  0,  15,  0,
    							   0,  15,  0,  99,  0,  2,
    							   0,  0,  15,  0,  -5,  0,
    							   0,  0,  0,  2,  0,  0}
    							},
    						},
    
    
    						//FirCoef 6 : BH
    						{
    							{
    							  { 0,  0,  3,  0,  1,  0,
    							   1,  -19,  51,  -48,  21,  -1,
    							   1,  0,  45,  0,  18,  0,
    							   4,  18,  123,  45,  51,  1,
    							   -1,  0,  -48,  0,  -19,  0,
    							   0,  1,  4,  3,  1,  0},
    					 
    							  { 0,  1,  0,  3,  0,  0,
    							   -1,  21,  -48,  51,  -19,  1,
    							   0,  18,  0,  45,  0,  1,
    							   1,  51,  45,  123,  18,  4,
    							   0,  -19,  0,  -48,  0,  -1,
    							   0,  1,  3,  4,  1,  0},
    					 
    							  { 0,  1,  4,  3,  1,  0,
    							   -1,  0,  -48,  0,  -19,  0,
    							   4,  18,  123,  45,  51,  1,
    							   1,  0,  45,  0,  18,  0,
    							   1,  -19,  51,  -48,  21,  -1,
    							   0,  0,  3,  0,  1,  0},
    					 
    							  { 0,  1,  3,  4,  1,  0,
    							   0,  -19,  0,  -48,  0,  -1,
    							   1,  51,  45,  123,  18,  4,
    							   0,  18,  0,  45,  0,  1,
    							   -1,  21,  -48,  51,  -19,  1,
    							   0,  1,  0,  3,  0,  0}
    							},
    						},
    
    						//FirCoef 7 : BV
    						{
    							{
    							  { 0,  0,  1,  0,  -1,  0,
    							   1,  -19,  51,  18,  21,  1,
    							   3,  0,  45,  0,  -48,  0,
    							   4,  -48,  123,  45,  51,  3,
    							   1,  0,  18,  0,  -19,  0,
    							   0,  -1,  4,  1,  1,  0},
    					 
    							  { 0,  -1,  0,  1,  0,  0,
    							   1,  21,  18,  51,  -19,  1,
    							   0,  -48,  0,  45,  0,  3,
    							   3,  51,  45,  123,  -48,  4,
    							   0,  -19,  0,  18,  0,  1,
    							   0,  1,  1,  4,  -1,  0},
    					 
    							  { 0,  -1,  4,  1,  1,  0,
    							   1,  0,  18,  0,  -19,  0,
    							   4,  -48,  123,  45,  51,  3,
    							   3,  0,  45,  0,  -48,  0,
    							   1,  -19,  51,  18,  21,  1,
    							   0,  0,  1,  0,  -1,  0},
    					 
    							  { 0,  1,  1,  4,  -1,  0,
    							   0,  -19,  0,  18,  0,  1,
    							   3,  51,  45,  123,  -48,  4,
    							   0,  -48,  0,  45,  0,  3,
    							   1,  21,  18,  51,  -19,  1,
    							   0,  -1,  0,  1,  0,  0}
    							},
    						},
    
    						//FirCoef 8 : BN
    						{
    							{
    							  { 0,  0,  0,  0,  0,  0,
    							   1,  0,  51,  0,  21,  0,
    							   0,  0,  0,  0,  0,  0,
    							   4,  0,  123,  0,  51,  0,
    							   0,  0,  0,  0,  0,  0,
    							   0,  0,  4,  0,  1,  0},
    					 
    							  { 0,  0,  0,  0,  0,  0,
    							   0,  21,  0,  51,  0,  1,
    							   0,  0,  0,  0,  0,  0,
    							   0,  51,  0,  123,  0,  4,
    							   0,  0,  0,  0,  0,  0,
    							   0,  1,  0,  4,  0,  0},
    					 
    							  { 0,  0,  4,  0,  1,  0,
    							   0,  0,  0,  0,  0,  0,
    							   4,  0,  123,  0,  51,  0,
    							   0,  0,  0,  0,  0,  0,
    							   1,  0,  51,  0,  21,  0,
    							   0,  0,  0,  0,  0,  0},
    					 
    							  { 0,  1,  0,  4,  0,  0,
    							   0,  0,  0,  0,  0,  0,
    							   0,  51,  0,  123,  0,  4,
    							   0,  0,  0,  0,  0,  0,
    							   0,  21,  0,  51,  0,  1,
    							   0,  0,  0,  0,  0,  0}
    
    							
    							},
    						},
    
    						//FirCoef 9 : Dummy
    						{
    							{
    							  { 0,  0,  0,  0,  0,  0,
    							   0,  0,  0,  0,  0,  0,
    							   0,  0,  0,  0,  0,  0,
    							   0,  0,  0,  0,  0,  0,
    							   0,  0,  0,  0,  0,  0,
    							   0,  0,  0,  0,  0,  0},
    					 
    							  { 0,  0,  0,  0,  0,  0,
    							   0,  0,  0,  0,  0,  0,
    							   0,  0,  0,  0,  0,  0,
    							   0,  0,  0,  0,  0,  0,
    							   0,  0,  0,  0,  0,  0,
    							   0,  0,  0,  0,  0,  0},
    					 
    							  { 0,  0,  0,  0,  0,  0,
    							   0,  0,  0,  0,  0,  0,
    							   0,  0,  0,  0,  0,  0,
    							   0,  0,  0,  0,  0,  0,
    							   0,  0,  0,  0,  0,  0,
    							   0,  0,  0,  0,  0,  0},
    					 
    							  { 0,  0,  0,  0,  0,  0,
    							   0,  0,  0,  0,  0,  0,
    							   0,  0,  0,  0,  0,  0,
    							   0,  0,  0,  0,  0,  0,
    							   0,  0,  0,  0,  0,  0,
    							   0,  0,  0,  0,  0,  0}
    							},
    						},
    
    						//FirCoef 10 : Dummy
    						{
    							{
    							  { 0,  0,  0,  0,  0,  0,
    							   0,  0,  0,  0,  0,  0,
    							   0,  0,  0,  0,  0,  0,
    							   0,  0,  0,  0,  0,  0,
    							   0,  0,  0,  0,  0,  0,
    							   0,  0,  0,  0,  0,  0},
    					 
    							  { 0,  0,  0,  0,  0,  0,
    							   0,  0,  0,  0,  0,  0,
    							   0,  0,  0,  0,  0,  0,
    							   0,  0,  0,  0,  0,  0,
    							   0,  0,  0,  0,  0,  0,
    							   0,  0,  0,  0,  0,  0},
    					 
    							  { 0,  0,  0,  0,  0,  0,
    							   0,  0,  0,  0,  0,  0,
    							   0,  0,  0,  0,  0,  0,
    							   0,  0,  0,  0,  0,  0,
    							   0,  0,  0,  0,  0,  0,
    							   0,  0,  0,  0,  0,  0},
    					 
    							  { 0,  0,  0,  0,  0,  0,
    							   0,  0,  0,  0,  0,  0,
    							   0,  0,  0,  0,  0,  0,
    							   0,  0,  0,  0,  0,  0,
    							   0,  0,  0,  0,  0,  0,
    							   0,  0,  0,  0,  0,  0}
    							},
    						},
    
    						//FirCoef 11 :Dummy
    						{
    							{
    							  { 0,  0,  0,  0,  0,  0,
    							   0,  0,  0,  0,  0,  0,
    							   0,  0,  0,  0,  0,  0,
    							   0,  0,  0,  0,  0,  0,
    							   0,  0,  0,  0,  0,  0,
    							   0,  0,  0,  0,  0,  0},
    					 
    							  { 0,  0,  0,  0,  0,  0,
    							   0,  0,  0,  0,  0,  0,
    							   0,  0,  0,  0,  0,  0,
    							   0,  0,  0,  0,  0,  0,
    							   0,  0,  0,  0,  0,  0,
    							   0,  0,  0,  0,  0,  0},
    					 
    							  { 0,  0,  0,  0,  0,  0,
    							   0,  0,  0,  0,  0,  0,
    							   0,  0,  0,  0,  0,  0,
    							   0,  0,  0,  0,  0,  0,
    							   0,  0,  0,  0,  0,  0,
    							   0,  0,  0,  0,  0,  0},
    					 
    							  { 0,  0,  0,  0,  0,  0,
    							   0,  0,  0,  0,  0,  0,
    							   0,  0,  0,  0,  0,  0,
    							   0,  0,  0,  0,  0,  0,
    							   0,  0,  0,  0,  0,  0,
    							   0,  0,  0,  0,  0,  0}
    							}
    						}
    					},//FirCoefs
    					{ //cfa_lut
    						#include "lut_cfa_16to12_g1o0_global.txt"
    					}
    				}
                </cfg_flxd_cfa_vars_dcc>
            </parameter_package>
        </use_case>
      <!--=====================================================================-->
    </cfg_flxd_cfa_xml>
    
    <?xml version="1.0" encoding="utf-8"?>
    <VISS_NSF4_CFG xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    	<!--this is comment-->
    	<dcc_name>viss_nsf4_cfg</dcc_name>
    	<dcc_header>
    		<camera_module_id>  233 </camera_module_id>
    		<dcc_descriptor_id>   1 </dcc_descriptor_id>
    		<algorithm_vendor_id>  1 </algorithm_vendor_id>
    		<tunning_tool_version> 0 </tunning_tool_version>
    	</dcc_header>
    	<!--=======================================================================-->
        <typedef>
            <viss_clamp type="struct">
    			<viss_clamp_vshort type="struct">
    				<dcoffset_clamp_value_0 type="int16"> </dcoffset_clamp_value_0> <!-- additive dc offset, S13 -->
    				<dcoffset_clamp_value_1 type="int16"> </dcoffset_clamp_value_1> <!-- additive dc offset, S13 -->
    				<dcoffset_clamp_value_2 type="int16"> </dcoffset_clamp_value_2> <!-- additive dc offset, S13 -->
    				<dcoffset_clamp_value_3 type="int16"> </dcoffset_clamp_value_3> <!-- additive dc offset, S13 -->
    			</viss_clamp_vshort>
    
    			<viss_clamp_short type="struct">
    				<dcoffset_clamp_value_0 type="int16"> </dcoffset_clamp_value_0> <!-- additive dc offset, S13 -->
    				<dcoffset_clamp_value_1 type="int16"> </dcoffset_clamp_value_1> <!-- additive dc offset, S13 -->
    				<dcoffset_clamp_value_2 type="int16"> </dcoffset_clamp_value_2> <!-- additive dc offset, S13 -->
    				<dcoffset_clamp_value_3 type="int16"> </dcoffset_clamp_value_3> <!-- additive dc offset, S13 -->
    			</viss_clamp_short>
    
    			<viss_clamp_long type="struct">
    				<dcoffset_clamp_value_0 type="int16"> </dcoffset_clamp_value_0> <!-- additive dc offset, S13 -->
    				<dcoffset_clamp_value_1 type="int16"> </dcoffset_clamp_value_1> <!-- additive dc offset, S13 -->
    				<dcoffset_clamp_value_2 type="int16"> </dcoffset_clamp_value_2> <!-- additive dc offset, S13 -->
    				<dcoffset_clamp_value_3 type="int16"> </dcoffset_clamp_value_3> <!-- additive dc offset, S13 -->
    			</viss_clamp_long>
    
    		</viss_clamp>
        </typedef>
    
    	<!--=======================================================================-->
    	
    	<use_case val="1023">
    		<n-space>
    		
    			<region0 class="0">
    				<colortemperature val="2" min="0" max="20000">  </colortemperature>
    				<exposure val="1" min="0" max="10000000">  </exposure>
    				<gain val="0" min="0" max="1024">  </gain>
    			</region0>
    		
    		</n-space>
    		
    	    <parameter_package>
                <viss_clamp_dcc type="viss_clamp">
    			{
    				 //viss_clamp_vshort : For linear mode only this should be set to sensor Black Level
    				  {
    						0, // dcoffset_clamp_value 0
    						0, // dcoffset_clamp_value 1
    						0, // dcoffset_clamp_value 2
    						0, // dcoffset_clamp_value 3
    				  },
    				 //viss_clamp_short : To be used only in WDR mode. 
    				  {
    						0, // dcoffset_clamp_value 0
    						0, // dcoffset_clamp_value 1
    						0, // dcoffset_clamp_value 2
    						0, // dcoffset_clamp_value 3
    				  },
    				 //viss_clamp_long : To be used only in WDR mode.
    				  {
    						0, // dcoffset_clamp_value 0
    						0, // dcoffset_clamp_value 1
    						0, // dcoffset_clamp_value 2
    						0, // dcoffset_clamp_value 3
    				  }
    			  }
                </viss_clamp_dcc>
    		</parameter_package>
    		
    	</use_case>
    	
    	<!--=====================================================================-->
    </VISS_NSF4_CFG>
    

     

  • Is 233 your correct DCC ID?

    Do you see any error message while running "./generate_dcc.sh" or re-compile?

  • Everything looks fine to me. Please check my last reply, have added some more information too. Attaching the ./generate response here. I did compare the header file (dcc_viss_ar0233_wdr.h)  after changing only the rgb2rgb values , there is an update in the header file.

    ./generate_dcc.sh
    rm: cannot remove '*.bin': No such file or directory
    Parsing: [AR0233_ipipe_rgb2rgb_1_dcc.xml] [OK!]
    Generating CRC: [18F10844] [OK!]
    Generating BIN file... [OK!]
    Parsing: [AR0233_viss_h3a_aewb_cfg.xml] [OK!]
    Generating CRC: [D0295AD2] [OK!]
    Generating BIN file... [OK!]
    Parsing: [AR0233_viss_h3a_mux_luts_cfg.xml] [OK!]
    Generating CRC: [C5BE9ED1] [OK!]
    Generating BIN file... [OK!]
    Parsing: [AR0233_viss_nsf4.xml] [OK!]
    Generating CRC: [41DA95E1] [OK!]
    Generating BIN file... [OK!]
    Parsing: [AR0233_viss_blc.xml] [OK!]
    Generating CRC: [3C7EA53F] [OK!]
    Generating BIN file... [OK!]
    Parsing: [AR0233_flxd_cfa.xml] [OK!]
    Generating CRC: [31358E23] [OK!]
    Generating BIN file... [OK!]
    Parsing: [AR0233_rawfe_decompand.xml] [OK!]
    Generating CRC: [DC5E70D] [OK!]
    Generating BIN file... [OK!]
    ../../dcc_bins/dcc_viss_wdr.bin ../../../../include/dcc_viss_ar0233_wdr.h dcc_viss_ar0233_wdr

    Converting binary file [../../dcc_bins/dcc_viss_wdr.bin] to C array .. Done. (17099 bytes)Parsing: [AR0233_awb_alg_ti3_tuning.xml] [OK!]
    Generating CRC: [184E603C] [OK!]
    Generating BIN file... [OK!]
    Parsing: [AR0233_viss_h3a_aewb_cfg.xml] [OK!]
    Generating CRC: [D0295AD2] [OK!]
    Generating BIN file... [OK!]
    Parsing: [AR0233_viss_h3a_mux_luts_cfg.xml] [OK!]
    Generating CRC: [C5BE9ED1] [OK!]
    Generating BIN file... [OK!]
    ../../dcc_bins/dcc_2a_wdr.bin ../../../../include/dcc_2a_ar0233_wdr.h dcc_2a_ar0233_wdr

    Converting binary file [../../dcc_bins/dcc_2a_wdr.bin] to C array .. Done. (30792 bytes)Parsing: [AR0233_ldc.xml] [OK!]
    Generating CRC: [C5D5EAA1] [OK!]
    Generating BIN file... [OK!]
    ../../dcc_bins/dcc_ldc_wdr.bin ../../../../include/dcc_ldc_ar0233_wdr.h dcc_ldc_ar0233_wdr

    Converting binary file [../../dcc_bins/dcc_ldc_wdr.bin] to C array .. Done. (2360 bytes)

  • The log looks file and the header file shall be good.

    Do you have any DCC binary file that may overwrite the rgb2rgb data in head file while you run pc emulation?

  • No I am using the only the bin files created from ./generate in the pc emulation.

  • You don't need any bin file for pc emulation as they are in the header file already.
    That shall work.

    Do you have AWB working properly in PC emulation?
    Choosing rgb2rgb may require AWB output to be valid.
    So, run for 2 frames so that AWB and rgb2rgb will kick in at the 2nd frame.

  • No I am using the only the bin files created from ./generate in the pc emulation

    Please get the header files to work for you first to rule out all potential issues.

    There was some bug in older PSDK versions (8.5 if I remember correctly) for using the bin files.

  • Good Gang, That seem to solve my issue. Multiple frames solve it. 

    Also I will follow the header file process. Works for me. 

  • Thanks for the update and we will close this thread.