Difference between revisions of "GStreamer Based Image Signal Processor/Performance/Color Space Conversion"

From RidgeRun Developer Connection
Jump to: navigation, search
m (Summary)
Line 7: Line 7:
 
The following section describes some relevant performance measurements during the execution of the color space correction kernel for a few standard resolutions. It begins with a summary of the results detailed on the following sections, as well as the pipelines used to capture such results.  
 
The following section describes some relevant performance measurements during the execution of the color space correction kernel for a few standard resolutions. It begins with a summary of the results detailed on the following sections, as well as the pipelines used to capture such results.  
  
= Summary =  
+
= Benchmarking =
<center>
 
{| class="wikitable"
 
|-
 
! Resolution !! CPU usage !! Memory !! Max Framerate !! Exec Time
 
|-
 
| 640x480 || 16 || 16080 || 170 || 32.9
 
 
 
|-
 
| 1280x720 || 17 || 19424 || 63 || 59.3
 
 
 
|-
 
| 1920x1080 || 18 || 18168 || 29 || 169.5
 
  
|}
 
</center>
 
 
= Benchmarking=
 
 
== Pipeline ==
 
== Pipeline ==
  
Line 33: Line 17:
 
HEIGHT=1080
 
HEIGHT=1080
  
gst-launch-1.0 videotestsrc ! 'video/x-raw,format=(string)RGBA,width=$WIDTH,height=$HEIGHT,framerate=(fraction)30/1' ! oclcsc ! fakesink -v  
+
gst-launch-1.0 videotestsrc is-live=true ! "video/x-bayer, format=(string)bggr, width=$WIDTH, height=$HEIGHT,framerate=(fraction)30/1" ! queue ! ocldebayerisp ! fakesink -v
 
</pre>
 
</pre>
 +
 +
== Summary ==
 +
In this summary you can find measurements related with CPU usage, memory, execution time and maximum framerate supported by the debayer algorithm.
 +
<html>
 +
<center>
 +
<table class="wikitable" style="text-align: center;">
 +
  <tr>
 +
    <th>Resolution</th>
 +
    <th>CPU usage (%) *</th>
 +
    <th>Memory (kB) *</th>
 +
    <th>Execution Time (ms)</th>
 +
  </tr>
 +
  <tr>
 +
    <td>640x480@30fps</td>
 +
    <td>8</td>
 +
    <td>17980</td>
 +
    <td>3.54</td>
 +
  </tr>
 +
<tr>
 +
    <td>1280x720@30fps</td>
 +
    <td>9</td>
 +
    <td>18800</td>
 +
    <td>9.82</td>
 +
</tr>
 +
<tr>
 +
    <td>1920x1080@30fps</td>
 +
    <td>14</td>
 +
    <td>19896</td>
 +
    <td>21.19</td>
 +
</tr>
 +
<caption>Table 1. Summary table regarding to the debayer performance for several standard resolutions running at 30fps</caption>
 +
</table>
 +
</center>
 +
</html>
 +
 +
 +
<span style="color:magenta"> * To have in account: these values were taken with videotestsrc element and may decrease with a camera source capture. </span>
 +
 +
 +
<html>
 +
<center>
 +
<table class="wikitable" style="text-align: center;">
 +
  <tr>
 +
    <th>Resolution</th>
 +
    <th>Maximum framerate (fps)</th>
 +
  </tr>
 +
  <tr>
 +
    <td>640x480</td>
 +
    <td>266</td>
 +
  </tr>
 +
<tr>
 +
    <td>1280x720</td>
 +
    <td>101</td>
 +
</tr>
 +
<tr>
 +
    <td>1920x1080</td>
 +
    <td>46</td>
 +
</tr>
 +
<caption>Table 2. Summary table for the maximum framerate using debayer algorithm for several standard resolutions</caption>
 +
</table>
 +
</center>
 +
</html>
  
  
==CPU usage==
+
=CPU usage=
 
These measurements were taken with '''top''' app to see the behavior of the pipeline while running, but we have to have in account that videotestsrc is used to generate the buffers and it consumes a lot of CPU.
 
These measurements were taken with '''top''' app to see the behavior of the pipeline while running, but we have to have in account that videotestsrc is used to generate the buffers and it consumes a lot of CPU.
 
[[File:Cpu.png|frame|center|CPU usage for CSC kernel.]]
 
[[File:Cpu.png|frame|center|CPU usage for CSC kernel.]]
  
==Memory usage==
+
=Memory usage=
 
These measurements were taken with '''meminfo''' file to see the behavior of the pipeline while running, but we have to have in account that videotestsrc is used to generate the buffers and it depends on the framerate due to the number of buffers generated by videotestsrc.
 
These measurements were taken with '''meminfo''' file to see the behavior of the pipeline while running, but we have to have in account that videotestsrc is used to generate the buffers and it depends on the framerate due to the number of buffers generated by videotestsrc.
 
[[File:Memo.png|frame|center|Memory consumption by CSC kernel.]]
 
[[File:Memo.png|frame|center|Memory consumption by CSC kernel.]]
  
==Maximum Framerate==
+
=Maximum Framerate=
 
These measurements were taken with '''gstperf''' tool to see the behavior of the pipeline while running, with videotestsrc we are able to push buffers as much as possible to the element. The image below shows the maximum framerate that the debayer element supports. It depends on the execution time of the debayer kernel algorithm.
 
These measurements were taken with '''gstperf''' tool to see the behavior of the pipeline while running, with videotestsrc we are able to push buffers as much as possible to the element. The image below shows the maximum framerate that the debayer element supports. It depends on the execution time of the debayer kernel algorithm.
 
[[File:Framerate.png|frame|center|Framerate for different resolutions on the CSC kernel.]]
 
[[File:Framerate.png|frame|center|Framerate for different resolutions on the CSC kernel.]]
  
==Execution time==
+
=Execution time=
 
These measurements were taken putting some '''timestamps''' before and after the processing to measure just the execution time for the debayer kernel algorithm by each frame and avoiding possible false measurements from the GStreamer plugin. The image below shows the debayer execution time by each frame for each resolution.  
 
These measurements were taken putting some '''timestamps''' before and after the processing to measure just the execution time for the debayer kernel algorithm by each frame and avoiding possible false measurements from the GStreamer plugin. The image below shows the debayer execution time by each frame for each resolution.  
 
[[File:Extime.png|frame|center|Execution time for different resolutions on the CSC kernel.]]
 
[[File:Extime.png|frame|center|Execution time for different resolutions on the CSC kernel.]]

Revision as of 18:53, 28 June 2019


Previous: Performance/Debayer Index Next: Contact Us





The following section describes some relevant performance measurements during the execution of the color space correction kernel for a few standard resolutions. It begins with a summary of the results detailed on the following sections, as well as the pipelines used to capture such results.

Benchmarking

Pipeline

All the measurements below were made using the following minimal pipeline.

WIDTH=1920
HEIGHT=1080

gst-launch-1.0 videotestsrc is-live=true ! "video/x-bayer, format=(string)bggr, width=$WIDTH, height=$HEIGHT,framerate=(fraction)30/1" ! queue ! ocldebayerisp ! fakesink -v

Summary

In this summary you can find measurements related with CPU usage, memory, execution time and maximum framerate supported by the debayer algorithm.

Resolution CPU usage (%) * Memory (kB) * Execution Time (ms)
640x480@30fps 8 17980 3.54
1280x720@30fps 9 18800 9.82
1920x1080@30fps 14 19896 21.19
Table 1. Summary table regarding to the debayer performance for several standard resolutions running at 30fps


* To have in account: these values were taken with videotestsrc element and may decrease with a camera source capture.


Resolution Maximum framerate (fps)
640x480 266
1280x720 101
1920x1080 46
Table 2. Summary table for the maximum framerate using debayer algorithm for several standard resolutions


CPU usage

These measurements were taken with top app to see the behavior of the pipeline while running, but we have to have in account that videotestsrc is used to generate the buffers and it consumes a lot of CPU.

Error creating thumbnail: Unable to save thumbnail to destination
CPU usage for CSC kernel.

Memory usage

These measurements were taken with meminfo file to see the behavior of the pipeline while running, but we have to have in account that videotestsrc is used to generate the buffers and it depends on the framerate due to the number of buffers generated by videotestsrc.

Error creating thumbnail: Unable to save thumbnail to destination
Memory consumption by CSC kernel.

Maximum Framerate

These measurements were taken with gstperf tool to see the behavior of the pipeline while running, with videotestsrc we are able to push buffers as much as possible to the element. The image below shows the maximum framerate that the debayer element supports. It depends on the execution time of the debayer kernel algorithm.

Error creating thumbnail: Unable to save thumbnail to destination
Framerate for different resolutions on the CSC kernel.

Execution time

These measurements were taken putting some timestamps before and after the processing to measure just the execution time for the debayer kernel algorithm by each frame and avoiding possible false measurements from the GStreamer plugin. The image below shows the debayer execution time by each frame for each resolution.

Error creating thumbnail: Unable to save thumbnail to destination
Execution time for different resolutions on the CSC kernel.


Previous: Performance/Debayer Index Next: Contact Us