From: Anton Khirnov <anton@khirnov.net> To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org> Subject: Re: [FFmpeg-devel] [PATCH] lavfi/dnn: Add OpenVINO API 2.0 support Date: Fri, 24 Mar 2023 14:09:35 +0100 Message-ID: <167966337522.27013.8762047240830839933@lain.khirnov.net> (raw) In-Reply-To: <20230321062140.25745-1-ting.fu@intel.com> 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".
prev parent reply other threads:[~2023-03-24 13:09 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-03-21 6:21 Ting Fu 2023-03-24 13:09 ` Anton Khirnov [this message]
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=167966337522.27013.8762047240830839933@lain.khirnov.net \ --to=anton@khirnov.net \ --cc=ffmpeg-devel@ffmpeg.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel This inbox may be cloned and mirrored by anyone: git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \ ffmpegdev@gitmailbox.com public-inbox-index ffmpegdev Example config snippet for mirrors. AGPL code for this site: git clone https://public-inbox.org/public-inbox.git