<?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: i.MX8Plus v4l2 Feature Control Api in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/i-MX8Plus-v4l2-Feature-Control-Api/m-p/1417824#M187372</link>
    <description>&lt;P&gt;Hello.&amp;nbsp; I didn't change any code from the original code in vvext.cpp, viv_private_ioctl(int fd, const char *cmd, char *request, char *response):&lt;/P&gt;&lt;LI-CODE lang="c"&gt;int viv_private_ioctl(const char *cmd, Json::Value&amp;amp; jsonRequest, Json::Value&amp;amp; jsonResponse) {
    if (!cmd) {
        ALOGE("cmd should not be null!");
        return -1;
    }
    jsonRequest["id"] = cmd;
    jsonRequest["streamid"] = streamid;

    struct v4l2_ext_controls ecs;
    struct v4l2_ext_control ec;
    memset(&amp;amp;ecs, 0, sizeof(ecs));
    memset(&amp;amp;ec, 0, sizeof(ec));
    ec.string = new char[VIV_JSON_BUFFER_SIZE];
    ec.id = V4L2_CID_VIV_EXTCTRL;
    ec.size = 0;
    ecs.controls = &amp;amp;ec;
    ecs.count = 1;

    ::ioctl(fd, VIDIOC_G_EXT_CTRLS, &amp;amp;ecs);

    strcpy(ec.string, jsonRequest.toStyledString().c_str());

    int ret = ::ioctl(fd, VIDIOC_S_EXT_CTRLS, &amp;amp;ecs);
    if (ret != 0)
        return ret;

    ::ioctl(fd, VIDIOC_G_EXT_CTRLS, &amp;amp;ecs);

    Json::Reader reader;
    reader.parse(ec.string, jsonResponse, true);
    delete ec.string;
    ec.string = NULL;
    return jsonResponse["MC_RET"].asInt();
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does this code work on the i.MX8Plus?&lt;/P&gt;</description>
    <pubDate>Wed, 23 Feb 2022 02:39:40 GMT</pubDate>
    <dc:creator>marcus-castlepeakinc</dc:creator>
    <dc:date>2022-02-23T02:39:40Z</dc:date>
    <item>
      <title>i.MX8Plus v4l2 Feature Control Api</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX8Plus-v4l2-Feature-Control-Api/m-p/1417751#M187361</link>
      <description>&lt;P&gt;Hello.&amp;nbsp; I'm trying to enable Demosaic feature in v4l2.&amp;nbsp; I read in i.MX 8M Plus Applications Processor Reference manual, table 13-39 that Demosaic converts RAW Bayer pipeline data to 12-bit RGB.&amp;nbsp; I am trying to set this with code I leveraged from isp-imx source, vvext.cpp, viv_private_ioctl(int fd, const char *cmd, char *request, char *response), and the only responses I'm seeing from the ioctl calls is "{\"result\": 0}".&lt;/P&gt;&lt;P&gt;Does anyone know if this return json string means demosaic is enabled?&amp;nbsp; I know my v4l2 buffers contain the same Bayer data as they did before, which leads me to believe the VIDIOC_S_EXT_CTRLS ioctl is not working correctly.&amp;nbsp; Does anyone know what response *will* be if the ioctl is successful?&lt;/P&gt;</description>
      <pubDate>Tue, 22 Feb 2022 23:36:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX8Plus-v4l2-Feature-Control-Api/m-p/1417751#M187361</guid>
      <dc:creator>marcus-castlepeakinc</dc:creator>
      <dc:date>2022-02-22T23:36:31Z</dc:date>
    </item>
    <item>
      <title>Re: i.MX8Plus v4l2 Feature Control Api</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX8Plus-v4l2-Feature-Control-Api/m-p/1417821#M187371</link>
      <description>&lt;P&gt;Can you send me the code you change?&lt;/P&gt;</description>
      <pubDate>Wed, 23 Feb 2022 02:31:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX8Plus-v4l2-Feature-Control-Api/m-p/1417821#M187371</guid>
      <dc:creator>Zhiming_Liu</dc:creator>
      <dc:date>2022-02-23T02:31:32Z</dc:date>
    </item>
    <item>
      <title>Re: i.MX8Plus v4l2 Feature Control Api</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX8Plus-v4l2-Feature-Control-Api/m-p/1417824#M187372</link>
      <description>&lt;P&gt;Hello.&amp;nbsp; I didn't change any code from the original code in vvext.cpp, viv_private_ioctl(int fd, const char *cmd, char *request, char *response):&lt;/P&gt;&lt;LI-CODE lang="c"&gt;int viv_private_ioctl(const char *cmd, Json::Value&amp;amp; jsonRequest, Json::Value&amp;amp; jsonResponse) {
    if (!cmd) {
        ALOGE("cmd should not be null!");
        return -1;
    }
    jsonRequest["id"] = cmd;
    jsonRequest["streamid"] = streamid;

    struct v4l2_ext_controls ecs;
    struct v4l2_ext_control ec;
    memset(&amp;amp;ecs, 0, sizeof(ecs));
    memset(&amp;amp;ec, 0, sizeof(ec));
    ec.string = new char[VIV_JSON_BUFFER_SIZE];
    ec.id = V4L2_CID_VIV_EXTCTRL;
    ec.size = 0;
    ecs.controls = &amp;amp;ec;
    ecs.count = 1;

    ::ioctl(fd, VIDIOC_G_EXT_CTRLS, &amp;amp;ecs);

    strcpy(ec.string, jsonRequest.toStyledString().c_str());

    int ret = ::ioctl(fd, VIDIOC_S_EXT_CTRLS, &amp;amp;ecs);
    if (ret != 0)
        return ret;

    ::ioctl(fd, VIDIOC_G_EXT_CTRLS, &amp;amp;ecs);

    Json::Reader reader;
    reader.parse(ec.string, jsonResponse, true);
    delete ec.string;
    ec.string = NULL;
    return jsonResponse["MC_RET"].asInt();
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does this code work on the i.MX8Plus?&lt;/P&gt;</description>
      <pubDate>Wed, 23 Feb 2022 02:39:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX8Plus-v4l2-Feature-Control-Api/m-p/1417824#M187372</guid>
      <dc:creator>marcus-castlepeakinc</dc:creator>
      <dc:date>2022-02-23T02:39:40Z</dc:date>
    </item>
    <item>
      <title>Re: i.MX8Plus v4l2 Feature Control Api</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX8Plus-v4l2-Feature-Control-Api/m-p/1417841#M187374</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/194787"&gt;@marcus-castlepeakinc&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ISP V4L2 user guide shows that V4L2 source code support&amp;nbsp;Demosaic.You can search "Demosaic" in this guide and you will find control code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.nxp.com.cn/webapp/Download?colCode=IMX8MPISPUV4L2IUG" target="_blank"&gt;https://www.nxp.com.cn/webapp/Download?colCode=IMX8MPISPUV4L2IUG&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Feb 2022 02:57:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX8Plus-v4l2-Feature-Control-Api/m-p/1417841#M187374</guid>
      <dc:creator>Zhiming_Liu</dc:creator>
      <dc:date>2022-02-23T02:57:41Z</dc:date>
    </item>
    <item>
      <title>Re: i.MX8Plus v4l2 Feature Control Api</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX8Plus-v4l2-Feature-Control-Api/m-p/1417849#M187375</link>
      <description>&lt;P&gt;Ok.&amp;nbsp; So in the above definition of&lt;/P&gt;&lt;PRE&gt;viv_private_ioctl&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What should the value of jsonResponse be after calling viv_private_ioctl?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Feb 2022 03:10:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX8Plus-v4l2-Feature-Control-Api/m-p/1417849#M187375</guid>
      <dc:creator>marcus-castlepeakinc</dc:creator>
      <dc:date>2022-02-23T03:10:29Z</dc:date>
    </item>
  </channel>
</rss>

