<?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: Streaming rescaled videos in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/Streaming-rescaled-videos/m-p/217027#M13802</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Deinterlace:&lt;/P&gt;&lt;P&gt;We are using tvp5151. Driver is based on driver 5150 (you can download it from internet).&lt;/P&gt;&lt;P&gt;A friend of mine found out (by accident) that if you provide procedure like in the previous post:&lt;/P&gt;&lt;P&gt;*************************&lt;/P&gt;&lt;P&gt;int fd, status;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; fd = open("/dev/video0", O_RDWR);&lt;BR /&gt;&amp;nbsp;&amp;nbsp; if(fd == -1)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; exit(1);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; status = 1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (ioctl(fd, VIDIOC_S_INPUT, &amp;amp;status) &amp;lt; 0) {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; printf("ioctl failed: %s\n", strerror(errno));&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; exit(1);&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; }&lt;/P&gt;&lt;P&gt;*************************&lt;/P&gt;&lt;P&gt;for some reason it deinterlaces video. I have no idea why and how it works. I went throught documentation and forums - no information about it.&lt;/P&gt;&lt;P&gt;The whole .c file is attached. I have compiled it on my host machine with command:&lt;/P&gt;&lt;P&gt;&amp;nbsp;- "arm-none-linux-gnueabi-gcc tvp5151_ctl.c -o tvp5151_ctl"&lt;/P&gt;&lt;P&gt;And run the program on target machine with command:&lt;/P&gt;&lt;P&gt;&amp;nbsp;- "./tvp5151_ctl -i 1"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Streaming rescaled video:&lt;/P&gt;&lt;P&gt;I was using fsl-plugins version 1.9.5. On the freescale webpage there are no files with newer codecs for IMX51· Seems it is not being developed anymore (at least software). So I took fsl-plugins from IMX53 (version 2.0.3), compiled it with spec file form imx53 and it started working.&lt;/P&gt;&lt;P&gt;I have noticed that you can rescale video with mfw_ipucsc plugin but it is not able to handle all resolution. It works fine if I want to rescale my 720x576 video to 320x240, but if for example I want to have 480x560 it gives errors like this:&lt;/P&gt;&lt;P&gt;mxc_ipu mxc_ipu: IPU Error - IPU_INT_STAT_10 = 0x00000001&lt;/P&gt;&lt;P&gt;mxc_ipu mxc_ipu: IPU Error - IPU_INT_STAT_5 = 0x00000001&lt;/P&gt;&lt;P&gt;Answer if you will find out how to rescale video with mfw_ipucsc without errors.&lt;/P&gt;&lt;P&gt;If my post is not clear tell me I will write detailed, long and boring one with instructions step by step how we had made it to work.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 29 Mar 2012 10:43:10 GMT</pubDate>
    <dc:creator>swroch</dc:creator>
    <dc:date>2012-03-29T10:43:10Z</dc:date>
    <item>
      <title>Streaming rescaled videos</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Streaming-rescaled-videos/m-p/217025#M13800</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am trying to stream rescaled, encoded video via ethernet. When I am using this line:&lt;/P&gt;&lt;P&gt;gst-launch-0.10 -vvv mfw_v4lsrc sensor-width=720 sensor-height=576 capture-width=720 capture-height=576 ! mfw_vpuencoder codec-type=std_avc ! video/x-h264,width=720,height=576 ! rtph264pay ! udpsink host=10.64.50.103 port=1234 sync=false async=true&lt;/P&gt;&lt;P&gt;everything goes fine, but video is interlaced. I can rescale it like this:&lt;/P&gt;&lt;P&gt;gst-launch-0.10 -vvv mfw_v4lsrc sensor-width=360 sensor-height=288 capture-width=360 capture-height=288 ! mfw_vpuencoder codec-type=std_avc ! video/x-h264,width=360,height=288 ! rtph264pay ! udpsink host=10.64.50.103 port=1234 sync=false async=true&lt;/P&gt;&lt;P&gt;video goes fine, but it is still interlaced. When I perform this procedure:&lt;/P&gt;&lt;P&gt;*** some .c file ***&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;#define VIDIOC_S_INPUT&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _IOWR ('V', 39, int)&lt;/P&gt;&lt;P&gt;int main(int argc, char *argv[])&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp; int fd, status;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; fd = open("/dev/video0", O_RDWR);&lt;BR /&gt;&amp;nbsp;&amp;nbsp; if(fd == -1)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; exit(1);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; status = 1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (ioctl(fd, VIDIOC_S_INPUT, &amp;amp;status) &amp;lt; 0) {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; printf("ioctl failed: %s\n", strerror(errno));&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; exit(1);&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; }&lt;BR /&gt;}&lt;BR /&gt;*** end of some .c file ***&lt;/P&gt;&lt;P&gt;video is deinterlaced and streaming it without rescaling is ok. When I try to rescale only messed up video is sent. When I try to display deinterlaced and scaled video on LCD (ex. Using ximagesink) it goes fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you have any idea how to properly deinterlace and rescale video so encoder is able to handle it? Or maybe you know how to use mfw_deinterlacer plugin because so far according to my experiments and observation it does nothing with video stream.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Mar 2012 07:21:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Streaming-rescaled-videos/m-p/217025#M13800</guid>
      <dc:creator>swroch</dc:creator>
      <dc:date>2012-03-06T07:21:54Z</dc:date>
    </item>
    <item>
      <title>Re: Streaming rescaled videos</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Streaming-rescaled-videos/m-p/217026#M13801</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello! I'm working with TV Decoder TVP5147 connected to the i.MX51 Processor through the CSI Port, in order to digitalize analog video (and most of it is interlaced video).&lt;/P&gt;&lt;P&gt;We are using gstreamer as well and, as you say, we also noticed that the mfw_deinterlacer is doing nothing.&lt;/P&gt;&lt;P&gt;Sorry I can't help you yet, but could you be more specific on how did you managed to deinterlace the video stream with the procedure you exemplified?&lt;/P&gt;&lt;P&gt;I'll try to do my best to deinterlace and rescale too, and then I'll post any advance here.&lt;/P&gt;&lt;P&gt;Thank you, Lautaro.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Mar 2012 05:54:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Streaming-rescaled-videos/m-p/217026#M13801</guid>
      <dc:creator>LautaroCarmona1</dc:creator>
      <dc:date>2012-03-29T05:54:52Z</dc:date>
    </item>
    <item>
      <title>Re: Streaming rescaled videos</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Streaming-rescaled-videos/m-p/217027#M13802</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Deinterlace:&lt;/P&gt;&lt;P&gt;We are using tvp5151. Driver is based on driver 5150 (you can download it from internet).&lt;/P&gt;&lt;P&gt;A friend of mine found out (by accident) that if you provide procedure like in the previous post:&lt;/P&gt;&lt;P&gt;*************************&lt;/P&gt;&lt;P&gt;int fd, status;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; fd = open("/dev/video0", O_RDWR);&lt;BR /&gt;&amp;nbsp;&amp;nbsp; if(fd == -1)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; exit(1);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; status = 1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (ioctl(fd, VIDIOC_S_INPUT, &amp;amp;status) &amp;lt; 0) {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; printf("ioctl failed: %s\n", strerror(errno));&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; exit(1);&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; }&lt;/P&gt;&lt;P&gt;*************************&lt;/P&gt;&lt;P&gt;for some reason it deinterlaces video. I have no idea why and how it works. I went throught documentation and forums - no information about it.&lt;/P&gt;&lt;P&gt;The whole .c file is attached. I have compiled it on my host machine with command:&lt;/P&gt;&lt;P&gt;&amp;nbsp;- "arm-none-linux-gnueabi-gcc tvp5151_ctl.c -o tvp5151_ctl"&lt;/P&gt;&lt;P&gt;And run the program on target machine with command:&lt;/P&gt;&lt;P&gt;&amp;nbsp;- "./tvp5151_ctl -i 1"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Streaming rescaled video:&lt;/P&gt;&lt;P&gt;I was using fsl-plugins version 1.9.5. On the freescale webpage there are no files with newer codecs for IMX51· Seems it is not being developed anymore (at least software). So I took fsl-plugins from IMX53 (version 2.0.3), compiled it with spec file form imx53 and it started working.&lt;/P&gt;&lt;P&gt;I have noticed that you can rescale video with mfw_ipucsc plugin but it is not able to handle all resolution. It works fine if I want to rescale my 720x576 video to 320x240, but if for example I want to have 480x560 it gives errors like this:&lt;/P&gt;&lt;P&gt;mxc_ipu mxc_ipu: IPU Error - IPU_INT_STAT_10 = 0x00000001&lt;/P&gt;&lt;P&gt;mxc_ipu mxc_ipu: IPU Error - IPU_INT_STAT_5 = 0x00000001&lt;/P&gt;&lt;P&gt;Answer if you will find out how to rescale video with mfw_ipucsc without errors.&lt;/P&gt;&lt;P&gt;If my post is not clear tell me I will write detailed, long and boring one with instructions step by step how we had made it to work.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Mar 2012 10:43:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Streaming-rescaled-videos/m-p/217027#M13802</guid>
      <dc:creator>swroch</dc:creator>
      <dc:date>2012-03-29T10:43:10Z</dc:date>
    </item>
  </channel>
</rss>

