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.

RTOS/TDA3: 12bit Gray Sensor Setting

Part Number: TDA3

Tool/software: TI-RTOS

Hi

I am in the same usecases using gray 12bit sensor for captureing and displaying.

I tried your recommendation like the follow:

2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
    pInstPrm->videoIfMode   =   SYSTEM_VIFM_SCH_DS_HSYNC_VSYNC;
pInstPrm->videoIfWidth  =   SYSTEM_VIFW_16BIT;   pInstPrm->bufCaptMode   =   SYSTEM_CAPT_BCM_FRM_DROP;
pInstPrm->numStream     =   1;
pInprms->width      =   captureInWidth;
pInprms->height     =   captureInHeight;
pInprms->dataFormat =   SYSTEM_DF_RAW16;
pInprms->scanFormat =   SYSTEM_SF_PROGRESSIVE;
pOutprms->width         =   captureOutWidth;
pOutprms->height        =   captureOutHeight;
pOutprms->dataFormat    =   SYSTEM_DF_RAW16;
pOutprms->maxWidth      =   pOutprms->width;
pOutprms->maxHeight     =   pOutprms->height;
pPortCfg->syncType          =   SYSTEM_VIP_SYNC_TYPE_DIS_SINGLE_YUV;
pPortCfg->ancCropEnable     =   FALSE;
pPortCfg->intfCfg.clipActive    =   FALSE;
pPortCfg->intfCfg.clipBlank     =   FALSE;
pPortCfg->intfCfg.intfWidth     =   SYSTEM_VIFW_16BIT;

but I had some error without capturing and displaying.

[IPU1-0]     43.969377 s:
[IPU1-0]     43.974653 s:  CAPTURE: Create in progress !!!
[IPU1-0]     43.974958 s:  CAPTURE: VIP1 Slice0 PortA capture mode is [16-bit] !!!
[IPU1-0]     43.975812 s:  SYSTEM: WARNING: Memory address out of bounds (0x82ff0400, 153600 B). Memory region is [ 0x82f7fc00, 576000 B ] !!!
[IPU1-0]     43.975995 s:  SYSTEM: WARNING: Memory address out of bounds (0x83015c00, 153600 B). Memory region is [ 0x82f7fc00, 576000 B ] !!!
[IPU1-0]     43.976331 s:  CAPTURE: Insuffcient memory provided by user !!!
[IPU1-0]     43.976453 s:  CAPTURE: Memory requirement is 768000 bytes.
[IPU1-0]     43.976514 s:  CAPTURE: Memory provided by user is 576000 bytes.
[IPU1-0]     43.976605 s:  CAPTURE: Additional Memory required is 192000 bytes.
[IPU1-0]     43.976697 s:  CAPTURE: ERROR: Cannot continue execution !!!
[IPU1-0]     43.976758 s:  Assertion @ Line: 1779 in system_common.c: (Bool)0U : failed !!!
[IPU1-0]     43.977154 s:  Assertion @ Line: 1779 in system_common.c: (Bool)0U : failed !!!

The difference between your code and default code are only pInstPrm->videoIfWidth, pInprms->dataFormat, and pOutprms->dataFormat.

So I tried several tests changing the values.

The results are like the below. Image Resolution is set to 320x240.

pInstPrm->videoIfWidth pInprms->dataFormat pOutprms->dataFormat Result
SYSTEM_VIFW_8BIT SYSTEM_DF_YUV422P SYSTEM_DF_YUV420SP_UV OK
    SYSTEM_DF_YUV422I_UYVY [IPU1-0]     44.972579 s:  CAPTURE: VIP1 Slice0 PortA capture mode is [ 8-bit] !!!
[IPU1-0]     54.326541 s: 
CAPTURE: Memory requirement is 768000 bytes.
[IPU1-0]     54.326602 s: 
CAPTURE: Memory provided by user is 576000 bytes.
[IPU1-0]     54.326694 s:  CAPTURE: Additional Memory required is 192000 bytes.
    SYSTEM_DF_YUV422SP_UV [IPU1-0]     74.361922 s:  CAPTURE: VIP1 Slice0 PortA capture mode is [ 8-bit] !!!
[IPU1-0]     74.363173 s: 
CAPTURE: Memory requirement is 384000 bytes.
[IPU1-0]     74.363264 s: 
CAPTURE: Memory provided by user is 576000 bytes.
[IPU1-0]     74.363356 s:  CAPTURE: Unused Memory is 192000 bytes.
    SYSTEM_DF_YUV420SP_VU [IPU1-0]     80.699048 s:  CAPTURE: VIP1 Slice0 PortA capture mode is [ 8-bit] !!!
[IPU1-0]     80.700207 s: 
CAPTURE: Memory requirement is 384000 bytes.
[IPU1-0]     80.700329 s: 
CAPTURE: Memory provided by user is 576000 bytes.
[IPU1-0]     80.700390 s:  CAPTURE: Unused Memory is 192000 bytes.
    SYSTEM_DF_YUV420P [IPU1-0]     31.385835 s:  CAPTURE: Memory requirement is 1536000 bytes.
[IPU1-0]     31.385926 s: 
CAPTURE: Memory provided by user is 576000 bytes.
[IPU1-0]     31.385987 s:  CAPTURE: Additional Memory required is 960000 bytes.
    SYSTEM_DF_RAW16 [IPU1-0]     20.233575 s:  CAPTURE: Memory requirement is 1536000 bytes.
[IPU1-0]     20.233666 s: 
CAPTURE: Memory provided by user is 576000 bytes.
[IPU1-0]     20.233727 s:  CAPTURE: Additional Memory required is 960000 bytes.
SYSTEM_VIFW_8BIT SYSTEM_DF_RAW16 SYSTEM_DF_YUV420SP_UV No Image Out, No Capture
  SYSTEM_DF_RGB16_565 SYSTEM_DF_YUV420SP_UV OK but color changed
  SYSTEM_DF_RGB16_565 SYSTEM_DF_RGB16_565 [IPU1-0]     26.043097 s:  CAPTURE: Memory requirement is 1536000 bytes.
[IPU1-0]     26.043189 s: 
CAPTURE: Memory provided by user is 576000 bytes.
[IPU1-0]     26.043250 s:  CAPTURE: Additional Memory required is 960000 bytes.
  SYSTEM_DF_RAW16 SYSTEM_DF_RAW16 [IPU1-0]     16.130299 s:  CAPTURE: Memory requirement is 1536000 bytes.
[IPU1-0]     16.130391 s: 
CAPTURE: Memory provided by user is 576000 bytes.
[IPU1-0]     16.130452 s:  CAPTURE: Additional Memory required is 960000 bytes.
SYSTEM_VIFW_16BIT SYSTEM_DF_RAW16 SYSTEM_DF_RAW16 [IPU1-0]     43.974958 s:  CAPTURE: VIP1 Slice0 PortA capture mode is [16-bit] !!!
[IPU1-0]     43.976453 s: 
CAPTURE: Memory requirement is 768000 bytes.
[IPU1-0]     43.976514 s: 
CAPTURE: Memory provided by user is 576000 bytes.
[IPU1-0]     43.976605 s:  CAPTURE: Additional Memory required is 192000 bytes.

Please analyse the results and let me know how to solve this please.

Thank you.

  • Hi Kevin,

    You need to make sure that the memSize and memAddr variables of the System_LinkMemAllocInfo of the VIP create args are set to 0..

    Rgds,

    Brijesh

  • Hi Brijesh,

    I'm sorry but could you let me know which file and which function I need to check??

    Kevin
  • Hi Kevin,

    Typically when you call CaptureLink_CreateParams_Init to initialize create parameters, it resets both of these variables. could you please check if you are setting them in your SetAppPrms callback in the usecase file?

    Rgds,
    Brijesh
  • Hi Brijesh,

    I modified the memsize bigger and there is no error about memory.
    But there is another error like the below..

    [IPU1-0] 19.600378 s: CAPTURE: Create in progress !!!
    [IPU1-0] 19.600683 s: CAPTURE: VIP1 Slice0 PortA capture mode is [ 8-bit] !!!
    [IPU1-0] 19.601811 s: CAPTURE: Create Done !!!
    [IPU1-0] 19.602086 s: IPC_OUT_0 : Create in progress !!!
    [IPU1-0] 19.602360 s: IPC_OUT_0 : Create Done !!!
    [IPU1-0] 19.603733 s: IPC_IN_0 : Create in progress !!!
    [IPU1-0] 19.604800 s: IPC_IN_0 : Create Done !!!
    [IPU1-0] 19.604983 s: DISPLAY: Create in progress !!!
    [IPU1-0] 19.605380 s: dispcore/src/vpscore_dss.c @ Line 1111:
    [IPU1-0] 19.605471 s: Un supported data format
    [IPU1-0] 19.605563 s: dispdrv/src/vpsdrv_displayCore.c @ Line 304:
    [IPU1-0] 19.605654 s: Set DSS parameter failed
    [IPU1-0] 19.605685 s: Assertion @ Line: 459 in displayLink_drv.c: status==SYSTEM_LINK_STATUS_SOK : failed !!!
    [IPU1-0] 19.606234 s: Assertion @ Line: 459 in displayLink_drv.c: status==SYSTEM_LINK_STATUS_SOK : failed !!!
    [DSP1 ] 19.602574 s: IPC_IN_0 : Create in progress !!!
    [DSP1 ] 19.603062 s: IPC_IN_0 : Create Done !!!
    [DSP1 ] 19.603245 s: ALGORITHM: Create in progress (algId = 39) !!!
    [DSP1 ] 19.603336 s: ALGORITHM: Create Done (algId = 39) !!!
    [DSP1 ] 19.603489 s: IPC_OUT_0 : Create in progress !!!
    [DSP1 ] 19.603611 s: IPC_OUT_0 : Create Done !!!

    Could you please find the reason why this kind of error occurs?
    Thank you very much.

    Kevin

    p.s. for reference, I set pOutprms->dataFormat as SYSTEM_DF_RAW16.
  • Hi Kevin,

    Are you trying to display RAW16 data on display?
    Please note that display does not support this format. Display supports only YUV and RGB formats.. It cannot display RAW formats..

    Rgds,
    Brijesh
  • Hi Brijesh,

    Thank you for quick answer.
    I got it.

    What I'd like to do is to get RAW16(actually gray 12bit) data from Sensor and process an image algorthm with RAW16(actually gray 12bit).
    I'm making use of ColorToGray Algorithm as a template of my algorithm.

    If I change "pInprms->dataFormat" as raw16, then it looks like capture doesn't work.
    And even though I set "pInprms->dataFormat" as YUV422P, the ColorToGray input data has YUV420SP_UV format.
    So I changed "pOutprms->dataFormat" in order to change the ColorToGray input data format, and some format works...

    Now could you guide me how to change the sensor input format and how to get the sensor data in algorithm process function without any format changing, please?

    Thank you very much.
    Kevin
  • Hi Kevin,

    I am sorry , i could not get the problem. Are you trying to change VIP capture output format? VIP supports RAW12 bit capture and also RAW16 bit capture..
    I see in the above log that you are using VIP in 8bit mode. For both of these modes, VIP requires to be opened 16bit mode..
    VIP1 Slice0 PortA capture mode is [ 8-bit] !!!

    If color2Grey does not support RAW data, you require to change it.

    Regards,
    Brijesh

  • Hi Brijesh,

    Kevin is my customer and please don't care about the log in above.

    When he changed to 16bit RAW as below,

    pInstPrm->videoIfWidth = SYSTEM_VIFW_16BIT;
    pInprms->dataFormat = SYSTEM_DF_RAW16 ;
    pOutprms->dataFormat = SYSTEM_DF_RAW16 ;


    He got below log. He solved memory allocation error now thanks to your help, but the problem is he could not see any data when he set SYSTEM_DF_RAW16 in above.

    [IPU1-0] 43.974958 s: CAPTURE: VIP1 Slice0 PortA capture mode is [16-bit] !!!
    [IPU1-0] 43.976453 s: CAPTURE: Memory requirement is 768000 bytes.
    [IPU1-0] 43.976514 s: CAPTURE: Memory provided by user is 576000 bytes.
    [IPU1-0] 43.976605 s: CAPTURE: Additional Memory required is 192000 bytes.


    Could you please let me know what is the format of SYSYTEM_DF_RAW16? He is expecting it is luminance only.


    Thanks and Best Regards,
    SI.
  • Hi SI,

    But where do you check the captured frames? Do you dump them from the memory and verify them offline? or they are going to the display..
    Also how many data valid lines connected to the VIP? if it is 12bits, then VIP will store 12bit data in 16bit container, where upper 4bits (or lower 4bits, depending on which output format is used in VIP) are set to 0.
    Please note that display does not support RAW16 data format.. This needs to be converted into YUV or RGB format..

    Rgds,
    Brijesh
  • Brijesh,

    They connected only D0 ~ D11 in below.

    They build their usecase using usecase gen and their usecase is capture link -> algorithm link -> display link.

    in algorithm link, they modified 'color to gray' function we provided.

    When they set 'SYSTEM_DF_YUV422' and 8bit,  they found it works well and they also found algorithm link was called.

    But, when they changed parameters to 'SYSTEM_DF_RAW16'  and 16bit in above, it seemed the algorithm link was not called and they could not find any logs in the algorithm link.

    Thanks and Best Regards,

    SI.

  • Hi SI,

    Please note that there is a check in the ColorsToGrey algo link also does not support RAW16 bit format. There is a check in the link, which allows processing only for YUV422 and YUV420 formats.. This check is present in the AlgorithmLink_ColorToGrayProcess API.. It just asserts if the input data format is not YUV422 or YUV420. You would have to change it to support RAW 16bit input format..

    Rgds,
    Brijesh
  • Brijesh,

    Could you please let me know the condition which colorToGrayLink is called?

    e.g. is it called along with pInprms->dataFormat or pOutprms->dataFormat or else?

    They changed it as below.

    and they inserted printf() in the Alg_IrIspProcess() function as below.

    But, they could not find any printf() string when he changed parameters.

    pInstPrm->videoIfWidth = SYSTEM_VIFW_16BIT

    pInprms->dataFormat = SYSTEM_DF_RAW16

    pInprms->dataFormat = SYSTEM_DF_RGB16_565

     

    DSP1  ]     18.652351 s:  IPC_IN_0   : Create in progress !!!
    [DSP1  ]     18.652870 s:  IPC_IN_0   : Create Done !!!
    [DSP1  ]     18.653083 s:  ALGORITHM: Create in progress (algId = 39) !!!
    [DSP1  ]     18.653205 s:  ALGORITHM: Create Done (algId = 39) !!!
    [DSP1  ]     18.653358 s:  IPC_OUT_0   : Create in progress !!!
    [DSP1  ]     18.653480 s:  IPC_OUT_0   : Create Done !!!
    [DSP1  ]     18.926310 s:  SYSTEM: SW Message Box Msg Pool, Free Msg Count = 1023
    [DSP1  ]     18.926340 s:  SYSTEM: Heap = LOCAL_L2             @ 0x00800000, Total size = 227264 B (221 KB), Free size = 227264 B (221 KB)
    [DSP1  ]     18.926401 s:  SYSTEM: Heap = LOCAL_DDR            @ 0x00000000, Total size = 524288 B (512 KB), Free size = 521552 B (509 KB)

    But, with below parameters, they can find printf() string and output image.

    pInstPrm->videoIfWidth = SYSTEM_VIFW_16BIT

    pInprms->dataFormat = SYSTEM_DF_YUV422P

    pInprms->dataFormat =SYSTEM_DF_YUV420SP_UV

     

    [IPU1-0]     16.541389 s:  KEVIN: Fvid2_start
    [DSP1  ]     16.243549 s:  IPC_IN_0   : Create in progress !!!
    [DSP1  ]     16.244067 s:  IPC_IN_0   : Create Done !!!
    [DSP1  ]     16.244250 s:  ALGORITHM: Create in progress (algId = 39) !!!
    [DSP1  ]     16.244372 s:  ALGORITHM: Create Done (algId = 39) !!!
    [DSP1  ]     16.244555 s:  IPC_OUT_0   : Create in progress !!!
    [DSP1  ]     16.244647 s:  IPC_OUT_0   : Create Done !!!
    [DSP1  ]     16.517690 s:  SYSTEM: SW Message Box Msg Pool, Free Msg Count = 1023
    [DSP1  ]     16.517751 s:  SYSTEM: Heap = LOCAL_L2             @ 0x00800000, Total size = 227264 B (221 KB), Free size = 227264 B (221 KB)
    [DSP1  ]     16.517812 s:  SYSTEM: Heap = LOCAL_DDR            @ 0x00000000, Total size = 524288 B (512 KB), Free size = 521552 B (509 KB)
    [DSP1  ]     16.540840 s:  Kevin : Alg_IrIspProcess width : 320, height : 240
    [DSP1  ]     16.540901 s:  Kevin : Alg_IrIspProcess inPitch : 320,320,0
    [DSP1  ]     16.540932 s:  Kevin :
    Alg_IrIspProcess dataFormat : 7

    Thanks and Best Regards,

    SI.

    pInstPrm->videoIfWidth
    pInprms->dataFormat
    pOutprms->dataFormat

  • Hi SI,

    Lets first check if the capture itself is working. This API will not get called if the capture is not forwarding buffers..
    Can you please press 'p' on the console and check if capture is working at correct fps? If possible, please share the statistics..

    Rgds,
    Brijesh
  • Brijesh,

    I agree with you.

    Do you mean the statistics is the console output when press 'p', right?


    And could you please let me know which dataformat among input and output will be used in colorToGrayLink?

    As I said in above log,

    When my customer input below parameters,

    pInprms->dataFormat = SYSTEM_DF_YUV422P

    pOutprms->dataFormat =SYSTEM_DF_YUV420SP_UV(7)


    They found 'pOutprms->dataFormat' value was printed in the Alg_IrIspProcess() function as below.

    [DSP1 ] 16.540932 s: Kevin : Alg_IrIspProcess dataFormat : 7


    Thanks and Best Regards,
    SI.
  • Hi SI,

    Yes, when we press 'p', it prints link stats on UART console.
    ColorsToGrey was just supporting YUV422/YUV420 to Luma output.
    Now for you, since it is working for YUV420, i think there is some issue in capturing RAW16 data..

    Rgds,
    Brijesh
  • Hi Brijesh,

    Please check below statistic log. it seemed the capture was not worked.

    input parameters are as below.

    pInstPrm->videoIfWidth = SYSTEM_VIFW_16BIT

    pInprms->dataFormat = SYSTEM_DF_RAW16

    pOutprms->dataFormat = SYSTEM_DF_YUV420SP_UV

    [IPU1-0]     33.676386 s:
    [IPU1-0]     33.676447 s:  CPU [IPU1-0 ] Statistics,
    [IPU1-0]     33.676508 s:  *************************
    [IPU1-0]     33.676569 s:
    [IPU1-0]     33.676630 s:  LOAD: CPU: 7.3% HWI: 0.7%, SWI:0.3%, Low Power: 0.0%
    [IPU1-0]     33.676752 s:
    [IPU1-0]     33.676935 s:  LOAD: TSK: GrpxSrc0            : 3.5%
    [IPU1-0]     33.677026 s:  LOAD: TSK: STAT_COLL           : 2.1%
    [IPU1-0]     33.677118 s:  LOAD: TSK: MISC                : 0.7%
    [IPU1-0]     33.677209 s:
    [IPU1-0]     33.677240 s:  SYSTEM: SW Message Box Msg Pool, Free Msg Count = 1022
    [IPU1-0]     33.677331 s:
    [IPU1-0]     33.677392 s:  SYSTEM: Sempahores Objects,  141 of 1050 free
    [IPU1-0]     33.677484 s:  SYSTEM: Task Objects      ,   13 of  100 free
    [IPU1-0]     33.677545 s:  SYSTEM: Clock Objects     ,   95 of  100 free
    [IPU1-0]     33.677636 s:  SYSTEM: Hwi Objects       ,   87 of  100 free
    [IPU1-0]     33.677728 s:
    [IPU1-0]     33.677758 s:  SYSTEM: Heap = LOCAL_DDR            @ 0x00000000, Total size = 262144 B (256 KB), Free size = 256608 B (250 KB)
    [IPU1-0]     33.677911 s:  SYSTEM: Heap = SR_OCMC              @ 0x00000000, Total size = 0 B (0 KB), Free size = 0 B (0 KB)
    [IPU1-0]     33.678063 s:  SYSTEM: Heap = SR_DDR_CACHED        @ 0x82f7fc00, Total size = 77594624 B (74 MB), Free size = 75367424 B (71 MB)
    [IPU1-0]     33.678216 s:  SYSTEM: Heap = SR_DDR_NON_CACHED    @ 0xa7e00000, Total size = 916096 B (0 MB), Free size = 915328 B (0 MB)
    [IPU1-0]     33.678490 s:
    [IPU1-0]     33.678551 s:
    [IPU1-0]     33.678582 s:  CPU [DSP1   ] Statistics,
    [IPU1-0]     33.678643 s:  *************************
    [IPU1-0]     33.678704 s:
    [IPU1-0]     33.678765 s:  LOAD: CPU: 0.4% HWI: 0.1%, SWI:0.1%, Low Power: 0.0%
    [IPU1-0]     33.678887 s:
    [IPU1-0]     33.678948 s:  LOAD: TSK: MISC                : 0.2%
    [IPU1-0]     33.679039 s:
    [IPU1-0]     33.679070 s:  SYSTEM: SW Message Box Msg Pool, Free Msg Count = 1022
    [IPU1-0]     33.679161 s:
    [IPU1-0]     33.679192 s:  SYSTEM: Sempahores Objects,  455 of 1050 free
    [IPU1-0]     33.679283 s:  SYSTEM: Task Objects      ,   92 of  100 free
    [IPU1-0]     33.679344 s:  SYSTEM: Clock Objects     ,   97 of  100 free
    [IPU1-0]     33.679466 s:  SYSTEM: Hwi Objects       ,  100 of  100 free
    [IPU1-0]     33.679527 s:
    [IPU1-0]     33.679588 s:  SYSTEM: Heap = LOCAL_L2             @ 0x00800000, Total size = 227264 B (221 KB), Free size = 227264 B (221 KB)
    [IPU1-0]     33.679741 s:  SYSTEM: Heap = LOCAL_DDR            @ 0x00000000, Total size = 524288 B (512 KB), Free size = 521552 B (509 KB)
    [IPU1-0]     33.679893 s:
    [IPU1-0]     33.679985 s:
    [IPU1-0]     33.680046 s:  UTILS_PRCM_STATS:  Current Temperature,
    [IPU1-0]     33.680137 s:
    [IPU1-0]     33.680168 s:   Voltage Rail         ||   Curr Temp Min - Max
    [IPU1-0]     33.680259 s:  ---------------------------------------------------------
    [IPU1-0]     33.680351 s:     PMHAL_PRCM_VD_CORE ||     [48.800 , 49.200]
    [IPU1-0]     33.680473 s:
    [IPU1-0]     34.679466 s:
    [IPU1-0]     34.679527 s:  Statistics Collector,
    [IPU1-0]     34.679588 s:
    [IPU1-0]     34.679619 s:        STATISTIC          Avg Data        Peak Data
    [IPU1-0]     34.679710 s:        COLLECTOR          MB/s            MB/s
    [IPU1-0]     34.679771 s:  --------------------------------------------------
    [IPU1-0]     34.679863 s:  SCI_EMIF_SYS         |     23.502207     48.642799
    [IPU1-0]     34.679985 s:  SCI_IPU              |      3.813192     12.385445
    [IPU1-0]     34.680076 s:  SCI_DSP1_MDMA        |      6.014773     22.057119
    [IPU1-0]     34.680168 s:  SCI_DSP2_MDMA        |      0.000000      0.000000
    [IPU1-0]     34.680290 s:  SCI_DSS              |     20.671429     25.087691
    [IPU1-0]     34.680381 s:  SCI_MMU              |      0.000000      0.000000
    [IPU1-0]     34.680503 s:  SCI_EDMA_TC0_RD      |      0.000000      0.000000
    [IPU1-0]     34.680595 s:  SCI_EDMA_TC0_WR      |      0.000000      0.000000
    [IPU1-0]     34.680717 s:  SCI_VIP_P1           |      0.000000      0.000000
    [IPU1-0]     34.680808 s:  SCI_VIP_P2           |      0.000000      0.000000
    [IPU1-0]     34.680900 s:  SCI_ISS_RT           |      0.000000      0.000000
    [IPU1-0]     34.680991 s:  SCI_ISS_NRT2         |      0.000000      0.000000
    [IPU1-0]     34.681083 s:  SCI_EVE_P1           |      0.000000      0.000000
    [IPU1-0]     34.681205 s:  SCI_EVE_P2           |      0.000000      0.000000
    [IPU1-0]     34.681327 s:  SCI_GMAC_SW          |      0.000000      0.000000
    [IPU1-0]     34.681418 s:  SCI_ISS_NRT1         |      0.000000      0.000000
    [IPU1-0]     34.681540 s:  SCI_DSP2_CFG         |      0.000000      0.000000
    [IPU1-0]     34.681632 s:  SCI_DSP2_EDMA        |      0.000000      0.000000
    [IPU1-0]     34.681723 s:  SCI_OCMC_RAM         |      0.000000      0.000000
    [IPU1-0]     34.681815 s:  SCI_DSP1_CFG         |      0.000000      0.000000
    [IPU1-0]     34.681998 s:  SCI_DSP1_EDMA        |      0.000000      0.000000
    [IPU1-0]     34.682089 s:  SCI_GPMC             |      0.000000      0.000000
    [IPU1-0]     34.682211 s:  SCI_MCASP            |      0.000000      0.000000
    [IPU1-0]     34.682303 s:  SCI_EDMA_TC1_RD      |      0.000000      0.000000
    [IPU1-0]     34.682425 s:  SCI_EDMA_TC1_WR      |      0.000000      0.000000
    [IPU1-0]     34.852437 s:
    [IPU1-0]     34.852498 s:
    [IPU1-0]     34.852589 s:
    [IPU1-0]     34.852620 s:  ### CPU [IPU1-0], LinkID [ 70],
    [IPU1-0]     34.852711 s:
    [IPU1-0]     34.852742 s:  [ CAPTURE ] Link Statistics,
    [IPU1-0]     34.852803 s:  ******************************
    [IPU1-0]     34.852864 s:
    [IPU1-0]     34.852925 s:  Elapsed time       = 19973 msec
    [IPU1-0]     34.852986 s:
    [IPU1-0]     34.853016 s:
    [IPU1-0]     34.853047 s:  Input Statistics,
    [IPU1-0]     34.853108 s:
    [IPU1-0]     34.853138 s:  CH | In Recv | In Drop | In User Drop | In Process
    [IPU1-0]     34.853230 s:     | FPS     | FPS     | FPS          | FPS
    [IPU1-0]     34.853291 s:  --------------------------------------------------
    [IPU1-0]     34.853382 s:
    [IPU1-0]     34.853565 s:  Output Statistics,
    [IPU1-0]     34.853596 s:
    [IPU1-0]     34.853657 s:  CH | Out | Out     | Out Drop | Out User Drop
    [IPU1-0]     34.853718 s:     | ID  | FPS     | FPS      | FPS
    [IPU1-0]     34.853779 s:  ---------------------------------------------
    [IPU1-0]     34.853870 s:
    [IPU1-0]     34.853931 s:  [ CAPTURE ] LATENCY,
    [IPU1-0]     34.853962 s:  ********************
    [IPU1-0]     34.854023 s:
    [IPU1-0]     34.854145 s:
    [IPU1-0]     34.854175 s:  ### CPU [IPU1-0], LinkID [  0],
    [IPU1-0]     34.854236 s:
    [IPU1-0]     34.854297 s:  [ IPC_OUT_0 ] Link Statistics,
    [IPU1-0]     34.854358 s:  ******************************
    [IPU1-0]     34.854419 s:
    [IPU1-0]     34.854480 s:  Elapsed time       = 19974 msec
    [IPU1-0]     34.854541 s:
    [IPU1-0]     34.854572 s:  Driver/Notify Cb   =  32.84 fps
    [IPU1-0]     34.854663 s:
    [IPU1-0]     34.854694 s:  Input Statistics,
    [IPU1-0]     34.854755 s:
    [IPU1-0]     34.854785 s:  CH | In Recv | In Drop | In User Drop | In Process
    [IPU1-0]     34.854846 s:     | FPS     | FPS     | FPS          | FPS
    [IPU1-0]     34.854938 s:  --------------------------------------------------
    [IPU1-0]     34.854999 s:
    [IPU1-0]     34.855060 s:  Output Statistics,
    [IPU1-0]     34.855090 s:
    [IPU1-0]     34.855121 s:  CH | Out | Out     | Out Drop | Out User Drop
    [IPU1-0]     34.855212 s:     | ID  | FPS     | FPS      | FPS
    [IPU1-0]     34.855273 s:  ---------------------------------------------
    [IPU1-0]     34.855365 s:
    [IPU1-0]     34.855426 s:  [ IPC_OUT_0 ] LATENCY,
    [IPU1-0]     34.855456 s:  ********************
    [IPU1-0]     34.855517 s:
    [IPU1-0]     35.355517 s:
    [IPU1-0]     35.355578 s:  ### CPU [  DSP1], LinkID [ 10],
    [IPU1-0]     35.355639 s:
    [IPU1-0]     35.355670 s:  [ IPC_IN_0 ] Link Statistics,
    [IPU1-0]     35.355761 s:  ******************************
    [IPU1-0]     35.355822 s:
    [IPU1-0]     35.355853 s:  Elapsed time       = 20474 msec
    [IPU1-0]     35.355914 s:
    [IPU1-0]     35.355944 s:  Driver/Notify Cb   =  32.82 fps
    [IPU1-0]     35.356036 s:
    [IPU1-0]     35.356066 s:  Input Statistics,
    [IPU1-0]     35.356127 s:
    [IPU1-0]     35.356158 s:  CH | In Recv | In Drop | In User Drop | In Process
    [IPU1-0]     35.356219 s:     | FPS     | FPS     | FPS          | FPS
    [IPU1-0]     35.356310 s:  --------------------------------------------------
    [IPU1-0]     35.356371 s:
    [IPU1-0]     35.356432 s:  Output Statistics,
    [IPU1-0]     35.356493 s:
    [IPU1-0]     35.356524 s:  CH | Out | Out     | Out Drop | Out User Drop
    [IPU1-0]     35.356615 s:     | ID  | FPS     | FPS      | FPS
    [IPU1-0]     35.356676 s:  ---------------------------------------------
    [IPU1-0]     35.356768 s:
    [IPU1-0]     35.356798 s:  [ IPC_IN_0 ] LATENCY,
    [IPU1-0]     35.356859 s:  ********************
    [IPU1-0]     35.356920 s:
    [IPU1-0]     35.357012 s:
    [IPU1-0]     35.357042 s:  ### CPU [  DSP1], LinkID [ 49],
    [IPU1-0]     35.357134 s:
    [IPU1-0]     35.357164 s:  [ ALG_COLORTOGRAY ] Link Statistics,
    [IPU1-0]     35.357225 s:  ******************************
    [IPU1-0]     35.357286 s:
    [IPU1-0]     35.357347 s:  Elapsed time       = 20476 msec
    [IPU1-0]     35.357408 s:
    [IPU1-0]     35.357439 s:
    [IPU1-0]     35.357500 s:  Input Statistics,
    [IPU1-0]     35.357530 s:
    [IPU1-0]     35.357591 s:  CH | In Recv | In Drop | In User Drop | In Process
    [IPU1-0]     35.357652 s:     | FPS     | FPS     | FPS          | FPS
    [IPU1-0]     35.357744 s:  --------------------------------------------------
    [IPU1-0]     35.357805 s:
    [IPU1-0]     35.357835 s:  Output Statistics,
    [IPU1-0]     35.357896 s:
    [IPU1-0]     35.357927 s:  CH | Out | Out     | Out Drop | Out User Drop
    [IPU1-0]     35.358018 s:     | ID  | FPS     | FPS      | FPS
    [IPU1-0]     35.358079 s:  ---------------------------------------------
    [IPU1-0]     35.358171 s:
    [IPU1-0]     35.358201 s:  [ ALG_COLORTOGRAY ] LATENCY,
    [IPU1-0]     35.358262 s:  ********************
    [IPU1-0]     35.358323 s:
    [IPU1-0]     35.358537 s:
    [IPU1-0]     35.358567 s:  ### CPU [  DSP1], LinkID [  0],
    [IPU1-0]     35.358659 s:
    [IPU1-0]     35.358689 s:  [ IPC_OUT_0 ] Link Statistics,
    [IPU1-0]     35.358750 s:  ******************************
    [IPU1-0]     35.358811 s:
    [IPU1-0]     35.358842 s:  Elapsed time       = 20476 msec
    [IPU1-0]     35.358903 s:
    [IPU1-0]     35.358964 s:  Driver/Notify Cb   =  32.81 fps
    [IPU1-0]     35.359025 s:
    [IPU1-0]     35.359055 s:  Input Statistics,
    [IPU1-0]     35.359116 s:
    [IPU1-0]     35.359147 s:  CH | In Recv | In Drop | In User Drop | In Process
    [IPU1-0]     35.359238 s:     | FPS     | FPS     | FPS          | FPS
    [IPU1-0]     35.359299 s:  --------------------------------------------------
    [IPU1-0]     35.359391 s:
    [IPU1-0]     35.359452 s:  Output Statistics,
    [IPU1-0]     35.359482 s:
    [IPU1-0]     35.359543 s:  CH | Out | Out     | Out Drop | Out User Drop
    [IPU1-0]     35.359604 s:     | ID  | FPS     | FPS      | FPS
    [IPU1-0]     35.359665 s:  ---------------------------------------------
    [IPU1-0]     35.359757 s:
    [IPU1-0]     35.359787 s:  [ IPC_OUT_0 ] LATENCY,
    [IPU1-0]     35.359848 s:  ********************
    [IPU1-0]     35.359909 s:
    [IPU1-0]     35.859513 s:
    [IPU1-0]     35.859574 s:  ### CPU [IPU1-0], LinkID [ 10],
    [IPU1-0]     35.859665 s:
    [IPU1-0]     35.859696 s:  [ IPC_IN_0 ] Link Statistics,
    [IPU1-0]     35.859757 s:  ******************************
    [IPU1-0]     35.859818 s:
    [IPU1-0]     35.859848 s:  Elapsed time       = 20976 msec
    [IPU1-0]     35.859909 s:
    [IPU1-0]     35.859970 s:  Driver/Notify Cb   =  32.84 fps
    [IPU1-0]     35.860031 s:
    [IPU1-0]     35.860062 s:  Input Statistics,
    [IPU1-0]     35.860123 s:
    [IPU1-0]     35.860153 s:  CH | In Recv | In Drop | In User Drop | In Process
    [IPU1-0]     35.860245 s:     | FPS     | FPS     | FPS          | FPS
    [IPU1-0]     35.860306 s:  --------------------------------------------------
    [IPU1-0]     35.860397 s:
    [IPU1-0]     35.860458 s:  Output Statistics,
    [IPU1-0]     35.860519 s:
    [IPU1-0]     35.860550 s:  CH | Out | Out     | Out Drop | Out User Drop
    [IPU1-0]     35.860611 s:     | ID  | FPS     | FPS      | FPS
    [IPU1-0]     35.860702 s:  ---------------------------------------------
    [IPU1-0]     35.860763 s:
    [IPU1-0]     35.860824 s:  [ IPC_IN_0 ] LATENCY,
    [IPU1-0]     35.860885 s:  ********************
    [IPU1-0]     35.860916 s:
    [IPU1-0]     35.861038 s:
    [IPU1-0]     35.861068 s:  ### CPU [IPU1-0], LinkID [ 73],
    [IPU1-0]     35.861129 s:
    [IPU1-0]     35.861190 s:  [ DISPLAY ] Link Statistics,
    [IPU1-0]     35.861251 s:  ******************************
    [IPU1-0]     35.861312 s:
    [IPU1-0]     35.861343 s:  Elapsed time       = 20977 msec
    [IPU1-0]     35.861404 s:
    [IPU1-0]     35.861465 s:
    [IPU1-0]     35.861495 s:  Input Statistics,
    [IPU1-0]     35.861556 s:
    [IPU1-0]     35.861587 s:  CH | In Recv | In Drop | In User Drop | In Process
    [IPU1-0]     35.861648 s:     | FPS     | FPS     | FPS          | FPS
    [IPU1-0]     35.861739 s:  --------------------------------------------------
    [IPU1-0]     35.861800 s:
    [IPU1-0]     35.861861 s:  Output Statistics,
    [IPU1-0]     35.861892 s:
    [IPU1-0]     35.861953 s:  CH | Out | Out     | Out Drop | Out User Drop
    [IPU1-0]     35.862014 s:     | ID  | FPS     | FPS      | FPS
    [IPU1-0]     35.862075 s:  ---------------------------------------------
    [IPU1-0]     35.862166 s:
    [IPU1-0]     35.862197 s:  [ DISPLAY ] LATENCY,
    [IPU1-0]     35.862258 s:  ********************
    [IPU1-0]     35.862319 s:
    [IPU1-0]     35.862349 s:  Display UnderFlow Count = 0
    [IPU1-0]     35.862410 s:
    [IPU1-0]     35.862471 s:  CPU [  IPU1-0], LinkID [ 23], Link Statistics not available !
    [IPU1-0]     35.862624 s:
    [IPU1-0]     35.862685 s:  ### CPU [IPU1-0], LinkID [ 74],
    [IPU1-0]     35.862746 s:
    [IPU1-0]     35.862776 s:  [ DISPLAY ] Link Statistics,
    [IPU1-0]     35.862837 s:  ******************************
    [IPU1-0]     35.862898 s:
    [IPU1-0]     35.862929 s:  Elapsed time       = 20693 msec
    [IPU1-0]     35.863020 s:
    [IPU1-0]     35.863051 s:  Driver/Notify Cb   =  29.96 fps
    [IPU1-0]     35.863112 s:
    [IPU1-0]     35.863173 s:  Input Statistics,
    [IPU1-0]     35.863203 s:
    [IPU1-0]     35.863234 s:  CH | In Recv | In Drop | In User Drop | In Process
    [IPU1-0]     35.863325 s:     | FPS     | FPS     | FPS          | FPS
    [IPU1-0]     35.863386 s:  --------------------------------------------------
    [IPU1-0]     35.863600 s:   0 |   0. 4      0. 0      0. 0           0. 4
    [IPU1-0]     35.863722 s:
    [IPU1-0]     35.863752 s:  [ DISPLAY ] LATENCY,
    [IPU1-0]     35.863813 s:  ********************
    [IPU1-0]     35.863874 s:  Local Link Latency     : Avg =     61 us, Min =     61 us, Max =     61 us,
    [IPU1-0]     35.863996 s:  Source to Link Latency : Avg =  18240 us, Min =  18240 us, Max =  18240 us,
    [IPU1-0]     35.864118 s:
    [IPU1-0]     35.864149 s:  Display UnderFlow Count = 0
    [IPU1-0]     35.864210 s:
    [IPU1-0]     36.363539 s:

    Thanks and Best Regards,

    SI.

  • Hi SI,

    Definitely, capture is not working in this case. There is no driver callback for the capture, which means VIP is not detecting any input frame. 

    Whereas this was working fine for the YUV format. There seems to be some issue in the VIP config.

    Could you please dump VIP registers and share them? Lets first check if VIP is configured correctly and is able to detect input frames. 

    Rgds,

    Brijesh

  • Bijesh,

    Could you please check below VIP registers dump from 0x48970000 memory region?

    MemoryMap_48970000.dat

    Thanks and Best Regards,

    SI.

  • Hi SI,

    This does not seem to have VIP Port registers, could you check and share again?

    Rgds,
    Brijesh
  • Brijesh,

    I'm sorry that I could not understand which registers you mentioned.

    In the TRM of TDA3, I can find only below for VIP Port registers, and it was dumped from 0x4897 0000.

    Could you please let me know which region you need to see?

    Thanks and Best Regards,

    SI.

  • Hi SI,

    Please share the Parser registers of the slice that you are using..

    Rgds,
    Brijesh
  • Brijesh,

    Please check below memory dump file.

    MemoryMap_48975500.dat

    I found SYNC_TYPE of VIP_PORT_A is 4 = discrete sync single 4:2:2 YUV stream. Do you think this is right for 16bit Raw stream input?

    Could you please let me know where my customer can modify this value?

    Could you please check other values as well?

    Thanks and Best Regards,

    SI.

  • Hi SI,

    VIP capture is definitely not capturing any thing. I see that
    - VIP is configured for single 8bit input port
    - HS, VS and DE signals are configured for active high
    - Size register is reporting 0x0 size, which means no activity on hs/vs/de input pins..

    Could you please check if sensor is connected to VIP over discrete sync interface or embedded sync interface?
    When this is working for YUV input, what is the input interface that you are using?

    Rgds,
    Brijesh
  • Hi Brijesh,

    I modified the file named "Chains_common_vision.c" like the below.

                pInstPrm->videoIfMode   =   SYSTEM_VIFM_SCH_DS_HSYNC_VSYNC;
                pInstPrm->videoIfWidth  =   SYSTEM_VIFW_16BIT;  
                pInstPrm->bufCaptMode   =   SYSTEM_CAPT_BCM_FRM_DROP;
                pInstPrm->numStream     =   1;
           
                pInprms->width      =   captureInWidth;
                pInprms->height     =   captureInHeight;
                pInprms->dataFormat =   SYSTEM_DF_RAW16;
                pInprms->scanFormat =   SYSTEM_SF_PROGRESSIVE;

                pOutprms = &pInstPrm->outParams[streamId];
                pOutprms->width         =   captureOutWidth;
                pOutprms->height        =   captureOutHeight;
                pOutprms->dataFormat    =   SYSTEM_DF_YUV420SP_UV;
                pOutprms->maxWidth      =   pOutprms->width;
                pOutprms->maxHeight     =   pOutprms->height;

    I am using 12bit parallel Interface with 12bit gray image - that is a thermal camera sensor.

    This sensor outputs data on active high of HS, VS and DE.

    But the symptom is the same when I tested with OV10635.

    Do I have to modify other parts?

    The folowings are the results that I tested with other values.

    pInstPrm->videoIfWidth pInprms->dataFormat pOutprms->dataFormat Result
    SYSTEM_VIFW_16BIT SYSTEM_DF_YUV422P SYSTEM_DF_RGB16_565 No Image
    SYSTEM_VIFW_16BIT SYSTEM_DF_YUV422P SYSTEM_DF_YUV420SP_UV OK
    SYSTEM_VIFW_16BIT SYSTEM_DF_RAW16 SYSTEM_DF_RGB16_565 No Image
    SYSTEM_VIFW_16BIT SYSTEM_DF_YUV422P SYSTEM_DF_YUV422I_UYVY OK
    SYSTEM_VIFW_16BIT SYSTEM_DF_YUV422P SYSTEM_DF_YUV422I_YUYV OK
    SYSTEM_VIFW_16BIT SYSTEM_DF_RAW16 SYSTEM_DF_YUV420SP_UV No Image
    SYSTEM_VIFW_16BIT SYSTEM_DF_YUV420P SYSTEM_DF_YUV420SP_UV OK
    SYSTEM_VIFW_16BIT SYSTEM_DF_RGB16_565 SYSTEM_DF_YUV420SP_UV OK
    SYSTEM_VIFW_16BIT SYSTEM_DF_RGB24_888 SYSTEM_DF_YUV420SP_UV OK
    SYSTEM_VIFW_16BIT SYSTEM_DF_BAYER_RAW SYSTEM_DF_YUV420SP_UV No Image
    SYSTEM_VIFW_16BIT SYSTEM_DF_BAYER_RGGB SYSTEM_DF_YUV420SP_UV No Image

    Thank you.

    Kevin

  • Hi Brijesh,

    Their sensor was connected to VIP over discrete sync interface. I attached their HW schematic in below.

    Their sensor output is grey - e.g. Y(lumar) only.

    Thanks and Best Regards,

    SI.

  • Hi Kevin,

    When you say ok in the above table, does it mean you are able to correctly capture luma/input data?

    You just need to set YUV422P as input format and YUV422_UYVY/YUYV as output data format. This is exactly what driver sets as input and output format when we set RAW16 as input and output formats..  

    I think once you set YUV422P as input format and UYVY as output format, you would get output pixels also correctly.. 

    Rgds,

    Brijesh

  • Hi SI,

    ok the connection looks correct. Can you please also check the pinmux is set correctly for these pins? These pins have many other functions, without pinmux set correctly, VIP will not be able to detect the input frame correctly.

    Rgds,
    Brijesh
  • Hi Brijesh,

    OK in the table means I can capture the image from luma sensor, but I'm not sure if the captured image is correct.

    You mean if I set SYSTEM_DF_YUV422P as input format and SYSTEM_DF_YUV422I_UYVY as output format then I can get correct data from sensor without any changing data, right?

    Because the format of inPtr[] coming to the algorithm process function is the same with the output format (pOutprms->dataFormat) that I changed in the above,

    I can guess that somewhere in the source code changes the buffer format from pInprms->dataFormat to pOutprms->dataFormat. Am I right?

    And one more time, I'd liek to know if you mean SYSTEM_DF_YUV422P as input format is the same with SYSTEM_DF_YUV422I_UYVY as output format.

    Thank you.

    Kevin

  • Hi Kevin,

    Yes, if you set the input format to YUV422P and output to UYVY, it should capture the images correctly, without any bit/byte swap. 

    Input format as YUV422P is not really any configuration, it just tells the driver that the input data format is YUV422 and it is used to determine if driver requires to enable CSC/chroma down sampler in the path or not. No other use of 422P data format.  Output data format is what is really important as it is configured in DMA and determines the order of YUV data in memory .. 

    Regards,

    Brijesh

  • Hi Brijesh,

    To check pinmux of TDA3, customer should check the Bsp_boardSetPinMuxTda3xx() funciton of bsp_boardTda3xx.c file, right?
    Kevin is using same pinmux configuration with EVM's and thus I think there should be no issue to use Hsync/Vsync.
    Could you please let us know what should be checked more?


    Thanks and Best Regards,
    SI.
  • Hi SI,

    The API is correct, but we need to call this API for each pin to set the mux value for that pin.. I was just asking to confirm that the pinmux is set correctly for all the pins, especially hs/vs/de and clk pins. Because without them, VIP will not able to detect input frame correctly..

    Regards,
    Brijesh
  • Brijesh,

    what I meant that Kevin used same pinmux configuration as EVM and I found PCLK , HSYNC and VSYNC were enabled as below, but I could not find what pin number of HSYNC and VSYNC in this code.

    /* CPI_PCLK */
    Bsp_platformSetPinmuxRegs(1, CTRL_CORE_PAD_IO_VIN1A_CLK0,
    BSP_PLATFORM_IOPAD_CFG_DEFAULT);
    /* CPI HSYNC */
    Bsp_platformSetPinmuxRegs(1, CTRL_CORE_PAD_IO_VIN1A_DE0,
    BSP_PLATFORM_IOPAD_CFG_DEFAULT);
    /* CPI VSYNC */
    Bsp_platformSetPinmuxRegs(1, CTRL_CORE_PAD_IO_VIN1A_FLD0,
    BSP_PLATFORM_IOPAD_CFG_DEFAULT);



    BTW, as you see in above table shared by Kevin, when pInprms->dataFormat and pOutprms->dataFormat are different, where the video format was changed? is it capture link?
    If so, could you please let us know where is the source of this capture link?


    Thanks and Best Regards,
    SI.
  • Hi SI,

    ok,
    Actually Link does not do anything with the dataformat, it passes them to the driver. Driver takes care of enabling appropriate module and configuring VIP and DMA engine based on the data format..

    Rgds,
    Brijesh
  • Brijesh,

    As you see, it seemed there is no issue in their pinmux. what is next step to debug their issue - failed to receive raw16bit input?


    Thanks and Best Regards,
    SI.
  • Hi SI,

    But one of the entry from the Kevin's table says he is able to receive image. Then do we just need to validate the captured image?

    Rgds,
    Brijesh
  • Brijesh,

    As there is no YUV422 to YUV422 mode in the VIP driver, the captured image was changed. e.g. the image sensor is grey sensor output YYYY... to be assumed as YUV422 format, but it changed to YUV420 in the video capture driver and this mean the second(or third) 'Y' value was changed.
    So, to receive with YUV422 format is a last option, and we want to debug why they failed to receive RAW16 format.


    Thanks and Best Regards,
    SI.
  • Hi SI,

    I am sorry i could not get it.
    Are you saying YUV422 to YUV422 is not supported in the driver? This is really supported, we have a test example working fine for this format combo.
    If you set the output format to YUV422 and input format to YUV422, there will not be any conversion in between. YUV422 input data will go straight to the output memory..

    For RAW16, could you please share your VIP create time parameters?

    Rgds,
    Brijesh
  • Hi Brijesh,

    Yes. YUV422P to YUV422I is supported in the driver. But, I'm afraid YUV422 support for only 8bits, not 16bits.
    When pInstPrm->videoIfWidth = SYSTEM_VIFW_16BIT, what is the pixel bits of YUV422P format?

    When I checked TRM, it seemed only 8bits pixel supported on YUV422 format.


    Thanks and Best Regards,
    SI.
  • Brijesh,

    Let me summaries my understanding as below from your previous answers, and please let me know when it is wrong.

    When pInstPrm->videoIfWidth = SYSTEM_VIFW_16BIT,
    the input of VPS capture driver should be YUV422P and output should be YUV422I_YUYV(or YUV422I_UYVY), right?

    In this case, YUV image is 16bit?


    As you know, the image sensor is grey sensor output Y only, and thus this means customer should modify VPS driver or re-arrange it by assuming UV data is Y.
    Do you have any idea to receive 16-bits Y image more efficiently?


    Thanks and Best Regards,
    SI.
  • Hi SI,

    No, You dont really need to rearrange the captured YUV frame. Since the capture is 16bit per pixel, the output format also is 16bits per pixels, they will be just stored as it is.. We don't really have to spend extra CPU cycles to rearrange them.. 

    Driver does not really anything with the captured data. You could assuming captured YUYVYUYV data is actually YYYYY data. Chroma is also actually luma only.. 

    In VIP, since input and output both are configured for YUV422, driver will not enabled any of the internal modules and input YUV422 (YYYYY) will directly go to the memory as it is.. 

    Rgds,

    Brijesh

  • Hi Brijesh,

    Thanks for your response.
    I'm not sure about YUV format yet.

    The VPS driver only worked with 'SYSTEM_DF_YUV422P' input and 'SYSTEM_DF_YUV422I_YUYV', and I found the YUV422P is YUV 422 Planar - Y, U and V seperate in the 'globalDefs.h', but the output format of 'YUV422I_YUYV' is YUV422 interleaved format 'YUYV', right?

    Then, customer need to re-arrange this output YUV422 interleaved format to YUV422 Planar format, is my understanding right?

    In our test, YUV422P was not worked for output.

    Thanks and Best Regards,
    SI.
  • Hi SI,

    As i said YUV422P as input format is not really configured in the HW. It is just used to tell the driver that the input format is YUV422 and since output format is YUV422, it will not enable any internal processing modules..
    Output is treated as YUV422 UYVY format, but it will not be YUV422 data. It will be YYYYY data.. We are just fooling VIP by saying that it is YUV422 UYVY data.

    Rgds,
    Brijesh
  • Brijesh,

    output image was not good now.

    So, I would like to check with you again how DMA transfer U/V fields when YUV422P input and YUV422I_UYVY,

    with YUV422P input, the Y data should be stored in the memory with below format, and U field and V field will be stored on seperately, as below, right?

    Y-field
    Y111 Y112 Y113 Y114 ...
    Y121 Y122 Y123 Y124....
    :

    U-field
    Y211 Y212 Y213 Y214 ...
    Y221 Y222 Y223 Y224....
    :

    V-field
    Y311 Y312 Y313 Y314 ...
    Y321 Y322 Y323 Y324....
    :

    Then, it will be transferred to the output memory buffers with YUV422I_UYUV format as below, right?

    Y211 Y111 Y311 Y112 ....
    Y221 Y121 Y321 Y122..
    :


    Thanks and Best Regards,
    SI.

  • Hi SI,

    no, the output format is interleaved. So for UYVY output format, the output will be in memory

    byte =    3 2 1 0

    comp = Y V Y U

    Regards,

    Brijesh

  • Hi Brijesh,

    Then, as this is grey sensor output only Y,
    do you mean Y will be stored without any interleaving?

    grey sensor output -> .. Y4 Y3 Y2 Y1 -> VIP -> ... Y4 Y3 Y2 Y1 -> DDR memory.


    Thanks and Best Regards,
    SI.
  • Yes, thats exactly what i am saying.
    We are treating input grey scale image as YUV422P, so the output UYVY will also be grey scale only..
    VIP is a video ports, so it understand YUV422 format, we are fooling VIP for grey scale input by saying it is YUV422..

    Regards,
    Brijesh
  • Hi SI,

    Any further question on this thread.
    I am closing this thread, we can reopen if there are more questions..

    Rgds,
    Brijesh