From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 0AD9445B7F for ; Fri, 24 Mar 2023 13:09:45 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id ED79268C7C6; Fri, 24 Mar 2023 15:09:42 +0200 (EET) Received: from mail0.khirnov.net (red.khirnov.net [176.97.15.12]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 70AF668C6F3 for ; Fri, 24 Mar 2023 15:09:36 +0200 (EET) Received: from localhost (localhost [IPv6:::1]) by mail0.khirnov.net (Postfix) with ESMTP id 1280A2404EA for ; Fri, 24 Mar 2023 14:09:36 +0100 (CET) Received: from mail0.khirnov.net ([IPv6:::1]) by localhost (mail0.khirnov.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id 2IuxXVVigXJa for ; Fri, 24 Mar 2023 14:09:35 +0100 (CET) Received: from lain.khirnov.net (lain.khirnov.net [IPv6:2001:67c:1138:4306::3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "lain.khirnov.net", Issuer "smtp.khirnov.net SMTP CA" (verified OK)) by mail0.khirnov.net (Postfix) with ESMTPS id 5D12F240178 for ; Fri, 24 Mar 2023 14:09:35 +0100 (CET) Received: by lain.khirnov.net (Postfix, from userid 1000) id 3F2511601B2; Fri, 24 Mar 2023 14:09:35 +0100 (CET) From: Anton Khirnov To: FFmpeg development discussions and patches In-Reply-To: <20230321062140.25745-1-ting.fu@intel.com> References: <20230321062140.25745-1-ting.fu@intel.com> Mail-Followup-To: FFmpeg development discussions and patches Date: Fri, 24 Mar 2023 14:09:35 +0100 Message-ID: <167966337522.27013.8762047240830839933@lain.khirnov.net> User-Agent: alot/0.8.1 MIME-Version: 1.0 Subject: Re: [FFmpeg-devel] [PATCH] lavfi/dnn: Add OpenVINO API 2.0 support X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 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 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: Quoting Ting Fu (2023-03-21 07:21:40) > OpenVINO API 2.0 was released in March 2022, which introduced new features. > This commit implement current OpenVINO features with new 2.0 APIs. And will > adding other features in API 2.0. > The OpenVINO runtime wil be installed in /usr/local/, please add path > /usr/local/runtime/lib/intel64/pkgconfig/ to PKG_CONFIG_PATH mannually > for new OpenVINO libs config. Installation paths are up to the system administrator and are detected with pkg-config as per your patch, so this does not belong in the commit message. > + > +#include "dnn_backend_openvino2.h" > +#include "dnn_io_proc.h" > +#include "libavutil/avassert.h" > +#include "libavutil/avstring.h" > +#include "libavutil/detection_bbox.h" > +#include "libavutil/cpu.h" > +#include "libavutil/opt.h" > +#include "dnn_backend_common.h" > +#include "../internal.h" > +#include "safe_queue.h" Headers should be grouped according to some principle, typically per-library and alphabetically ordered. > +#include "openvino/c/openvino.h" This is a system header, it needs to use <> > +static DNNDataType port_datatype_to_dnn_datatype(ov_element_type_e port_datatype) > +{ > + switch (port_datatype) > + { > + case F32: > + return DNN_FLOAT; > + case U8: > + return DNN_UINT8; > + default: > + av_assert0(!"Not supported yet."); asserts express internal code constraints, you must never assert on outside data. > +int ff_dnn_execute_model_ov2(const DNNModel *model, DNNExecBaseParams *exec_params) { This file is schizophrenic about opening brace placement. It should always be on its own line. > +static int get_datatype_size(DNNDataType dt) > +{ > + switch (dt) > + { > + case DNN_FLOAT: > + return sizeof(float); > + case DNN_UINT8: > + return sizeof(uint8_t); > + default: > + av_assert0(!"not supported yet."); Same as above. -- Anton Khirnov _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".