<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: IMX8MP  sensor ISP VVCAM porting in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/IMX8MP-sensor-ISP-VVCAM-porting/m-p/1935397#M227428</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;The digital gain is realized by ISP (image signal processing), not directly adjusting the built-in register of the chip. Under normal circumstances, the default digital gain is close to 1.0, unless there are the following three situations.&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Overall gain parameter requirements, that is, when the analog gain cannot meet the set gain parameter requirements, the digital gain will be needed for compensation.&lt;/LI&gt;
&lt;LI&gt;One of the color gains is less than 1 (the color gain is achieved by digital gain), in this case, the final gain is stabilized at 1/min(red_gain, blue_gain), that is, a uniform digital gain is applied, and is the gain value for one of the color channels (not the green channel).&lt;/LI&gt;
&lt;LI&gt;AEC/AGC was modified. If there is a change in AEC/AGC, the digital gain will also change to a certain extent to eliminate any fluctuations, this change will be quickly restored to the "normal" value.&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;</description>
    <pubDate>Mon, 19 Aug 2024 14:21:31 GMT</pubDate>
    <dc:creator>Bio_TICFSL</dc:creator>
    <dc:date>2024-08-19T14:21:31Z</dc:date>
    <item>
      <title>IMX8MP  sensor ISP VVCAM porting</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/IMX8MP-sensor-ISP-VVCAM-porting/m-p/1935058#M227415</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am using OS08a20 as the example for porting a new sensor.&lt;/P&gt;&lt;P&gt;For exposure gain, sensor usually has min/max analog and digital gain. This is set in the vvcam_mode_info_s.ae_info.&lt;/P&gt;&lt;P&gt;My question is when ISP is calling&lt;STRONG&gt; set_gain(sensor, total_gain),&lt;/STRONG&gt; how do I convert &lt;STRONG&gt;total_gain&lt;/STRONG&gt; to sensor's analog and digital gain?&amp;nbsp;&lt;/P&gt;&lt;P&gt;I also check OV2755 and IMX219 VVCAM as examples, but they all have different calculation on converting total gain to analog and digital gain.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Aug 2024 09:47:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/IMX8MP-sensor-ISP-VVCAM-porting/m-p/1935058#M227415</guid>
      <dc:creator>jjiimmyy</dc:creator>
      <dc:date>2024-08-19T09:47:46Z</dc:date>
    </item>
    <item>
      <title>Re: IMX8MP  sensor ISP VVCAM porting</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/IMX8MP-sensor-ISP-VVCAM-porting/m-p/1935080#M227417</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot from 2024-08-19 17-32-42.png" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/293798i379561D7E9B68631/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot from 2024-08-19 17-32-42.png" alt="Screenshot from 2024-08-19 17-32-42.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;attached a snippet of the vvcam&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Aug 2024 10:09:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/IMX8MP-sensor-ISP-VVCAM-porting/m-p/1935080#M227417</guid>
      <dc:creator>jjiimmyy</dc:creator>
      <dc:date>2024-08-19T10:09:51Z</dc:date>
    </item>
    <item>
      <title>Re: IMX8MP  sensor ISP VVCAM porting</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/IMX8MP-sensor-ISP-VVCAM-porting/m-p/1935397#M227428</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;The digital gain is realized by ISP (image signal processing), not directly adjusting the built-in register of the chip. Under normal circumstances, the default digital gain is close to 1.0, unless there are the following three situations.&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Overall gain parameter requirements, that is, when the analog gain cannot meet the set gain parameter requirements, the digital gain will be needed for compensation.&lt;/LI&gt;
&lt;LI&gt;One of the color gains is less than 1 (the color gain is achieved by digital gain), in this case, the final gain is stabilized at 1/min(red_gain, blue_gain), that is, a uniform digital gain is applied, and is the gain value for one of the color channels (not the green channel).&lt;/LI&gt;
&lt;LI&gt;AEC/AGC was modified. If there is a change in AEC/AGC, the digital gain will also change to a certain extent to eliminate any fluctuations, this change will be quickly restored to the "normal" value.&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Mon, 19 Aug 2024 14:21:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/IMX8MP-sensor-ISP-VVCAM-porting/m-p/1935397#M227428</guid>
      <dc:creator>Bio_TICFSL</dc:creator>
      <dc:date>2024-08-19T14:21:31Z</dc:date>
    </item>
    <item>
      <title>Re: IMX8MP  sensor ISP VVCAM porting</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/IMX8MP-sensor-ISP-VVCAM-porting/m-p/1935683#M227437</link>
      <description>&lt;P&gt;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/34846"&gt;@Bio_TICFSL&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;Thanks for the clarification. I am still a little confused about the gain value.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;When I look at the set_gain(...) which is called by ISP. It seems this function needs to convert "gain" to sensor's analog and digital gain. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;But what is the equation or guideline for this conversion?&lt;/P&gt;&lt;P&gt;I already trace the function call, it seems the "gain" pass-in parameter is rather large and it is not floating point.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Aug 2024 00:54:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/IMX8MP-sensor-ISP-VVCAM-porting/m-p/1935683#M227437</guid>
      <dc:creator>jjiimmyy</dc:creator>
      <dc:date>2024-08-20T00:54:37Z</dc:date>
    </item>
    <item>
      <title>Re: IMX8MP  sensor ISP VVCAM porting</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/IMX8MP-sensor-ISP-VVCAM-porting/m-p/1936055#M227459</link>
      <description>&lt;P&gt;Hi Jimmy,&lt;/P&gt;&lt;P&gt;I must admit, that in my case, I do not allow the ISP to set the gain because I am not using AEC functionality.&lt;BR /&gt;Nevertheless I will tell you what I know.&lt;BR /&gt;The *_set_gain() function you are showing is controlled by either the AEC (auto exposure control) or the manual exposure control of the ISP. This is done via ISP's&amp;nbsp;VVSENSORIOC_S_GAIN&amp;nbsp; IOCTL.&amp;nbsp;According to the "ISP tuning Tool User Guide" (ISPTTUG.pdf) which I highly recommend to read the max value is 32.0:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="malik_cisse_0-1724142532761.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/294085i7B1FA03BBFA7AB12/image-size/medium?v=v2&amp;amp;px=400" role="button" title="malik_cisse_0-1724142532761.png" alt="malik_cisse_0-1724142532761.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;This means the gain range is between 0 and 32. This gain is to be mapped to your sensor gain. Your sensor might have analog and digital gain or both depending on the sensor. Each sensor is different.&lt;BR /&gt;I would recommend to e.g only use analog gain. You are not obliged to set both analog and digital gain.&lt;BR /&gt;Also your sensor gain range is sensor dependant. It may be from 0 to 1000 for example.&lt;BR /&gt;This means the formula to map ISP gain will map (0 to 32) range to (0 to 1000).&lt;BR /&gt;This is why the formulas are different from sensor to sensor.&lt;BR /&gt;If the gain is too high, the AEC algorithm will go ahead and set lower gain, etc.&lt;BR /&gt;Also the sensors register are mostly 16bit and spread over two registers. Therefore you see code like this:&lt;/P&gt;&lt;P&gt;ret |= os08a20_write_reg(sensor,&amp;nbsp;0x3508, (again &amp;gt;&amp;gt;&amp;nbsp;&lt;LI-EMOJI id="lia_smiling-face-with-sunglasses" title=":smiling_face_with_sunglasses:"&gt;&lt;/LI-EMOJI&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&amp;amp;&amp;nbsp;0xff);&amp;nbsp;&lt;/P&gt;&lt;P&gt;ret |= os08a20_write_reg(sensor,&amp;nbsp;0x3509, again &amp;amp;&amp;nbsp;0xff);&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I hope this is useful.&lt;/P&gt;</description>
      <pubDate>Tue, 20 Aug 2024 08:30:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/IMX8MP-sensor-ISP-VVCAM-porting/m-p/1936055#M227459</guid>
      <dc:creator>malik_cisse</dc:creator>
      <dc:date>2024-08-20T08:30:55Z</dc:date>
    </item>
  </channel>
</rss>

