From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.ffmpeg.org (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTPS id 3AFAC44B18 for ; Mon, 14 Jul 2025 07:03:37 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id C33A068E78A; Mon, 14 Jul 2025 10:03:34 +0300 (EEST) Received: from haasn.dev (haasn.dev [78.46.187.166]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id 981B1687D43 for ; Mon, 14 Jul 2025 10:03:28 +0300 (EEST) Received: from haasn.dev (unknown [10.30.1.1]) by haasn.dev (Postfix) with UTF8SMTP id 58B3B40C81 for ; Mon, 14 Jul 2025 09:03:28 +0200 (CEST) Date: Mon, 14 Jul 2025 09:03:28 +0200 Message-ID: <20250714090328.GB5348@haasn.xyz> From: Niklas Haas To: ffmpeg-devel@ffmpeg.org In-Reply-To: References: <20250712104459.52153-1-ffmpeg@haasn.xyz> <20250712104459.52153-7-ffmpeg@haasn.xyz> MIME-Version: 1.0 Content-Disposition: inline Subject: Re: [FFmpeg-devel] [PATCH v8 07/18] swscale/ops: introduce new low level framework 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: On Sun, 13 Jul 2025 20:25:18 +0200 Andreas Rheinhardt wrote: > Niklas Haas: > > From: Niklas Haas > > > > See docs/swscale-v2.txt for an in-depth introduction to the new approach. > > > > This commit merely introduces the ops definitions and boilerplate functions. > > The subsequent commits will flesh out the underlying implementation. > > --- > > libswscale/Makefile | 1 + > > libswscale/ops.c | 524 ++++++++++++++++++++++++++++++++++++++++++++ > > libswscale/ops.h | 243 ++++++++++++++++++++ > > 3 files changed, 768 insertions(+) > > create mode 100644 libswscale/ops.c > > create mode 100644 libswscale/ops.h > > > > > + > > +static const char *describe_lin_mask(uint32_t mask) > > +{ > > + /* Try to be fairly descriptive without assuming too much */ > > + static const struct { > > + const char *name; > > Please avoid the relocations. Could you please clarify what you mean by this? > > > + uint32_t mask; > > + } patterns[] = { > > + { "noop", 0 }, > > + { "luma", SWS_MASK_LUMA }, > > + { "alpha", SWS_MASK_ALPHA }, > > + { "luma+alpha", SWS_MASK_LUMA | SWS_MASK_ALPHA }, > > + { "dot3", 0b111 }, > > + { "dot4", 0b1111 }, > > src/libswscale/ops.c:369:33: warning: binary constants are a C23 feature > or GCC extension > 369 | { "dot3", 0b111 }, > | ^~~~~ > src/libswscale/ops.c:370:33: warning: binary constants are a C23 feature > or GCC extension > 370 | { "dot4", 0b1111 }, > | ^~~~~~ > > (There are also a few other instances of this at other places.) Noted, will remove. > > > + { "row0", SWS_MASK_ROW(0) }, > > + { "row0+alpha", SWS_MASK_ROW(0) | SWS_MASK_ALPHA }, > > + { "col0", SWS_MASK_COL(0) }, > > + { "col0+off3", SWS_MASK_COL(0) | SWS_MASK_OFF3 }, > > + { "off3", SWS_MASK_OFF3 }, > > + { "off3+alpha", SWS_MASK_OFF3 | SWS_MASK_ALPHA }, > > + { "diag3", SWS_MASK_DIAG3 }, > > + { "diag4", SWS_MASK_DIAG4 }, > > + { "diag3+alpha", SWS_MASK_DIAG3 | SWS_MASK_ALPHA }, > > + { "diag3+off3", SWS_MASK_DIAG3 | SWS_MASK_OFF3 }, > > + { "diag3+off3+alpha", SWS_MASK_DIAG3 | SWS_MASK_OFF3 | SWS_MASK_ALPHA }, > > + { "diag4+off4", SWS_MASK_DIAG4 | SWS_MASK_OFF4 }, > > + { "matrix3", SWS_MASK_MAT3 }, > > + { "matrix3+off3", SWS_MASK_MAT3 | SWS_MASK_OFF3 }, > > + { "matrix3+off3+alpha", SWS_MASK_MAT3 | SWS_MASK_OFF3 | SWS_MASK_ALPHA }, > > + { "matrix4", SWS_MASK_MAT4 }, > > + { "matrix4+off4", SWS_MASK_MAT4 | SWS_MASK_OFF4 }, > > + }; > > + > > + for (int i = 0; i < FF_ARRAY_ELEMS(patterns); i++) { > > + if (!(mask & ~patterns[i].mask)) > > + return patterns[i].name; > > + } > > + > > + return "full"; > > +} > > + > > +#endif > > _______________________________________________ > 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". _______________________________________________ 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".