Videoconvert needs to be optimized
Yaroslav Andrusyak
pontostroy at gmail.com
Sun Oct 5 07:50:35 PDT 2014
vanilla 1.4.3
Performance counter stats for 'gst-launch-1.0 videotestsrc !
video/x-raw,format=BGRx,width=1920,height=1080 ! imagefreeze ! queue !
videoconvert ! video/x-raw,format=NV12 ! fakesink num-buffers=6000':
98360.636211 task-clock (msec) # 1.001 CPUs utilized
6,403 context-switches # 0.065 K/sec
135 cpu-migrations # 0.001 K/sec
2,353 page-faults # 0.024 K/sec
313,125,266,258 cycles # 3.183 GHz
75,629,048,758 stalled-cycles-frontend # 24.15% frontend
cycles idle
<not supported> stalled-cycles-backend
903,876,411,765 instructions # 2.89 insns per
cycle
# 0.08 stalled cycles
per insn
65,865,189,773 branches # 669.630 M/sec
36,058,736 branch-misses # 0.05% of all
branches
98.274839849 seconds time elapsed
1.4.2 +SSE
https://github.com/pontostroy/gstreamer-screenrecording/blob/master/patches/1.4.0/SSE_2_nv12%2Ci420_1.4.0.patch
Performance counter stats for 'gst-launch-1.0 videotestsrc !
video/x-raw,format=BGRx,width=1920,height=1080 ! imagefreeze ! queue !
videoconvert ! video/x-raw,format=NV12 ! fakesink num-buffers=6000':
33457.250442 task-clock (msec) # 1.002 CPUs utilized
6,162 context-switches # 0.184 K/sec
90 cpu-migrations # 0.003 K/sec
4,367 page-faults # 0.131 K/sec
106,550,436,733 cycles # 3.185 GHz
19,416,677,000 stalled-cycles-frontend # 18.22% frontend
cycles idle
<not supported> stalled-cycles-backend
309,264,199,276 instructions # 2.90 insns per
cycle
# 0.06 stalled cycles
per insn
16,465,186,680 branches # 492.126 M/sec
29,833,144 branch-misses # 0.18% of all
branches
33.405062383 seconds time elapsed
1.4.2+ SimpleScreeRecoded patch
https://github.com/pontostroy/gstreamer-screenrecording/blob/master/patches/1.4.0/SSR_i420_1.4.0.patch
Performance counter stats for 'gst-launch-1.0 videotestsrc !
video/x-raw,format=BGRx,width=1920,height=1080 ! imagefreeze ! queue !
videoconvert ! video/x-raw,format=I420 ! fakesink num-buffers=6000':
7158.287710 task-clock (msec) # 1.016 CPUs utilized
6,074 context-switches # 0.849 K/sec
121 cpu-migrations # 0.017 K/sec
2,838 page-faults # 0.396 K/sec
22,678,342,775 cycles # 3.168 GHz
4,182,567,305 stalled-cycles-frontend # 18.44% frontend
cycles idle
<not supported> stalled-cycles-backend
66,936,755,926 instructions # 2.95 insns per
cycle
# 0.06 stalled cycles
per insn
447,701,888 branches # 62.543 M/sec
5,987,845 branch-misses # 1.34% of all
branches
7.048563154 seconds time elapsed
1.5.0 orc
Performance counter stats for 'gst-launch-1.0 videotestsrc !
video/x-raw,format=BGRx,width=1920,height=1080 ! imagefreeze ! queue !
videoconvert ! video/x-raw,format=I420 ! fakesink num-buffers=6000':
50316.822297 task-clock (msec) # 1.001 CPUs utilized
6,589 context-switches # 0.131 K/sec
95 cpu-migrations # 0.002 K/sec
8,255 page-faults # 0.164 K/sec
160,235,388,591 cycles # 3.185 GHz
34,241,769,176 stalled-cycles-frontend # 21.37% frontend
cycles idle
<not supported> stalled-cycles-backend
468,313,611,472 instructions # 2.92 insns per
cycle
# 0.07 stalled cycles
per insn
22,484,833,596 branches # 446.865 M/sec
35,166,607 branch-misses # 0.16% of all
branches
50.261769163 seconds time elapsed
I do not test very simple table64 patch
https://github.com/pontostroy/gstreamer-screenrecording/blob/master/patches/1.4.0/table64_nv12_i420_1.4.0.patch
,but I think that it is not worse than ORC
2014-10-05 16:46 GMT+03:00 Tim Müller <tim at centricular.com>:
> On Sun, 2014-10-05 at 16:23 +0300, Yaroslav Andrusyak wrote:
>
> > CPU time of this pipeline
> > gst-launch-1.0 -e ximagesrc display-name=:0 use-damage=0 !
> > multiqueue ! video/x-raw,format=BGRx ! videoconvert !
> > video/x-raw,format=I420,framerate=30/1 ! multiqueue !
> > vaapiencode_h264 ! vaapiparse_h264 ! multiqueue ! matroskamux
> > name=muxer muxer. ! progressreport name=Rec_time ! filesink
> > location=/disk/tmp//rec_2014-10-05_123757.mkv
> > and then
> > perf stat -p `pidof gst-launch-1.0`
>
> It might make sense to try and condense the pipeline to the essential
> bits that you're trying to benchmark, e.g. something like:
>
> perf stat gst-launch-1.0 videotestsrc !
> video/x-raw,format=BGRx,width=1920,height=1080 ! imagefreeze ! queue !
> videoconvert ! video/x-raw,format=I420 ! fakesink num-buffers=1000
>
> or just
>
> time gst-launch-1.0 ...
>
> Cheers
> -Tim
>
> --
> Tim Müller, Centricular Ltd - http://www.centricular.com
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20141005/d8acdc09/attachment.html>
More information about the gstreamer-devel
mailing list