From patchwork Thu Sep 29 18:08: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: 38463 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:3b1c:b0:96:9ee8:5cfd with SMTP id c28csp1163519pzh; Thu, 29 Sep 2022 11:09:28 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5K1+c68TMuo0flORBarDqJlu6EOEJApqI2iBXGZ6Py0fZf597FL3c1sf0WCA2mhwcC2/V+ X-Received: by 2002:a50:cdc2:0:b0:456:ecb7:30ad with SMTP id h2-20020a50cdc2000000b00456ecb730admr4488720edj.37.1664474968510; Thu, 29 Sep 2022 11:09:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664474968; cv=none; d=google.com; s=arc-20160816; b=CVkZ3i4fko+jnL5QeFzGwgRll9Sd6njJLQHGTWM1Ze8IQIu6btalmK2/VVn47D2EJ0 310rY3dqbAuWXfMHXirw6vEKFmXZemLu2g2EfkQzIzHt1AETGN7fxI8upIXx+0Cp3Tor HABcbtrwDVh5V2vmgFgcDpUTAkE6vdnryjRMbmtmR7+TscxRxFuODvtZsAjQiYG1medp Ftj4fw4jeHmqtNbKTufg/aW044APSaEAX4/3YATsl5s3/pZvWfGnbw2gtaBwX+iHFdaV 8bYsqelTmWYFghKxLvp+SmQkgOL7K5nlt27s6C13sEPUgxU2wjUCpZPDQcWptkQ9XqLA 6S9Q== 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=M502uE2T8NvYnuZMAQkZjwPvGCY6CXRT8CAdV7M2uTs=; b=icm1sbdUK+d9f/LqHsz7kGcwXI0gDUaDOfI1ZPR1VNv2RavKdcLtXbkNnz0W/XmNPy 8/jJPi+8KloVRn1mETOkuJQmk1GQbRPeTOhqUEDlyL12J0GlOdHTwQ0nYvzfYrk4RdG3 HYGkNd9lG77HZ8WXNNlIN+vZgBw/7/C3PhfNv6VF99O8+pOJuEH5YaanvinBgKS/GN9p vx1JT3pusRwXphDcyqPlbZplrFRi+J9tE5CLMvuocwkIzdCFGNi7AJrR+zegDXIi+Lpu 2RyMT5CKKEL8kbjWM6d+cE0JauWYXs04YYowq4a6wsSPNyLRPNMe+jsAsa2p0otSuTcM m8fg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20210112 header.b=cFxJNg99; 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 bj17-20020a170906b05100b0077eca9fa444si7551109ejb.187.2022.09.29.11.09.18; Thu, 29 Sep 2022 11:09:28 -0700 (PDT) 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=cFxJNg99; 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 D233368BA89; Thu, 29 Sep 2022 21:09:09 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pg1-f179.google.com (mail-pg1-f179.google.com [209.85.215.179]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 82D6568BA8D for ; Thu, 29 Sep 2022 21:09:02 +0300 (EEST) Received: by mail-pg1-f179.google.com with SMTP id f193so2160363pgc.0 for ; Thu, 29 Sep 2022 11:09:02 -0700 (PDT) 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; bh=lEQnxzIUumeilp+UNMA6dwRS1QqCHDKdOyTz1nNHhG4=; b=cFxJNg99Ye5f5m/80CtLaZYXogVXhYam56uNxv5U8YksuRIWofaSjWtCnKHeL2Bt7S EvicREBpn+HOtQi/Ps9ua3wH7EFgzZXVTMchdsw7BPgrtZSNRzOjIDUP2dMY1ZecfvpL dj1iIyJQo7pjGXnn1FKGYC/PoIkGTM1jZ+9iPBjdg43QxlJS2tf1MtzjIN8NluTJubPc 4w3SNnO+dTKR1pArXQX25F0XYShwfO0EsN3yYVqlr0FDMlIJ3fynVnJQXt1K3qRxCASa 5EZ0uSNuZXYbsrKtLUx0N/HlC3ZJcGQic4fAaLoDi2k3E7mi00y8jsQ7mavLyBnGir36 Hyxw== 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; bh=lEQnxzIUumeilp+UNMA6dwRS1QqCHDKdOyTz1nNHhG4=; b=IP561INblkFbUBkTP33nsTBW9XBSrZrMc6gLhgGGgJeu+RBAdnDc0hjPCHcv2wGJWZ HKON/qCRscQITI6X4gpLkbt3j48B0n6UJx9O7MNc885c39LC5NQnWQHy2SPhXsW5HT22 kQ+7tdAyTBvAr8n/WxyrbkkqYNOIAeiq39qwxCx17f9BWbC53bVntRVi4xpLiMypatmY /Kbx+DTIA0oDAa9NqL9JunasNO+bxjeryvLBiF8dV+tk1nNgTWkw2zxFAye4oCUj8gtF kodvqB1bkHSVhhhIKy6Ovc/rEJy9Sdcvmb3b698QEtpk5tqwZmRXRdjBryvrDNpcFSyC XIcw== X-Gm-Message-State: ACrzQf0AjN/qv0AFOLkMEUmMyoTtcP0ubf11Yei3XwvP4Ol64FRQS1qN U2S3ADVH/GsIdOv61gS0GFc8tNqv1bE= X-Received: by 2002:a62:6085:0:b0:53e:7874:5067 with SMTP id u127-20020a626085000000b0053e78745067mr4757440pfb.4.1664474939984; Thu, 29 Sep 2022 11:08:59 -0700 (PDT) Received: from localhost.localdomain (S0106bc4dfba470f3.vc.shawcable.net. [174.7.244.175]) by smtp.gmail.com with ESMTPSA id i2-20020a17090332c200b0016f8e8032c4sm185689plr.129.2022.09.29.11.08.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Sep 2022 11:08:58 -0700 (PDT) From: mindmark@gmail.com To: ffmpeg-devel@ffmpeg.org Date: Thu, 29 Sep 2022 11:08:38 -0700 Message-Id: <20220929180841.614-2-mindmark@gmail.com> X-Mailer: git-send-email 2.31.1.windows.1 In-Reply-To: <20220929180841.614-1-mindmark@gmail.com> References: <20220929180841.614-1-mindmark@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 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: UpSxbH0cFzIS From: Mark Reid --- libswscale/input.c | 172 +++++++++++++++++++++++++++++++++++++++++++++ libswscale/utils.c | 4 ++ 2 files changed, 176 insertions(+) diff --git a/libswscale/input.c b/libswscale/input.c index 7ff7bfaa01..4683284b0b 100644 --- a/libswscale/input.c +++ b/libswscale/input.c @@ -1284,6 +1284,136 @@ 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_half_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; + for (i = 0; i < width; i++) { + int r = (lrintf(av_clipf(65535.0f * rdpx(src[i*(comp*2)+0]), 0.0f, 65535.0f)) + + lrintf(av_clipf(65535.0f * rdpx(src[i*(comp*2)+4]), 0.0f, 65535.0f))) >> 1; + int g = (lrintf(av_clipf(65535.0f * rdpx(src[i*(comp*2)+1]), 0.0f, 65535.0f)) + + lrintf(av_clipf(65535.0f * rdpx(src[i*(comp*2)+5]), 0.0f, 65535.0f))) >> 1; + int b = (lrintf(av_clipf(65535.0f * rdpx(src[i*(comp*2)+2]), 0.0f, 65535.0f)) + + lrintf(av_clipf(65535.0f * rdpx(src[i*(comp*2)+6]), 0.0f, 65535.0f))) >> 1; + + 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 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; + 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; + 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; @@ -1570,6 +1700,18 @@ av_cold void ff_sws_init_input_funcs(SwsContext *c) case AV_PIX_FMT_RGBAF16LE: c->chrToYV12 = rgbaf16leToUV_half_c; break; + case AV_PIX_FMT_RGBF32BE: + c->chrToYV12 = rgbf32beToUV_half_c; + break; + case AV_PIX_FMT_RGBAF32BE: + c->chrToYV12 = rgbaf32beToUV_half_c; + break; + case AV_PIX_FMT_RGBF32LE: + c->chrToYV12 = rgbf32leToUV_half_c; + break; + case AV_PIX_FMT_RGBAF32LE: + c->chrToYV12 = rgbaf32leToUV_half_c; + break; } } else { switch (srcFormat) { @@ -1663,6 +1805,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 +2127,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 +2164,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 45baa22b23..6da1f21e25 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 }, }; From patchwork Thu Sep 29 18:08: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: 38462 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:3b1c:b0:96:9ee8:5cfd with SMTP id c28csp1163516pzh; Thu, 29 Sep 2022 11:09:28 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7OdPFeJEkMwP10IuLv964JLq8GgxTQVLTI/JSBmRb9PFOdS+K7tiLbHlklzWWH6kIyq5PE X-Received: by 2002:a05:6402:370a:b0:456:d006:6948 with SMTP id ek10-20020a056402370a00b00456d0066948mr4587771edb.90.1664474968341; Thu, 29 Sep 2022 11:09:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664474968; cv=none; d=google.com; s=arc-20160816; b=0r7P0FO/894ODHo6O/pnxRqFH+8yd1ZII753qXKg8AYPN3eNcsewg23xopguHyg9ev CVqavCcvrkH8LdKSRKd0pjMCQZ6toJCLd+XU5jmRevGEMVYTOxo40yJ+EI6KGQqo7Ey/ 4YUwKbFSLpLyJyc5Jj+wrCl8RARCtK122y4Xr/1Ex2Fcful8rLOvg5UP2gyBXlI+7+7F ctDElAKrpX1U0Em+Ial/AzU9vzLXO18PiJ1hr+SS5vorTT+vRj8j8TBXc1qjwuWt5AsL ghlvEn/UxF1LIHh+wds859IEibZPG0kyJJCJfioq4VJaFnu2xpVrDRW18GeH1QKUZa4P 9lSA== 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=m7KOgb9CUGHhT3FCRGV+Tszkrmr9k5j6BlJEIBhb6J+u22aZFxETXhMVbvkeGKsWUD /E+7poG/nUIeY2PZMZiLt8EtCfnpIEXcyOfTxJFkBC0gSx2QjraXFidao/G2CoYrpkWR JOS7jouhfjcftM+FJBe/qkL/XUEDncRFfSMQz+bxwMj1qEqoRYMdVPkstUYjRitPDAeL mqyqTT7VfZymG3ovS9a4bSd9617UUn/W1MccUAHKDxmZF2iebYBQfVqfVFjuviHntEHn a0WQp3wiuDUOGFO1RsFnaj6/fVx4i2524WBocAXXFmmvA7/h+e3esZjTdrta9UJokLhK +OjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20210112 header.b="dtRbV/hf"; 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 z16-20020a1709063a1000b0078363fceadbsi7106912eje.528.2022.09.29.11.09.27; Thu, 29 Sep 2022 11:09:28 -0700 (PDT) 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="dtRbV/hf"; 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 01A4468BAF2; Thu, 29 Sep 2022 21:09:12 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pf1-f170.google.com (mail-pf1-f170.google.com [209.85.210.170]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 2336468BA89 for ; Thu, 29 Sep 2022 21:09:04 +0300 (EEST) Received: by mail-pf1-f170.google.com with SMTP id b23so2116541pfp.9 for ; Thu, 29 Sep 2022 11:09:04 -0700 (PDT) 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; bh=gA54uSmepfSWjONf2GDMCk9UPzM21oyq2EuT7HkLuD4=; b=dtRbV/hfu+5fpf0lCxqXF5F0JB82TEQFisDo3EFT4+Fbgiee0bZZOPJaS3f7pU+CAB Sgw/a91GnGOZSNV3EqMPdZbbam/W5QhzxsWo16GPf1WzjxFbIGemHzBxPxidFaf1tROU SWo/qhTo9HFxFHbAEBicp62rJ9fR3oBjWfql3XNLOgRBRDyqPDgkq9lb+Ny7pS0al3C8 WH39hnAoxFOVMWos0XMZ0wjGRpA/J8KFoNrfDV8tTLW4nzgorOLSdCPwTyPJ8RPXuLoD pqRm8zMbdWNPqgqrkYHuHmRG+0b8xxJ4V6gM2YLKoQnnfpDv6mwG4LDKlKSzNNU9pR/y OZdA== 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; bh=gA54uSmepfSWjONf2GDMCk9UPzM21oyq2EuT7HkLuD4=; b=P4pFk0jN8vSNsuU2RcMTHdMTLHaf6jPUfFwr8zQWzMaiaJQScHIO3wj4sO6qvGNUBg qmKf1HWA8kndgzsG4y4mmhjnWIHeHrAIPh3hDJogDywT8YkUu64AnaQAHBvfqIsvROk8 ArwCJJFKL/jyYEywSuQP0azEtV3iULnyL3rrPOJqVj5jjxmwZafB1lO9f3+nc1LdTc3S DNiKh37ngLnKYXtPri3KtJeZT293C+RtMpw7fkXtrcZMmCsYRRvAz5lVJUt54PR1rfbt Cv7+Ws78syVKLIZVHcpKih1lYqTlBA3DAikdv2ZtkO/KRwv0zV3G8chzimF1psekYuO+ iNhg== X-Gm-Message-State: ACrzQf2LnF8H5bGiXY5O4PqDyh8YtSecY96NWSrXmoBebDIA0lP5KXeW 3zxv0EjHofyF/mK99gbnXCD6QRxNTx4= X-Received: by 2002:a63:3110:0:b0:438:e26c:167f with SMTP id x16-20020a633110000000b00438e26c167fmr4048221pgx.134.1664474941668; Thu, 29 Sep 2022 11:09:01 -0700 (PDT) Received: from localhost.localdomain (S0106bc4dfba470f3.vc.shawcable.net. [174.7.244.175]) by smtp.gmail.com with ESMTPSA id i2-20020a17090332c200b0016f8e8032c4sm185689plr.129.2022.09.29.11.09.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Sep 2022 11:09:00 -0700 (PDT) From: mindmark@gmail.com To: ffmpeg-devel@ffmpeg.org Date: Thu, 29 Sep 2022 11:08:39 -0700 Message-Id: <20220929180841.614-3-mindmark@gmail.com> X-Mailer: git-send-email 2.31.1.windows.1 In-Reply-To: <20220929180841.614-1-mindmark@gmail.com> References: <20220929180841.614-1-mindmark@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 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: zmKAtS8TEZ0J 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 Thu Sep 29 18:08: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: 38464 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:3b1c:b0:96:9ee8:5cfd with SMTP id c28csp1163610pzh; Thu, 29 Sep 2022 11:09:37 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4YgJ7SLxqIj4wkFK16k8sv7vvMyzD4pn3TNRQVNyXUCPqqS3cJj4bw6yZ1c446KlF7qhv4 X-Received: by 2002:a05:6402:40c2:b0:44f:963d:1ab4 with SMTP id z2-20020a05640240c200b0044f963d1ab4mr4558505edb.319.1664474977363; Thu, 29 Sep 2022 11:09:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664474977; cv=none; d=google.com; s=arc-20160816; b=e6Wsk0Ex6LFq+9vPW13PCFYgzrcxqWGhBkpt9MGV3E7XBvslFFWLCBS7Vy8MI0zRJy BYNjOxIaHmkeSP/UF0c+Tvf/Coe6wYOt76YdJgM5dpZ1KUSt7qZzzQwhgDEF5oVZXTF6 t39Prq2NiCsHA8g3tb1JHtWcTw+eaHPb0oV9qoXTAv8L/XZk5gcuFI5S31FMzwoCoGma TNS9V7l/H0ocdlzKaQB8bIv2RNfNdP5uHe+TcEGkhNqXgA8HOqKksNweMZlQ0fMO+a/u iIeNXYAPecFi51Ni5Li4WjqNCA1MhEuYYLmT0BXcaABUz+jwMGG8MRCSJr0Zf7MdhUgn RTdw== 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=XNYO8bp74ddXqvuhxGBqCkdAoAWj/YYiZEIKnq6Sus/KrZVbtB7vrUi9m1gnKYYGO2 s76wwBXdSS6gpcI7YeGn5ZtliFM9WHfiKPAYW8OP6+FuMWzczH0KbTmOC6dDZYWf9Bes TVhFJpEZQDoSZzYIU2M/1dGIlI38/vF+RqnqRFOhqjGt1v+Bo8HJsL4ndgyRzCA+BKnk nVCIaRGpGGMTYXyp3T/n44H0gxBqNOl5agwMhtf5zobEUPDgBQNQAy3KXsQWiUu7aAj0 MM/HwvVnm+kPZp6qa9wE1K+xVzJVI1WN0KmRyevKCF7cmbfdp++r4OaCMfcRfkz+UDN4 lVlQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20210112 header.b=hB0Hx6IF; 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 hs14-20020a1709073e8e00b007417c6edb0asi8146813ejc.402.2022.09.29.11.09.36; Thu, 29 Sep 2022 11:09:37 -0700 (PDT) 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=hB0Hx6IF; 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 04B0B68BA9D; Thu, 29 Sep 2022 21:09:13 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pl1-f180.google.com (mail-pl1-f180.google.com [209.85.214.180]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 08CFE68BA9D for ; Thu, 29 Sep 2022 21:09:06 +0300 (EEST) Received: by mail-pl1-f180.google.com with SMTP id v1so1912509plo.9 for ; Thu, 29 Sep 2022 11:09:05 -0700 (PDT) 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; bh=LksnUiNcu42gqrIrPD1I6aZ/atWUfj86EsUXolhc2Qk=; b=hB0Hx6IFyB2S+YaIPC++I72saLokTfxfoLCtqexqNdMh8uiaT8pINPqcSQiEdKMGCl 2X0ahimswFO6TeK211Vqls0EAOBWlZM9mtyvNoBjlUcKPu/ZcfUHOca2Pr5zMdZGmnlp 1SVsuHKKvVL8yB17uXMBykHJCqwCZxdSCNAWJMa+SYeP6eQW/lgt/706QLpvS2cKqk7G gfcsDnW/q/C2IGEcb2njqiAk/mA0jZWHm56cNMpcdVnkqAAxrLHV1g5ADpnu7egEdm0R DHraVctxZmFvnSoPLNJNw2bZY1XpZT08ZCob72vnm0gF2I1l2Fn/W/F7yX2WCLypUDgf nD+Q== 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; bh=LksnUiNcu42gqrIrPD1I6aZ/atWUfj86EsUXolhc2Qk=; b=cXm1W6Ill9dHoJ3H1ywXKl9QMz5nx2RuvWpTdKUAmh6S1Vc9HMhTCHEQQWSC1MiLel WI9u6qZWrcBMpcgZhUhPm+OSPCC+YkV44eQwbUevgoQQmuEMpv5ef8aFguO4MvT8wpwb Z50evVwqHPb287XnSBLP0sGcUBDSuJrihqgExQZ2KtlVC0FblR2v+OkwIbquYJ950Nuj O6WRwHRfWgRC6wkamrfO8i3QT3uW4u0R9uptDU+22CIxv/GcywdlKswUMnQ78e+lmG3j 7ECKJavyavumSVSqkwlTnsUYkUZJzg+YrZV4xlfk0n/q3jX9cF3a+CtTFQCdW7iooWst JQ1Q== X-Gm-Message-State: ACrzQf1V7j6pqTOERcAGcZgZDWniuoAfxaTJQnl43T3a098yBaIQzJzt 34WpEirlplKU7Fguge/q4LQE478wQ1Q= X-Received: by 2002:a17:902:ecd2:b0:178:3b53:ec0d with SMTP id a18-20020a170902ecd200b001783b53ec0dmr4696178plh.167.1664474943384; Thu, 29 Sep 2022 11:09:03 -0700 (PDT) Received: from localhost.localdomain (S0106bc4dfba470f3.vc.shawcable.net. [174.7.244.175]) by smtp.gmail.com with ESMTPSA id i2-20020a17090332c200b0016f8e8032c4sm185689plr.129.2022.09.29.11.09.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Sep 2022 11:09:02 -0700 (PDT) From: mindmark@gmail.com To: ffmpeg-devel@ffmpeg.org Date: Thu, 29 Sep 2022 11:08:40 -0700 Message-Id: <20220929180841.614-4-mindmark@gmail.com> X-Mailer: git-send-email 2.31.1.windows.1 In-Reply-To: <20220929180841.614-1-mindmark@gmail.com> References: <20220929180841.614-1-mindmark@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 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: r3hYuuBv4Nex 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 Thu Sep 29 18:08:41 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Reid X-Patchwork-Id: 38465 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:3b1c:b0:96:9ee8:5cfd with SMTP id c28csp1163762pzh; Thu, 29 Sep 2022 11:09:52 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4qX5KQDJI32BxMT2MLhBLx/qamUmsOcMR7ahGTF4ZFoINbcTjeG5keayu8M6iohXRYeEUw X-Received: by 2002:a17:907:7284:b0:783:ca4d:1c49 with SMTP id dt4-20020a170907728400b00783ca4d1c49mr3688873ejc.618.1664474991843; Thu, 29 Sep 2022 11:09:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664474991; cv=none; d=google.com; s=arc-20160816; b=jlLhv+SIya66o5AZ8ZCE/UU9t+qX9qOtVe2djo8RopLux9yNGG76YqiGewh7xqR3Jm +17CTgOlLZa8TilG9c21cGPXVU8ATEMbz+mv4yHs98vjriMr92uWBJm2lVuw4dXkf8Pf a4RinwrmSWTSB6pX3ijK7E9p+gm/JPvEocKpBXr1I0Q3yw2fCBaE8+SOri2dBJ6DJL7M JLv9iNsdFaVrpjT7r58GRpmRadmTudJEpLQpq9CEjEsOryEouo1ikBw+HHincHDX7tOo w6VrK13TU722CXvocN/tNS5TDJ4SEEr30Kg19fgUCkdPP/+2NehDUyIczL0cRpToVRPt SMvg== 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=/Q9gvb8/wFkOtluiQaQzWGUNSRLWHV7JYAt6FuZ59TQ=; b=flwoxkQTvUv390aEFRYTkfHgDb6x+rZTbDRVkqEuKSqh/SyoCo7K5jWpaH0QYEBosJ 689uIS23/7JaXA9U3UEFmWhQ+lVClV60ppPIJUroC0tsPpeXbvwTj8sI7oVf1ph5cgjt G837MayUF8RlBGW+hsQ/458JIM9xCrlB2+ue4iV+JXWDGRtUDR4OUat6mj6qNLxj0Ax9 VMaU/cynRUaxTt6YVIbZnuIIefP4WGcw6pUfMDAsXKetBIfGhs+7wfzWIzw97I1/doOJ ufmMu2AaJrQgNKNxtCIZrXpnHQUUEKX+hOWGuFRNyMNOx+L75cLkIxZ4qWbLjG/+fNhG 9sOg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20210112 header.b=cv251Qyq; 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 mp18-20020a1709071b1200b0073d87ee8f46si9601490ejc.476.2022.09.29.11.09.46; Thu, 29 Sep 2022 11:09:51 -0700 (PDT) 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=cv251Qyq; 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 0338568BB16; Thu, 29 Sep 2022 21:09:15 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pj1-f50.google.com (mail-pj1-f50.google.com [209.85.216.50]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 320F468BAFC for ; Thu, 29 Sep 2022 21:09:07 +0300 (EEST) Received: by mail-pj1-f50.google.com with SMTP id d1-20020a17090a6a4100b002095b319b9aso805026pjm.0 for ; Thu, 29 Sep 2022 11:09:07 -0700 (PDT) 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; bh=sG7dU0wdnCldlRtPlX7ZAWqBon1DDOKDZ7f0ohyrxHs=; b=cv251QyqtDDgr0WwnfoWFq53S/c5FTEF3lWCRxTOJKfd0rusa8V9kyr0JD/HD++V0s iiXsB2fatjR9ZslKwL5HMF6cE+h0RPOq+Fffipd074dyEOyxccpdy3weIIe0VWQHjQwf yMRJvWRgMIH8g1uB/7grZrfnLpkszYV2y2i0k0Xuf8EXEnxqIH8FKKSZaMNeQzC8Hy5X rq8J8W/Uh/PQt3bFsZn0io9eZMHhIFe4kR1/6XXIw2Ebwch+MAQXvHDhLauErys/r3BT wulvou2kWZFg3AzC5J7PTAWbC3ytMh7xuXjwPdra5xcaCnBrWi/jzOZRqXDjVL6TTnQe QL+A== 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; bh=sG7dU0wdnCldlRtPlX7ZAWqBon1DDOKDZ7f0ohyrxHs=; b=kXF4TVn22ANzqezAHEJH3tRWOLULFvh+XJl2KaKFUsXNIc5+ij/ukFmx7P8Dzao9Fy Fo+PFaBB3EMbNJsJzoCTsCwnEQ0v3PWh3qH1iiewF0bzYiZGiSYweph35khem9p3xFLB mrDa652ZRF5r4q6pAT3HUojZVbRVP+fxSJ3TX0Y33l/Ls43ibbtkZ6bkjYjicwtujurU ZWUuChnEx6YMxfpBQNG3+v6TmwrpsOWakYarzKqAyhRtbk93QbkPEEUyU9ZEjkMI3Ojp mtWJDKDJyj8homJetDaXo7SM4j2lr/kj6Aws4Gr7UZ1b29Eu0qlLuoAkVAtBsO4OZg/Q WmWg== X-Gm-Message-State: ACrzQf1VR6jFfglgIoC2ec5CQrAIvPKZeCQqTSC2mUVZrx5EhvN/jZSx WhbZTKpvTUxT02PM13iS4OnqsZvuJ1s= X-Received: by 2002:a17:903:18a:b0:178:3ad0:2689 with SMTP id z10-20020a170903018a00b001783ad02689mr4650647plg.20.1664474944781; Thu, 29 Sep 2022 11:09:04 -0700 (PDT) Received: from localhost.localdomain (S0106bc4dfba470f3.vc.shawcable.net. [174.7.244.175]) by smtp.gmail.com with ESMTPSA id i2-20020a17090332c200b0016f8e8032c4sm185689plr.129.2022.09.29.11.09.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Sep 2022 11:09:03 -0700 (PDT) From: mindmark@gmail.com To: ffmpeg-devel@ffmpeg.org Date: Thu, 29 Sep 2022 11:08:41 -0700 Message-Id: <20220929180841.614-5-mindmark@gmail.com> X-Mailer: git-send-email 2.31.1.windows.1 In-Reply-To: <20220929180841.614-1-mindmark@gmail.com> References: <20220929180841.614-1-mindmark@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 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: y5H+qNZLs7Cw From: Mark Reid --- libswscale/output.c | 89 ++++++++++++++++++++++++ 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, 167 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 0e1c1225a0..b3e064ae8d 100644 --- a/libswscale/output.c +++ b/libswscale/output.c @@ -2474,6 +2474,89 @@ 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 hasAlpha = (desc->flags & AV_PIX_FMT_FLAG_ALPHA) && alpSrcx; + int pixelStep = desc->flags & AV_PIX_FMT_FLAG_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; + + 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; + } + + Y -= c->yuv2rgb_y_offset; + Y *= c->yuv2rgb_y_coeff; + Y += 1 << 13; + 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, 30); + G = av_clip_uintp2(Y + G, 30); + B = av_clip_uintp2(Y + B, 30); + + dest32[0] = av_float2int(float_mult * (float)(R >> 14)); + dest32[1] = av_float2int(float_mult * (float)(G >> 14)); + dest32[2] = av_float2int(float_mult * (float)(B >> 14)); + if (hasAlpha) + dest32[3] = av_float2int(float_mult * (float)(av_clip_uintp2(A, 30) >> 14)); + + 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 (hasAlpha) + 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], @@ -2986,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 8838cc8b53..fb151cd371 100644 --- a/libswscale/swscale_unscaled.c +++ b/libswscale/swscale_unscaled.c @@ -2159,7 +2159,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 6da1f21e25..0bbb799516 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..66cb9a6379 --- /dev/null +++ b/tests/ref/fate/filter-pixdesc-rgbaf32be @@ -0,0 +1 @@ +pixdesc-rgbaf32be b86a15e29cf03d7d3d22407c9b39b913 diff --git a/tests/ref/fate/filter-pixdesc-rgbaf32le b/tests/ref/fate/filter-pixdesc-rgbaf32le new file mode 100644 index 0000000000..47fa92b732 --- /dev/null +++ b/tests/ref/fate/filter-pixdesc-rgbaf32le @@ -0,0 +1 @@ +pixdesc-rgbaf32le 1d6673d3d951ae9cc2f6a42db2608932 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..8c31a5b19e 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 7244107701b5563390f2500dd7ac97a7 +rgbaf32le f425b1f210c05d877d9f0ad3c8771de2 +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..cab5ce9288 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 5ba64084e4acbca68dabf38e33f78ef1 +rgbaf32le 4942f08ec3bb7ca9a3920a4e73b513a3 +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..b81b16bd66 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 21d7f7de074b9aff754a061e0ab7cd42 +rgbaf32le 09b4d7e4ba8b99e0934383dc21590a3f +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..ae1c3d914c 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 c7004008676929069313ab5e2a33fb4e +rgbaf32le 17919af77770b07f3b30bd692f8d8ae7 +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..0f9f19b5c3 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 28354f1f94ce86c4675d6dd0e4c6c9aa +rgbaf32le eb579d96cd88006f83358782177b7a3f +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..11a4875300 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 36d7fa219b4bd502ee14acec12189c4d +rgbaf32le dffefd92fb413d2f61ab573ce3da4e40 +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..8c31a5b19e 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 7244107701b5563390f2500dd7ac97a7 +rgbaf32le f425b1f210c05d877d9f0ad3c8771de2 +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..4fab2bb8f7 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 27ea4228e5e7ae4b4633af868d64d044 +rgbaf32le 95a905c977b50cb64806d4d9391b5d32 +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..5216ac8431 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 6bab9ed5dc67972434e696c7ac0e7232 +rgbaf32le b5b550bb683d25853c535d6039bfe76f +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..eb2b30a95c 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 6fb5bbaa058dbbd38fa5f97bdbb43703 +rgbaf32le e35ed2c2b613e9cd2853a7d5c6d6ffdb +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