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 9A5B44CB34 for ; Wed, 14 Aug 2024 13:37:44 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 8E07B68DB54; Wed, 14 Aug 2024 16:37:41 +0300 (EEST) Received: from out203-205-221-231.mail.qq.com (out203-205-221-231.mail.qq.com [203.205.221.231]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 8E04768DB03 for ; Wed, 14 Aug 2024 16:37:33 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foxmail.com; s=s201512; t=1723642650; bh=51aU1CVu1GFI/KfzvnW5+TWbCzvmElpELjB+uUIQdpw=; h=From:To:Cc:Subject:Date; b=NH9p8TVvlG5TW8J6wvw4cayvLydXJFC7TTt24g99rMy58eUkBYrPFW2qB+KHja+LD SZHFDfIixmUrdlTKhhK3iVoXQmgxCCs41w2yS5r/spemDzXLep/+ViDF8TNgwH0Pcx lsma9VlYRfExzGTDekWwlb2g4SSoTjuBEAMRxHeQ= Received: from ZHILIZHAO-MB1.tencent.com ([113.108.77.52]) by newxmesmtplogicsvrszb9-0.qq.com (NewEsmtp) with SMTP id 90F3F0F9; Wed, 14 Aug 2024 21:36:15 +0800 X-QQ-mid: xmsmtpt1723642575tv6vy6d75 Message-ID: X-QQ-XMAILINFO: MVbvI5amSZ2YP8y6LqogsFmlbfT9RHms7X9LmliStBx8bRXpIc5mGx5bKGXj/q huuOY6mNrl8dBPX40GeVb1Q6YFRyJNwKyEgzj4kcfaM2jdvxOkawvMRo2eYmVKqGB/Mm75ogyc2c IK+GJaVYcz+hr6Ypj5TpvkRCkiLkxG80lpdLWnolrzHlUF7L5u4VW2lcoVCMTOBN3aqQJq6kU8fJ wmsM/VOYrkXDY5mXJknhXThP8XtoQQC9JeHxKyuoV4vS5Bn3xgaq+I/GDaLD95zTNBBaKwsLyVGW pZZXTUmuzJmNjRm8Ih2JDZqeJnY+8yw7Foi4fiHKP1RUu1wTjUQznbJZ0fSFg45ySL1XtJnglwZ8 MdZ/6jQiPbVeyTZBfKgcRRmmhiaKpFbSXPSvVJ/vMgD3YJlDzwFGSfpPfw4CLnwskKd9iQWq5Zf8 zQcO9FSLG3p8mmiwrbEasElbOknlJeqX3wrovgoIiDUwwwJY4SgMn7zkzvo3L2u6zCC5jtjaQOkK dETajqa5aer3M+H7jEw8S6JgH1w9BZwMGlO2qOxpoUqKmr6EEOQ7YKF6uJFKz7u7tVQL7gZqm3PF WTqSfpMYjtp6BzmhJN3prKuJgJI0MikRQYKA6Idu6gEG7MbVjALR65Jd6RfqYDDw1oyrZlZPNzn/ I8KqR/cyT6DdL6ix7RjipIJt96wqMHaI+t4a3nM4iUPaWgdtgDMSIailMKthmr22ZCzuIEglavJT K+BLlV4AbvqGKTceJmg1n4IMqgbfy9kM0TMpX8ojA15d/x+fDVGNQ9SSxG9PM33O1DCHmv6vFYw3 i/mwO+cdttUFaKZ+f96t0rYOf6lIeC7Stj3uPjK1oVuW7kIMKOimYCDCCIgNpcy3a9YdDiQwnTTt nY3eYVvLIf4YywBnAkgtudpXf/jvJ7leK5KOC3EabC/D91cs/oezxAlbIn9k4nqPRyT1M9kvDtzB 3zzbpNJzhqFo6SruA2pq0oEAfVMJFRMDYfDWYjjMxAGPmm830a/Xves5fD//uXFBQgAJdaO/Y= X-QQ-XMRINFO: OWPUhxQsoeAVDbp3OJHYyFg= From: Zhao Zhili To: ffmpeg-devel@ffmpeg.org Date: Wed, 14 Aug 2024 21:36:14 +0800 X-OQ-MSGID: <20240814133614.96688-1-quinkblack@foxmail.com> X-Mailer: git-send-email 2.42.0 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH] avfilter/vf_unsharp: Merge header into .c 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: Zhao Zhili 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: From: Zhao Zhili It was shared with opencl implementation. --- libavfilter/unsharp.h | 62 ---------------------------------------- libavfilter/vf_unsharp.c | 34 +++++++++++++++++++++- 2 files changed, 33 insertions(+), 63 deletions(-) delete mode 100644 libavfilter/unsharp.h diff --git a/libavfilter/unsharp.h b/libavfilter/unsharp.h deleted file mode 100644 index 0da6f05036..0000000000 --- a/libavfilter/unsharp.h +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright (C) 2013 Wei Gao - * Copyright (C) 2013 Lenny Wang - * - * This file is part of FFmpeg. - * - * FFmpeg is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * FFmpeg is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with FFmpeg; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#ifndef AVFILTER_UNSHARP_H -#define AVFILTER_UNSHARP_H - -#include "config.h" -#include "avfilter.h" - -#define MIN_MATRIX_SIZE 3 -#define MAX_MATRIX_SIZE 63 - - -typedef struct UnsharpFilterParam { - int msize_x; ///< matrix width - int msize_y; ///< matrix height - int amount; ///< effect amount - int steps_x; ///< horizontal step count - int steps_y; ///< vertical step count - int scalebits; ///< bits to shift pixel - int32_t halfscale; ///< amount to add to pixel - uint32_t *sr; ///< finite state machine storage within a row - uint32_t **sc; ///< finite state machine storage across rows -} UnsharpFilterParam; - -typedef struct UnsharpContext { - const AVClass *class; - int lmsize_x, lmsize_y, cmsize_x, cmsize_y; - int amsize_x, amsize_y; - float lamount, camount; - float aamount; - UnsharpFilterParam luma; ///< luma parameters (width, height, amount) - UnsharpFilterParam chroma; ///< chroma parameters (width, height, amount) - UnsharpFilterParam alpha; ///< alpha parameters (width, height, amount) - int hsub, vsub; - int nb_planes; - int bitdepth; - int bps; - int nb_threads; - int (* apply_unsharp)(AVFilterContext *ctx, AVFrame *in, AVFrame *out); - int (* unsharp_slice)(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs); -} UnsharpContext; - -#endif /* AVFILTER_UNSHARP_H */ diff --git a/libavfilter/vf_unsharp.c b/libavfilter/vf_unsharp.c index 2705ac5270..01b5dae796 100644 --- a/libavfilter/vf_unsharp.c +++ b/libavfilter/vf_unsharp.c @@ -44,7 +44,39 @@ #include "libavutil/mem.h" #include "libavutil/opt.h" #include "libavutil/pixdesc.h" -#include "unsharp.h" + +#define MIN_MATRIX_SIZE 3 +#define MAX_MATRIX_SIZE 63 + +typedef struct UnsharpFilterParam { + int msize_x; ///< matrix width + int msize_y; ///< matrix height + int amount; ///< effect amount + int steps_x; ///< horizontal step count + int steps_y; ///< vertical step count + int scalebits; ///< bits to shift pixel + int32_t halfscale; ///< amount to add to pixel + uint32_t *sr; ///< finite state machine storage within a row + uint32_t **sc; ///< finite state machine storage across rows +} UnsharpFilterParam; + +typedef struct UnsharpContext { + const AVClass *class; + int lmsize_x, lmsize_y, cmsize_x, cmsize_y; + int amsize_x, amsize_y; + float lamount, camount; + float aamount; + UnsharpFilterParam luma; ///< luma parameters (width, height, amount) + UnsharpFilterParam chroma; ///< chroma parameters (width, height, amount) + UnsharpFilterParam alpha; ///< alpha parameters (width, height, amount) + int hsub, vsub; + int nb_planes; + int bitdepth; + int bps; + int nb_threads; + int (* apply_unsharp)(AVFilterContext *ctx, AVFrame *in, AVFrame *out); + int (* unsharp_slice)(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs); +} UnsharpContext; typedef struct TheadData { UnsharpFilterParam *fp; -- 2.42.0 _______________________________________________ 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".