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; }