Skip to content

Draft: gaussblur: add test to check gaussianblur element and parallelize with OpenMP

diegonieto requested to merge diegonieto/gstreamer:gbomp into main
  • Checks whether the pipeline is built
  • Checks whether the element produces frames according to the caps
  • Checks whether the output is the expected

Set the number of threads with OMP_NUM_THREADS

Initial benefits:

OMP_NUM_THREADS=1 GST_DEBUG="GST_TRACER:7" GST_TRACERS="latency(flags=pipeline+element)" GST_DEBUG_FILE=trace.log gst-launch-1.0 videotestsrc num-buffers=300 ! "video/x-raw,width=640,height=480" ! videoconvert ! gaussianblur sigma=-2 ! videoconvert ! autovideosink

Time: 0:00:10.497720962

Latency Statistics:
        0x55d026cecee0.videotestsrc0.src|0x55d026ece060.autovideosink0.sink: mean=0:00:00.038908498 min=0:00:00.035988959 max=0:00:00.047720939

Element Latency Statistics:
        0x55d026eda330.capsfilter0.src: mean=0:00:00.000022337 min=0:00:00.000013209 max=0:00:00.000050442
        0x55d026e1d4d0.videoconvert0.src: mean=0:00:00.000022594 min=0:00:00.000011576 max=0:00:00.000063035
        0x55d026dee1d0.gaussianblur0.src: mean=0:00:00.038587862 min=0:00:00.035757412 max=0:00:00.046951260
        0x55d026de36d0.videoconvert1.src: mean=0:00:00.000275826 min=0:00:00.000180245 max=0:00:00.000678704

OMP_NUM_THREADS=4 GST_DEBUG="GST_TRACER:7" GST_TRACERS="latency(flags=pipeline+element)" GST_DEBUG_FILE=trace.log gst-launch-1.0 videotestsrc num-buffers=300 ! "video/x-raw,width=640,height=480" ! videoconvert ! gaussianblur sigma=-2 ! videoconvert ! autovideosink

Time: 0:00:09.993806407

Latency Statistics:
        0x557f8d3ff380.videotestsrc0.src|0x557f8d412060.autovideosink0.sink: mean=0:00:00.016117619 min=0:00:00.010885659 max=0:00:00.020469247

Element Latency Statistics:
        0x557f8d4222f0.capsfilter0.src: mean=0:00:00.000032629 min=0:00:00.000022318 max=0:00:00.000061060
        0x557f8d40b2b0.videoconvert0.src: mean=0:00:00.000041020 min=0:00:00.000023231 max=0:00:00.000165284
        0x557f8d40e950.gaussianblur0.src: mean=0:00:00.015790028 min=0:00:00.010685111 max=0:00:00.020005140
        0x557f8d40f070.videoconvert1.src: mean=0:00:00.000253940 min=0:00:00.000124530 max=0:00:00.000737544

Merge request reports