diff mbox series

[FFmpeg-devel,3/6] libavfilter/dnn: add prefix ff_ for internal functions

Message ID 20210118125213.27377-1-yejun.guo@intel.com
State Accepted
Headers show
Series [FFmpeg-devel,1/6] dnn_backend_openvino.c: add version mismatch reminder
Related show

Checks

Context Check Description
andriy/x86_make success Make finished
andriy/x86_make_fate success Make fate finished
andriy/PPC64_make success Make finished
andriy/PPC64_make_fate success Make fate finished

Commit Message

Guo, Yejun Jan. 18, 2021, 12:52 p.m. UTC
from proc_from_frame_to_dnn to ff_proc_from_frame_to_dnn, and
from proc_from_dnn_to_frame to ff_proc_from_dnn_to_frame.

Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
---
 libavfilter/dnn/dnn_backend_native.c   | 4 ++--
 libavfilter/dnn/dnn_backend_openvino.c | 4 ++--
 libavfilter/dnn/dnn_backend_tf.c       | 4 ++--
 libavfilter/dnn/dnn_io_proc.c          | 4 ++--
 libavfilter/dnn/dnn_io_proc.h          | 4 ++--
 5 files changed, 10 insertions(+), 10 deletions(-)

Comments

Mark Thompson Jan. 21, 2021, 9:43 p.m. UTC | #1
On 18/01/2021 12:52, Guo, Yejun wrote:
> from proc_from_frame_to_dnn to ff_proc_from_frame_to_dnn, and
> from proc_from_dnn_to_frame to ff_proc_from_dnn_to_frame.
> 
> Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
> ---
>   libavfilter/dnn/dnn_backend_native.c   | 4 ++--
>   libavfilter/dnn/dnn_backend_openvino.c | 4 ++--
>   libavfilter/dnn/dnn_backend_tf.c       | 4 ++--
>   libavfilter/dnn/dnn_io_proc.c          | 4 ++--
>   libavfilter/dnn/dnn_io_proc.h          | 4 ++--
>   5 files changed, 10 insertions(+), 10 deletions(-)

LGTM.

I fixed some more of these and added a fate test to prevent it from happening again in <https://lists.ffmpeg.org/pipermail/ffmpeg-devel/2021-January/274931.html>.

Thanks,

- Mark
Guo, Yejun Jan. 22, 2021, 1:34 a.m. UTC | #2
> -----Original Message-----
> From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of Mark
> Thompson
> Sent: 2021年1月22日 5:43
> To: ffmpeg-devel@ffmpeg.org
> Subject: Re: [FFmpeg-devel] [PATCH 3/6] libavfilter/dnn: add prefix ff_ for
> internal functions
> 
> On 18/01/2021 12:52, Guo, Yejun wrote:
> > from proc_from_frame_to_dnn to ff_proc_from_frame_to_dnn, and from
> > proc_from_dnn_to_frame to ff_proc_from_dnn_to_frame.
> >
> > Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
> > ---
> >   libavfilter/dnn/dnn_backend_native.c   | 4 ++--
> >   libavfilter/dnn/dnn_backend_openvino.c | 4 ++--
> >   libavfilter/dnn/dnn_backend_tf.c       | 4 ++--
> >   libavfilter/dnn/dnn_io_proc.c          | 4 ++--
> >   libavfilter/dnn/dnn_io_proc.h          | 4 ++--
> >   5 files changed, 10 insertions(+), 10 deletions(-)
> 
> LGTM.
> 
> I fixed some more of these and added a fate test to prevent it from happening
> again in
> <https://lists.ffmpeg.org/pipermail/ffmpeg-devel/2021-January/274931.html>
> .

thanks, will push this patch set soon, and then back to the patch set with the fate test.
diff mbox series

Patch

diff --git a/libavfilter/dnn/dnn_backend_native.c b/libavfilter/dnn/dnn_backend_native.c
index 2700251ee6..2c0b938839 100644
--- a/libavfilter/dnn/dnn_backend_native.c
+++ b/libavfilter/dnn/dnn_backend_native.c
@@ -320,7 +320,7 @@  static DNNReturnType execute_model_native(const DNNModel *model, const char *inp
         if (native_model->model->pre_proc != NULL) {
             native_model->model->pre_proc(in_frame, &input, native_model->model->filter_ctx);
         } else {
-            proc_from_frame_to_dnn(in_frame, &input, ctx);
+            ff_proc_from_frame_to_dnn(in_frame, &input, ctx);
         }
     }
 
@@ -368,7 +368,7 @@  static DNNReturnType execute_model_native(const DNNModel *model, const char *inp
             if (native_model->model->post_proc != NULL) {
                 native_model->model->post_proc(out_frame, &output, native_model->model->filter_ctx);
             } else {
-                proc_from_dnn_to_frame(out_frame, &output, ctx);
+                ff_proc_from_dnn_to_frame(out_frame, &output, ctx);
             }
         } else {
             out_frame->width = output.width;
diff --git a/libavfilter/dnn/dnn_backend_openvino.c b/libavfilter/dnn/dnn_backend_openvino.c
index 5820afbcfd..9c803c8188 100644
--- a/libavfilter/dnn/dnn_backend_openvino.c
+++ b/libavfilter/dnn/dnn_backend_openvino.c
@@ -160,7 +160,7 @@  static DNNReturnType fill_model_input_ov(OVModel *ov_model, RequestItem *request
             if (ov_model->model->pre_proc != NULL) {
                 ov_model->model->pre_proc(task->in_frame, &input, ov_model->model->filter_ctx);
             } else {
-                proc_from_frame_to_dnn(task->in_frame, &input, ctx);
+                ff_proc_from_frame_to_dnn(task->in_frame, &input, ctx);
             }
         }
         input.data = (uint8_t *)input.data
@@ -228,7 +228,7 @@  static void infer_completion_callback(void *args)
             if (task->ov_model->model->post_proc != NULL) {
                 task->ov_model->model->post_proc(task->out_frame, &output, task->ov_model->model->filter_ctx);
             } else {
-                proc_from_dnn_to_frame(task->out_frame, &output, ctx);
+                ff_proc_from_dnn_to_frame(task->out_frame, &output, ctx);
             }
         } else {
             task->out_frame->width = output.width;
diff --git a/libavfilter/dnn/dnn_backend_tf.c b/libavfilter/dnn/dnn_backend_tf.c
index cbe83741f6..f77f3dd817 100644
--- a/libavfilter/dnn/dnn_backend_tf.c
+++ b/libavfilter/dnn/dnn_backend_tf.c
@@ -743,7 +743,7 @@  static DNNReturnType execute_model_tf(const DNNModel *model, const char *input_n
         if (tf_model->model->pre_proc != NULL) {
             tf_model->model->pre_proc(in_frame, &input, tf_model->model->filter_ctx);
         } else {
-            proc_from_frame_to_dnn(in_frame, &input, ctx);
+            ff_proc_from_frame_to_dnn(in_frame, &input, ctx);
         }
     }
 
@@ -800,7 +800,7 @@  static DNNReturnType execute_model_tf(const DNNModel *model, const char *input_n
             if (tf_model->model->post_proc != NULL) {
                 tf_model->model->post_proc(out_frame, &output, tf_model->model->filter_ctx);
             } else {
-                proc_from_dnn_to_frame(out_frame, &output, ctx);
+                ff_proc_from_dnn_to_frame(out_frame, &output, ctx);
             }
         } else {
             out_frame->width = output.width;
diff --git a/libavfilter/dnn/dnn_io_proc.c b/libavfilter/dnn/dnn_io_proc.c
index 193e5bd9cc..bee1423342 100644
--- a/libavfilter/dnn/dnn_io_proc.c
+++ b/libavfilter/dnn/dnn_io_proc.c
@@ -22,7 +22,7 @@ 
 #include "libavutil/imgutils.h"
 #include "libswscale/swscale.h"
 
-DNNReturnType proc_from_dnn_to_frame(AVFrame *frame, DNNData *output, void *log_ctx)
+DNNReturnType ff_proc_from_dnn_to_frame(AVFrame *frame, DNNData *output, void *log_ctx)
 {
     struct SwsContext *sws_ctx;
     int bytewidth = av_image_get_linesize(frame->format, frame->width, 0);
@@ -92,7 +92,7 @@  DNNReturnType proc_from_dnn_to_frame(AVFrame *frame, DNNData *output, void *log_
     return DNN_SUCCESS;
 }
 
-DNNReturnType proc_from_frame_to_dnn(AVFrame *frame, DNNData *input, void *log_ctx)
+DNNReturnType ff_proc_from_frame_to_dnn(AVFrame *frame, DNNData *input, void *log_ctx)
 {
     struct SwsContext *sws_ctx;
     int bytewidth = av_image_get_linesize(frame->format, frame->width, 0);
diff --git a/libavfilter/dnn/dnn_io_proc.h b/libavfilter/dnn/dnn_io_proc.h
index 4c7dc7c1a2..6a410ccc7b 100644
--- a/libavfilter/dnn/dnn_io_proc.h
+++ b/libavfilter/dnn/dnn_io_proc.h
@@ -30,7 +30,7 @@ 
 #include "../dnn_interface.h"
 #include "libavutil/frame.h"
 
-DNNReturnType proc_from_frame_to_dnn(AVFrame *frame, DNNData *input, void *log_ctx);
-DNNReturnType proc_from_dnn_to_frame(AVFrame *frame, DNNData *output, void *log_ctx);
+DNNReturnType ff_proc_from_frame_to_dnn(AVFrame *frame, DNNData *input, void *log_ctx);
+DNNReturnType ff_proc_from_dnn_to_frame(AVFrame *frame, DNNData *output, void *log_ctx);
 
 #endif