From patchwork Wed Nov 23 19:35:37 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Reid X-Patchwork-Id: 39395 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a21:999a:b0:a4:2148:650a with SMTP id ve26csp4022816pzb; Wed, 23 Nov 2022 11:36:21 -0800 (PST) X-Google-Smtp-Source: AA0mqf7RW611tdidiWCjUJ5swufAFowf9kDA2ZTXaYL/OuGq/9OtpeMFgf10bMcfWy9AxN8g2005 X-Received: by 2002:a17:906:4d16:b0:78b:15dc:2355 with SMTP id r22-20020a1709064d1600b0078b15dc2355mr10262497eju.306.1669232180944; Wed, 23 Nov 2022 11:36:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669232180; cv=none; d=google.com; s=arc-20160816; b=t3R3+g5O1LJMzowGdvjgsbhl2vV5Vmc+/1/LNbjYd9PLLms92C2NOlogRtkD1KICIx 8/1TlkbOdAExFaN4v/wAjW5xlZ2m6/2kwAljusSccpHvjfCvEmdwgdJrK2jSDsHChUIE IGt4Ff3KxaeDgYzXBB8FTfNEI+jTCs5VS3Q5+Z2tsu96UEpyxLWXYsR2R6GYitgLQu4T 6Uy49sKwATNGodbmH45WFhmTky1y498nAr2PXZXlMuhBFJvv325Yc4EB+9rARzkQzoqf bvkar8UoM13eEDdV3btGcL6OiGyWDALhCYMo1St7/aRFKi9pC6NlITOZyTFTNq1xXa8R 6Wug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature:delivered-to; bh=DgMJO5JE62efFHh7lF3PFjVedb0QxYSyvTaQ5ydq5eg=; b=y/HOnIfUWA4MZ8AXyuEUBQnWkb+BRc86HCCI3qDZUcOp8gN9GVZ02slSU/y7k+m2Me LTqlFjo+N3c12JEQ27rqNvYcCZEdNgBUZW26jbjOttROiUKBt3DYF/Q9Q5B80ISI/GeX CPatiJZaN/HUyf14lAIKMvdTUv57s+IyU0Tle8vxK/bhspDD23iUQvKGOkjs5/A5Dbb4 OWnhvxp0NE/5AvH/loxCRWWdzSkla8oexJopDzQuDEt5goj2OOM8W2Lue1L2+zg01BtK HhFJ6IE95Ml8esMngKsWfjkLM1Lq4ha3ar71lYQUKC6B8ZKb9Nbg8bouyDdx55Fwii84 Ejww== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20210112 header.b=daJT9Rs7; 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 xe14-20020a170907318e00b0079b40c09982si383344ejb.340.2022.11.23.11.36.20; Wed, 23 Nov 2022 11:36:20 -0800 (PST) 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=20210112 header.b=daJT9Rs7; 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 18CDA68B5DA; Wed, 23 Nov 2022 21:36:11 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pj1-f46.google.com (mail-pj1-f46.google.com [209.85.216.46]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 087AB68B1A1 for ; Wed, 23 Nov 2022 21:36:03 +0200 (EET) Received: by mail-pj1-f46.google.com with SMTP id a1-20020a17090abe0100b00218a7df7789so3024872pjs.5 for ; Wed, 23 Nov 2022 11:36:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Zi7F5DwO02fBI7YUPNwWvizURNB9A7nJ7+uq0QZh8x4=; b=daJT9Rs7uvZGyhRGxPYlb7TxbdLkoACvm4/LAaShV/9PdR+OtjSWgsvGzCZV5embQV qBX+IE5j9SaN6NxHbV38bvoxv62VIJvKdyz4FcDPHA1i9PwmAiHjJ+Bic6dQqN+aKwMY ABt4RJVY7rX48H/Xwd64RVy9W3CafkerSR4uBsLGWiTacAPtO70sfnaf7Ox2XNO4OX86 N1fNuLDWxwP9eY2gApk7AgLJ3E8VfrHeloyODTG6IwFc6WiLbEXkejLEoYMJa2uciJmN c4H26pGSrrtoXEJjZibzjegWcf4lDWEYMCzRGn5bFANptb5zf9dcAn6YMAY50gY+cguO ST7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Zi7F5DwO02fBI7YUPNwWvizURNB9A7nJ7+uq0QZh8x4=; b=bfhRhY9nV3g/knBBKsUr9QpbwKGwzLcG/vncVj8x1DAQ6WVPB9oDlvzf/DsG3sS6v8 boYoM4HSFN4b3JyW9Ux6WmFjZds0vs2M5nYwRDKwirODMyNBKaZBItxYIL4dvhUELc4b XBj5Xp+9to35q2IZ5fYpS420qdYlpXctlmAOJEwwBF/qlkgexAQdA5X3QmaIccJmmX3V QLLVXhQQpHzPYjV7B/OhUa8WAsZTXlV53kICQggX99ILPN6vbvQg2d8bnFJfy9gUB/DS yn/LxRdPsKEAbFu2/ZWW5hFfVChnf4cNDZbBiXn3nMZ/w4DdfXTadMlCG5nT5JFPdPqT cQ+w== X-Gm-Message-State: ANoB5ploRlkHxS9zB4/p8YcOAagoVhp+Rhsz3/briwCQ+yMq+Z5aTYkz ovx2T8QTkKUPmHHxJgDLkObDLLzSK4w= X-Received: by 2002:a17:902:ab5e:b0:189:56ab:ab6c with SMTP id ij30-20020a170902ab5e00b0018956abab6cmr1222782plb.152.1669232161044; Wed, 23 Nov 2022 11:36:01 -0800 (PST) Received: from localhost.localdomain (S0106bc4dfba470f3.vc.shawcable.net. [174.7.244.175]) by smtp.gmail.com with ESMTPSA id a8-20020a63d408000000b00460fbe0d75esm11319276pgh.31.2022.11.23.11.36.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Nov 2022 11:36:00 -0800 (PST) From: mindmark@gmail.com To: ffmpeg-devel@ffmpeg.org Date: Wed, 23 Nov 2022 11:35:37 -0800 Message-Id: <20221123193540.741-2-mindmark@gmail.com> X-Mailer: git-send-email 2.31.1.windows.1 In-Reply-To: <20221123193540.741-1-mindmark@gmail.com> References: <20221123193540.741-1-mindmark@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v5 1/4] swscale/input: add rgbaf32 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 Cc: Mark Reid Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: v/OwxnJW3y2P From: Mark Reid The input functions are currently matching the planar f32 functions. They can be factorized removing multiple lrintf/av_clipf calls, this will be addressed in a future patch. --- libswscale/input.c | 122 +++++++++++++++++++++++++++++++++++++++++++++ libswscale/utils.c | 6 +++ 2 files changed, 128 insertions(+) diff --git a/libswscale/input.c b/libswscale/input.c index d5676062a2..9c9eb31cde 100644 --- a/libswscale/input.c +++ b/libswscale/input.c @@ -1284,6 +1284,98 @@ static void rgbaf16##endian_name##ToA_c(uint8_t *_dst, const uint8_t *_src, cons rgbaf16_funcs_endian(le, 0) rgbaf16_funcs_endian(be, 1) +#define rdpx(src) (is_be ? av_int2float(AV_RB32(&src)): av_int2float(AV_RL32(&src))) + +static av_always_inline void rgbaf32ToUV_endian(uint16_t *dstU, uint16_t *dstV, int is_be, + const float *src, int width, + int32_t *rgb2yuv, int comp) +{ + int32_t ru = rgb2yuv[RU_IDX], gu = rgb2yuv[GU_IDX], bu = rgb2yuv[BU_IDX]; + int32_t rv = rgb2yuv[RV_IDX], gv = rgb2yuv[GV_IDX], bv = rgb2yuv[BV_IDX]; + int i; + /*TODO: refactor these f32 conversions to only have one lrintf and av_clipf call*/ + for (i = 0; i < width; i++) { + int r = lrintf(av_clipf(65535.0f * rdpx(src[i*comp+0]), 0.0f, 65535.0f)); + int g = lrintf(av_clipf(65535.0f * rdpx(src[i*comp+1]), 0.0f, 65535.0f)); + int b = lrintf(av_clipf(65535.0f * rdpx(src[i*comp+2]), 0.0f, 65535.0f)); + + dstU[i] = (ru*r + gu*g + bu*b + (0x10001<<(RGB2YUV_SHIFT-1))) >> RGB2YUV_SHIFT; + dstV[i] = (rv*r + gv*g + bv*b + (0x10001<<(RGB2YUV_SHIFT-1))) >> RGB2YUV_SHIFT; + } +} + +static av_always_inline void rgbaf32ToY_endian(uint16_t *dst, const float *src, int is_be, + int width, int32_t *rgb2yuv, int comp) +{ + int32_t ry = rgb2yuv[RY_IDX], gy = rgb2yuv[GY_IDX], by = rgb2yuv[BY_IDX]; + int i; + /*TODO: refactor these f32 conversions to only have one lrintf and av_clipf call*/ + for (i = 0; i < width; i++) { + int r = lrintf(av_clipf(65535.0f * rdpx(src[i*comp+0]), 0.0f, 65535.0f)); + int g = lrintf(av_clipf(65535.0f * rdpx(src[i*comp+1]), 0.0f, 65535.0f)); + int b = lrintf(av_clipf(65535.0f * rdpx(src[i*comp+2]), 0.0f, 65535.0f)); + + dst[i] = (ry*r + gy*g + by*b + (0x2001<<(RGB2YUV_SHIFT-1))) >> RGB2YUV_SHIFT; + } +} + +static av_always_inline void rgbaf32ToA_endian(uint16_t *dst, const float *src, int is_be, + int width, void *opq) +{ + int i; + for (i=0; isrcFormat; @@ -1663,6 +1755,18 @@ av_cold void ff_sws_init_input_funcs(SwsContext *c) case AV_PIX_FMT_RGBAF16LE: c->chrToYV12 = rgbaf16leToUV_c; break; + case AV_PIX_FMT_RGBF32BE: + c->chrToYV12 = rgbf32beToUV_c; + break; + case AV_PIX_FMT_RGBAF32BE: + c->chrToYV12 = rgbaf32beToUV_c; + break; + case AV_PIX_FMT_RGBF32LE: + c->chrToYV12 = rgbf32leToUV_c; + break; + case AV_PIX_FMT_RGBAF32LE: + c->chrToYV12 = rgbaf32leToUV_c; + break; } } @@ -1973,6 +2077,18 @@ av_cold void ff_sws_init_input_funcs(SwsContext *c) case AV_PIX_FMT_RGBAF16LE: c->lumToYV12 = rgbaf16leToY_c; break; + case AV_PIX_FMT_RGBF32BE: + c->lumToYV12 = rgbf32beToY_c; + break; + case AV_PIX_FMT_RGBAF32BE: + c->lumToYV12 = rgbaf32beToY_c; + break; + case AV_PIX_FMT_RGBF32LE: + c->lumToYV12 = rgbf32leToY_c; + break; + case AV_PIX_FMT_RGBAF32LE: + c->lumToYV12 = rgbaf32leToY_c; + break; } if (c->needAlpha) { if (is16BPS(srcFormat) || isNBPS(srcFormat)) { @@ -1998,6 +2114,12 @@ av_cold void ff_sws_init_input_funcs(SwsContext *c) case AV_PIX_FMT_RGBAF16LE: c->alpToYV12 = rgbaf16leToA_c; break; + case AV_PIX_FMT_RGBAF32BE: + c->alpToYV12 = rgbaf32beToA_c; + break; + case AV_PIX_FMT_RGBAF32LE: + c->alpToYV12 = rgbaf32leToA_c; + break; case AV_PIX_FMT_YA8: c->alpToYV12 = uyvyToY_c; break; diff --git a/libswscale/utils.c b/libswscale/utils.c index 85640a143f..2c520f68d1 100644 --- a/libswscale/utils.c +++ b/libswscale/utils.c @@ -266,6 +266,10 @@ static const FormatEntry format_entries[] = { [AV_PIX_FMT_VUYX] = { 1, 1 }, [AV_PIX_FMT_RGBAF16BE] = { 1, 0 }, [AV_PIX_FMT_RGBAF16LE] = { 1, 0 }, + [AV_PIX_FMT_RGBF32BE] = { 1, 0 }, + [AV_PIX_FMT_RGBF32LE] = { 1, 0 }, + [AV_PIX_FMT_RGBAF32BE] = { 1, 0 }, + [AV_PIX_FMT_RGBAF32LE] = { 1, 0 }, [AV_PIX_FMT_XV30LE] = { 1, 1 }, [AV_PIX_FMT_XV36LE] = { 1, 1 }, }; @@ -1572,6 +1576,8 @@ av_cold int sws_init_context(SwsContext *c, SwsFilter *srcFilter, srcFormat != AV_PIX_FMT_GBRAP16BE && srcFormat != AV_PIX_FMT_GBRAP16LE && srcFormat != AV_PIX_FMT_GBRPF32BE && srcFormat != AV_PIX_FMT_GBRPF32LE && srcFormat != AV_PIX_FMT_GBRAPF32BE && srcFormat != AV_PIX_FMT_GBRAPF32LE && + srcFormat != AV_PIX_FMT_RGBF32BE && srcFormat != AV_PIX_FMT_RGBF32LE && + srcFormat != AV_PIX_FMT_RGBAF32BE && srcFormat != AV_PIX_FMT_RGBAF32LE && ((dstW >> c->chrDstHSubSample) <= (srcW >> 1) || (flags & SWS_FAST_BILINEAR))) c->chrSrcHSubSample = 1; From patchwork Wed Nov 23 19:35:38 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Reid X-Patchwork-Id: 39396 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a21:999a:b0:a4:2148:650a with SMTP id ve26csp4022877pzb; Wed, 23 Nov 2022 11:36:28 -0800 (PST) X-Google-Smtp-Source: AA0mqf5hHrVm9tWCXQ45TMBftElrnsitEjyjt2P0fEr/ZJ1B27kUKAETYeZbDf3uCMxQRjvEMeMW X-Received: by 2002:a17:906:1182:b0:78d:99f2:a94e with SMTP id n2-20020a170906118200b0078d99f2a94emr22429674eja.232.1669232188676; Wed, 23 Nov 2022 11:36:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669232188; cv=none; d=google.com; s=arc-20160816; b=X6v4vFgUHwr4nHc5o+85ugD0XAaIYE8z6pKmroe1intC92Ip9qxLAjisAJ6sg4C5Wq zFM8Dzuym62MqrlwfOdxYZ4tEjgT9xQd2QCHcFfzY1dBpDpBvlZFzSTcZad97PG0DlAu 7Pj1FUNN6rDyzhlmv3mcomT1AD3iHOkeLyLjaT8qyNuQH5VP6tIE4lhhfiR/cVlXNrYw ET6ap1dDnSrl5UCB5PSDbCMuR5kIuPwmeno9uRXvJjz4o2jjyEzT/49bLi7exIBWWAID vEVy6h2vL3XF1CMa/I7DwbMb9MFq9xc75Y3w2eRho+EvM9eK99OLrtce8QW72Ur/8Xgx MYMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature:delivered-to; bh=PJejlmHKBPtnBvgMJKwti1U4pMM0fAtqlrmBURAsoig=; b=SQDUF6Af6Lza5oFDNW5Iv8ZJbm50RdR+N0yd9HC3G6z2OIEQbKTikgYIHpDpIOwXi2 7ccTxoqO05W4FTWoL6ERYJbvko2yu8x8wqdaRCHmPuEClZR69iaZL+B1W4JBaHjaDKjy qPkhnvJ5yS8kZo1BwbcwBpTJKVZzSdEhQM2Ya86sgAtt2jY2fm/2w8EXJPY7lbWAuZbR /8UMiTdjMmwB+KwOT/AYN7IBcIPiOb9lbmQbWF30iUAvt/I28lmhzAYkf+RLRcQ7ydGU 30q8hChn7IIOXU7ooICb01Tk+qy/snccRRpdu1fGtgAEvIOCt0nYpHBoRvtwNyNJjhNV Subg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20210112 header.b=ax6cJBfi; 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 hb30-20020a170907161e00b00781cde43588si424989ejc.58.2022.11.23.11.36.28; Wed, 23 Nov 2022 11:36:28 -0800 (PST) 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=20210112 header.b=ax6cJBfi; 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 145D168B068; Wed, 23 Nov 2022 21:36:12 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pg1-f171.google.com (mail-pg1-f171.google.com [209.85.215.171]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 3C59668980E for ; Wed, 23 Nov 2022 21:36:04 +0200 (EET) Received: by mail-pg1-f171.google.com with SMTP id b62so17644264pgc.0 for ; Wed, 23 Nov 2022 11:36:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=gA54uSmepfSWjONf2GDMCk9UPzM21oyq2EuT7HkLuD4=; b=ax6cJBfi3sZmnNnzzMbI50MX/GZHInR9jcmIVfV2znf8whUD1bNRRk9aoTFLCY3Do+ MQxyQr/ZDYMwsQB7HWz7V66m7CQPZRNJTHzHkfJorRGodeSjwHGn0CWa4tMvchf1Y04R uz6naXwaNlYBj00r3HEPg8gkIovUUSFQGANQGo2dJFU5E+SDCQWaULxEIuzFyjpsQy83 tdo2Mes4p0lA00afd8gqtY0i01rXbtRodNzXtppaygv1yeYC3MoJ7e8OLM+VL6Q67xO8 HfzHGDU0IbVYVa1/rWYpE7YNdkDeZP4qGaPdz1eEgIAkcWncIk5wITnph3th7lHaez5S R/XA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=gA54uSmepfSWjONf2GDMCk9UPzM21oyq2EuT7HkLuD4=; b=M1fwTgcINkFG0Aa0UAFdvInNbcr42p2tzszY+ltIDYLEZtoqCjsBccpIWgjJPWx5a3 LVj9UiwYV6iGTJ4PrDKnEUND/OHzD0qZWhqnOqLfee0g3u8zMWAKP5MMQX5rbd5ffKhq f/tdasSwkTSql32z8IeUY6yzuQuoLPG+0dvapPOX5UpjohxGUPuIfxQ1ajDZSEfD1ZJh fWj5pTpwFFwlzqxvqtp9txPsN5GcQBsHlih+DJKA88eW+mJFGMUwkhefIBLZwm855NSH GkfgiYQaEp1KM36R/DnClEk8xNmJV/jLj1tg7hssASje1oPKmsxfVfkeJf5Bw47ibe9/ S7sA== X-Gm-Message-State: ANoB5pk/SOl6lChlSEBoHnh+m4lFpOIyTxjRCCk89bcvPBt8hSPtDM6N YnGEpqMqCrW2ilh/1eH5+caPupcKQFY= X-Received: by 2002:aa7:8c54:0:b0:574:2f5a:18d0 with SMTP id e20-20020aa78c54000000b005742f5a18d0mr6854287pfd.23.1669232162051; Wed, 23 Nov 2022 11:36:02 -0800 (PST) Received: from localhost.localdomain (S0106bc4dfba470f3.vc.shawcable.net. [174.7.244.175]) by smtp.gmail.com with ESMTPSA id a8-20020a63d408000000b00460fbe0d75esm11319276pgh.31.2022.11.23.11.36.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Nov 2022 11:36:01 -0800 (PST) From: mindmark@gmail.com To: ffmpeg-devel@ffmpeg.org Date: Wed, 23 Nov 2022 11:35:38 -0800 Message-Id: <20221123193540.741-3-mindmark@gmail.com> X-Mailer: git-send-email 2.31.1.windows.1 In-Reply-To: <20221123193540.741-1-mindmark@gmail.com> References: <20221123193540.741-1-mindmark@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v5 2/4] avfilter/vf_hflip: add support for packed rgb float formats 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: Mark Reid Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: tQul9/PF8jTJ From: Mark Reid --- libavfilter/vf_hflip_init.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/libavfilter/vf_hflip_init.h b/libavfilter/vf_hflip_init.h index d0319f463d..31173f73fc 100644 --- a/libavfilter/vf_hflip_init.h +++ b/libavfilter/vf_hflip_init.h @@ -86,6 +86,29 @@ static void hflip_qword_c(const uint8_t *ssrc, uint8_t *ddst, int w) dst[j] = src[-j]; } +static void hflip_b96_c(const uint8_t *ssrc, uint8_t *ddst, int w) +{ + const uint32_t *in = (const uint32_t *)ssrc; + uint32_t *out = (uint32_t *)ddst; + + for (int j = 0; j < w; j++, out += 3, in -= 3) { + out[0] = in[0]; + out[1] = in[1]; + out[2] = in[2]; + } +} + +static void hflip_b128_c(const uint8_t *ssrc, uint8_t *ddst, int w) +{ + const uint64_t *in = (const uint64_t *)ssrc; + uint64_t *out = (uint64_t *)ddst; + + for (int j = 0; j < w; j++, out += 2, in -= 2) { + out[0] = in[0]; + out[1] = in[1]; + } +} + static av_unused int ff_hflip_init(FlipContext *s, int step[4], int nb_planes) { for (int i = 0; i < nb_planes; i++) { @@ -97,6 +120,8 @@ static av_unused int ff_hflip_init(FlipContext *s, int step[4], int nb_planes) case 4: s->flip_line[i] = hflip_dword_c; break; case 6: s->flip_line[i] = hflip_b48_c; break; case 8: s->flip_line[i] = hflip_qword_c; break; + case 12: s->flip_line[i] = hflip_b96_c; break; + case 16: s->flip_line[i] = hflip_b128_c; break; default: return AVERROR_BUG; } From patchwork Wed Nov 23 19:35:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Reid X-Patchwork-Id: 39397 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a21:999a:b0:a4:2148:650a with SMTP id ve26csp4022960pzb; Wed, 23 Nov 2022 11:36:36 -0800 (PST) X-Google-Smtp-Source: AA0mqf6zRIjOfQtWjqVI4Je7p+5/4IhThkr399wqxBZtgi/zEoW7f1ZZCW8zbxJbJOGcCX6kQ/Lw X-Received: by 2002:a17:906:7f07:b0:7ad:b216:f1ce with SMTP id d7-20020a1709067f0700b007adb216f1cemr24789092ejr.419.1669232196575; Wed, 23 Nov 2022 11:36:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669232196; cv=none; d=google.com; s=arc-20160816; b=yxkT5VXpLms3LWydxOAav7B+qMk/bSoRjQMAnJ/0wKj09XVnLWAHKrSdpPyTtz7UwN Wo/S20vYiUo6rCkbi09ofCYxuWfk9E4VKWggAC3n5BTT2yXffSxcqvQb+sFM4ZZ0AKSW VDXopDWNOHstkuszNP1d/qKyTulEgz5PBdK4kTTV/fknjWxFiNjy3+fD8YWUibVoSax3 gkD5/Bzf2iQb7W0GlHQJnzZ0u7pHyqIW/9J4atlQ3x3CyYzkwMuZDFp9KHYEGiUZiwFV Ipzg9tLnzSocPmsuRy2QvvU+J1i5JBfxdWITtlNnwfwxEFMK0bOWadYgmDJsRP1hgFXY dggA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature:delivered-to; bh=boMg8rZ0alfHDA3iE/A2krjQnDhL41J8Bi73ikJeBbs=; b=t4/njwzgATT9SkAmcrad3f1Xi/tFTfshzNMUKmROl+IhttZkx+hiRRIrydg76wnBPO XtYW8vZ5UV3SDm1chGh39RnHYxK0s/09R+F4jkX5WUP6xDkjKAAPePDSQhRdXoCYd7qW eJcxgjC9jJ8rSynMwUvEN5DYNyHltno20pxJ2n8uoxAjSNhRYyj/rRhR8mNzuu0FwBYH pr6Xv6dhrPrDmlG0Dt8IDmdplzuyNIaocwjvvwZnl6jiVFgzunyjF0d7FbsPI3DIVnpT YTIThJpmdXz3lOOqbozrxVcrmu5qbxPoio7SIuHEkzZXsRdQxfJWmDtLqPr2fBB5cKeH btMA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20210112 header.b="YVGg0U//"; 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 ia28-20020a170907a07c00b007940226fd21si12952914ejc.903.2022.11.23.11.36.36; Wed, 23 Nov 2022 11:36:36 -0800 (PST) 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=20210112 header.b="YVGg0U//"; 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 0BB2E68B7D5; Wed, 23 Nov 2022 21:36:13 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pl1-f174.google.com (mail-pl1-f174.google.com [209.85.214.174]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id F1CC968980E for ; Wed, 23 Nov 2022 21:36:04 +0200 (EET) Received: by mail-pl1-f174.google.com with SMTP id io19so17541091plb.8 for ; Wed, 23 Nov 2022 11:36:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=LksnUiNcu42gqrIrPD1I6aZ/atWUfj86EsUXolhc2Qk=; b=YVGg0U//M0x3WEEIytKyj5gqdDY/Zho7NHsab+pFfPlGy1yzv6zwV6moI1q4Y4OPPW vG6BA8JL7D/EJ+xZKAwTxslpu5AvpyyjNqhRWp+Os/K4WWSGfUuXtmX9ElD13Ay7DH3Y 9+Gdk3mUhwEWkUQ9eJiw358iK2iPLTRat0U6gaCd7rLzM4dIVSSUmBQ49Mj3ziBeVex7 hAcsqo/oFm+NoIIjKPvsznJyDhWv4KNyuWKvC4hQH0lexP/Z4QTOrdwzaIsg68QiB7hR 9usWe8393ZbzdH0qhCAFC81gvDAtwL0IUE5uVFi+GKM4QBHGr9o9CffkT+3yJUA+I9ot jXqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=LksnUiNcu42gqrIrPD1I6aZ/atWUfj86EsUXolhc2Qk=; b=LRMZBuLfd3IVBDCqXXqKTcWkIVx1QSpmB0ltSbWBzhJqyv6XVzSULbEA2V7q9KVt0c m1/wX9WpcJLPVeFm2Ez5qbWang1CqSWyBD0J2P22dE79DEdshGiwg5I3PSJQ/g4+kMxQ B8S/c7Ff4BQpXdcx6gGai5ZzPzyN0dXRmXksouZFA7ibLu/1/u4Am6Y/oHLNfFG7ElMb qrhkD/DxfUIYnjsbNibZhaEWeplUZtxQ1f7g38ZjByz4tDrUVh1ITq96wzCVYMA0D0pw JjveHfMbTzo0dgNpDR6HElYqXU6VLPNuaRyJ134H29ik4SorA2CyQIDLUiMo/zs5UpIQ xtCA== X-Gm-Message-State: ANoB5pmp6TSInmRFsgB59I1gwFk2fk1cSIe+NpXUQ3IlTHypTpFvWPnt RnMcGj7F7oNThtziZjy9TIg3Firde+Y= X-Received: by 2002:a17:902:ec01:b0:186:a27d:8e81 with SMTP id l1-20020a170902ec0100b00186a27d8e81mr23116707pld.133.1669232162946; Wed, 23 Nov 2022 11:36:02 -0800 (PST) Received: from localhost.localdomain (S0106bc4dfba470f3.vc.shawcable.net. [174.7.244.175]) by smtp.gmail.com with ESMTPSA id a8-20020a63d408000000b00460fbe0d75esm11319276pgh.31.2022.11.23.11.36.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Nov 2022 11:36:02 -0800 (PST) From: mindmark@gmail.com To: ffmpeg-devel@ffmpeg.org Date: Wed, 23 Nov 2022 11:35:39 -0800 Message-Id: <20221123193540.741-4-mindmark@gmail.com> X-Mailer: git-send-email 2.31.1.windows.1 In-Reply-To: <20221123193540.741-1-mindmark@gmail.com> References: <20221123193540.741-1-mindmark@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v5 3/4] avfilter/vf_transpose: add support for packed rgb float formats 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: Mark Reid Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: Fv/0Pxj6tMt+ From: Mark Reid --- libavfilter/vf_transpose.c | 44 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/libavfilter/vf_transpose.c b/libavfilter/vf_transpose.c index 469e66729f..1023d6fe82 100644 --- a/libavfilter/vf_transpose.c +++ b/libavfilter/vf_transpose.c @@ -174,6 +174,46 @@ static void transpose_8x8_64_c(uint8_t *src, ptrdiff_t src_linesize, transpose_block_64_c(src, src_linesize, dst, dst_linesize, 8, 8); } +static inline void transpose_block_96_c(uint8_t *src, ptrdiff_t src_linesize, + uint8_t *dst, ptrdiff_t dst_linesize, + int w, int h) +{ + int x, y; + for (y = 0; y < h; y++, dst += dst_linesize, src += 12) { + for (x = 0; x < w; x++) { + *((uint32_t *)(dst+0 + 12*x)) = *((uint32_t *)(src+0 + x*src_linesize)); + *((uint32_t *)(dst+4 + 12*x)) = *((uint32_t *)(src+4 + x*src_linesize)); + *((uint32_t *)(dst+8 + 12*x)) = *((uint32_t *)(src+8 + x*src_linesize)); + } + } +} + +static void transpose_8x8_96_c(uint8_t *src, ptrdiff_t src_linesize, + uint8_t *dst, ptrdiff_t dst_linesize) +{ + transpose_block_96_c(src, src_linesize, dst, dst_linesize, 8, 8); +} + + +static inline void transpose_block_128_c(uint8_t *src, ptrdiff_t src_linesize, + uint8_t *dst, ptrdiff_t dst_linesize, + int w, int h) +{ + int x, y; + for (y = 0; y < h; y++, dst += dst_linesize, src += 16) { + for (x = 0; x < w; x++) { + *((uint64_t *)(dst+0 + 16*x)) = *((uint64_t *)(src+0 + x*src_linesize)); + *((uint64_t *)(dst+8 + 16*x)) = *((uint64_t *)(src+8 + x*src_linesize)); + } + } +} + +static void transpose_8x8_128_c(uint8_t *src, ptrdiff_t src_linesize, + uint8_t *dst, ptrdiff_t dst_linesize) +{ + transpose_block_128_c(src, src_linesize, dst, dst_linesize, 8, 8); +} + static int config_props_output(AVFilterLink *outlink) { AVFilterContext *ctx = outlink->src; @@ -232,6 +272,10 @@ static int config_props_output(AVFilterLink *outlink) v->transpose_8x8 = transpose_8x8_48_c; break; case 8: v->transpose_block = transpose_block_64_c; v->transpose_8x8 = transpose_8x8_64_c; break; + case 12: v->transpose_block = transpose_block_96_c; + v->transpose_8x8 = transpose_8x8_96_c; break; + case 16: v->transpose_block = transpose_block_128_c; + v->transpose_8x8 = transpose_8x8_128_c; break; } } From patchwork Wed Nov 23 19:35:40 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Reid X-Patchwork-Id: 39398 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a21:999a:b0:a4:2148:650a with SMTP id ve26csp4023046pzb; Wed, 23 Nov 2022 11:36:45 -0800 (PST) X-Google-Smtp-Source: AA0mqf4KqK1dQx7auFc+Lgq3mWDQexwY7aCLTzgg4oMibyi8it6V1CThAuQsLBW7sKz7HlRwAY42 X-Received: by 2002:aa7:dd4b:0:b0:467:65a2:f635 with SMTP id o11-20020aa7dd4b000000b0046765a2f635mr13524272edw.106.1669232205150; Wed, 23 Nov 2022 11:36:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669232205; cv=none; d=google.com; s=arc-20160816; b=gpCvT9GuKFknOQJASHNpUPbqOKfuX6++3a8UQpWOPiAUunxb1R84Z9A0hD0e857rA9 rHfktlo7GiHrUTrclmkYkWA0x+6LF4a3q0AkKROwxhfeRS5m9MlYHF+x2CnHH7sbFWW8 5WSMWXBAO+lV9yfD1zIHC16F9LLXGCLSIELdbcgCGO+wkLQv/CU6EYSvC4wS8BCMZkAz 8k0p6JoQdbe7baLTrXY9ZmWdmV4WP4ZNLsUgyQOijWIFo626sdfRg9ldTZaz0kJ5OETl BI0Vi022RkmW0lV2JbKbQrlCaggaE2aE2D8VKcILVv/ntLlrNaHcL9a3RS4Rd1oG/2eT hCtA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature:delivered-to; bh=yPrgicNddvAr+FrjDcriojCrRmTVI0vb6jsPPc14g64=; b=Okt3u4GyFoh39HypAtpv+IeIYNVQhw3TTqeIa2Q87GMQBZdzo5V+tp+DvO8Zel6WLk 0UxfZi65DwlCCDLwyRdVmutBFXZ8Ji4wKZV1E89VRxu0eyeiYpEVWZrQiWCq2luj2ZM+ agLJLeRAal/rb+uMRe/82ZCyvLrChXVHdAPOOx8fAvs/CjYqjQZkrC4FWbBMm4s/yVoQ a36bWbxO7/un8oQQTnC/XmZNyY2WTXedldAU4tLubZhxOFJ4I60VyUOV8bIn0Plb5mmk iOhY5fEfqUHPAjcaAv/CiBpwp3rkOzRYJCwDXi+qoy3klBbPLiwW9lo6za7sNn0jZUGD 1FfQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20210112 header.b=N4LckinZ; 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 mp36-20020a1709071b2400b007ae86742c39si12376455ejc.504.2022.11.23.11.36.44; Wed, 23 Nov 2022 11:36:45 -0800 (PST) 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=20210112 header.b=N4LckinZ; 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 0342A68B401; Wed, 23 Nov 2022 21:36:14 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pf1-f179.google.com (mail-pf1-f179.google.com [209.85.210.179]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 0B72068B59C for ; Wed, 23 Nov 2022 21:36:06 +0200 (EET) Received: by mail-pf1-f179.google.com with SMTP id y203so18261731pfb.4 for ; Wed, 23 Nov 2022 11:36:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=5nSr4KjTCTeyupBx5LUdQ0nL6X68ayq7qe7GnQ/OA7I=; b=N4LckinZR5lykkcXFFOhUx8tLS3skKEnH9d8MBjTdjt3iU2LwbSl04Ve5BywAWEl1b 0Fckn88wp+HcI4EfebHTRzwMM9W8atwVqf0B9C0/vXvdDHHrFV4dyFavDsYrsAegKjdh wJMKhXyg8b9gQAOVyJcm4Frfra+P5xj4h6rwR79X4Rt/6umJ43/r72J+E+NTeVAbQt48 RlliivP9fpv0wmJpFz0CSxV7AzLHw7ovrhza1y2OhFB9lNARRlvufX/0/4wVPuMhghc3 oHXoqETKDuSzXkENBGauerUtOIOS10YsTpBgPDkYptbQXGwwMvcFTtVtHtxQ/1Svhnoe Bdlg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=5nSr4KjTCTeyupBx5LUdQ0nL6X68ayq7qe7GnQ/OA7I=; b=o9+x3141SiSpHedYD3FrJbNr2UiRwsymu/sKNMvld1sCIwwBS7AhspDy+27vHB9mT6 fL9yEjPw0gcpKJ/lhbupeqsoW5Ejg5/D27PsSGU9Q1mNtmhhWqa68oOXiL8y79sfjBxB nqBg2zJXzd+r1WleNqUV4LaNE3bVSXanhjANNGUzq1OywJYcFkWkwW8wMQ+NXxg5utWF AiP6W1dMF+Jjas+8k2/fHazTqSc2eI57RSDXXUJ1svoMRW5PdGrZKJX6TaK18ZJl+iWG cYJ8i8TMEIqQ2l4USaHDfDMKpe5mjkc7tJ5W9LBOpngADQzoH+KK4r+Db/eG+5jyCjQ0 rPqg== X-Gm-Message-State: ANoB5pkPs1jco0gdyCfazW/M/aV0GnOKkBnAiY64pvT+E6i11qVqi6VH IFwRP23//+48Kmeef587fOuccUNZoGM= X-Received: by 2002:a05:6a00:1348:b0:56b:e27f:76ee with SMTP id k8-20020a056a00134800b0056be27f76eemr10806115pfu.31.1669232163766; Wed, 23 Nov 2022 11:36:03 -0800 (PST) Received: from localhost.localdomain (S0106bc4dfba470f3.vc.shawcable.net. [174.7.244.175]) by smtp.gmail.com with ESMTPSA id a8-20020a63d408000000b00460fbe0d75esm11319276pgh.31.2022.11.23.11.36.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Nov 2022 11:36:03 -0800 (PST) From: mindmark@gmail.com To: ffmpeg-devel@ffmpeg.org Date: Wed, 23 Nov 2022 11:35:40 -0800 Message-Id: <20221123193540.741-5-mindmark@gmail.com> X-Mailer: git-send-email 2.31.1.windows.1 In-Reply-To: <20221123193540.741-1-mindmark@gmail.com> References: <20221123193540.741-1-mindmark@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v5 4/4] swscale/output: add rgbaf32 output 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 Cc: Mark Reid Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: 3t6vGADfEQky From: Mark Reid --- libswscale/output.c | 92 ++++++++++++++++++++++++ libswscale/swscale_unscaled.c | 4 +- libswscale/tests/floatimg_cmp.c | 4 +- libswscale/utils.c | 16 +++-- libswscale/yuv2rgb.c | 2 + tests/ref/fate/filter-pixdesc-rgbaf32be | 1 + tests/ref/fate/filter-pixdesc-rgbaf32le | 1 + tests/ref/fate/filter-pixdesc-rgbf32be | 1 + tests/ref/fate/filter-pixdesc-rgbf32le | 1 + tests/ref/fate/filter-pixfmts-copy | 4 ++ tests/ref/fate/filter-pixfmts-crop | 4 ++ tests/ref/fate/filter-pixfmts-field | 4 ++ tests/ref/fate/filter-pixfmts-fieldorder | 4 ++ tests/ref/fate/filter-pixfmts-hflip | 4 ++ tests/ref/fate/filter-pixfmts-il | 4 ++ tests/ref/fate/filter-pixfmts-null | 4 ++ tests/ref/fate/filter-pixfmts-scale | 4 ++ tests/ref/fate/filter-pixfmts-transpose | 4 ++ tests/ref/fate/filter-pixfmts-vflip | 4 ++ tests/ref/fate/sws-floatimg-cmp | 16 +++++ 20 files changed, 170 insertions(+), 8 deletions(-) create mode 100644 tests/ref/fate/filter-pixdesc-rgbaf32be create mode 100644 tests/ref/fate/filter-pixdesc-rgbaf32le create mode 100644 tests/ref/fate/filter-pixdesc-rgbf32be create mode 100644 tests/ref/fate/filter-pixdesc-rgbf32le diff --git a/libswscale/output.c b/libswscale/output.c index 5c85bff971..1d86a244f9 100644 --- a/libswscale/output.c +++ b/libswscale/output.c @@ -2471,6 +2471,92 @@ yuv2gbrpf32_full_X_c(SwsContext *c, const int16_t *lumFilter, } } +static void +yuv2rgbaf32_full_X_c(SwsContext *c, const int16_t *lumFilter, + const int16_t **lumSrcx, int lumFilterSize, + const int16_t *chrFilter, const int16_t **chrUSrcx, + const int16_t **chrVSrcx, int chrFilterSize, + const int16_t **alpSrcx, uint8_t *dest, + int dstW, int y) +{ + const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(c->dstFormat); + int i; + int alpha = desc->flags & AV_PIX_FMT_FLAG_ALPHA; + int hasAlpha = alpha && alpSrcx; + int pixelStep = alpha ? 4 : 3; + uint32_t *dest32 = (uint32_t*)dest; + const int32_t **lumSrc = (const int32_t**)lumSrcx; + const int32_t **chrUSrc = (const int32_t**)chrUSrcx; + const int32_t **chrVSrc = (const int32_t**)chrVSrcx; + const int32_t **alpSrc = (const int32_t**)alpSrcx; + static const float float_mult = 1.0f / 65535.0f; + uint32_t a = av_float2int(1.0f); + + for (i = 0; i < dstW; i++) { + int j; + int Y = -0x40000000; + int U = -(128 << 23); + int V = -(128 << 23); + int R, G, B, A; + + for (j = 0; j < lumFilterSize; j++) + Y += lumSrc[j][i] * (unsigned)lumFilter[j]; + + for (j = 0; j < chrFilterSize; j++) { + U += chrUSrc[j][i] * (unsigned)chrFilter[j]; + V += chrVSrc[j][i] * (unsigned)chrFilter[j]; + } + + Y >>= 14; + Y += 0x10000; + U >>= 14; + V >>= 14; + + if (hasAlpha) { + A = -0x40000000; + + for (j = 0; j < lumFilterSize; j++) + A += alpSrc[j][i] * (unsigned)lumFilter[j]; + + A >>= 1; + A += 0x20002000; + a = av_float2int(float_mult * (float)(av_clip_uintp2(A, 30) >> 14)); + } + + Y -= c->yuv2rgb_y_offset; + Y *= c->yuv2rgb_y_coeff; + Y += (1 << 13) - (1 << 29); + R = V * c->yuv2rgb_v2r_coeff; + G = V * c->yuv2rgb_v2g_coeff + U * c->yuv2rgb_u2g_coeff; + B = U * c->yuv2rgb_u2b_coeff; + + R = av_clip_uintp2(((Y + R) >> 14) + (1<<15), 16); + G = av_clip_uintp2(((Y + G) >> 14) + (1<<15), 16); + B = av_clip_uintp2(((Y + B) >> 14) + (1<<15), 16); + + dest32[0] = av_float2int(float_mult * (float)R); + dest32[1] = av_float2int(float_mult * (float)G); + dest32[2] = av_float2int(float_mult * (float)B); + if (alpha) + dest32[3] = a; + + dest32 += pixelStep; + } + if ((!isBE(c->dstFormat)) != (!HAVE_BIGENDIAN)) { + dest32 = (uint32_t*)dest; + for (i = 0; i < dstW; i++) { + dest32[0] = av_bswap32(dest32[0]); + dest32[1] = av_bswap32(dest32[1]); + dest32[2] = av_bswap32(dest32[2]); + if (alpha) + dest32[3] = av_bswap32(dest32[3]); + + dest32 += pixelStep; + } + } + +} + static void yuv2ya8_1_c(SwsContext *c, const int16_t *buf0, const int16_t *ubuf[2], const int16_t *vbuf[2], @@ -2983,6 +3069,12 @@ av_cold void ff_sws_init_output_funcs(SwsContext *c, } break; + case AV_PIX_FMT_RGBF32LE: + case AV_PIX_FMT_RGBF32BE: + case AV_PIX_FMT_RGBAF32LE: + case AV_PIX_FMT_RGBAF32BE: + *yuv2packedX = yuv2rgbaf32_full_X_c; + break; case AV_PIX_FMT_RGB24: *yuv2packedX = yuv2rgb24_full_X_c; *yuv2packed2 = yuv2rgb24_full_2_c; diff --git a/libswscale/swscale_unscaled.c b/libswscale/swscale_unscaled.c index 9af2e7ecc3..5a73cfa541 100644 --- a/libswscale/swscale_unscaled.c +++ b/libswscale/swscale_unscaled.c @@ -2160,7 +2160,9 @@ void ff_get_unscaled_swscale(SwsContext *c) /* bswap 32 bits per pixel/component formats */ if (IS_DIFFERENT_ENDIANESS(srcFormat, dstFormat, AV_PIX_FMT_GBRPF32) || - IS_DIFFERENT_ENDIANESS(srcFormat, dstFormat, AV_PIX_FMT_GBRAPF32)) + IS_DIFFERENT_ENDIANESS(srcFormat, dstFormat, AV_PIX_FMT_GBRAPF32) || + IS_DIFFERENT_ENDIANESS(srcFormat, dstFormat, AV_PIX_FMT_RGBF32) || + IS_DIFFERENT_ENDIANESS(srcFormat, dstFormat, AV_PIX_FMT_RGBAF32)) c->convert_unscaled = bswap_32bpc; if (usePal(srcFormat) && isByteRGB(dstFormat)) diff --git a/libswscale/tests/floatimg_cmp.c b/libswscale/tests/floatimg_cmp.c index 5c67594fb6..9559c93aac 100644 --- a/libswscale/tests/floatimg_cmp.c +++ b/libswscale/tests/floatimg_cmp.c @@ -54,7 +54,9 @@ static const enum AVPixelFormat pix_fmts[] = { AV_PIX_FMT_GBRP10LE, AV_PIX_FMT_GBRAP10LE, AV_PIX_FMT_GBRP12LE, AV_PIX_FMT_GBRAP12LE, AV_PIX_FMT_GBRP14LE, - AV_PIX_FMT_GBRP16LE, AV_PIX_FMT_GBRAP16LE + AV_PIX_FMT_GBRP16LE, AV_PIX_FMT_GBRAP16LE, + AV_PIX_FMT_RGBF32LE, AV_PIX_FMT_RGBAF32LE, + AV_PIX_FMT_RGBF32BE, AV_PIX_FMT_RGBAF32BE }; const char *usage = "floatimg_cmp -pixel_format -size -ref \n"; diff --git a/libswscale/utils.c b/libswscale/utils.c index 2c520f68d1..642f765550 100644 --- a/libswscale/utils.c +++ b/libswscale/utils.c @@ -266,10 +266,10 @@ static const FormatEntry format_entries[] = { [AV_PIX_FMT_VUYX] = { 1, 1 }, [AV_PIX_FMT_RGBAF16BE] = { 1, 0 }, [AV_PIX_FMT_RGBAF16LE] = { 1, 0 }, - [AV_PIX_FMT_RGBF32BE] = { 1, 0 }, - [AV_PIX_FMT_RGBF32LE] = { 1, 0 }, - [AV_PIX_FMT_RGBAF32BE] = { 1, 0 }, - [AV_PIX_FMT_RGBAF32LE] = { 1, 0 }, + [AV_PIX_FMT_RGBF32BE] = { 1, 1 }, + [AV_PIX_FMT_RGBF32LE] = { 1, 1 }, + [AV_PIX_FMT_RGBAF32BE] = { 1, 1 }, + [AV_PIX_FMT_RGBAF32LE] = { 1, 1 }, [AV_PIX_FMT_XV30LE] = { 1, 1 }, [AV_PIX_FMT_XV36LE] = { 1, 1 }, }; @@ -1512,7 +1512,7 @@ av_cold int sws_init_context(SwsContext *c, SwsFilter *srcFilter, } } } - if (isPlanarRGB(dstFormat)) { + if (isPlanarRGB(dstFormat) || isFloat(dstFormat)) { if (!(flags & SWS_FULL_CHR_H_INT)) { av_log(c, AV_LOG_DEBUG, "%s output is not supported with half chroma resolution, switching to full\n", @@ -1544,7 +1544,11 @@ av_cold int sws_init_context(SwsContext *c, SwsFilter *srcFilter, dstFormat != AV_PIX_FMT_BGR4_BYTE && dstFormat != AV_PIX_FMT_RGB4_BYTE && dstFormat != AV_PIX_FMT_BGR8 && - dstFormat != AV_PIX_FMT_RGB8 + dstFormat != AV_PIX_FMT_RGB8 && + dstFormat != AV_PIX_FMT_RGBF32LE && + dstFormat != AV_PIX_FMT_RGBF32BE && + dstFormat != AV_PIX_FMT_RGBAF32LE && + dstFormat != AV_PIX_FMT_RGBAF32BE ) { av_log(c, AV_LOG_WARNING, "full chroma interpolation for destination format '%s' not yet implemented\n", diff --git a/libswscale/yuv2rgb.c b/libswscale/yuv2rgb.c index 9c3f5e23c6..7ad9d2c9dc 100644 --- a/libswscale/yuv2rgb.c +++ b/libswscale/yuv2rgb.c @@ -999,6 +999,8 @@ av_cold int ff_yuv2rgb_c_init_tables(SwsContext *c, const int inv_table[4], break; case 32: case 64: + case 96: + case 128: base = (c->dstFormat == AV_PIX_FMT_RGB32_1 || c->dstFormat == AV_PIX_FMT_BGR32_1) ? 8 : 0; rbase = base + (isRgb ? 16 : 0); diff --git a/tests/ref/fate/filter-pixdesc-rgbaf32be b/tests/ref/fate/filter-pixdesc-rgbaf32be new file mode 100644 index 0000000000..def2537716 --- /dev/null +++ b/tests/ref/fate/filter-pixdesc-rgbaf32be @@ -0,0 +1 @@ +pixdesc-rgbaf32be 8c618ffd38084857013b0f50d2cee0dd diff --git a/tests/ref/fate/filter-pixdesc-rgbaf32le b/tests/ref/fate/filter-pixdesc-rgbaf32le new file mode 100644 index 0000000000..01913ecaa7 --- /dev/null +++ b/tests/ref/fate/filter-pixdesc-rgbaf32le @@ -0,0 +1 @@ +pixdesc-rgbaf32le bb5239a00a3ec2b1f1d569733a1e03a2 diff --git a/tests/ref/fate/filter-pixdesc-rgbf32be b/tests/ref/fate/filter-pixdesc-rgbf32be new file mode 100644 index 0000000000..77e40f20b9 --- /dev/null +++ b/tests/ref/fate/filter-pixdesc-rgbf32be @@ -0,0 +1 @@ +pixdesc-rgbf32be ca6c4115dc368a192a67d06bd47f369f diff --git a/tests/ref/fate/filter-pixdesc-rgbf32le b/tests/ref/fate/filter-pixdesc-rgbf32le new file mode 100644 index 0000000000..c0cb4d60f0 --- /dev/null +++ b/tests/ref/fate/filter-pixdesc-rgbf32le @@ -0,0 +1 @@ +pixdesc-rgbf32le 290153561ddc3266b253fa075e040578 diff --git a/tests/ref/fate/filter-pixfmts-copy b/tests/ref/fate/filter-pixfmts-copy index b28a114c7b..9aa653d12d 100644 --- a/tests/ref/fate/filter-pixfmts-copy +++ b/tests/ref/fate/filter-pixfmts-copy @@ -90,6 +90,10 @@ rgb8 7ac6008c84d622c2fc50581706e17576 rgba b6e1b441c365e03b5ffdf9b7b68d9a0c rgba64be ae2ae04b5efedca3505f47c4dd6ea6ea rgba64le b91e1d77f799eb92241a2d2d28437b15 +rgbaf32be abb244bb1af2247bbba7b4eac0357f6b +rgbaf32le 99b2afe809649e58eea0a188fd6ab3f2 +rgbf32be e4a0b47e8ecb2e7e461915227ebd4edd +rgbf32le 2979d6bfe509a55486e55e4de63d67d1 uyvy422 3bcf3c80047592f2211fae3260b1b65d vuya 3d5e934651cae1ce334001cb1829ad22 vuyx 3f68ea6ec492b30d867cb5401562264e diff --git a/tests/ref/fate/filter-pixfmts-crop b/tests/ref/fate/filter-pixfmts-crop index bdb2536f7d..9bb54cf9f0 100644 --- a/tests/ref/fate/filter-pixfmts-crop +++ b/tests/ref/fate/filter-pixfmts-crop @@ -88,6 +88,10 @@ rgb8 9b364a8f112ad9459fec47a51cc03b30 rgba 9488ac85abceaf99a9309eac5a87697e rgba64be 89910046972ab3c68e2a348302cc8ca9 rgba64le fea8ebfc869b52adf353778f29eac7a7 +rgbaf32be 48be3ace31f293fa2bf174c583c46b50 +rgbaf32le a2a358ecc5fe53a684d3de994134c4ce +rgbf32be ad982fbaf08c908658e66cb4330257cd +rgbf32le 14b944af62af458fa53da118721a258f vuya 76578a705ff3a37559653c1289bd03dd vuyx 5d2bae51a2f4892bd5f177f190cc323b x2bgr10le 84de725b85662c362862820dc4a309aa diff --git a/tests/ref/fate/filter-pixfmts-field b/tests/ref/fate/filter-pixfmts-field index 4e5a798471..5c8817a5c7 100644 --- a/tests/ref/fate/filter-pixfmts-field +++ b/tests/ref/fate/filter-pixfmts-field @@ -90,6 +90,10 @@ rgb8 62c3b9e2a171de3d894a8eeb271c85e8 rgba ee616262ca6d67b7ecfba4b36c602ce3 rgba64be 23c8c0edaabe3eaec89ce69633fb0048 rgba64le dfdba4de4a7cac9abf08852666c341d3 +rgbaf32be f081b6c6df6094d36563b78dccdbc97a +rgbaf32le e461aff4408751a03f8effd0e16be47c +rgbf32be d71855f12b960ab02b787c99bc0e4cf1 +rgbf32le a4251c66110290418f15cb1e334a7f0d uyvy422 1c49e44ab3f060e85fc4a3a9464f045e vuya f72bcf29d75cd143d0c565f7cc49119a vuyx 6257cd1ce11330660e9fa9c675acbdcc diff --git a/tests/ref/fate/filter-pixfmts-fieldorder b/tests/ref/fate/filter-pixfmts-fieldorder index bebaf07371..05b288dbe3 100644 --- a/tests/ref/fate/filter-pixfmts-fieldorder +++ b/tests/ref/fate/filter-pixfmts-fieldorder @@ -79,6 +79,10 @@ rgb8 6deae05ccac5c50bd0d9c9fe8e124557 rgba 1fdf872a087a32cd35b80cc7be399578 rgba64be 5598f44514d122b9a57c5c92c20bbc61 rgba64le b34e6e30621ae579519a2d91a96a0acf +rgbaf32be 9a7c2182fd89218172f07e3b37f9728e +rgbaf32le 940e87c0ddb7a86f9df438591b4870e6 +rgbf32be f23c5dd85e312471e3def0204051d264 +rgbf32le fec06f561663e7d01dec08c1c337f068 uyvy422 75de70e31c435dde878002d3f22b238a vuya a3891d4168ff208948fd0b3ba0910495 vuyx d7a900e970c9a69ed41f8b220114b9fa diff --git a/tests/ref/fate/filter-pixfmts-hflip b/tests/ref/fate/filter-pixfmts-hflip index fd5e9723fd..02a734d8af 100644 --- a/tests/ref/fate/filter-pixfmts-hflip +++ b/tests/ref/fate/filter-pixfmts-hflip @@ -88,6 +88,10 @@ rgb8 68a3a575badadd9e4f90226209f11699 rgba 51961c723ea6707e0a410cd3f21f15d3 rgba64be c910444019f4cfbf4d995227af55da8d rgba64le 0c810d8b3a6bca10321788e1cb145340 +rgbaf32be 6077603ed554db4149f82d891e1d1120 +rgbaf32le 3081376a3a9e90fd2849751dfd69094b +rgbf32be 0e5ffacba8dc768acfa50fc590dddac6 +rgbf32le 542380fd2490e3227b70373eace3bade vuya 7e530261e7ac4eae4fd616fd7572d0b8 vuyx 3ce9890363cad3984521293be1eb679c x2bgr10le 827cc659f29378e00c5a7d2c0ada8f9a diff --git a/tests/ref/fate/filter-pixfmts-il b/tests/ref/fate/filter-pixfmts-il index ec9d809721..48701fe9a3 100644 --- a/tests/ref/fate/filter-pixfmts-il +++ b/tests/ref/fate/filter-pixfmts-il @@ -89,6 +89,10 @@ rgb8 93f9fa5ecf522abe13ed34f21831fdfe rgba 625d8f4bd39c4bdbf61eb5e4713aecc9 rgba64be db70d33aa6c06f3e0a1c77bd11284261 rgba64le a8a2daae04374a27219bc1c890204007 +rgbaf32be e803073624dee4ce4c10d5d22f95b788 +rgbaf32le f87c6898ef385fb7239b16677a450326 +rgbf32be 3696160d95d41564a1a375ddeab82d70 +rgbf32le 71d9d0c83ded4c0866ea0673c1eed8d0 uyvy422 d6ee3ca43356d08c392382b24b22cda5 vuya b9deab5ba249dd608b709c09255a4932 vuyx 49cc92fcc002ec0f312017014dd68c0c diff --git a/tests/ref/fate/filter-pixfmts-null b/tests/ref/fate/filter-pixfmts-null index b28a114c7b..9aa653d12d 100644 --- a/tests/ref/fate/filter-pixfmts-null +++ b/tests/ref/fate/filter-pixfmts-null @@ -90,6 +90,10 @@ rgb8 7ac6008c84d622c2fc50581706e17576 rgba b6e1b441c365e03b5ffdf9b7b68d9a0c rgba64be ae2ae04b5efedca3505f47c4dd6ea6ea rgba64le b91e1d77f799eb92241a2d2d28437b15 +rgbaf32be abb244bb1af2247bbba7b4eac0357f6b +rgbaf32le 99b2afe809649e58eea0a188fd6ab3f2 +rgbf32be e4a0b47e8ecb2e7e461915227ebd4edd +rgbf32le 2979d6bfe509a55486e55e4de63d67d1 uyvy422 3bcf3c80047592f2211fae3260b1b65d vuya 3d5e934651cae1ce334001cb1829ad22 vuyx 3f68ea6ec492b30d867cb5401562264e diff --git a/tests/ref/fate/filter-pixfmts-scale b/tests/ref/fate/filter-pixfmts-scale index 525306ec12..b22a6d639d 100644 --- a/tests/ref/fate/filter-pixfmts-scale +++ b/tests/ref/fate/filter-pixfmts-scale @@ -90,6 +90,10 @@ rgb8 bcdc033b4ef0979d060dbc8893d4db58 rgba 85bb5d03cea1c6e8002ced3373904336 rgba64be ee73e57923af984b31cc7795d13929da rgba64le 783d2779adfafe3548bdb671ec0de69e +rgbaf32be 0ccc31b373d6465ab72247ae42f395ce +rgbaf32le 3eb06a5ba1c2341f12a30ff2539d5de0 +rgbf32be 11d0d9722abf9ea4fdce370920ff5820 +rgbf32le a9c247ff3d50e07bd7d0f777b9f82b32 uyvy422 aeb4ba4f9f003ae21f6d18089198244f vuya ffa817e283bf6a0b6fba21b07523ccaa vuyx ba182200e20e0c82765eba15217848d3 diff --git a/tests/ref/fate/filter-pixfmts-transpose b/tests/ref/fate/filter-pixfmts-transpose index 24f4249639..868a784731 100644 --- a/tests/ref/fate/filter-pixfmts-transpose +++ b/tests/ref/fate/filter-pixfmts-transpose @@ -82,6 +82,10 @@ rgb8 c90feb30c3c9391ef5f470209d7b7a15 rgba 4d76a9542143752a4ac30f82f88f68f1 rgba64be a60041217f4c0cd796d19d3940a12a41 rgba64le ad47197774858858ae7b0c177dffa459 +rgbaf32be 83d7d66f59a8b62c40aa59c81188584d +rgbaf32le d9cb46bfebebadaf838bb13d243feabe +rgbf32be b090912ac60da12be5f84672d223300f +rgbf32le 4b4e06621fb626952fc632f5049453ba vuya 9ece18a345beb17cd19e09e443eca4bf vuyx 4c2929cd1c6e5512f62e802f482f0ef2 x2bgr10le 4aa774b6d8f6d446a64f1f288e5c97eb diff --git a/tests/ref/fate/filter-pixfmts-vflip b/tests/ref/fate/filter-pixfmts-vflip index b7b0526588..b999109ff8 100644 --- a/tests/ref/fate/filter-pixfmts-vflip +++ b/tests/ref/fate/filter-pixfmts-vflip @@ -90,6 +90,10 @@ rgb8 7df049b6094f8a5e084d74462f6d6cde rgba c1a5908572737f2ae1e5d8218af65f4b rgba64be 17e6273323b5779b5f3f775f150c1011 rgba64le 48f45b10503b7dd140329c3dd0d54c98 +rgbaf32be cd7a7ce6f70ef8ca4a05d69458c6c40d +rgbaf32le 4516303140dd7ff5bc02e4ae0c94b46d +rgbf32be f416f773dd17dd15ca0845b47bf5ff44 +rgbf32le 16c50e897557972203c7e637080dc885 uyvy422 3a237e8376264e0cfa78f8a3fdadec8a vuya fb849f76e56181e005c31fce75d7038c vuyx 7a8079a97610e2c1c97aa8832b58a102 diff --git a/tests/ref/fate/sws-floatimg-cmp b/tests/ref/fate/sws-floatimg-cmp index 251042f1c3..d524dd612f 100644 --- a/tests/ref/fate/sws-floatimg-cmp +++ b/tests/ref/fate/sws-floatimg-cmp @@ -118,3 +118,19 @@ gbrpf32le -> gbrap16le -> gbrpf32le avg diff: 0.000249 min diff: 0.000000 max diff: 0.000990 +gbrpf32le -> rgbf32le -> gbrpf32le +avg diff: 0.000249 +min diff: 0.000000 +max diff: 0.000990 +gbrpf32le -> rgbaf32le -> gbrpf32le +avg diff: 0.000249 +min diff: 0.000000 +max diff: 0.000990 +gbrpf32le -> rgbf32be -> gbrpf32le +avg diff: 0.000249 +min diff: 0.000000 +max diff: 0.000990 +gbrpf32le -> rgbaf32be -> gbrpf32le +avg diff: 0.000249 +min diff: 0.000000 +max diff: 0.000990