[FFmpeg-devel] [PATCH V2 1/3] checkasm/vf_eq: add test for vf_eq

2019-09-18 Thread Ting Fu
Signed-off-by: Ting Fu --- libavfilter/vf_eq.c | 13 --- libavfilter/vf_eq.h | 1 + tests/checkasm/Makefile | 1 + tests/checkasm/checkasm.c | 3 ++ tests/checkasm/checkasm.h | 1 + tests/checkasm/vf_eq.c| 79 +++ tests/fate

[FFmpeg-devel] [PATCH V2 3/3] avfilter/x86/vf_eq: add SSE2 version

2019-09-18 Thread Ting Fu
Signed-off-by: Ting Fu --- libavfilter/x86/vf_eq.asm| 12 ++-- libavfilter/x86/vf_eq_init.c | 19 +++ 2 files changed, 29 insertions(+), 2 deletions(-) diff --git a/libavfilter/x86/vf_eq.asm b/libavfilter/x86/vf_eq.asm index 8460342896..a30a287029 100644

[FFmpeg-devel] [PATCH V2 2/3] avfilter/x86/vf_eq: Change inline assembly into nasm code

2019-09-18 Thread Ting Fu
Signed-off-by: Ting Fu --- libavfilter/x86/Makefile | 3 +- libavfilter/x86/vf_eq.asm| 82 ++ libavfilter/x86/vf_eq.c | 96 libavfilter/x86/vf_eq_init.c | 55 + 4 files changed, 139 insertions

[FFmpeg-devel] [PATCH 2/3] avfilter/x86/vf_eq: Change inline assembly into nasm code

2019-09-17 Thread Ting Fu
Signed-off-by: Ting Fu --- libavfilter/x86/Makefile | 3 +- libavfilter/x86/vf_eq.asm| 82 ++ libavfilter/x86/vf_eq.c | 96 libavfilter/x86/vf_eq_init.c | 55 + 4 files changed, 139 insertions

[FFmpeg-devel] [PATCH 3/3] avfilter/x86/vf_eq: add SSE2 version

2019-09-17 Thread Ting Fu
Signed-off-by: Ting Fu --- libavfilter/x86/vf_eq.asm| 19 +-- libavfilter/x86/vf_eq_init.c | 20 2 files changed, 37 insertions(+), 2 deletions(-) diff --git a/libavfilter/x86/vf_eq.asm b/libavfilter/x86/vf_eq.asm index bf28691297..d6b51cf6df 100644

[FFmpeg-devel] [PATCH 1/3] checkasm/vf_eq: add test for vf_eq

2019-09-17 Thread Ting Fu
Signed-off-by: Ting Fu --- libavfilter/vf_eq.c | 13 --- libavfilter/vf_eq.h | 1 + tests/checkasm/Makefile | 1 + tests/checkasm/checkasm.c | 3 ++ tests/checkasm/checkasm.h | 1 + tests/checkasm/vf_eq.c| 79 +++ tests/fate

[FFmpeg-devel] [PATCH] libswscale/swscale_unscaled.c: remove redundant code

2019-12-04 Thread Ting Fu
Signed-off-by: Ting Fu --- libswscale/swscale_unscaled.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/libswscale/swscale_unscaled.c b/libswscale/swscale_unscaled.c index d9260c151a..0d109da2d7 100644 --- a/libswscale/swscale_unscaled.c +++ b/libswscale/swscale_unscaled.c @@ -2032,7

[FFmpeg-devel] [PATCH V2 1/2] libswscale/x86/yuv2rgb: Change inline assembly into nasm code

2019-12-01 Thread Ting Fu
Tested using this command: ./ffmpeg -pix_fmt yuv420p -s 1920*1080 -i ArashRawYuv420.yuv \ -vcodec rawvideo -s 1920*1080 -pix_fmt rgb24 -f null /dev/null The fps increase from 151 to 389 on my local machine. Signed-off-by: Ting Fu --- libswscale/x86/Makefile | 1 + libswscale/x86

[FFmpeg-devel] [PATCH V2 2/2] libswscale/x86/yuv2rgb: add ssse3 version

2019-12-01 Thread Ting Fu
Tested using this command: /ffmpeg -pix_fmt yuv420p -s 1920*1080 -i ArashRawYuv420.yuv \ -vcodec rawvideo -s 1920*1080 -pix_fmt rgb24 -f null /dev/null The fps increase from 389 to 640 on my local machine. Signed-off-by: Ting Fu --- libswscale/x86/yuv2rgb.c | 8 +- libswscale/x86

[FFmpeg-devel] [PATCH 2/2] libswscale/x86/yuv2rgb: add ssse3 version

2019-11-27 Thread Ting Fu
Signed-off-by: Ting Fu --- libswscale/x86/yuv2rgb.c | 5 + libswscale/x86/yuv2rgb_template.c | 58 ++- libswscale/x86/yuv_2_rgb.asm | 163 +++--- 3 files changed, 208 insertions(+), 18 deletions(-) diff --git a/libswscale/x86/yuv2rgb.c b

[FFmpeg-devel] [PATCH 1/2] libswscale/x86/yuv2rgb: Change inline assembly into nasm code

2019-11-27 Thread Ting Fu
Signed-off-by: Ting Fu --- libswscale/x86/Makefile | 1 + libswscale/x86/swscale.c | 16 +- libswscale/x86/yuv2rgb.c | 81 ++ libswscale/x86/yuv2rgb_template.c | 441 ++ libswscale/x86/yuv_2_rgb.asm | 270 ++ 5

[FFmpeg-devel] [PATCH V4 1/2] libswscale/x86/yuv2rgb: Change inline assembly into nasm code

2019-12-18 Thread Ting Fu
Tested using this command: ./ffmpeg -pix_fmt yuv420p -s 1920*1080 -i ArashRawYuv420.yuv \ -vcodec rawvideo -s 1920*1080 -pix_fmt rgb24 -f null /dev/null The fps increase from 151 to 389 on my local machine. Signed-off-by: Ting Fu --- libswscale/x86/Makefile | 1 + libswscale/x86

[FFmpeg-devel] [PATCH V4 2/2] libswscale/x86/yuv2rgb: add ssse3 version

2019-12-18 Thread Ting Fu
Tested using this command: /ffmpeg -pix_fmt yuv420p -s 1920*1080 -i ArashRawYuv420.yuv \ -vcodec rawvideo -s 1920*1080 -pix_fmt rgb24 -f null /dev/null The fps increase from 389 to 640 on my local machine. Signed-off-by: Ting Fu --- libswscale/x86/yuv2rgb.c | 8 +- libswscale/x86

[FFmpeg-devel] [PATCH V3 1/2] libswscale/x86/yuv2rgb: Change inline assembly into nasm code

2019-12-03 Thread Ting Fu
Tested using this command: ./ffmpeg -pix_fmt yuv420p -s 1920*1080 -i ArashRawYuv420.yuv \ -vcodec rawvideo -s 1920*1080 -pix_fmt rgb24 -f null /dev/null The fps increase from 151 to 389 on my local machine. Signed-off-by: Ting Fu --- libswscale/x86/Makefile | 1 + libswscale/x86

[FFmpeg-devel] [PATCH V3 2/2] libswscale/x86/yuv2rgb: add ssse3 version

2019-12-03 Thread Ting Fu
Tested using this command: /ffmpeg -pix_fmt yuv420p -s 1920*1080 -i ArashRawYuv420.yuv \ -vcodec rawvideo -s 1920*1080 -pix_fmt rgb24 -f null /dev/null The fps increase from 389 to 640 on my local machine. Signed-off-by: Ting Fu --- libswscale/x86/yuv2rgb.c | 8 +- libswscale/x86

[FFmpeg-devel] [PATCH V2] libswscale/x86/yuv2rgb: Fix Segmentation Fault when load unaligned data

2020-02-25 Thread Ting Fu
Fixes ticket #8532 Signed-off-by: Ting Fu --- V2: Add ticket info in commit message libswscale/x86/yuv_2_rgb.asm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libswscale/x86/yuv_2_rgb.asm b/libswscale/x86/yuv_2_rgb.asm index e05bbb89f5..575a84d921 100644

[FFmpeg-devel] [PATCH] libswscale/x86/yuv2rgb: Fix Segmentation Fault when load unaligned data

2020-02-24 Thread Ting Fu
Signed-off-by: Ting Fu --- libswscale/x86/yuv_2_rgb.asm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libswscale/x86/yuv_2_rgb.asm b/libswscale/x86/yuv_2_rgb.asm index e05bbb89f5..575a84d921 100644 --- a/libswscale/x86/yuv_2_rgb.asm +++ b/libswscale/x86/yuv_2_rgb.asm

[FFmpeg-devel] [PATCH V7 1/2] libswscale/x86/yuv2rgb: Change inline assembly into nasm code

2020-01-09 Thread Ting Fu
Signed-off-by: Ting Fu --- V7: Fix compile issue when user configure with --disable-mmx. Fix issue when running ./ffmpeg with --cpuflags mmx/ssse3. Adjust the SIMD verify logic in libswscale/x86/yuv2rgb.c libswscale/x86/Makefile | 1 + libswscale/x86/swscale.c

[FFmpeg-devel] [PATCH V7 2/2] libswscale/x86/yuv2rgb: add ssse3 version

2020-01-09 Thread Ting Fu
Tested using this command: /ffmpeg -pix_fmt yuv420p -s 1920*1080 -i ArashRawYuv420.yuv \ -vcodec rawvideo -s 1920*1080 -pix_fmt rgb24 -f null /dev/null The fps increase from 389 to 640 on Intel(R) Core(TM) i7-8700K CPU @ 3.70GHz Signed-off-by: Ting Fu --- libswscale/x86/yuv2rgb.c | 38

[FFmpeg-devel] [PATCH V8 2/2] libswscale/x86/yuv2rgb: add ssse3 version

2020-01-18 Thread Ting Fu
Tested using this command: /ffmpeg -pix_fmt yuv420p -s 1920*1080 -i ArashRawYuv420.yuv \ -vcodec rawvideo -s 1920*1080 -pix_fmt rgb24 -f null /dev/null The fps increase from 389 to 640 on Intel(R) Core(TM) i7-8700K CPU @ 3.70GHz Signed-off-by: Ting Fu --- libswscale/x86/yuv2rgb.c | 38

[FFmpeg-devel] [PATCH V8 1/2] libswscale/x86/yuv2rgb: Change inline assembly into nasm code

2020-01-18 Thread Ting Fu
The original inline assembly and nasm code have the same fps when called by command. NASM code almost has no impact on the perfromance. Signed-off-by: Ting Fu --- V8: Remove all reindention to make review easier. Fix some improper indention. Reserve the "inline" for

[FFmpeg-devel] [PATCH V5 1/2] libswscale/x86/yuv2rgb: Change inline assembly into nasm code

2020-01-05 Thread Ting Fu
Signed-off-by: Ting Fu --- libswscale/x86/Makefile | 1 + libswscale/x86/swscale.c | 16 +- libswscale/x86/yuv2rgb.c | 81 +++--- libswscale/x86/yuv2rgb_template.c | 441 ++ libswscale/x86/yuv_2_rgb.asm | 270 ++ 5

[FFmpeg-devel] [PATCH V5 2/2] libswscale/x86/yuv2rgb: add ssse3 version

2020-01-05 Thread Ting Fu
Tested using this command: /ffmpeg -pix_fmt yuv420p -s 1920*1080 -i ArashRawYuv420.yuv \ -vcodec rawvideo -s 1920*1080 -pix_fmt rgb24 -f null /dev/null The fps increase from 389 to 640 on my local machine. Signed-off-by: Ting Fu --- libswscale/x86/yuv2rgb.c | 7 +- libswscale/x86

[FFmpeg-devel] [PATCH V6 2/2] libswscale/x86/yuv2rgb: add ssse3 version

2020-01-07 Thread Ting Fu
Tested using this command: /ffmpeg -pix_fmt yuv420p -s 1920*1080 -i ArashRawYuv420.yuv \ -vcodec rawvideo -s 1920*1080 -pix_fmt rgb24 -f null /dev/null The fps increase from 389 to 640 on Intel(R) Core(TM) i7-8700K CPU @ 3.70GHz Signed-off-by: Ting Fu --- libswscale/x86/yuv2rgb.c

[FFmpeg-devel] [PATCH V6 1/2] libswscale/x86/yuv2rgb: Change inline assembly into nasm code

2020-01-07 Thread Ting Fu
Signed-off-by: Ting Fu --- libswscale/x86/Makefile | 1 + libswscale/x86/swscale.c | 16 +- libswscale/x86/yuv2rgb.c | 81 +++--- libswscale/x86/yuv2rgb_template.c | 441 ++ libswscale/x86/yuv_2_rgb.asm | 270 ++ 5

[FFmpeg-devel] [PATCH 1/2] dnn/openvino: support run inference via GPU

2020-09-08 Thread Ting Fu
detailed steps please refer: https://github.com/openvinotoolkit/openvino/blob/master/build-instruction.md inference model with GPU please add: optioins=device=GPU Signed-off-by: Ting Fu --- libavfilter/dnn/dnn_backend_openvino.c | 52 ++ 1 file changed, 44 insertions(+), 8

[FFmpeg-devel] [PATCH 2/2] dnn/openvino: add input/output name info

2020-09-08 Thread Ting Fu
show all input/output names when the input or output name not correct Signed-off-by: Ting Fu --- libavfilter/dnn/dnn_backend_openvino.c | 18 +- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/libavfilter/dnn/dnn_backend_openvino.c b/libavfilter/dnn

[FFmpeg-devel] [PATCH V4 2/2] dnn/native: add log error message

2020-08-23 Thread Ting Fu
Signed-off-by: Ting Fu --- libavfilter/dnn/dnn_backend_native.c | 59 +++ libavfilter/dnn/dnn_backend_native.h | 5 ++ .../dnn/dnn_backend_native_layer_avgpool.c| 10 +++- .../dnn/dnn_backend_native_layer_avgpool.h| 2 +- .../dnn

[FFmpeg-devel] [PATCH V4 1/2] dnn/native: unify error return to DNN_ERROR

2020-08-23 Thread Ting Fu
Unify all error return as DNN_ERROR, in order to cease model executing when return error in ff_dnn_execute_model_native layer_func.pf_exec Signed-off-by: Ting Fu --- V4: Rename NetworkContext to NativeContext Move pf_exec return DNN_ERROR from PATCH 2/2 to 1/2 libavfilter/dnn

[FFmpeg-devel] [PATCH] dnn/native: rename struct ConvolutionalNetwork to NativeModel

2020-08-19 Thread Ting Fu
Signed-off-by: Ting Fu --- libavfilter/dnn/dnn_backend_native.c | 112 +-- libavfilter/dnn/dnn_backend_native.h | 4 +- libavfilter/dnn/dnn_backend_tf.c | 24 +++--- 3 files changed, 70 insertions(+), 70 deletions(-) diff --git a/libavfilter/dnn

[FFmpeg-devel] [PATCH V3 2/2] dnn/native: add log error message

2020-08-20 Thread Ting Fu
Signed-off-by: Ting Fu --- V3: 1. modify log_ctx of NativeModel to non-pointer 2. modify log_ctx of NativeModel to ctx 3. delete empty line libavfilter/dnn/dnn_backend_native.c | 67 ++- libavfilter/dnn/dnn_backend_native.h | 5 ++ .../dnn

[FFmpeg-devel] [PATCH V3 1/2] dnn/native: unify error return to DNN_ERROR

2020-08-20 Thread Ting Fu
Unify all error return as DNN_ERROR, in order to cease model executing when return error in ff_dnn_execute_model_native layer_func.pf_exec Signed-off-by: Ting Fu --- libavfilter/dnn/dnn_backend_native_layer_avgpool.c | 2 +- libavfilter/dnn/dnn_backend_native_layer_conv2d.c | 4

[FFmpeg-devel] [PATCH 1/2] dnn/openvino: add log error message

2020-08-26 Thread Ting Fu
Signed-off-by: Ting Fu --- libavfilter/dnn/dnn_backend_openvino.c | 51 ++ 1 file changed, 43 insertions(+), 8 deletions(-) diff --git a/libavfilter/dnn/dnn_backend_openvino.c b/libavfilter/dnn/dnn_backend_openvino.c index 034dee1839..5d6d3ed542 100644 --- a/libavfilter

[FFmpeg-devel] [PATCH 2/2] dnn/tensorflow: add log error message

2020-08-26 Thread Ting Fu
Signed-off-by: Ting Fu --- libavfilter/dnn/dnn_backend_tf.c | 59 ++-- 1 file changed, 57 insertions(+), 2 deletions(-) diff --git a/libavfilter/dnn/dnn_backend_tf.c b/libavfilter/dnn/dnn_backend_tf.c index bdc90d5063..5e7f37bb12 100644 --- a/libavfilter/dnn

[FFmpeg-devel] [PATCH V5 2/2] dnn/native: add log error message

2020-08-24 Thread Ting Fu
Signed-off-by: Ting Fu --- libavfilter/dnn/dnn_backend_native.c | 55 +++ libavfilter/dnn/dnn_backend_native.h | 5 ++ .../dnn/dnn_backend_native_layer_avgpool.c| 10 +++- .../dnn/dnn_backend_native_layer_avgpool.h| 2 +- .../dnn

[FFmpeg-devel] [PATCH V5 1/2] dnn/native: unify error return to DNN_ERROR

2020-08-24 Thread Ting Fu
Unify all error return as DNN_ERROR, in order to cease model executing when return error in ff_dnn_execute_model_native layer_func.pf_exec Signed-off-by: Ting Fu --- V5: rebase to latest code libavfilter/dnn/dnn_backend_native.c | 10 ++ libavfilter/dnn

[FFmpeg-devel] [PATCH V2] dnn/native: add log error message

2020-08-16 Thread Ting Fu
Signed-off-by: Ting Fu --- V2: Fix the issue in V1: make fate failed libavfilter/dnn/dnn_backend_native.c | 74 +++ libavfilter/dnn/dnn_backend_native.h | 5 ++ .../dnn/dnn_backend_native_layer_avgpool.c| 2 +- .../dnn

[FFmpeg-devel] [PATCH 1/2] dnn_backend_native_layer_mathunary: add abs support

2020-05-25 Thread Ting Fu
output)) Signed-off-by: Ting Fu --- libavfilter/dnn/Makefile | 1 + libavfilter/dnn/dnn_backend_native.h | 1 + .../dnn/dnn_backend_native_layer_mathunary.c | 80 +++ .../dnn/dnn_backend_native_layer_mathunary.h | 45

[FFmpeg-devel] [PATCH 2/2] dnn-layer-mathunary-test: add unit test for abs

2020-05-25 Thread Ting Fu
Signed-off-by: Ting Fu --- tests/dnn/.gitignore | 1 + tests/dnn/Makefile | 1 + tests/dnn/dnn-layer-mathunary-test.c | 81 tests/fate/dnn.mak | 5 ++ 4 files changed, 88 insertions(+) create mode 100644 tests

[FFmpeg-devel] [PATCH V4 1/2] dnn/native: add native support for avg_pool

2020-08-04 Thread Ting Fu
sess.run(y, feed_dict={x: in_data}) imageio.imsave("out.jpg", np.squeeze(output)) Signed-off-by: Ting Fu --- libavfilter/dnn/Makefile | 1 + libavfilter/dnn/dnn_backend_native.h | 2 + .../dnn/dnn_backend_native_layer_avgpool.c| 141 +++

[FFmpeg-devel] [PATCH V4 2/2] FATE/dnn: add unit test for dnn avgpool layer

2020-08-04 Thread Ting Fu
'make fate-dnn-layer-avgpool' to run the test Signed-off-by: Ting Fu --- tests/dnn/.gitignore | 1 + tests/dnn/Makefile | 1 + tests/dnn/dnn-layer-avgpool-test.c | 202 + tests/fate/dnn.mak | 5 + 4 files changed

[FFmpeg-devel] [PATCH V5 1/2] dnn/native: add native support for avg_pool

2020-08-05 Thread Ting Fu
sess.run(y, feed_dict={x: in_data}) imageio.imsave("out.jpg", np.squeeze(output)) Signed-off-by: Ting Fu --- libavfilter/dnn/Makefile | 1 + libavfilter/dnn/dnn_backend_native.h | 2 + .../dnn/dnn_backend_native_layer_avgpool.c| 141 +++

[FFmpeg-devel] [PATCH V5 2/2] FATE/dnn: add unit test for dnn avgpool layer

2020-08-05 Thread Ting Fu
'make fate-dnn-layer-avgpool' to run the test Signed-off-by: Ting Fu --- V5: Fix the issue V4 make fate failed. tests/dnn/.gitignore | 1 + tests/dnn/Makefile | 1 + tests/dnn/dnn-layer-avgpool-test.c | 202 + tests/fate/dnn.mak

[FFmpeg-devel] [PATCH V6 2/2] FATE/dnn: add unit test for dnn avgpool layer

2020-08-05 Thread Ting Fu
'make fate-dnn-layer-avgpool' to run the test Signed-off-by: Ting Fu --- V6: Fix the issue of make fate failed in V4 tests/dnn/.gitignore | 1 + tests/dnn/Makefile | 1 + tests/dnn/dnn-layer-avgpool-test.c | 198 + tests/fate

[FFmpeg-devel] [PATCH V6 1/2] dnn/native: add native support for avg_pool

2020-08-05 Thread Ting Fu
sess.run(y, feed_dict={x: in_data}) imageio.imsave("out.jpg", np.squeeze(output)) Signed-off-by: Ting Fu --- libavfilter/dnn/Makefile | 1 + libavfilter/dnn/dnn_backend_native.h | 2 + .../dnn/dnn_backend_native_layer_avgpool.c| 141 +++

[FFmpeg-devel] [PATCH V7 2/2] FATE/dnn: add unit test for dnn avgpool layer

2020-08-09 Thread Ting Fu
'make fate-dnn-layer-avgpool' to run the test Signed-off-by: Ting Fu --- tests/dnn/.gitignore | 1 + tests/dnn/Makefile | 1 + tests/dnn/dnn-layer-avgpool-test.c | 197 + tests/fate/dnn.mak | 5 + 4 files changed

[FFmpeg-devel] [PATCH V7 1/2] dnn/native: add native support for avg_pool

2020-08-09 Thread Ting Fu
Not support pooling strides in channel dimension yet. Signed-off-by: Ting Fu --- libavfilter/dnn/Makefile | 1 + libavfilter/dnn/dnn_backend_native.h | 2 + .../dnn/dnn_backend_native_layer_avgpool.c| 141 ++ .../dnn

[FFmpeg-devel] [PATCH V3 2/2] FATE/dnn: add unit test for dnn avgpool layer

2020-07-30 Thread Ting Fu
'make fate-dnn-layer-avgpool' to run the test Signed-off-by: Ting Fu --- tests/dnn/.gitignore | 1 + tests/dnn/Makefile | 1 + tests/dnn/dnn-layer-avgpool-test.c | 202 + tests/fate/dnn.mak | 5 + 4 files changed

[FFmpeg-devel] [PATCH V3 1/2] dnn/native: add native support for avg_pool

2020-07-30 Thread Ting Fu
sess.run(y, feed_dict={x: in_data}) imageio.imsave("out.jpg", np.squeeze(output)) Signed-off-by: Ting Fu --- libavfilter/dnn/Makefile | 1 + libavfilter/dnn/dnn_backend_native.h | 2 + .../dnn/dnn_backend_native_layer_avgpool.c| 147 +++

[FFmpeg-devel] [PATCH] tests/dnn/mathunary: fix the issue of NAN

2020-07-02 Thread Ting Fu
When one of output[i] & expected_output is NAN, the unit test will always pass. Signed-off-by: Ting Fu --- tests/dnn/dnn-layer-mathunary-test.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/dnn/dnn-layer-mathunary-test.c b/tests/dnn/dnn-layer-mathunary-te

[FFmpeg-devel] [PATCH V2] tests/dnn/mathunary: fix the issue of NAN

2020-07-07 Thread Ting Fu
When one of output[i] & expected_output is NAN, the unit test will always pass. Signed-off-by: Ting Fu --- tests/dnn/dnn-layer-mathunary-test.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/dnn/dnn-layer-mathunary-test.c b/tests/dnn/dnn-layer-mathunary-te

[FFmpeg-devel] [PATCH V3] tests/dnn/mathunary: fix the issue of NAN

2020-07-08 Thread Ting Fu
When one of output[i] & expected_output is NAN, the unit test will always pass. Signed-off-by: Ting Fu --- tests/dnn/dnn-layer-mathunary-test.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/dnn/dnn-layer-mathunary-test.c b/tests/dnn/dnn-layer-mathunary-te

[FFmpeg-devel] [PATCH 1/6] dnn_backend_native_layer_mathunary: add asin support

2020-06-18 Thread Ting Fu
, '.', 'image_process.pb', as_text=False) print("image_process.pb generated, please use \ path_to_ffmpeg/tools/python/convert.py to generate image_process.model\n") output = sess.run(y, feed_dict={x: in_data}) imageio.imsave("out.jpg", np.squeeze(output)) Signed-off-by: Ting Fu

[FFmpeg-devel] [PATCH 4/6] dnn-layer-math-unary-test: add unit test for acos

2020-06-18 Thread Ting Fu
Signed-off-by: Ting Fu --- tests/dnn/dnn-layer-mathunary-test.c | 4 1 file changed, 4 insertions(+) diff --git a/tests/dnn/dnn-layer-mathunary-test.c b/tests/dnn/dnn-layer-mathunary-test.c index ac26f7445f..540ea4cef5 100644 --- a/tests/dnn/dnn-layer-mathunary-test.c +++ b/tests/dnn/dnn

[FFmpeg-devel] [PATCH 6/6] dnn-layer-math-unary-test: add unit test for atan

2020-06-18 Thread Ting Fu
Signed-off-by: Ting Fu --- tests/dnn/dnn-layer-mathunary-test.c | 4 1 file changed, 4 insertions(+) diff --git a/tests/dnn/dnn-layer-mathunary-test.c b/tests/dnn/dnn-layer-mathunary-test.c index 540ea4cef5..bf77c44bbe 100644 --- a/tests/dnn/dnn-layer-mathunary-test.c +++ b/tests/dnn/dnn

[FFmpeg-devel] [PATCH 3/6] dnn_backend_native_layer_mathunary: add acos support

2020-06-18 Thread Ting Fu
, '.', 'image_process.pb', as_text=False) print("image_process.pb generated, please use \ path_to_ffmpeg/tools/python/convert.py to generate image_process.model\n") output = sess.run(y, feed_dict={x: in_data}) imageio.imsave("out.jpg", np.squeeze(output)) Signed-off-by: Ting Fu

[FFmpeg-devel] [PATCH 5/6] dnn_backend_native_layer_mathunary: add atan support

2020-06-18 Thread Ting Fu
, '.', 'image_process.pb', as_text=False) print("image_process.pb generated, please use \ path_to_ffmpeg/tools/python/convert.py to generate image_process.model\n") output = sess.run(y, feed_dict={x: in_data}) imageio.imsave("out.jpg", np.squeeze(output)) Signed-off-by: Ting Fu

[FFmpeg-devel] [PATCH 2/6] dnn-layer-math-unary-test: add unit test for asin

2020-06-18 Thread Ting Fu
Signed-off-by: Ting Fu --- tests/dnn/dnn-layer-mathunary-test.c | 4 1 file changed, 4 insertions(+) diff --git a/tests/dnn/dnn-layer-mathunary-test.c b/tests/dnn/dnn-layer-mathunary-test.c index 9a7e07c98c..ac26f7445f 100644 --- a/tests/dnn/dnn-layer-mathunary-test.c +++ b/tests/dnn/dnn

[FFmpeg-devel] [PATCH V2 02/12] dnn-layer-math-unary-test: add unit test for sinh

2020-06-29 Thread Ting Fu
Signed-off-by: Ting Fu --- tests/dnn/dnn-layer-mathunary-test.c | 4 1 file changed, 4 insertions(+) diff --git a/tests/dnn/dnn-layer-mathunary-test.c b/tests/dnn/dnn-layer-mathunary-test.c index bf77c44bbe..a1ff05e5fb 100644 --- a/tests/dnn/dnn-layer-mathunary-test.c +++ b/tests/dnn/dnn

[FFmpeg-devel] [PATCH V2 01/12] dnn_backend_native_layer_mathunary: add sinh support

2020-06-29 Thread Ting Fu
Signed-off-by: Ting Fu --- V2: Add more test number Fix incorrect atanh unit test libavfilter/dnn/dnn_backend_native_layer_mathunary.c | 4 libavfilter/dnn/dnn_backend_native_layer_mathunary.h | 1 + tools/python/convert_from_tensorflow.py | 2 +- tools/python

[FFmpeg-devel] [PATCH V2 04/12] dnn-layer-math-unary-test: add unit test for cosh

2020-06-29 Thread Ting Fu
Signed-off-by: Ting Fu --- tests/dnn/dnn-layer-mathunary-test.c | 4 1 file changed, 4 insertions(+) diff --git a/tests/dnn/dnn-layer-mathunary-test.c b/tests/dnn/dnn-layer-mathunary-test.c index a1ff05e5fb..0280debc0b 100644 --- a/tests/dnn/dnn-layer-mathunary-test.c +++ b/tests/dnn/dnn

[FFmpeg-devel] [PATCH V2 05/12] dnn_backend_native_layer_mathunary: add tanh support

2020-06-29 Thread Ting Fu
Signed-off-by: Ting Fu --- libavfilter/dnn/dnn_backend_native_layer_mathunary.c | 4 libavfilter/dnn/dnn_backend_native_layer_mathunary.h | 1 + tools/python/convert_from_tensorflow.py | 2 +- tools/python/convert_header.py | 2 +- 4 files changed, 7

[FFmpeg-devel] [PATCH V2 03/12] dnn_backend_native_layer_mathunary: add cosh support

2020-06-29 Thread Ting Fu
Signed-off-by: Ting Fu --- libavfilter/dnn/dnn_backend_native_layer_mathunary.c | 4 libavfilter/dnn/dnn_backend_native_layer_mathunary.h | 1 + tools/python/convert_from_tensorflow.py | 2 +- tools/python/convert_header.py | 2 +- 4 files changed, 7

[FFmpeg-devel] [PATCH V2 12/12] dnn-layer-math-unary-test: add unit test for atanh

2020-06-29 Thread Ting Fu
Signed-off-by: Ting Fu --- tests/dnn/dnn-layer-mathunary-test.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tests/dnn/dnn-layer-mathunary-test.c b/tests/dnn/dnn-layer-mathunary-test.c index 5587e47ad5..683e623d95 100644 --- a/tests/dnn/dnn-layer-mathunary

[FFmpeg-devel] [PATCH V2 07/12] dnn_backend_native_layer_mathunary: add asinh support

2020-06-29 Thread Ting Fu
Signed-off-by: Ting Fu --- libavfilter/dnn/dnn_backend_native_layer_mathunary.c | 4 libavfilter/dnn/dnn_backend_native_layer_mathunary.h | 1 + tools/python/convert_from_tensorflow.py | 2 +- tools/python/convert_header.py | 2 +- 4 files changed, 7

[FFmpeg-devel] [PATCH V2 10/12] dnn-layer-math-unary-test: add unit test for acosh

2020-06-29 Thread Ting Fu
Signed-off-by: Ting Fu --- tests/dnn/dnn-layer-mathunary-test.c | 4 1 file changed, 4 insertions(+) diff --git a/tests/dnn/dnn-layer-mathunary-test.c b/tests/dnn/dnn-layer-mathunary-test.c index 90fce71a0c..5587e47ad5 100644 --- a/tests/dnn/dnn-layer-mathunary-test.c +++ b/tests/dnn/dnn

[FFmpeg-devel] [PATCH V2 11/12] dnn_backend_native_layer_mathunary: add atanh support

2020-06-29 Thread Ting Fu
, '.', 'image_process.pb', as_text=False) print("image_process.pb generated, please use \ path_to_ffmpeg/tools/python/convert.py to generate image_process.model\n") output = sess.run(y, feed_dict={x: in_data}) imageio.imsave("out.jpg", np.squeeze(output)) Signed-off-by: Ting Fu

[FFmpeg-devel] [PATCH V2 09/12] dnn_backend_native_layer_mathunary: add acosh support

2020-06-29 Thread Ting Fu
Signed-off-by: Ting Fu --- libavfilter/dnn/dnn_backend_native_layer_mathunary.c | 4 libavfilter/dnn/dnn_backend_native_layer_mathunary.h | 1 + tools/python/convert_from_tensorflow.py | 2 +- tools/python/convert_header.py | 2 +- 4 files changed, 7

[FFmpeg-devel] [PATCH V2 06/12] dnn-layer-math-unary-test: add unit test for tanh

2020-06-29 Thread Ting Fu
Signed-off-by: Ting Fu --- tests/dnn/dnn-layer-mathunary-test.c | 4 1 file changed, 4 insertions(+) diff --git a/tests/dnn/dnn-layer-mathunary-test.c b/tests/dnn/dnn-layer-mathunary-test.c index 0280debc0b..6885b4d318 100644 --- a/tests/dnn/dnn-layer-mathunary-test.c +++ b/tests/dnn/dnn

[FFmpeg-devel] [PATCH V2 08/12] dnn-layer-math-unary-test: add unit test for asinh

2020-06-29 Thread Ting Fu
Signed-off-by: Ting Fu --- tests/dnn/dnn-layer-mathunary-test.c | 4 1 file changed, 4 insertions(+) diff --git a/tests/dnn/dnn-layer-mathunary-test.c b/tests/dnn/dnn-layer-mathunary-test.c index 6885b4d318..90fce71a0c 100644 --- a/tests/dnn/dnn-layer-mathunary-test.c +++ b/tests/dnn/dnn

[FFmpeg-devel] [PATCH 04/12] dnn-layer-math-unary-test: add unit test for cosh

2020-06-28 Thread Ting Fu
Signed-off-by: Ting Fu --- tests/dnn/dnn-layer-mathunary-test.c | 4 1 file changed, 4 insertions(+) diff --git a/tests/dnn/dnn-layer-mathunary-test.c b/tests/dnn/dnn-layer-mathunary-test.c index a1ff05e5fb..0280debc0b 100644 --- a/tests/dnn/dnn-layer-mathunary-test.c +++ b/tests/dnn/dnn

[FFmpeg-devel] [PATCH 02/12] dnn-layer-math-unary-test: add unit test for sinh

2020-06-28 Thread Ting Fu
Signed-off-by: Ting Fu --- tests/dnn/dnn-layer-mathunary-test.c | 4 1 file changed, 4 insertions(+) diff --git a/tests/dnn/dnn-layer-mathunary-test.c b/tests/dnn/dnn-layer-mathunary-test.c index bf77c44bbe..a1ff05e5fb 100644 --- a/tests/dnn/dnn-layer-mathunary-test.c +++ b/tests/dnn/dnn

[FFmpeg-devel] [PATCH 12/12] dnn-layer-math-unary-test: add unit test for atanh

2020-06-28 Thread Ting Fu
Signed-off-by: Ting Fu --- tests/dnn/dnn-layer-mathunary-test.c | 4 1 file changed, 4 insertions(+) diff --git a/tests/dnn/dnn-layer-mathunary-test.c b/tests/dnn/dnn-layer-mathunary-test.c index 5587e47ad5..1815f79f34 100644 --- a/tests/dnn/dnn-layer-mathunary-test.c +++ b/tests/dnn/dnn

[FFmpeg-devel] [PATCH 11/12] dnn_backend_native_layer_mathunary: add atanh support

2020-06-28 Thread Ting Fu
, '.', 'image_process.pb', as_text=False) print("image_process.pb generated, please use \ path_to_ffmpeg/tools/python/convert.py to generate image_process.model\n") output = sess.run(y, feed_dict={x: in_data}) imageio.imsave("out.jpg", np.squeeze(output)) Signed-off-by: Ting Fu

[FFmpeg-devel] [PATCH 07/12] dnn_backend_native_layer_mathunary: add asinh support

2020-06-28 Thread Ting Fu
Signed-off-by: Ting Fu --- libavfilter/dnn/dnn_backend_native_layer_mathunary.c | 4 libavfilter/dnn/dnn_backend_native_layer_mathunary.h | 1 + tools/python/convert_from_tensorflow.py | 2 +- tools/python/convert_header.py | 2 +- 4 files changed, 7

[FFmpeg-devel] [PATCH 09/12] dnn_backend_native_layer_mathunary: add acosh support

2020-06-28 Thread Ting Fu
Signed-off-by: Ting Fu --- libavfilter/dnn/dnn_backend_native_layer_mathunary.c | 4 libavfilter/dnn/dnn_backend_native_layer_mathunary.h | 1 + tools/python/convert_from_tensorflow.py | 2 +- tools/python/convert_header.py | 2 +- 4 files changed, 7

[FFmpeg-devel] [PATCH 06/12] dnn-layer-math-unary-test: add unit test for tanh

2020-06-28 Thread Ting Fu
Signed-off-by: Ting Fu --- tests/dnn/dnn-layer-mathunary-test.c | 4 1 file changed, 4 insertions(+) diff --git a/tests/dnn/dnn-layer-mathunary-test.c b/tests/dnn/dnn-layer-mathunary-test.c index 0280debc0b..6885b4d318 100644 --- a/tests/dnn/dnn-layer-mathunary-test.c +++ b/tests/dnn/dnn

[FFmpeg-devel] [PATCH 10/12] dnn-layer-math-unary-test: add unit test for acosh

2020-06-28 Thread Ting Fu
Signed-off-by: Ting Fu --- tests/dnn/dnn-layer-mathunary-test.c | 4 1 file changed, 4 insertions(+) diff --git a/tests/dnn/dnn-layer-mathunary-test.c b/tests/dnn/dnn-layer-mathunary-test.c index 90fce71a0c..5587e47ad5 100644 --- a/tests/dnn/dnn-layer-mathunary-test.c +++ b/tests/dnn/dnn

[FFmpeg-devel] [PATCH 03/12] dnn_backend_native_layer_mathunary: add cosh support

2020-06-28 Thread Ting Fu
Signed-off-by: Ting Fu --- libavfilter/dnn/dnn_backend_native_layer_mathunary.c | 4 libavfilter/dnn/dnn_backend_native_layer_mathunary.h | 1 + tools/python/convert_from_tensorflow.py | 2 +- tools/python/convert_header.py | 2 +- 4 files changed, 7

[FFmpeg-devel] [PATCH 05/12] dnn_backend_native_layer_mathunary: add tanh support

2020-06-28 Thread Ting Fu
Signed-off-by: Ting Fu --- libavfilter/dnn/dnn_backend_native_layer_mathunary.c | 4 libavfilter/dnn/dnn_backend_native_layer_mathunary.h | 1 + tools/python/convert_from_tensorflow.py | 2 +- tools/python/convert_header.py | 2 +- 4 files changed, 7

[FFmpeg-devel] [PATCH 01/12] dnn_backend_native_layer_mathunary: add sinh support

2020-06-28 Thread Ting Fu
Signed-off-by: Ting Fu --- libavfilter/dnn/dnn_backend_native_layer_mathunary.c | 4 libavfilter/dnn/dnn_backend_native_layer_mathunary.h | 1 + tools/python/convert_from_tensorflow.py | 2 +- tools/python/convert_header.py | 2 +- 4 files changed, 7

[FFmpeg-devel] [PATCH 08/12] dnn-layer-math-unary-test: add unit test for asinh

2020-06-28 Thread Ting Fu
Signed-off-by: Ting Fu --- tests/dnn/dnn-layer-mathunary-test.c | 4 1 file changed, 4 insertions(+) diff --git a/tests/dnn/dnn-layer-mathunary-test.c b/tests/dnn/dnn-layer-mathunary-test.c index 6885b4d318..90fce71a0c 100644 --- a/tests/dnn/dnn-layer-mathunary-test.c +++ b/tests/dnn/dnn

[FFmpeg-devel] [PATCH 5/6] dnn_backend_native_layer_mathunary: add tan support

2020-06-06 Thread Ting Fu
, '.', 'image_process.pb', as_text=False) print("image_process.pb generated, please use \ path_to_ffmpeg/tools/python/convert.py to generate image_process.model\n") output = sess.run(y, feed_dict={x: in_data}) imageio.imsave("out.jpg", np.squeeze(output)) Signed-off-by: Ting Fu

[FFmpeg-devel] [PATCH 4/6] dnn-layer-mathunary-test: add unit test for cos

2020-06-06 Thread Ting Fu
Signed-off-by: Ting Fu --- tests/dnn/dnn-layer-mathunary-test.c | 4 1 file changed, 4 insertions(+) diff --git a/tests/dnn/dnn-layer-mathunary-test.c b/tests/dnn/dnn-layer-mathunary-test.c index ed42198195..23e1766ad0 100644 --- a/tests/dnn/dnn-layer-mathunary-test.c +++ b/tests/dnn/dnn

[FFmpeg-devel] [PATCH 3/6] dnn_backend_native_layer_mathunary: add cos support

2020-06-06 Thread Ting Fu
, '.', 'image_process.pb', as_text=False) print("image_process.pb generated, please use \ path_to_ffmpeg/tools/python/convert.py to generate image_process.model\n") output = sess.run(y, feed_dict={x: in_data}) imageio.imsave("out.jpg", np.squeeze(output)) Signed-off-by: Ting Fu

[FFmpeg-devel] [PATCH 2/6] dnn-layer-mathunary-test: add unit test for sin

2020-06-06 Thread Ting Fu
Signed-off-by: Ting Fu --- tests/dnn/dnn-layer-mathunary-test.c | 4 1 file changed, 4 insertions(+) diff --git a/tests/dnn/dnn-layer-mathunary-test.c b/tests/dnn/dnn-layer-mathunary-test.c index f032ca0684..ed42198195 100644 --- a/tests/dnn/dnn-layer-mathunary-test.c +++ b/tests/dnn/dnn

[FFmpeg-devel] [PATCH 6/6] dnn-layer-mathunary-test: add unit test for tan

2020-06-06 Thread Ting Fu
Signed-off-by: Ting Fu --- tests/dnn/dnn-layer-mathunary-test.c | 4 1 file changed, 4 insertions(+) diff --git a/tests/dnn/dnn-layer-mathunary-test.c b/tests/dnn/dnn-layer-mathunary-test.c index 23e1766ad0..9a7e07c98c 100644 --- a/tests/dnn/dnn-layer-mathunary-test.c +++ b/tests/dnn/dnn

[FFmpeg-devel] [PATCH 1/6] dnn_backend_native_layer_mathunary: add sin support

2020-06-06 Thread Ting Fu
, '.', 'image_process.pb', as_text=False) print("image_process.pb generated, please use \ path_to_ffmpeg/tools/python/convert.py to generate image_process.model\n") output = sess.run(y, feed_dict={x: in_data}) imageio.imsave("out.jpg", np.squeeze(output)) Signed-off-by: Ting Fu

[FFmpeg-devel] [PATCH 1/2] dnn/native: add native support for avg_pool

2020-07-17 Thread Ting Fu
e("out.jpg", np.squeeze(output)) Signed-off-by: Ting Fu --- libavfilter/dnn/Makefile | 1 + libavfilter/dnn/dnn_backend_native.h | 2 + .../dnn/dnn_backend_native_layer_avgpool.c| 136 ++ .../dnn/dnn_backend_native_layer_avgpool.h

[FFmpeg-devel] [PATCH 2/2] FATE/dnn: add unit test for dnn avgpool layer

2020-07-17 Thread Ting Fu
'make fate-dnn-layer-avgpool' to run the test Signed-off-by: Ting Fu --- tests/dnn/.gitignore | 1 + tests/dnn/Makefile | 1 + tests/dnn/dnn-layer-avgpool-test.c | 202 + tests/fate/dnn.mak | 5 + 4 files changed

[FFmpeg-devel] [PATCH V2 2/2] FATE/dnn: add unit test for dnn avgpool layer

2020-07-29 Thread Ting Fu
'make fate-dnn-layer-avgpool' to run the test Signed-off-by: Ting Fu --- tests/dnn/.gitignore | 1 + tests/dnn/Makefile | 1 + tests/dnn/dnn-layer-avgpool-test.c | 202 + tests/fate/dnn.mak | 5 + 4 files changed

[FFmpeg-devel] [PATCH V2 1/2] dnn/native: add native support for avg_pool

2020-07-29 Thread Ting Fu
sess.run(y, feed_dict={x: in_data}) imageio.imsave("out.jpg", np.squeeze(output)) Signed-off-by: Ting Fu --- libavfilter/dnn/Makefile | 1 + libavfilter/dnn/dnn_backend_native.h | 2 + .../dnn/dnn_backend_native_layer_avgpool.c| 147 +++

[FFmpeg-devel] [PATCH] dnn/native: add log error message

2020-08-14 Thread Ting Fu
Signed-off-by: Ting Fu --- libavfilter/dnn/dnn_backend_native.c | 74 +++ libavfilter/dnn/dnn_backend_native.h | 5 ++ .../dnn/dnn_backend_native_layer_avgpool.c| 2 +- .../dnn/dnn_backend_native_layer_avgpool.h| 2 +- .../dnn

[FFmpeg-devel] [PATCH] dnn: add NV12 pixel format support

2020-12-18 Thread Ting Fu
Signed-off-by: Ting Fu --- libavfilter/dnn/dnn_io_proc.c | 2 ++ libavfilter/vf_dnn_processing.c | 30 +- 2 files changed, 23 insertions(+), 9 deletions(-) diff --git a/libavfilter/dnn/dnn_io_proc.c b/libavfilter/dnn/dnn_io_proc.c index c9b49be3bd..2744cb6502

[FFmpeg-devel] [PATCH 2/3] dnn/openvino: refine code for better model initialization

2021-01-10 Thread Ting Fu
Move openvino model/inference request creation and initialization steps from ff_dnn_load_model_ov to new function init_model_ov, for later input resize support. Signed-off-by: Ting Fu --- libavfilter/dnn/dnn_backend_openvino.c | 153 +++-- 1 file changed, 93 insertions

[FFmpeg-devel] [PATCH 3/3] dnn/openvino: support model input resize

2021-01-10 Thread Ting Fu
video_name.mp4 -vf dnn_processing=dnn_backend=openvino:\ model=model_name.xml:input=input_name:output=output_name:\ options=device=CPU\_resizable=1 -y output_video_name.mp4 Signed-off-by: Ting Fu --- libavfilter/dnn/dnn_backend_openvino.c | 21 +++-- 1 file changed, 19

[FFmpeg-devel] [PATCH 1/3] dnn/openvino: remove unnecessary code

2021-01-10 Thread Ting Fu
Signed-off-by: Ting Fu --- libavfilter/dnn/dnn_backend_openvino.c | 8 1 file changed, 8 deletions(-) diff --git a/libavfilter/dnn/dnn_backend_openvino.c b/libavfilter/dnn/dnn_backend_openvino.c index d27e451eea..050be97209 100644 --- a/libavfilter/dnn/dnn_backend_openvino.c +++ b

[FFmpeg-devel] [PATCH V3 2/3] dnn/openvino: refine code for better model initialization

2021-01-17 Thread Ting Fu
Move openvino model/inference request creation and initialization steps from ff_dnn_load_model_ov to new function init_model_ov, for later input resize support. Signed-off-by: Ting Fu --- libavfilter/dnn/dnn_backend_openvino.c | 203 ++--- 1 file changed, 118 insertions

[FFmpeg-devel] [PATCH V3 3/3] dnn/openvino: support model input resize

2021-01-17 Thread Ting Fu
video_name.mp4 -vf dnn_processing=dnn_backend=openvino:\ model=model_name.xml:input=input_name:output=output_name:\ options=device=CPU\_resizable=1 -y output_video_name.mp4 Signed-off-by: Ting Fu --- V3: rebase to latest code and add missing code libavfilter/dnn/dnn_backend_openvino.c

[FFmpeg-devel] [PATCH V3 1/3] dnn/openvino: remove unnecessary code

2021-01-17 Thread Ting Fu
Signed-off-by: Ting Fu --- libavfilter/dnn/dnn_backend_openvino.c | 8 1 file changed, 8 deletions(-) diff --git a/libavfilter/dnn/dnn_backend_openvino.c b/libavfilter/dnn/dnn_backend_openvino.c index 5271d1caa5..8476f4fb38 100644 --- a/libavfilter/dnn/dnn_backend_openvino.c +++ b

  1   2   >