From patchwork Fri Jun 25 01:29:19 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lance Wang X-Patchwork-Id: 28613 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6602:2042:0:0:0:0 with SMTP id z2csp995677iod; Thu, 24 Jun 2021 18:29:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz1nYMArZ095YfTznwp/JsjrddrmLY3CH7cOHtT5FWO9/qaFbD4QKi5lmDSy1DbULGOhDc4 X-Received: by 2002:a17:906:40c5:: with SMTP id a5mr8357265ejk.433.1624584575447; Thu, 24 Jun 2021 18:29:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624584575; cv=none; d=google.com; s=arc-20160816; b=FrQKaEZK4XfwB5UhwBYJPe2V4uOe6dYvYvRI4hKFQGAlJSzzZuGkXzdBO0ox3NX9iW ooIsyEyfNbzZI6x3zcH+wzixNOlUwiFFTeyNfqbeHMcOqqMhQWrUtpoDNc81e/hcTfQi 4RG3yw/31ZLbxMdv9aeGkKmg2+WPJrxwEPtygY+frzmW1APBXxZiQAOHSsAez8O4X7n6 EetZPRYLIE0Et4ElwkYLZWdjjin9mPyAmqlVJP+fuQkNAZyhjut6f10S4XT3h7ngtmo3 1hv9fzR92S3Z6IJsQ3CWqsxuu8mJO1FXp5q315o+RYHFv43RbqITZ4c0iL5PmN+jcQF7 ViRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:message-id:date:to:from:dkim-signature :delivered-to; bh=THLnWi+HjvEZhd9LFiMJhZEAjl0JDnXA4RIXsI5eFC4=; b=j0XLAG0qcGVOiW40rOxPr6qL8fDVD7kYCJpiKgaVN4NfEvQ4vM1Q0I8yH3MWihxnIp UIM6hmnnY9Zo10ViIeZotAWYdPmQYYuKMDRz4EJZEVc3cTmKHSjugSGSoRaanVNuJlgV liCeWS2E2BOOgZYY/rqFQNMpg+GyS3kEi//8m0aSKlGGh+uF9ZEQrY5Ss6CJH+HqhqvF m0WQNmS1IjTNQE94yShG6E+ufBzGowqtYr8JKEggiuYVbW1whCtSvh1Y9dJwdhNlfQxJ b+Ct5hBwPbeBsw+f8xONUz9neRMJnmdHqzrInnxhNe9amag4uTFZlTjC4t1/DaBWRMPV ggCg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=H78CjG0w; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id u3si4655079edy.407.2021.06.24.18.29.34; Thu, 24 Jun 2021 18:29:35 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=H78CjG0w; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id C2BA468A148; Fri, 25 Jun 2021 04:29:31 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pj1-f41.google.com (mail-pj1-f41.google.com [209.85.216.41]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 6E78A68812E for ; Fri, 25 Jun 2021 04:29:25 +0300 (EEST) Received: by mail-pj1-f41.google.com with SMTP id t19-20020a17090ae513b029016f66a73701so6997955pjy.3 for ; Thu, 24 Jun 2021 18:29:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=+6Z2XF0OKyBQGvBIFwoI95H6l4jR21NfqWcrPPyDydo=; b=H78CjG0wezTw5WtRSuj1bbrstZiCKiIXn9UqHnNbhNpPSynAuSSEZnn7OLCU3Jp6XR +2LQLLwI1wSMaVInxmplJ3HMF1clmBgKQt4VRqlh60rkHtsh1Up1HmwEpj5F+pBf5CcL msK2DSfQXE8KMnEu2N8beQ9H9WIvs3Cer/DRafcERjosGEO7JmRbiQozEZV6q4ZwMFv/ Djm+1X9ok6QgaijggsD3+2hnjJAUBUoRsq96ihlWJ3K4sQorfHnCvS9+pRtqWmqOSwXK dtcLkLpT33qCNd/MuPqUI2lYEA17BDqawG9QrsB4DqmhkGFQThHDS+30nRNS9PrwP7oz z7/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=+6Z2XF0OKyBQGvBIFwoI95H6l4jR21NfqWcrPPyDydo=; b=qayeKQcZQAo4Q7nrg3zRJ1ljNbKhpvi5YocuBqaw1jGSQlTcbD3LsTQmGcu0GfxYUz os/01BxO3QJQraBI8A4Xm+248cZ0VWtpSWmmLFB4KbeFtNFltOEnofLJ7lhfEfCu6LPo f6w1/aGPyZUXURdPOSpi90zhRDGCbmJI9/xvldyriO4/F4YobEnRCqo83O1i49vznFS5 Iwnez6vjKf7Y6Jvoo3mqaLTjAhlHmp1p2c40bAink5ZMYq72w53Tv14ahBhJESwBNY8R 05rsWbJoNQExCUUC7oStjg9mEHKcurKvEAtwgvXnikcZ91rWxVxAOwIaXKcK/GtkGqJ+ OjBg== X-Gm-Message-State: AOAM533Ttuk9E9pv1xx2dq+2zIX6MUynjYlMSA3nqOHBPPOZNgpFQpvh 3SJx+C7OwNyHNnkOrI0Hn8+DNhzlMaw= X-Received: by 2002:a17:90a:ce8b:: with SMTP id g11mr18209588pju.170.1624584563542; Thu, 24 Jun 2021 18:29:23 -0700 (PDT) Received: from vpn2.localdomain ([161.117.202.209]) by smtp.gmail.com with ESMTPSA id s13sm3623008pgi.36.2021.06.24.18.29.22 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 24 Jun 2021 18:29:23 -0700 (PDT) From: lance.lmwang@gmail.com To: ffmpeg-devel@ffmpeg.org Date: Fri, 25 Jun 2021 09:29:19 +0800 Message-Id: <1624584559-23793-1-git-send-email-lance.lmwang@gmail.com> X-Mailer: git-send-email 1.8.3.1 Subject: [FFmpeg-devel] [PATCH] avfilter/dnn_filter_common: Use const where appropriate 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 Cc: Limin Wang MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: 484UOEPb2Iqs From: Limin Wang Signed-off-by: Limin Wang --- libavfilter/dnn_filter_common.c | 2 +- libavfilter/dnn_filter_common.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libavfilter/dnn_filter_common.c b/libavfilter/dnn_filter_common.c index 0ed0ac2..fcee748 100644 --- a/libavfilter/dnn_filter_common.c +++ b/libavfilter/dnn_filter_common.c @@ -153,7 +153,7 @@ DNNReturnType ff_dnn_execute_model_async(DnnContext *ctx, AVFrame *in_frame, AVF return (ctx->dnn_module->execute_model_async)(ctx->model, &exec_params); } -DNNReturnType ff_dnn_execute_model_classification(DnnContext *ctx, AVFrame *in_frame, AVFrame *out_frame, char *target) +DNNReturnType ff_dnn_execute_model_classification(DnnContext *ctx, AVFrame *in_frame, AVFrame *out_frame, const char *target) { DNNExecClassificationParams class_params = { { diff --git a/libavfilter/dnn_filter_common.h b/libavfilter/dnn_filter_common.h index 36319bf..8e43d8c 100644 --- a/libavfilter/dnn_filter_common.h +++ b/libavfilter/dnn_filter_common.h @@ -57,7 +57,7 @@ DNNReturnType ff_dnn_get_input(DnnContext *ctx, DNNData *input); DNNReturnType ff_dnn_get_output(DnnContext *ctx, int input_width, int input_height, int *output_width, int *output_height); DNNReturnType ff_dnn_execute_model(DnnContext *ctx, AVFrame *in_frame, AVFrame *out_frame); DNNReturnType ff_dnn_execute_model_async(DnnContext *ctx, AVFrame *in_frame, AVFrame *out_frame); -DNNReturnType ff_dnn_execute_model_classification(DnnContext *ctx, AVFrame *in_frame, AVFrame *out_frame, char *target); +DNNReturnType ff_dnn_execute_model_classification(DnnContext *ctx, AVFrame *in_frame, AVFrame *out_frame, const char *target); DNNAsyncStatusType ff_dnn_get_async_result(DnnContext *ctx, AVFrame **in_frame, AVFrame **out_frame); DNNReturnType ff_dnn_flush(DnnContext *ctx); void ff_dnn_uninit(DnnContext *ctx);