[FFmpeg-devel] [PATCH V2 8/8] libavfilter: Remove DNNReturnType from DNN Module

2022-03-02 Thread Shubhanshu Saxena
This patch removes all occurences of DNNReturnType from the DNN module. This commit replaces DNN_SUCCESS by 0 (essentially the same), so the functions with DNNReturnType now return 0 in case of success, the negative values otherwise. Signed-off-by: Shubhanshu Saxena --- libavfilter/dnn

[FFmpeg-devel] [PATCH V2 7/8] lavfi/dnn_backend_common: Return specific error codes

2022-03-02 Thread Shubhanshu Saxena
Switch to returning specific error codes or DNN_GENERIC_ERROR when an error is encountered in the common DNN backend functions. Signed-off-by: Shubhanshu Saxena --- libavfilter/dnn/dnn_backend_common.c | 35 ++-- libavfilter/dnn/dnn_backend_common.h | 22

[FFmpeg-devel] [PATCH V2 6/8] lavfi/dnn_backend_native: Return Specific Error Codes

2022-03-02 Thread Shubhanshu Saxena
Switch to returning specific error codes or DNN_GENERIC_ERROR when an error is encountered. Signed-off-by: Shubhanshu Saxena --- libavfilter/dnn/dnn_backend_native.c | 82 +++- libavfilter/dnn/dnn_backend_native.h | 4 +- 2 files changed, 45 insertions(+), 41 deletions

[FFmpeg-devel] [PATCH V2 5/8] lavfi/dnn_backend_tf: Return Specific Error Codes

2022-03-02 Thread Shubhanshu Saxena
Switch to returning specific error codes or DNN_GENERIC_ERROR when an error is encountered. For TensorFlow C API errors, currently DNN_GENERIC_ERROR is returned. Signed-off-by: Shubhanshu Saxena --- libavfilter/dnn/dnn_backend_tf.c | 148 +-- libavfilter/dnn

[FFmpeg-devel] [PATCH V2 4/8] lavfi/dnn_backend_openvino: Return Specific Error Codes

2022-03-02 Thread Shubhanshu Saxena
Switch to returning specific error codes or DNN_GENERIC_ERROR when an error is encountered. For OpenVINO API errors, currently DNN_GENERIC_ERROR is returned. Signed-off-by: Shubhanshu Saxena --- libavfilter/dnn/dnn_backend_openvino.c | 138 +++-- libavfilter/dnn

[FFmpeg-devel] [PATCH V2 3/8] lavfi/dnn_io_proc: Return Specific Error Codes

2022-03-02 Thread Shubhanshu Saxena
This commit returns specific error codes from the functions in the dnn_io_proc instead of DNN_ERROR. Signed-off-by: Shubhanshu Saxena --- libavfilter/dnn/dnn_io_proc.c | 48 +++ libavfilter/dnn/dnn_io_proc.h | 8 +++--- 2 files changed, 30 insertions(+), 26

[FFmpeg-devel] [PATCH V2 2/8] lavfi/dnn: Error Specificity in Native Backend Layers

2022-03-02 Thread Shubhanshu Saxena
This commit returns specific error codes from the execution functions in the Native Backend layers instead of DNN_ERROR. Signed-off-by: Shubhanshu Saxena --- libavfilter/dnn/dnn_backend_native_layer_avgpool.c | 6 +++--- libavfilter/dnn/dnn_backend_native_layer_avgpool.h | 3 ++- libavfilter

[FFmpeg-devel] [PATCH V2 1/8] libavfilter: Prepare to handle specific error codes in DNN Filters

2022-03-02 Thread Shubhanshu Saxena
This commit prepares the filter side to handle specific error codes from the DNN backends instead of current DNN_ERROR. Signed-off-by: Shubhanshu Saxena --- libavfilter/dnn_filter_common.c | 10 +- libavfilter/dnn_filter_common.h | 10 +- libavfilter/vf_derain.c | 4

[FFmpeg-devel] [PATCH 8/8] libavfilter: Remove DNNReturnType from DNN Module

2022-02-24 Thread Shubhanshu Saxena
This patch removes all occurences of DNNReturnType from the DNN module. This commit replaces DNN_SUCCESS by 0 (essentially the same), so the functions with DNNReturnType now return 0 in case of success, the negative values otherwise. Signed-off-by: Shubhanshu Saxena --- libavfilter/dnn

[FFmpeg-devel] [PATCH 7/8] lavfi/dnn_backend_common: Return specific error codes

2022-02-24 Thread Shubhanshu Saxena
Switch to returning specific error codes or DNN_GENERIC_ERROR when an error is encountered in the common DNN backend functions. Signed-off-by: Shubhanshu Saxena --- libavfilter/dnn/dnn_backend_common.c | 35 ++-- libavfilter/dnn/dnn_backend_common.h | 22

[FFmpeg-devel] [PATCH 6/8] lavfi/dnn_backend_native: Return Specific Error Codes

2022-02-24 Thread Shubhanshu Saxena
Switch to returning specific error codes or DNN_GENERIC_ERROR when an error is encountered. Signed-off-by: Shubhanshu Saxena --- libavfilter/dnn/dnn_backend_native.c | 82 +++- libavfilter/dnn/dnn_backend_native.h | 4 +- 2 files changed, 45 insertions(+), 41 deletions

[FFmpeg-devel] [PATCH 5/8] lavfi/dnn_backend_tf: Return Specific Error Codes

2022-02-24 Thread Shubhanshu Saxena
Switch to returning specific error codes or DNN_GENERIC_ERROR when an error is encountered. For TensorFlow C API errors, currently DNN_GENERIC_ERROR is returned. Signed-off-by: Shubhanshu Saxena --- libavfilter/dnn/dnn_backend_tf.c | 147 +-- libavfilter/dnn

[FFmpeg-devel] [PATCH 4/8] lavfi/dnn_backend_openvino: Return Specific Error Codes

2022-02-24 Thread Shubhanshu Saxena
Switch to returning specific error codes or DNN_GENERIC_ERROR when an error is encountered. For OpenVINO API errors, currently DNN_GENERIC_ERROR is returned. --- libavfilter/dnn/dnn_backend_openvino.c | 138 +++-- libavfilter/dnn/dnn_backend_openvino.h | 4 +- libavfilter/dnn

[FFmpeg-devel] [PATCH 3/8] lavfi/dnn_io_proc: Return Specific Error Codes

2022-02-24 Thread Shubhanshu Saxena
This commit returns specific error codes from the functions in the dnn_io_proc instead of DNN_ERROR. Signed-off-by: Shubhanshu Saxena --- libavfilter/dnn/dnn_io_proc.c | 48 +++ libavfilter/dnn/dnn_io_proc.h | 8 +++--- 2 files changed, 30 insertions(+), 26

[FFmpeg-devel] [PATCH 2/8] lavfi/dnn: Error Specificity in Native Backend Layers

2022-02-24 Thread Shubhanshu Saxena
This commit returns specific error codes from the execution functions in the Native Backend layers instead of DNN_ERROR. Signed-off-by: Shubhanshu Saxena --- libavfilter/dnn/dnn_backend_native_layer_avgpool.c | 6 +++--- libavfilter/dnn/dnn_backend_native_layer_avgpool.h | 3 ++- libavfilter

[FFmpeg-devel] [PATCH 1/8] libavfilter: Prepare to handle specific error codes in DNN Filters

2022-02-24 Thread Shubhanshu Saxena
This commit prepares the filter side to handle specific error codes from the DNN backends instead of current DNN_ERROR. Signed-off-by: Shubhanshu Saxena --- libavfilter/dnn_filter_common.c | 10 +- libavfilter/dnn_filter_common.h | 10 +- libavfilter/vf_derain.c | 4

[FFmpeg-devel] [PATCH v5 6/6] doc/filters.texi: Include dnn_processing in docs of sr and derain filter

2021-08-25 Thread Shubhanshu Saxena
Signed-off-by: Shubhanshu Saxena --- doc/filters.texi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/filters.texi b/doc/filters.texi index 7aff920311..4da1cdc2aa 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -9982,7 +9982,7 @@ Note that different backends

[FFmpeg-devel] [PATCH v5 5/6] lavfi/dnn: Rename InferenceItem to LastLevelTaskItem

2021-08-25 Thread Shubhanshu Saxena
Item 3. inference_queue -> lltask_queue 4. inference -> lltask 5. inference_count -> lltask_count Signed-off-by: Shubhanshu Saxena --- libavfilter/dnn/dnn_backend_common.h | 4 +- libavfilter/dnn/dnn_backend_native.c | 58 ++--- libavfilter/dnn/dnn_backend_native.h | 2 +-

[FFmpeg-devel] [PATCH v5 4/6] libavfilter: Remove Async Flag from DNN Filter Side

2021-08-25 Thread Shubhanshu Saxena
Remove async flag from filter's perspective after the unification of async and sync modes in the DNN backend. Signed-off-by: Shubhanshu Saxena --- doc/filters.texi | 14 -- libavfilter/dnn/dnn_backend_tf.c | 7 +++ libavfilter/dnn_filter_common.c

[FFmpeg-devel] [PATCH v5 3/6] libavfilter: Remove synchronous functions from DNN filters

2021-08-25 Thread Shubhanshu Saxena
This commit removes the unused sync mode specific code from the DNN filters since the sync and async mode are now unified from the filters' perspective. Signed-off-by: Shubhanshu Saxena --- libavfilter/vf_dnn_detect.c | 71 +--- libavfilter/vf_dnn_processing.c

[FFmpeg-devel] [PATCH v5 2/6] libavfilter: Unify Execution Modes in DNN Filters

2021-08-25 Thread Shubhanshu Saxena
nstead of input frame to the DNN backends. Signed-off-by: Shubhanshu Saxena --- libavfilter/dnn/dnn_backend_common.c | 4 +- libavfilter/dnn/dnn_backend_common.h | 5 +- libavfilter/dnn/dnn_backend_native.c | 59 ++- libavfilter/dnn/dnn_backend_native.h | 6 ++

[FFmpeg-devel] [PATCH v5 1/6] lavfi/dnn: Task-based Inference in Native Backend

2021-08-25 Thread Shubhanshu Saxena
This commit rearranges the code in Native Backend to use the TaskItem for inference. Signed-off-by: Shubhanshu Saxena --- libavfilter/dnn/dnn_backend_native.c | 176 ++- libavfilter/dnn/dnn_backend_native.h | 2 + 2 files changed, 121 insertions(+), 57 deletions

[FFmpeg-devel] [PATCH v4 7/7] libavfilter: Send only input frame for DNN Detect and Classify

2021-08-25 Thread Shubhanshu Saxena
This commit updates the following two filters to send only the input frame and send NULL as output frame instead of input frame to the DNN backends. 1. vf_dnn_detect 2. vf_dnn_classify Signed-off-by: Shubhanshu Saxena --- libavfilter/dnn/dnn_backend_common.c | 2 +- libavfilter/dnn

[FFmpeg-devel] [PATCH v4 6/7] doc/filters.texi: Include dnn_processing in docs of sr and derain filter

2021-08-25 Thread Shubhanshu Saxena
Signed-off-by: Shubhanshu Saxena --- doc/filters.texi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/filters.texi b/doc/filters.texi index d99368e64b..112adc5d94 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -9982,7 +9982,7 @@ Note that different backends

[FFmpeg-devel] [PATCH v4 5/7] lavfi/dnn: Rename InferenceItem to LastLevelTaskItem

2021-08-25 Thread Shubhanshu Saxena
Item 3. inference_queue -> lltask_queue 4. inference -> lltask 5. inference_count -> lltask_count Signed-off-by: Shubhanshu Saxena --- libavfilter/dnn/dnn_backend_common.h | 4 +- libavfilter/dnn/dnn_backend_native.c | 58 ++--- libavfilter/dnn/dnn_backend_native.h | 2 +-

[FFmpeg-devel] [PATCH v4 4/7] libavfilter: Remove Async Flag from DNN Filter Side

2021-08-25 Thread Shubhanshu Saxena
Remove async flag from filter's perspective after the unification of async and sync modes in the DNN backend. Signed-off-by: Shubhanshu Saxena --- doc/filters.texi | 14 -- libavfilter/dnn/dnn_backend_tf.c | 7 +++ libavfilter/dnn_filter_common.c

[FFmpeg-devel] [PATCH v4 3/7] libavfilter: Remove synchronous functions from DNN filters

2021-08-25 Thread Shubhanshu Saxena
This commit removes the unused sync mode specific code from the DNN filters since the sync and async mode are now unified from the filters' perspective. Signed-off-by: Shubhanshu Saxena --- libavfilter/vf_dnn_detect.c | 71 +--- libavfilter/vf_dnn_processing.c

[FFmpeg-devel] [PATCH v4 2/7] libavfilter: Unify Execution Modes in DNN Filters

2021-08-25 Thread Shubhanshu Saxena
1 for async and 0 for sync mode of execution. This commit affects the following filters: 1. vf_dnn_classify 2. vf_dnn_detect 3. vf_dnn_processing 4. vf_sr 5. vf_derain Signed-off-by: Shubhanshu Saxena --- libavfilter/dnn/dnn_backend_common.c | 2 +- libavfilter/dnn/dnn_backend_common.h | 5

[FFmpeg-devel] [PATCH v4 1/7] lavfi/dnn: Task-based Inference in Native Backend

2021-08-25 Thread Shubhanshu Saxena
This commit rearranges the code in Native Backend to use the TaskItem for inference. Signed-off-by: Shubhanshu Saxena --- libavfilter/dnn/dnn_backend_native.c | 176 ++- libavfilter/dnn/dnn_backend_native.h | 2 + 2 files changed, 121 insertions(+), 57 deletions

[FFmpeg-devel] [PATCH v3 7/7] libavfilter: Send only input frame for DNN Detect and Classify

2021-08-23 Thread Shubhanshu Saxena
This commit updates the following two filters to send only the input frame and send NULL as output frame instead of input frame to the DNN backends. 1. vf_dnn_detect 2. vf_dnn_classify Signed-off-by: Shubhanshu Saxena --- libavfilter/dnn/dnn_backend_common.c | 2 +- libavfilter/dnn

[FFmpeg-devel] [PATCH v3 6/7] doc/filters.texi: Include dnn_processing in docs of sr and derain filter

2021-08-23 Thread Shubhanshu Saxena
Signed-off-by: Shubhanshu Saxena --- doc/filters.texi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/filters.texi b/doc/filters.texi index d99368e64b..112adc5d94 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -9982,7 +9982,7 @@ Note that different backends

[FFmpeg-devel] [PATCH v3 5/7] lavfi/dnn: Rename InferenceItem to LastLevelTaskItem

2021-08-23 Thread Shubhanshu Saxena
Item 3. inference_queue -> lltask_queue 4. inference -> lltask 5. inference_count -> lltask_count Signed-off-by: Shubhanshu Saxena --- libavfilter/dnn/dnn_backend_common.h | 4 +- libavfilter/dnn/dnn_backend_native.c | 58 ++--- libavfilter/dnn/dnn_backend_native.h | 2 +-

[FFmpeg-devel] [PATCH v3 4/7] libavfilter: Remove Async Flag from DNN Filter Side

2021-08-23 Thread Shubhanshu Saxena
Remove async flag from filter's perspective after the unification of async and sync modes in the DNN backend. Signed-off-by: Shubhanshu Saxena --- doc/filters.texi | 14 -- libavfilter/dnn/dnn_backend_tf.c | 7 +++ libavfilter/dnn_filter_common.c

[FFmpeg-devel] [PATCH v3 3/7] libavfilter: Remove synchronous functions from DNN filters

2021-08-23 Thread Shubhanshu Saxena
This commit removes the unused sync mode specific code from the DNN filters since the sync and async mode are now unified from the filters' perspective. Signed-off-by: Shubhanshu Saxena --- libavfilter/vf_dnn_detect.c | 71 +--- libavfilter/vf_dnn_processing.c

[FFmpeg-devel] [PATCH v3 2/7] libavfilter: Unify Execution Modes in DNN Filters

2021-08-23 Thread Shubhanshu Saxena
1 for async and 0 for sync mode of execution. This commit affects the following filters: 1. vf_dnn_classify 2. vf_dnn_detect 3. vf_dnn_processing 4. vf_sr 5. vf_derain Signed-off-by: Shubhanshu Saxena --- libavfilter/dnn/dnn_backend_common.c | 2 +- libavfilter/dnn/dnn_backend_common.h | 5

[FFmpeg-devel] [PATCH v3 1/7] lavfi/dnn: Task-based Inference in Native Backend

2021-08-23 Thread Shubhanshu Saxena
This commit rearranges the code in Native Backend to use the TaskItem for inference. Signed-off-by: Shubhanshu Saxena --- libavfilter/dnn/dnn_backend_native.c | 176 ++- libavfilter/dnn/dnn_backend_native.h | 2 + 2 files changed, 121 insertions(+), 57 deletions

Re: [FFmpeg-devel] [PATCH v2 6/6] doc/filters.texi: Include dnn_processing in docs of sr and derain filter

2021-08-23 Thread Shubhanshu Saxena
On Mon, Aug 23, 2021 at 3:57 PM Fu, Ting wrote: > > > > -Original Message- > > From: ffmpeg-devel On Behalf Of > > Shubhanshu Saxena > > Sent: Saturday, August 21, 2021 03:59 PM > > To: ffmpeg-devel@ffmpeg.org > > Cc: Shubhanshu Saxena >

[FFmpeg-devel] [PATCH v2 6/6] doc/filters.texi: Include dnn_processing in docs of sr and derain filter

2021-08-21 Thread Shubhanshu Saxena
Signed-off-by: Shubhanshu Saxena --- doc/filters.texi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/filters.texi b/doc/filters.texi index f7b6b61f4c..0b2da7c71f 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -9974,7 +9974,7 @@ Note that different backends

[FFmpeg-devel] [PATCH v2 5/6] lavfi/dnn: Rename InferenceItem to LastLevelTaskItem

2021-08-21 Thread Shubhanshu Saxena
Item 3. inference_queue -> lltask_queue 4. inference -> lltask 5. inference_count -> lltask_count Signed-off-by: Shubhanshu Saxena --- libavfilter/dnn/dnn_backend_common.h | 4 +- libavfilter/dnn/dnn_backend_native.c | 58 ++--- libavfilter/dnn/dnn_backend_native.h | 2 +-

[FFmpeg-devel] [PATCH v2 4/6] libavfilter: Remove Async Flag from DNN Filter Side

2021-08-21 Thread Shubhanshu Saxena
Remove async flag from filter's perspective after the unification of async and sync modes in the DNN backend. Signed-off-by: Shubhanshu Saxena --- doc/filters.texi | 14 -- libavfilter/dnn/dnn_backend_tf.c | 7 +++ libavfilter/dnn_filter_common.c

[FFmpeg-devel] [PATCH v2 3/6] libavfilter: Remove synchronous functions from DNN filters

2021-08-21 Thread Shubhanshu Saxena
This commit removes the unused sync mode specific code from the DNN filters since the sync and async mode are now unified from the filters' perspective. Signed-off-by: Shubhanshu Saxena --- libavfilter/vf_dnn_detect.c | 71 +--- libavfilter/vf_dnn_processing.c

[FFmpeg-devel] [PATCH v2 2/6] libavfilter: Unify Execution Modes in DNN Filters

2021-08-21 Thread Shubhanshu Saxena
1 for async and 0 for sync mode of execution. This commit affects the following filters: 1. vf_dnn_classify 2. vf_dnn_detect 3. vf_dnn_processing 4. vf_sr 5. vf_derain Signed-off-by: Shubhanshu Saxena --- libavfilter/dnn/dnn_backend_common.c | 2 +- libavfilter/dnn/dnn_backend_common.h | 5

[FFmpeg-devel] [PATCH v2 1/6] lavfi/dnn: Task-based Inference in Native Backend

2021-08-21 Thread Shubhanshu Saxena
This commit rearranges the code in Native Backend to use the TaskItem for inference. Signed-off-by: Shubhanshu Saxena --- libavfilter/dnn/dnn_backend_native.c | 176 ++- libavfilter/dnn/dnn_backend_native.h | 2 + 2 files changed, 121 insertions(+), 57 deletions

Re: [FFmpeg-devel] [PATCH 2/6] libavfilter: Unify Execution Modes in DNN Filters

2021-08-21 Thread Shubhanshu Saxena
On Sat, Aug 21, 2021 at 12:56 PM Guo, Yejun wrote: > > > > -Original Message- > > From: ffmpeg-devel On Behalf Of > > Shubhanshu Saxena > > Sent: Saturday, August 21, 2021 3:05 PM > > To: FFmpeg development discussions and patches > de...@ffm

Re: [FFmpeg-devel] [PATCH 2/6] libavfilter: Unify Execution Modes in DNN Filters

2021-08-21 Thread Shubhanshu Saxena
On Sat, Aug 21, 2021 at 8:41 AM Guo, Yejun wrote: > > > > -Original Message- > > From: ffmpeg-devel On Behalf Of > > Shubhanshu Saxena > > Sent: 2021年8月20日 22:21 > > To: ffmpeg-devel@ffmpeg.org > > Cc: Shubhanshu Saxena > > Subjec

[FFmpeg-devel] [PATCH 6/6] doc/filters.texi: Include dnn_processing in docs of sr and derain filter

2021-08-20 Thread Shubhanshu Saxena
Signed-off-by: Shubhanshu Saxena --- doc/filters.texi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/filters.texi b/doc/filters.texi index fac19ac413..03a355a982 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -9974,7 +9974,7 @@ Note that different backends

[FFmpeg-devel] [PATCH 5/6] lavfi/dnn: Rename InferenceItem to LastLevelTaskItem

2021-08-20 Thread Shubhanshu Saxena
Item 3. inference_queue -> lltask_queue 4. inference -> lltask 5. inference_count -> lltask_count Signed-off-by: Shubhanshu Saxena --- libavfilter/dnn/dnn_backend_common.h | 4 +- libavfilter/dnn/dnn_backend_native.c | 58 ++--- libavfilter/dnn/dnn_backend_native.h | 2 +-

[FFmpeg-devel] [PATCH 4/6] libavfilter: Remove Async Flag from DNN Filter Side

2021-08-20 Thread Shubhanshu Saxena
Remove async flag from filter's perspective after the unification of async and sync modes in the DNN backend. Signed-off-by: Shubhanshu Saxena --- doc/filters.texi | 14 -- libavfilter/dnn/dnn_backend_tf.c | 7 +++ libavfilter/dnn_filter_common.c

[FFmpeg-devel] [PATCH 3/6] libavfilter: Remove synchronous functions from DNN filters

2021-08-20 Thread Shubhanshu Saxena
This commit removes the unused sync mode specific code from the DNN filters since the sync and async mode are now unified from the filters' perspective. Signed-off-by: Shubhanshu Saxena --- libavfilter/vf_dnn_detect.c | 71 +--- libavfilter/vf_dnn_processing.c

[FFmpeg-devel] [PATCH 2/6] libavfilter: Unify Execution Modes in DNN Filters

2021-08-20 Thread Shubhanshu Saxena
1 for async and 0 for sync mode of execution. This commit affects the following filters: 1. vf_dnn_classify 2. vf_dnn_detect 3. vf_dnn_processing 4. vf_sr 5. vf_derain Signed-off-by: Shubhanshu Saxena --- libavfilter/dnn/dnn_backend_common.c | 2 +- libavfilter/dnn/dnn_backend_common.h | 5

[FFmpeg-devel] [PATCH 1/6] lavfi/dnn: Task-based Inference in Native Backend

2021-08-20 Thread Shubhanshu Saxena
This commit rearranges the code in Native Backend to use the TaskItem for inference. Signed-off-by: Shubhanshu Saxena --- libavfilter/dnn/dnn_backend_native.c | 176 ++- libavfilter/dnn/dnn_backend_native.h | 2 + 2 files changed, 121 insertions(+), 57 deletions

[FFmpeg-devel] [PATCH v3 8/9] [GSoC] lavfi/dnn_backend_tf: Error Handling for tf_create_inference_request

2021-08-08 Thread Shubhanshu Saxena
This commit includes the check for the case when the newly created TFInferRequest is NULL. Signed-off-by: Shubhanshu Saxena --- libavfilter/dnn/dnn_backend_tf.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavfilter/dnn/dnn_backend_tf.c b/libavfilter/dnn/dnn_backend_tf.c index

[FFmpeg-devel] [PATCH v3 7/9] [GSoC] lavfi/dnn: Extract Common Parts from get_output functions

2021-08-08 Thread Shubhanshu Saxena
The frame allocation and filling the TaskItem with execution parameters is common in the three backends. This commit shifts this logic to dnn_backend_common. Signed-off-by: Shubhanshu Saxena --- libavfilter/dnn/dnn_backend_common.c | 26 + libavfilter/dnn/dnn_backend_common.h

[FFmpeg-devel] [PATCH v3 9/9] [GSoC] lavfi/dnn: DNNAsyncExecModule Execution Failure Handling

2021-08-08 Thread Shubhanshu Saxena
This commit adds the case handling if the asynchronous execution of a request fails by checking the exit status of the thread when joining before starting another execution. On failure, it does the cleanup as well. Signed-off-by: Shubhanshu Saxena --- libavfilter/dnn/dnn_backend_common.c | 23

[FFmpeg-devel] [PATCH v3 6/9] [GSoC] lavfi/dnn_backend_tf: Add TF_Status to TFRequestItem

2021-08-08 Thread Shubhanshu Saxena
Since requests are running in parallel, there is inconsistency in the status of the execution. To resolve it, we avoid using mutex as it would result in single TF_Session running at a time. So add TF_Status to the TFRequestItem Signed-off-by: Shubhanshu Saxena --- libavfilter/dnn

[FFmpeg-devel] [PATCH v3 5/9] [GSoC] lavfi/dnn_backend_tf: Error Handling for execute_model_tf

2021-08-08 Thread Shubhanshu Saxena
This patch adds error handling for cases where the execute_model_tf fails, clears the used memory in the TFRequestItem and finally pushes it back to the request queue. Signed-off-by: Shubhanshu Saxena --- libavfilter/dnn/dnn_backend_tf.c | 52 ++-- 1 file changed, 36

[FFmpeg-devel] [PATCH v3 4/9] [GSoC] lavfi/dnn: Async Support for TensorFlow Backend

2021-08-08 Thread Shubhanshu Saxena
comparison of this mechanism with the existing sync mechanism on TensorFlow C API 2.5 CPU variant. Async Mode: 4m32.846s Sync Mode: 5m17.582s The above was performed on super resolution filter using SRCNN model. Signed-off-by: Shubhanshu Saxena --- libavfilter/dnn/dnn_backend_tf.c | 121

[FFmpeg-devel] [PATCH v3 3/9] [GSoC] lavfi/dnn_backend_tf: TFInferRequest Execution and Documentation

2021-08-08 Thread Shubhanshu Saxena
This commit adds a function for execution of TFInferRequest and documentation for functions related to TFInferRequest. Signed-off-by: Shubhanshu Saxena --- libavfilter/dnn/dnn_backend_tf.c | 45 1 file changed, 45 insertions(+) diff --git a/libavfilter/dnn

[FFmpeg-devel] [PATCH v3 2/9] [GSoC] lavfi/dnn: Common Function to Get Async Result in DNN Backends

2021-08-08 Thread Shubhanshu Saxena
This commits refactors the get async result function for common use in all three backends. Signed-off-by: Shubhanshu Saxena --- libavfilter/dnn/dnn_backend_common.c | 20 libavfilter/dnn/dnn_backend_common.h | 15 +++ libavfilter/dnn/dnn_backend_openvino.c

[FFmpeg-devel] [PATCH v3 1/9] [GSoC] lavfi/dnn: Add Async Execution Mechanism and Documentation

2021-08-08 Thread Shubhanshu Saxena
This commit adds an async execution mechanism for common use in the TensorFlow and Native backends. This commit also adds the documentation of typedefs and functions in the async module for common use in DNN backends. Signed-off-by: Shubhanshu Saxena --- libavfilter/dnn/dnn_backend_common.c

[FFmpeg-devel] [PATCH V2 2/8] [GSoC] lavfi/dnn: Common Function to Get Async Result in DNN Backends

2021-08-04 Thread Shubhanshu Saxena
This commits refactors the get async result function for common use in all three backends. Signed-off-by: Shubhanshu Saxena --- libavfilter/dnn/dnn_backend_common.c | 20 libavfilter/dnn/dnn_backend_common.h | 15 +++ libavfilter/dnn/dnn_backend_openvino.c

[FFmpeg-devel] [PATCH V2 4/8] [GSoC] lavfi/dnn: Async Support for TensorFlow Backend

2021-08-04 Thread Shubhanshu Saxena
comparison of this mechanism with the existing sync mechanism on TensorFlow C API 2.5 CPU variant. Async Mode: 4m32.846s Sync Mode: 5m17.582s The above was performed on super resolution filter using SRCNN model. Signed-off-by: Shubhanshu Saxena --- libavfilter/dnn/dnn_backend_tf.c | 121

[FFmpeg-devel] [PATCH V2 3/8] [GSoC] lavfi/dnn_backend_tf: TFInferRequest Execution and Documentation

2021-08-04 Thread Shubhanshu Saxena
This commit adds a function for execution of TFInferRequest and documentation for functions related to TFInferRequest. Signed-off-by: Shubhanshu Saxena --- libavfilter/dnn/dnn_backend_tf.c | 45 1 file changed, 45 insertions(+) diff --git a/libavfilter/dnn

[FFmpeg-devel] [PATCH V2 6/8] [GSoC] lavfi/dnn_backend_tf: Add TF_Status to TFRequestItem

2021-08-04 Thread Shubhanshu Saxena
Since requests are running in parallel, there is inconsistency in the status of the execution. To resolve it, we avoid using mutex as it would result in single TF_Session running at a time. So add TF_Status to the TFRequestItem Signed-off-by: Shubhanshu Saxena --- libavfilter/dnn

[FFmpeg-devel] [PATCH V2 5/8] [GSoC] lavfi/dnn_backend_tf: Error Handling for execute_model_tf

2021-08-04 Thread Shubhanshu Saxena
This patch adds error handling for cases where the execute_model_tf fails, clears the used memory in the TFRequestItem and finally pushes it back to the request queue. Signed-off-by: Shubhanshu Saxena --- libavfilter/dnn/dnn_backend_tf.c | 52 ++-- 1 file changed, 36

[FFmpeg-devel] [PATCH V2 8/8] [GSoC] lavfi/dnn_backend_tf: Error Handling for tf_create_inference_request

2021-08-04 Thread Shubhanshu Saxena
This commit includes the check for the case when the newly created TFInferRequest is NULL. Signed-off-by: Shubhanshu Saxena --- libavfilter/dnn/dnn_backend_tf.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavfilter/dnn/dnn_backend_tf.c b/libavfilter/dnn/dnn_backend_tf.c index

[FFmpeg-devel] [PATCH V2 1/8] [GSoC] lavfi/dnn: Add Async Execution Mechanism and Documentation

2021-08-04 Thread Shubhanshu Saxena
This commit adds an async execution mechanism for common use in the TensorFlow and Native backends. This commit also adds the documentation of typedefs and functions in the async module for common use in DNN backends. Signed-off-by: Shubhanshu Saxena --- libavfilter/dnn/dnn_backend_common.c

[FFmpeg-devel] [PATCH V2 7/8] [GSoC] lavfi/dnn: Extract Common Parts from get_output functions

2021-08-04 Thread Shubhanshu Saxena
The frame allocation and filling the TaskItem with execution parameters is common in the three backends. This commit shifts this logic to dnn_backend_common. Signed-off-by: Shubhanshu Saxena --- libavfilter/dnn/dnn_backend_common.c | 26 + libavfilter/dnn/dnn_backend_common.h

[FFmpeg-devel] [PATCH 1/8] lavfi/dnn: Add Async Execution Mechanism and Documentation

2021-07-30 Thread Shubhanshu Saxena
This commit adds an async execution mechanism for common use in the TensorFlow and Native backends. This commit also adds the documentation of typedefs and functions in the async module for common use in DNN backends. Signed-off-by: Shubhanshu Saxena --- libavfilter/dnn/dnn_backend_common.c

[FFmpeg-devel] [PATCH 3/8] lavfi/dnn_backend_tf: TFInferRequest Execution and Documentation

2021-07-30 Thread Shubhanshu Saxena
This commit adds a function for execution of TFInferRequest and documentation for functions related to TFInferRequest. Signed-off-by: Shubhanshu Saxena --- libavfilter/dnn/dnn_backend_tf.c | 45 1 file changed, 45 insertions(+) diff --git a/libavfilter/dnn

[FFmpeg-devel] [PATCH 5/8] lavfi/dnn_backend_tf: Error Handling for execute_model_tf

2021-07-30 Thread Shubhanshu Saxena
This patch adds error handling for cases where the execute_model_tf fails, clears the used memory in the TFRequestItem and finally pushes it back to the request queue. Signed-off-by: Shubhanshu Saxena --- libavfilter/dnn/dnn_backend_tf.c | 52 ++-- 1 file changed, 36

[FFmpeg-devel] [PATCH 2/8] lavfi/dnn: Common Function to Get Async Result in DNN Backends

2021-07-30 Thread Shubhanshu Saxena
This commits refactors the get async result function for common use in all three backends. Signed-off-by: Shubhanshu Saxena --- libavfilter/dnn/dnn_backend_common.c | 20 libavfilter/dnn/dnn_backend_common.h | 15 +++ libavfilter/dnn/dnn_backend_openvino.c

[FFmpeg-devel] [PATCH 6/8] lavfi/dnn_backend_tf: Add TF_Status to TFRequestItem

2021-07-30 Thread Shubhanshu Saxena
Since requests are running in parallel, there is inconsistency in the status of the execution. To resolve it, we avoid using mutex as it would result in single TF_Session running at a time. So add TF_Status to the TFRequestItem Signed-off-by: Shubhanshu Saxena --- libavfilter/dnn

[FFmpeg-devel] [PATCH 4/8] lavfi/dnn: Async Support for TensorFlow Backend

2021-07-30 Thread Shubhanshu Saxena
variant. Async Mode: 0m57.064s Sync Mode: 1m1.959s The above was performed on super resolution filter using ESPCN model. Signed-off-by: Shubhanshu Saxena --- libavfilter/dnn/dnn_backend_tf.c | 121 ++- libavfilter/dnn/dnn_backend_tf.h | 3 + libavfilter/dnn

[FFmpeg-devel] [PATCH 8/8] lavfi/dnn_backend_tf: Error Handling for tf_create_inference_request

2021-07-30 Thread Shubhanshu Saxena
This commit includes the check for the case when the newly created TFInferRequest is NULL. Signed-off-by: Shubhanshu Saxena --- libavfilter/dnn/dnn_backend_tf.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavfilter/dnn/dnn_backend_tf.c b/libavfilter/dnn/dnn_backend_tf.c index

[FFmpeg-devel] [PATCH 7/8] lavfi/dnn: Extract Common Parts from get_output functions

2021-07-30 Thread Shubhanshu Saxena
The frame allocation and filling the TaskItem with execution parameters is common in the three backends. This commit shifts this logic to dnn_backend_common. Signed-off-by: Shubhanshu Saxena --- libavfilter/dnn/dnn_backend_common.c | 26 + libavfilter/dnn/dnn_backend_common.h

[FFmpeg-devel] [PATCH 2/2] lavfi/dnn_backend_ov: Rename RequestItem to OVRequestItem

2021-07-11 Thread Shubhanshu Saxena
Rename RequestItem to OVRequestItem in the OpenVINO backend to avoid confusion. Signed-off-by: Shubhanshu Saxena --- libavfilter/dnn/dnn_backend_openvino.c | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/libavfilter/dnn/dnn_backend_openvino.c b

[FFmpeg-devel] [PATCH 1/2] lavfi/dnn_backend_openvino.c: Fix Memory Leak in execute_model_ov

2021-07-11 Thread Shubhanshu Saxena
In cases where the execution inside the function execute_model_ov fails, the OVRequestItem must be pushed back to the request_queue before returning the error. In case pushing back fails, release the allocated memory. Signed-off-by: Shubhanshu Saxena --- libavfilter/dnn/dnn_backend_openvino.c

Re: [FFmpeg-devel] [PATCH V2 3/6] lavfi/dnn_backend_tf: Request-based Execution

2021-07-11 Thread Shubhanshu Saxena
On Sun, Jul 11, 2021 at 6:25 PM Guo, Yejun wrote: > > > > -Original Message- > > From: ffmpeg-devel On Behalf Of > > Shubhanshu Saxena > > Sent: 2021年7月5日 18:31 > > To: ffmpeg-devel@ffmpeg.org > > Cc: Shubhanshu Saxena > > Subject: [F

[FFmpeg-devel] [PATCH V2 3/6] lavfi/dnn_backend_tf: Request-based Execution

2021-07-05 Thread Shubhanshu Saxena
This commit uses TFRequestItem and the existing sync execution mechanism to use request-based execution. It will help in adding async functionality to the TensorFlow backend later. Signed-off-by: Shubhanshu Saxena --- libavfilter/dnn/dnn_backend_common.h | 3 + libavfilter/dnn

[FFmpeg-devel] [PATCH V2 2/6] lavfi/dnn_backend_tf: Add TFInferRequest and TFRequestItem

2021-07-05 Thread Shubhanshu Saxena
This commit introduces a typedef TFInferRequest to store execution parameters for a single call to the TensorFlow C API. This typedef is used in the TFRequestItem. Signed-off-by: Shubhanshu Saxena --- libavfilter/dnn/dnn_backend_tf.c | 49 1 file changed, 49

[FFmpeg-devel] [PATCH V2 4/6] lavfi/dnn_backend_tf: Separate function for filling RequestItem

2021-07-05 Thread Shubhanshu Saxena
This commit rearranges the existing code to create separate function for filling request with execution data. Signed-off-by: Shubhanshu Saxena --- libavfilter/dnn/dnn_backend_tf.c | 137 ++- 1 file changed, 80 insertions(+), 57 deletions(-) diff --git a/libavfilter

[FFmpeg-devel] [PATCH V2 5/6] lavfi/dnn_backend_tf: Separate function for Completion Callback

2021-07-05 Thread Shubhanshu Saxena
This commit rearranges the existing code to create a separate function for the completion callback in execute_model_tf. Signed-off-by: Shubhanshu Saxena --- libavfilter/dnn/dnn_backend_tf.c | 109 +-- 1 file changed, 61 insertions(+), 48 deletions(-) diff --git a

[FFmpeg-devel] [PATCH V2 6/6] lavfi/dnn_backend_tf: Error Handling

2021-07-05 Thread Shubhanshu Saxena
This commit adds handling for cases where an error may occur, clearing the allocated memory resources. Signed-off-by: Shubhanshu Saxena --- libavfilter/dnn/dnn_backend_tf.c | 80 1 file changed, 60 insertions(+), 20 deletions(-) diff --git a/libavfilter/dnn

[FFmpeg-devel] [PATCH V2 1/6] lavfi/dnn_backend_tf: TaskItem Based Inference

2021-07-05 Thread Shubhanshu Saxena
This commit uses the common TaskItem and InferenceItem typedefs for execution in TensorFlow backend. Signed-off-by: Shubhanshu Saxena --- libavfilter/dnn/dnn_backend_tf.c | 134 ++- 1 file changed, 94 insertions(+), 40 deletions(-) diff --git a/libavfilter/dnn

[FFmpeg-devel] [PATCH] lavfi/dnn_backend_openvino.c: Fix Memory Leak in execute_model_ov

2021-06-18 Thread Shubhanshu Saxena
In cases where the execution inside the function execute_model_ov fails, push the RequestItem back to the request_queue before returning the error. In case pushing back fails, release the allocated memory. Signed-off-by: Shubhanshu Saxena --- libavfilter/dnn/dnn_backend_openvino.c | 12

[FFmpeg-devel] [PATCH] lavfi/dnn_backend_openvino.c: Fix Memory Leak for RequestItem

2021-06-14 Thread Shubhanshu Saxena
Fix memory leak for RequestItem upon error while pushing to the request_queue in the completion callback. Signed-off-by: Shubhanshu Saxena --- libavfilter/dnn/dnn_backend_openvino.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavfilter/dnn/dnn_backend_openvino.c b/libavfilter/dnn

[FFmpeg-devel] [PATCH V2 3/5] lavfi/dnn: Add nb_output to TaskItem

2021-06-05 Thread Shubhanshu Saxena
Add nb_output property to TaskItem for use in TensorFlow backend and Native backend. Signed-off-by: Shubhanshu Saxena --- libavfilter/dnn/dnn_backend_common.h | 1 + libavfilter/dnn/dnn_backend_openvino.c | 3 +++ 2 files changed, 4 insertions(+) diff --git a/libavfilter/dnn

[FFmpeg-devel] [PATCH V2 1/5] lavfi/dnn: Extract TaskItem and InferenceItem from OpenVino Backend

2021-06-05 Thread Shubhanshu Saxena
Extract TaskItem and InferenceItem from OpenVino backend and convert ov_model to void in TaskItem. Signed-off-by: Shubhanshu Saxena --- libavfilter/dnn/dnn_backend_common.h | 19 + libavfilter/dnn/dnn_backend_openvino.c | 58 ++ 2 files changed, 40 insertions

[FFmpeg-devel] [PATCH V2 5/5] lavfi/dnn: Fill Task using Common Function

2021-06-05 Thread Shubhanshu Saxena
This commit adds a common function for filling the TaskItems in all three backends. Signed-off-by: Shubhanshu Saxena --- libavfilter/dnn/dnn_backend_common.c | 20 libavfilter/dnn/dnn_backend_common.h | 15 +++ libavfilter/dnn/dnn_backend_openvino.c | 23

[FFmpeg-devel] [PATCH V2 4/5] lavfi/dnn: Use uint8_t for async and do_ioproc in TaskItems

2021-06-05 Thread Shubhanshu Saxena
These properties have values either 0 or 1, so using uint8_t is a better option as compared to int. Signed-off-by: Shubhanshu Saxena --- libavfilter/dnn/dnn_backend_common.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavfilter/dnn/dnn_backend_common.h b

[FFmpeg-devel] [PATCH V2 2/5] lavfi/dnn: Convert output_name to char** in TaskItem

2021-06-05 Thread Shubhanshu Saxena
Convert output_name to char **output_names in TaskItem and use it as a pointer to array of output names in the DNN backend. Signed-off-by: Shubhanshu Saxena --- libavfilter/dnn/dnn_backend_common.h | 2 +- libavfilter/dnn/dnn_backend_openvino.c | 10 +- 2 files changed, 6 insertions

[FFmpeg-devel] [PATCH 01/10] lavfi/dnn: Extract TaskItem and InferenceItem from OpenVino Backend

2021-05-28 Thread Shubhanshu Saxena
Extract TaskItem and InferenceItem from OpenVino backend and convert ov_model to void in TaskItem. Signed-off-by: Shubhanshu Saxena --- libavfilter/dnn/dnn_backend_common.h | 19 + libavfilter/dnn/dnn_backend_openvino.c | 58 ++ 2 files changed, 40 insertions

[FFmpeg-devel] [PATCH 03/10] lavfi/dnn: Add nb_output to TaskItem

2021-05-28 Thread Shubhanshu Saxena
Add nb_output property to TaskItem for use in TensorFlow backend and Native backend. Signed-off-by: Shubhanshu Saxena --- libavfilter/dnn/dnn_backend_common.h | 1 + libavfilter/dnn/dnn_backend_openvino.c | 3 +++ 2 files changed, 4 insertions(+) diff --git a/libavfilter/dnn

[FFmpeg-devel] [PATCH 02/10] lavfi/dnn: Convert output_name to char** in TaskItem

2021-05-28 Thread Shubhanshu Saxena
Convert output_name to char **output_names in TaskItem and use it as a pointer to array of output names in the DNN backend. Signed-off-by: Shubhanshu Saxena --- libavfilter/dnn/dnn_backend_common.h | 2 +- libavfilter/dnn/dnn_backend_openvino.c | 10 +- 2 files changed, 6 insertions

[FFmpeg-devel] [PATCH 08/10] lavfi/dnn_backend_tf: Error Handling

2021-05-28 Thread Shubhanshu Saxena
This commit adds handling for cases where an error may occur, clearing the allocated memory resources. Signed-off-by: Shubhanshu Saxena --- libavfilter/dnn/dnn_backend_tf.c | 100 +++ 1 file changed, 74 insertions(+), 26 deletions(-) diff --git a/libavfilter/dnn

[FFmpeg-devel] [PATCH 10/10] lavfi/dnn_backend_tf.c: Documentation for tf_infer_request functions

2021-05-28 Thread Shubhanshu Saxena
Documentation for functions related to tf_infer_request Signed-off-by: Shubhanshu Saxena --- libavfilter/dnn/dnn_backend_tf.c | 41 1 file changed, 41 insertions(+) diff --git a/libavfilter/dnn/dnn_backend_tf.c b/libavfilter/dnn/dnn_backend_tf.c index

[FFmpeg-devel] [PATCH 07/10] lavfi/dnn_backend_tf: Separate function for filling RequestItem and callback

2021-05-28 Thread Shubhanshu Saxena
This commit rearranges the existing code to create two separate functions for filling request with execution data and the completion callback. Signed-off-by: Shubhanshu Saxena --- libavfilter/dnn/dnn_backend_tf.c | 81 ++-- 1 file changed, 57 insertions(+), 24

[FFmpeg-devel] [PATCH 09/10] lavfi/dnn: Async Support for TensorFlow Backend

2021-05-28 Thread Shubhanshu Saxena
This commit adds functions to execute the inference requests to TensorFlow Backend asynchronously in detached threads. Signed-off-by: Shubhanshu Saxena --- libavfilter/dnn/dnn_backend_tf.c | 198 --- libavfilter/dnn/dnn_backend_tf.h | 3 + libavfilter/dnn

[FFmpeg-devel] [PATCH 06/10] lavfi/dnn_backend_tf: Request-based Execution

2021-05-28 Thread Shubhanshu Saxena
This commit adds RequestItem and rearranges the existing sync execution mechanism to use request-based execution. It will help in adding async functionality to the TensorFlow backend later. Signed-off-by: Shubhanshu Saxena --- libavfilter/dnn/dnn_backend_tf.c | 297

  1   2   >