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 12C17495C6 for ; Wed, 16 Jul 2025 15:49:06 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id F386268E8C4; Wed, 16 Jul 2025 18:49:03 +0300 (EEST) Received: from haasn.dev (haasn.dev [78.46.187.166]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id 4467A68E8AD for ; Wed, 16 Jul 2025 18:48:57 +0300 (EEST) Received: from haasn.dev (unknown [10.30.1.1]) by haasn.dev (Postfix) with UTF8SMTP id DCB3D40E94; Wed, 16 Jul 2025 17:48:56 +0200 (CEST) Date: Wed, 16 Jul 2025 17:48:56 +0200 Message-ID: <20250716174856.GB373337@haasn.xyz> From: Niklas Haas To: ffmpeg-devel@ffmpeg.org In-Reply-To: <20250716152551.362334-1-ffmpeg@haasn.xyz> References: <20250716152551.362334-1-ffmpeg@haasn.xyz> MIME-Version: 1.0 Content-Disposition: inline Subject: Re: [FFmpeg-devel] [PATCH 1/3] avfilter/vf_colordetect: add new color range detection filter 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: Niklas Haas 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 Wed, 16 Jul 2025 17:25:49 +0200 Niklas Haas wrote: > From: Niklas Haas > > This filter can detect various properties about the image, including > whether or not there are out-of-range values, or whether the input appears > to use straight or premultiplied alpha. > > Of course, these can only be heuristics, with "undetermined" as the base > case. While we can definitely prove the existence of full range or > straight alpha colors, we can never infer the opposite. Upon further testing, I realized that this logic (both C and SIMD) overflows for 16-bit inputs. Will fix and resubmit. I also found that the C versions can be made slightly faster by returning out of the inner loop, which generates a shorter scalar version that is faster than the auto-vectorized abomination that was generated before. _______________________________________________ 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".