From patchwork Mon Jan 18 12:52:32 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Guo, Yejun" X-Patchwork-Id: 25011 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id 08B544498EA for ; Mon, 18 Jan 2021 14:54:30 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id DFBCB688197; Mon, 18 Jan 2021 14:54:29 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id DD95D68818C for ; Mon, 18 Jan 2021 14:54:27 +0200 (EET) IronPort-SDR: mmKZSetVsq6swbk/fEi1NmREV7KMPkux577HliyXlupQXZziFz9iUlf0faB3lr03EEhvlSO7UG bDP6jcQ2h5hw== X-IronPort-AV: E=McAfee;i="6000,8403,9867"; a="178948696" X-IronPort-AV: E=Sophos;i="5.79,356,1602572400"; d="scan'208";a="178948696" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jan 2021 04:54:19 -0800 IronPort-SDR: 8SplQmte59pL6W6CN31NYnDBRu3TyPGaiJ7xwluQGZZ3avLHGAtQS04EjolZkSBnqJ76fwzj9F JBlxJeDDOS/w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.79,356,1602572400"; d="scan'208";a="573273917" Received: from yguo18-skl-u1604.sh.intel.com ([10.239.159.53]) by fmsmga005.fm.intel.com with ESMTP; 18 Jan 2021 04:54:19 -0800 From: "Guo, Yejun" To: ffmpeg-devel@ffmpeg.org Date: Mon, 18 Jan 2021 20:52:32 +0800 Message-Id: <20210118125232.27474-1-yejun.guo@intel.com> X-Mailer: git-send-email 2.17.1 Subject: [FFmpeg-devel] [PATCH 5/6] dnn_backend_native_layer_conv2d.c: correct struct name with CamelCase X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: yejun.guo@intel.com MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Signed-off-by: Guo, Yejun --- .../dnn/dnn_backend_native_layer_conv2d.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/libavfilter/dnn/dnn_backend_native_layer_conv2d.c b/libavfilter/dnn/dnn_backend_native_layer_conv2d.c index 0fb968a1fc..7c6d96e916 100644 --- a/libavfilter/dnn/dnn_backend_native_layer_conv2d.c +++ b/libavfilter/dnn/dnn_backend_native_layer_conv2d.c @@ -26,19 +26,19 @@ #define CLAMP_TO_EDGE(x, w) ((x) < 0 ? 0 : ((x) >= (w) ? (w - 1) : (x))) //struct to pass parameters -typedef struct thread_common_param{ +typedef struct ThreadCommonParam{ DnnOperand *operands; const int32_t *input_operand_indexes; int32_t output_operand_index; const void *parameters; NativeContext *ctx; float *output_data; -} thread_common_param; +} ThreadCommonParam; -typedef struct thread_param{ - thread_common_param *thread_common_param; +typedef struct ThreadParam{ + ThreadCommonParam *thread_common_param; int thread_start, thread_end; -} thread_param; +} ThreadParam; int dnn_load_layer_conv2d(Layer *layer, AVIOContext *model_file_context, int file_size, int operands_num) { @@ -108,8 +108,8 @@ int dnn_load_layer_conv2d(Layer *layer, AVIOContext *model_file_context, int fil static void * dnn_execute_layer_conv2d_thread(void *threadarg) { //pass parameters - thread_param *thread_param = (struct thread_param *)threadarg; - thread_common_param *thread_common_param = thread_param->thread_common_param; + ThreadParam *thread_param = threadarg; + ThreadCommonParam *thread_common_param = thread_param->thread_common_param; DnnOperand *operands = thread_common_param->operands; int32_t input_operand_index = thread_common_param->input_operand_indexes[0]; int height = operands[input_operand_index].dims[1]; @@ -190,8 +190,8 @@ int dnn_execute_layer_conv2d(DnnOperand *operands, const int32_t *input_operand_ pthread_t *thread_id = av_malloc(thread_num * sizeof(pthread_t)); int thread_stride; #endif - thread_param **thread_param = av_malloc(thread_num * sizeof(*thread_param)); - thread_common_param thread_common_param; + ThreadParam **thread_param = av_malloc(thread_num * sizeof(*thread_param)); + ThreadCommonParam thread_common_param; const ConvolutionalParams *conv_params = (const ConvolutionalParams *)(parameters); int height = operands[input_operand_indexes[0]].dims[1]; int width = operands[input_operand_indexes[0]].dims[2];