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 4F08F433A8 for ; Mon, 8 Aug 2022 20:59:33 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 74E6468B75A; Mon, 8 Aug 2022 23:59:30 +0300 (EEST) Received: from btbn.de (btbn.de [136.243.74.85]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id AEEA66880B3 for ; Mon, 8 Aug 2022 23:59:23 +0300 (EEST) Received: from [authenticated] by btbn.de (Postfix) with ESMTPSA id 4E3D5357CEA for ; Mon, 8 Aug 2022 22:59:23 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rothenpieler.org; s=mail; t=1659992363; bh=0n1GNu+A5tFtgHT26g8qxkvHqx9ufoLL74IrvpDW8EI=; h=Date:Subject:To:References:From:In-Reply-To; b=hc4mn6/GSLVpSLfngRSO5asPq4uvcBj/a1BFN6fRiRCZMnRtaz8kv/OQCMiCZoPgZ TLhV26Z2Hy2VyC1wWuEqNESo6M74fswGCNntydID9K3UmglvCn5/3l4RYQebIlcu4A eQu1u6E1q3fFVnbfZUd+inmtPz85xfFWbPGINncEO63VA8M2R8pOI9biqFYaCGsyg1 EolFScVJYe+msLYsshpg78w20Avk2tJIOy6I0hYKYsvpnrIDl7mcE6x8Dh24nyzVBF ZIiw7p0ayq8y6IzIcQfh/3SOKk66YkrbsRGTUlxU5+mUhLfuSx6kyv7uVokIU58K0W I6+COZJMyTNwg== Message-ID: <7a75c699-5050-534f-d7e9-127207b66d59@rothenpieler.org> Date: Mon, 8 Aug 2022 22:59:22 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.1.1 To: ffmpeg-devel@ffmpeg.org References: <20220808182358.24264-1-timo@rothenpieler.org> Content-Language: en-US From: Timo Rothenpieler In-Reply-To: Subject: Re: [FFmpeg-devel] [PATCH] swscale/input: add rgbaf16 input support 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-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On 08.08.2022 21:39, Mark Reid wrote: > On Mon, Aug 8, 2022 at 11:24 AM Timo Rothenpieler > wrote: > >> This is by no means perfect, since at least ddagrab will return scRGB >> data with values outside of 0.0f to 1.0f for HDR values. >> Its primary purpose is to be able to work with the format at all. >> >> _Float16 support was available on arm/aarch64 for a while, and with gcc >> 12 was enabled on x86 as long as SSE2 is supported. >> >> If the target arch supports f16c, gcc emits fairly efficient assembly, >> taking advantage of it. This is the case on x86-64-v3 or higher. >> Without f16c, it emulates it in software using sse2 instructions. >> --- >> >> I am by no means certain this is the correct way to implement this. >> Tested it with ddagrab output in that format, and it looks like what I'd >> expect. >> >> Specially the order of arguments is a bit of a mystery. I'd have >> expected them to be in order of the planes, so for packed formats, only >> the first one would matter. >> But a bunch of other packed formats left the first src unused, and so I >> followed along, and it ended up working fine. >> >> > Have you looked at the exr decoder half2float.h? It already has f16 to f32 > decoding functions. > For performance, using the compilers native, and potentially hardware accelerated, support is probably preferable. Though as a no-float16-fallback it's probably not too horrible. Just not sure if it's worth the extra effort, given that by the time this sees any use at all, gcc 12 will be very common. Might even think about _Float16 support for exr in that case. Would be an interesting benchmark. _______________________________________________ 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".