1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-12 19:18:44 +02:00
FFmpeg/libavfilter/dnn
Xu Jun 3c7cad69f2 dnn_backend_native_layer_conv2d.c:Add mutithread function
Use pthread to multithread dnn_execute_layer_conv2d.
Can be tested with command "./ffmpeg_g -i input.png -vf \
format=yuvj420p,dnn_processing=dnn_backend=native:model= \
espcn.model:input=x:output=y:options=conv2d_threads=23 \
 -y sr_native.jpg -benchmark"

before patch: utime=11.238s stime=0.005s rtime=11.248s
after patch:  utime=20.817s stime=0.047s rtime=1.051s
on my 3900X 12c24t @4.2GHz

About the increase of utime, it's because that CPU HyperThreading
technology makes logical cores twice of physical cores while cpu's
counting performance improves less than double. And utime sums
all cpu's logical cores' runtime. As a result, using threads num
near cpu's logical core's number will double utime, while reduce
rtime less than half for HyperThreading CPUs.

Signed-off-by: Xu Jun <xujunzz@sjtu.edu.cn>
Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
2020-09-09 14:24:36 +08:00
..
dnn_backend_native_layer_avgpool.c dnn/native: add log error message 2020-08-25 13:03:46 +08:00
dnn_backend_native_layer_avgpool.h dnn/native: add log error message 2020-08-25 13:03:46 +08:00
dnn_backend_native_layer_conv2d.c dnn_backend_native_layer_conv2d.c:Add mutithread function 2020-09-09 14:24:36 +08:00
dnn_backend_native_layer_conv2d.h dnn/native: add log error message 2020-08-25 13:03:46 +08:00
dnn_backend_native_layer_depth2space.c dnn/native: add log error message 2020-08-25 13:03:46 +08:00
dnn_backend_native_layer_depth2space.h dnn/native: add log error message 2020-08-25 13:03:46 +08:00
dnn_backend_native_layer_mathbinary.c dnn/native: add log error message 2020-08-25 13:03:46 +08:00
dnn_backend_native_layer_mathbinary.h dnn/native: add log error message 2020-08-25 13:03:46 +08:00
dnn_backend_native_layer_mathunary.c dnn/native: add log error message 2020-08-25 13:03:46 +08:00
dnn_backend_native_layer_mathunary.h dnn/native: add log error message 2020-08-25 13:03:46 +08:00
dnn_backend_native_layer_maximum.c dnn/native: add log error message 2020-08-25 13:03:46 +08:00
dnn_backend_native_layer_maximum.h dnn/native: add log error message 2020-08-25 13:03:46 +08:00
dnn_backend_native_layer_pad.c dnn/native: add log error message 2020-08-25 13:03:46 +08:00
dnn_backend_native_layer_pad.h dnn/native: add log error message 2020-08-25 13:03:46 +08:00
dnn_backend_native_layers.c dnn/native: add native support for avg_pool 2020-08-10 16:37:39 +08:00
dnn_backend_native_layers.h dnn/native: add log error message 2020-08-25 13:03:46 +08:00
dnn_backend_native.c dnn_backend_native.c: parse options in native backend 2020-09-09 14:24:36 +08:00
dnn_backend_native.h dnn_backend_native.c: parse options in native backend 2020-09-09 14:24:36 +08:00
dnn_backend_openvino.c dnn/openvino: add log error message 2020-08-31 13:12:10 +08:00
dnn_backend_openvino.h dnn: move output name from DNNModel.set_input_output to DNNModule.execute_model 2020-08-25 09:02:59 +08:00
dnn_backend_tf.c dnn/tensorflow: add log error message 2020-08-31 13:12:10 +08:00
dnn_backend_tf.h dnn: move output name from DNNModel.set_input_output to DNNModule.execute_model 2020-08-25 09:02:59 +08:00
dnn_interface.c dnn: add openvino as one of dnn backend 2020-07-02 09:36:34 +08:00
Makefile dnn/native: add native support for avg_pool 2020-08-10 16:37:39 +08:00