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.

TDA2E: Change Input Format

Part Number: TDA2E
Other Parts Discussed in Thread: TDA2

Hi, 

I have some questions I want to ask,

I want to change the input format of TDA2. Where do I need to change it?
For example, I want to change YUV422SP to RGB888

  • Hi,

    what do you mean by input format? Do you mean input input to VIP? 

    Yes, VIP supports RGB24 as input format, provided pins are available. 

    Rgds,

    Brijesh

  • Hi,

    Yes, it is the VIP input. At present, the default input I know is YUV422, but I want to change this default value.

    In addition, the Sensor I use is to output grayscale data(only Y value), but I found format on TDA2 There will be shift  phenomenon.

          

  • Hi,

    How can I make TDA2 receive Raw data?

  • Hi,

    Yes, you could receive raw data via VIP, but no hw module to process them. 

    What is the size of the raw data? If it is less than 16bits, you could just treat them as YUV422 over 16bit interface and store it as YUV422 data. 

    Regards,

    Brijesh

  • Hi,

    The sensor I used is AR0144, the size is 1280*720, 8-bits output, and the buffer sorting is 55 00 5A 00 55 00 5A 00.....(only 55 & 5A are useful)
    Which input format can I make TDA2 use to receive these data?

    Regards,

    Michael

  • Hi Michael,

    What is input interface on which sensor AR0144 is connected to VIP? is it over 8bit interface or 16bit interface? 

    In both the cases, input format is YUV422 and so is output format.

    In 16bit input interface, we can 55 5A 55 5A data in memory, but in 8bit interface, data save in memory will also be 55 00 5a 00 55 and so on.

    Regards,

    Brijesh

  • Hi Brijesh,

    Can I change the VIP input format from YUV422 to Raw data format and change VIP output format?

    Our sensor should be input to VIP through 16bit interface.

    Regards,

    Michael

  • Hi Michael,

    VIP does not have RAW data format support. It cannot convert RAW format into YUV or viewable format.  It can just capture this data into memory by treating it as YUV422.

    How do you want to store it in memory? 

    Regards,

    Brijesh

  • HI Brijesh,

    So you mean that VIP input in TDA2 only supports YUV422 format?

    Because I found that after the sensor is processed by TDA2 VIP, the data will be shifted by 2 bits to the right.

    In this code pInprms->dataFormat =   SYSTEM_DF_YUV422P Can i change to SYSTEM_DF_RGB24_888?

    Does this code set the input format of the VIP? If yes, which code is the output format set? And output format can change RGB24_888 not YUV420?

    Regards,

    Michael

  • Hi Michael,

    No, VIP supports both YUV422 and RGB888 input format. You could capture YUV422 over 8bit and 16bit interface, whereas RGB888 can be captured over 24bit interface.

    VIP cannot shift the data, it has no way to shift data by 2 bits. 

    Yes, this will change input format to RGB888. There should be outPrms where we can set the output format. 

    Regards,

    Brijesh

     

  • Hi Brijesh,

    It is currently confirmed that the sensor is input to VIP through the 8Bit interface.

    Can I still use the RGB888 format as the input format?

    Are the input and output format settings set in the captrueLink.h file?

    Regards,

    Michael

  • Hi Michael,

    Yes, but why do you want to use RGB24 as input format? i did not get the idea. 

    Yes, input and output format settings are in captureLink.h header file. 

    Regards,

    Brijesh

  • Hi Brijesh

    Because the data of AR0144 is RAW data, but after input to VIP, RAW data will be allocated but the allocation is wrong (input format is YUV422, output format is YUV420).

    My idea is that I use RGB to assign this Y value, and fill in the same value for R channel, G channel and B channel, so that it should be the grayscale image I want.

    The sorted Data is output through RGB, but I don’t know if my approach is correct?

    Regards,

    Michael

  • Hi Michael,

    But how will you fill data in other two channels? Is this going to be done by SW or sensor AR0144? 

    Even if you treat input data as YUV422 over 16bit and just capture Y component, it would be grey scale image only.

    Regards,

    Brijesh

  • Hi Brijesh,

    As for the UV channel, it uses the difference compensation method for data filling

    It may be an error in the sorting of the data, so I never came up with the idea of the previous answer.

    for(i = 0; i < Maxrow; i++)
    {
    for(j = 0; j < Maxcol; j++)
    {
    pFrame1[1280*(2*i)+ 2*j] = pFrame2[1280*(2*i)+ 640+j];
    pFrame1[1280*(2*i)+ 2*j+1] = pFrame2[1280*i + j]; // pixel U
    pFrame1[1280*(2*i+1)+ 2*j] = pFrame2[1280*(2*i+1)+ 640+j];
    pFrame1[1280*(2*i+1)+ 2*j+1] = pFrame2[1280*i + j]; // pixel V
    }
    }

    This is the current method of filling data

    Regards,

    Michael

  • Hi Michael,

    Sorry, I did not get the issue. Do you mean to fill up the UV data in the code, after frame is captured in the memory?

    If we know the input sequence and output data format, we can definitely get the exact position of the Y and UV components.

    Regards,

    Brijesh

  • Hi Brijesh,

    What I mean is that the output data of AR0144 is RAW8 data, and the receiving format of TDA2 is YUV422, and the output format is YUV420, and my idea is that I change the input format and output format of TDA2 to RGB888 format, and I manually sort the data, assign a data to the three channels of R, G, and B respectively, so that I should get the result I want? (Grayscale image)

    In addition, I want to ask what is the subframe in the capture link?

    Regards,

    Michael

  • Michael,

    VIP cannot convert it into grey scale image, so i am not sure how by changing just the data format to RGB, you would get the grey scale image from RAW8 input. 

    My idea is to treat the data as YUV422 over 16biit interface, then luma is expected to come over 8bit and chroma is expected to come over other 8bit inputs. You could just connect your 8bit RAW8 input to where luma is expected to come. Then store the output as YUV420, in YUV420 format, luma and chroma plane are stored in the separate plane, so you could get your RAW8 data on the luma plane.. 

    Regards,

    Brijesh