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: Enable YUV 12 bit output

Part Number: TDA4VM

Hi,

In order to have 12 bit YUV display, apart from change in FCP gamma and EE output select, what are the other changes anticipated in single camera usecase?

  • Rinku,

    Do you mean 12bit YUV output from VISS? VISS does support 12bit NV12 output. This is by default not enabled, but it can be enabled in output0. Please refer to userguide/API guide for more information. 

    Regards,

    Brijesh

  • Hi Brijesh,

    Can you comment on the changes to be done on the API mentioned below?

    write_output_image_fp()
  • Rinku,

    Can you please check the implementation of this API and change num_bytes_per_pixel variable for this format? 

    Regards,

    Brijesh

  • Hi Brijesh,

    We have enabled 12bit NV12 output for the 12b sensor output. The changes we have done are given below.

    1) Decompanding is disabled

    2) CFA lut is disabled and input bits = 12

    3) Contrast gamma lut which was doing 12b to 10b is changed to 12b to 12b

    4) Luma input bits is set to 12 (it was 10 by default) in RGB lut config

    5) Output is selected by setting 4 for mux 0 for which the format is TIVX_DF_IMAGE_NV12_P12

    6) image dump code is changed for 12b

    With these changes, we find Luma is proper. But when we add U and V, the image looks completely greenish.

    Are we missing anything here?

    We have considered the packing of YUV data as 12b packed output which means 12b*W*H will be Luma and rest is interleaved U(12b) and V(12b) for W*H/2. Please confirm if this is correct.

  • Hi Rinku,

    Below changes are sufficient to get nv12 12bit output.

    5) Output is selected by setting 4 for mux 0 for which the format is TIVX_DF_IMAGE_NV12_P12

    6) image dump code is changed for 12b

    If you are not getting chroma data, then most likely, can you coefficients of RGB2YUV module? is this coming for specific sensor or for all sensors? Could you please provide some more details?

    We have considered the packing of YUV data as 12b packed output which means 12b*W*H will be Luma and rest is interleaved U(12b) and V(12b) for W*H/2. Please confirm if this is correct.

    Yes, this is correct. Essentially, if you are using OpenVX for allocating memory for yuv420 12bit data, it would be taken care by framework. 

    Regards,

    Brijesh

  • Hi Brijesh,

    We are using default RGB2YUV coefficients. We have tested this with multiple sensors, but UV makes the image greenish.

  • Hi Rinku,

    Strange, does 8bit output look fine, ie YUV420 in 8bit? Can you please check it?

    Regards,

    Brijesh

  • Hi Brijesh,

    1) Decompanding is disabled // We want to keep the sensor 12b input without change

    2) CFA lut is disabled and input bits = 12 // There was 16 to 12b LUT enabled in CFA. We dont want this conversion as input to CFA will be 12b

    3) Contrast gamma lut which was doing 12b to 10b is changed to 12b to 12b // We dont want 12b to 10b conversion here

    4) Luma input bits is set to 12 (it was 10 by default) in RGB lut config // clip value was set to 10. Only when we changed this to 12, we observed data expanding to 12b in Y channel. Otherwise, even though the container is 12b, data was limited to 10b.

    We have kept the above changes also, as there was different bit depth in the pipeline without making these changes. Do you think these are not required?

    Also, after making these changes (including changes 5 and 6 mentioned before), both 8b YUV and 12b YUV is greenish.

  • Hi Rinku,

    Can you please check CFA coefficients? I suspect the CFA coefficients are not correctly generated/programmed..

    This could be reason why you are getting grey color only. 

    Regards,

    Brijesh

  • Hi Brijesh,

    CFA coefficients are generated properly.

    The issue was with RGB2YUV offsets. It's resolved by making the following change.

       r2y->offsets[0u]     = 0;
       r2y->offsets[1u]     = 512;
       r2y->offsets[2u]     = 512;