Videoconvert needs to be optimized

Edward Hervey bilboed at bilboed.com
Mon May 19 22:09:29 PDT 2014


Hi,

   Since:
    * your biggest cpu usage is videoconvert and x264
    * You are most likely using a multi-core system

   I would strongly recommend putting queue element before/after
videoconvert and x264:
   ... ! queue ! videoconvert ! queue ! <capsfilter> ! <videoencoder> !
queue ! ...

   That will essentially decouple videoconvert processing and h264
encoding into dedicated threads.

     Edward
> 
> 
> 
> OMX
> gst-launch-1.0 -e matroskamux name=muxer ! progressreport ! filesink
> location=/home/pont/disk/rec_2014-05-19_165945.mkv \ ximagesrc
> use-damage=0 ! video/x-raw,format=BGRx ! videoconvert !
> video/x-raw,format=NV12,framerate=25/1 ! omxh264enc ! h264parse !
> queue ! muxer.video_0
> 
> 
> 
> VAAPI
> gst-launch-1.0 -e matroskamux name=muxer ! progressreport ! filesink
> location=/home/pont/disk/rec_2014-05-19_170015.mkv \ ximagesrc
> use-damage=0 ! video/x-raw,format=BGRx ! videoconvert !
> video/x-raw,format=NV12,framerate=25/1 ! vaapiencode_h264 ! queue !
> muxer.video_0
> 
> 
> 
> Software
> gst-launch-1.0 -e matroskamux name=muxer ! progressreport ! filesink
> location=/home/pont/disk/rec_2014-05-19_170044.mkv \ ximagesrc
> use-damage=0 ! video/x-raw,format=BGRx ! videoconvert !
> video/x-raw,format=NV12,framerate=25/1 ! x264enc speed-preset=faster !
> queue ! muxer.video_0 
> 
> 
> 
> pert top for Gstreamer software fullhd 25fps
> Samples: 297K of event 'cycles', Event count (approx.): 99651686548
> 
>                                                
>  23.51%  libgstvideoconvert.so          [.]
> videoconvert_convert_matrix8
>  23.44%  libx264.so.142                 [.]
> x264_add8x8_idct_avx2.skip_prologue
>  10.35%  libx264.so.142                 [.] 0x000000000009ce74
>   8.45%  libx264.so.142                 [.]
> x264_add8x8_idct_avx.skip_prologue
>   2.97%  orcexec.47KToS                 [.] 0x00000000000000c4
>   2.62%  intel_drv.so                   [.] 0x0000000000035dde
>   2.45%  libgstvideo-1.0.so.0.204.0     [.]
> video_chroma_down_h2_guint8
>   2.39%  libgstvideo-1.0.so.0.204.0     [.]
> video_chroma_down_v2_guint8
>   2.23%  libx264.so.142                 [.]
> x264_macroblock_cache_load_progressive
>   2.21%  libx264.so.142                 [.] x264_me_search_ref
>   1.31%  libx264.so.142                 [.] x264_macroblock_analyse
>   1.27%  libx264.so.142                 [.]
> x264_sub8x8_dct_avx.skip_prologue
>   1.11%  libx264.so.142                 [.]
> x264_mb_predict_mv_ref16x16
>   0.93%  libx264.so.142                 [.] x264_macroblock_cache_save
>   0.61%  libx264.so.142                 [.]
> x264_mb_predict_mv_direct16x16
>   0.56%  libx264.so.142                 [.] x264_macroblock_probe_skip
> 
> 
> 
> 
> perf top for simple screen recorder fullhd 25 fps
> Samples: 243K of event 'cycles', Event count (approx.): 63217744816
> 
>                                                
>  33.70%  libx264.so.142                 [.]
> x264_add8x8_idct_avx2.skip_prologue
>  13.57%  libx264.so.142                 [.] 0x000000000001a7b6
>  11.25%  libx264.so.142                 [.]
> x264_add8x8_idct_avx.skip_prologue
>   3.62%  intel_drv.so                   [.] 0x00000000000168c9
>   3.54%  simplescreenrecorder           [.]
> Convert_BGRA_YUV420_SSSE3(unsigned int, unsigned int, unsigned char
> const*, int, unsigned char* const*, int const*)
>   3.34%  libx264.so.142                 [.] x264_me_search_ref
>   3.27%  libx264.so.142                 [.]
> x264_macroblock_cache_load_progressive
>   1.92%  libx264.so.142                 [.] x264_macroblock_analyse
>   1.66%  libx264.so.142                 [.]
> x264_sub8x8_dct_avx.skip_prologue
>   1.61%  libx264.so.142                 [.]
> x264_mb_predict_mv_ref16x16
>   1.42%  libx264.so.142                 [.] x264_macroblock_cache_save
>   0.91%  libx264.so.142                 [.]
> x264_mb_predict_mv_direct16x16
>   0.76%  libpepflashplayer.so           [.] 0x00000000001f4980
>   0.64%  libx264.so.142                 [.] x264_macroblock_probe_skip
>   0.54%  libx264.so.142                 [.] x264_ratecontrol_mb_qp
>   0.54%  perf                           [.] 0x0000000000067856
>   0.43%  i965_dri.so                    [.] 0x00000000002e59a9
> 
> 
> 
> 
> 
> 
> 
> 
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20140520/74113578/attachment.sig>


More information about the gstreamer-devel mailing list