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.
Hi,
I'm debuging AR0220AT sensor and using PSDKR v7.2.0
I've removed DCC from sensor's feature list in driver.
When I use multi-cam in vision apps, I found that the AR0220AT 3072~3078 test registers are mapped to actual colors:
reg --> ouput R --> G GR --> B B --> G GB --> R
So I think there must be some where to modify vision app or driver 's parse order.
But where? VISS?
Thanks!
Hello Keelung,
Default CFA parameters are loaded in the function tivxVpacVissDefaultMapFlexCFAParams. If DCC is enabled, these parameters are overwritten. If you want to disable DCC, you can change CFA phase by changing FIR coefficients in flexcfa_cfa_0.txt
Regards,
Mayank
Hi Mayank,
I checked tivxVpacVissDefaultMapFlexCFAParams and flexcfa_cfa_0.txt, and found that I need a lot of work to figure out how FIR coefficients works, since I have no signals and systems backgroud. Could you list some materials to understanding the whole process flow? I notice that there is a document named "Understanding the DaVinci Preview Engine" metioned in https://e2e.ti.com/support/processors/f/791/t/6756, but it's very old, created in 2008 year. Do you have an updated version?
I'm confused with this comment DCC does not support CFA in tivxVpacVissDefaultMapFlexCFAParams(), could you explain it in details?
static void tivxVpacVissDefaultMapFlexCFAParams(tivxVpacVissObj *vissObj) { uint32_t cnt; Fcp_CfaConfig *cfaCfg; cfaCfg = &vissObj->vissCfg.cfaCfg; if (NULL != vissObj) { /* DCC does not support CFA, so using default config from * example_Sensor/0/0/flexCFA_cfg test case */ for (cnt = 0u; cnt < FCP_MAX_COLOR_COMP; cnt ++) { cfaCfg->bypass[cnt] = (uint32_t)FALSE; }
And another question: since AR0820 in RCCB has supported in PSDKR 7.x, and RCCB is not a bayer pattern defined in sensor_properties.txt, so how RCCB works with DCC and BAYER_PATTERN ?
I'm also confused. Do we need such hard / deep work to just change a CFA mapping? Can Ti vision team supply an API to do this common / essential / generic function to rescue users from FIR coefficients? FIR coefficients is not a friendly UI/API for users, even if many of users are programmer.
I tried to enable DCC, and modify BAYER_PATTERN values in tools/default_DCC_profile_gen/configs/ar0820_properties.txt ( I use AR0820 as my debugging base code), and then re-generate dcc_bins by python & shell tools. I tried BAYER_PATTERN 0/1/2/3, but the display have no changing both on sensor stream and pattern output.
I also tried changing AR0220 PIXEL_ORDER in READ_MODE register, and all of values combined to BAYER_PATTERN, 4*4=16 trying. But still no any changing on display. Here is my register settings of AR0220 to test. Appreciated if you and anyone can help me with colorful output of AR0220.
#define AR0220_PATTERN_CONFIG_SIZE (13) I2cParams ar0220PatternConfig[AR0220_PATTERN_CONFIG_SIZE] = { {0x301A, 0x0018, 500}, // RESET_REGISTER {0x3004, 4, 0x01}, // X_ADDR_START_ {0x3002, 4, 0x01}, // Y_ADDR_START_ {0x3008, 1823, 0x01}, // X_ADDR_END_ {0x3006, 943, 0x01}, // Y_ADDR_END_ {0x300A, 996, 1}, // FRAME_LENGTH_LINES_ {0x300C, 1864, 1}, // LINE_LENGTH_PCK_ // {0x3024, 0x0003, 0x01}, // PIXEL_ORDER_ // The value in this register changes as a function of R0x3040[1:0] {0x3040, 0x0003, 0x01}, // READ_MODE // 00 = First row is GreenR/Red, first pixel is GreenR // 01 = First row is GreenR/Red, first pixel is Red // 02 = First row is Blue/GreenB, first pixel is Blue // 03 = First row is Blue/GreenB, first pixel is GreenB {0x3070, 0x0001, 1}, // 1: Solid color test pattern, // 2: Full color bar test pattern, // 3: Fade to grey color bar test pattern, //256: Walking 1 test pattern (12 bit) {0x3072, 0x0000, 1}, // R --> G {0x3074, 0x0000, 1}, // G(GR row) --> B {0x3076, 0x0000, 1}, // B --> G {0x3078, 0x0FFF, 1}, // G(GB row) --> R // {0x31AE, 0x0204, 0x01}, // SERIAL_FORMAT // {0x31AC, 0x0C0C, 0x01}, // DATA_FORMAT_BITS // {0x301A, 0x001C, 500}, // RESET_REGISTER };
I notice that there is a CFA_TYPE register in AR0220, as metioned in https://e2e.ti.com/support/processors/f/791/t/698666, but I can't found it in AR0220 Register Reference in version of August, 2020 − Rev. 4
I know I can contact with onsemi supporter, and I'm trying.
Anyway, Thanks for your helpful info for CFA mapping.
The comment "DCC does not support CFA" is old and not correct anymore.
Generating CFA parameters manually is not easy. I strongly recommend using DCC.
Hi Mangla,
I changed sensor's output order to meet default CFA in tiovx, then the sensor's color bar works as expected without enabling DCC, see picture at left-top.
But the colors are missing once DCC enabled. Here are my steps:
1.Changing WIDTH and HEIGHT from 3840x2160 to 1820x940 in tools/default_DCC_profile_gen/configs/ar0820_properties.txt
2. generate dcc xmls and then bins
3. make imaging && make sdk
Hello Keelung,
To get correct colors you will need to generate tuned DCC XML files for your sensor through tuning tool.
Regards,
Mayank