From patchwork Mon Oct 31 00:32:33 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Reid X-Patchwork-Id: 39070 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:8e01:b0:a3:a294:714c with SMTP id y1csp619806pzj; Sun, 30 Oct 2022 17:33:25 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7rjee4lbNLuFxDN2hVqTJNRYz2lfeT6QgKLCqF6lq7uD2u4SfdN9xYLhQ1n5XBLJGMkA5Y X-Received: by 2002:a17:907:a48:b0:7a7:3714:1629 with SMTP id be8-20020a1709070a4800b007a737141629mr9864213ejc.569.1667176405440; Sun, 30 Oct 2022 17:33:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667176405; cv=none; d=google.com; s=arc-20160816; b=btkjqDXGjO9NMrmWANGbwFqRCQXLSHFI5ngJtQbteaWoMvb1skvkDT2ppR9IiTcqO7 6EXHzsxesAQJ+grjs4yLg3JvXfXXOnb+GhwtOr9ADrVFC8JeOr5fkJLZW9jorMIJ644Z pGdxxeK9fyUkHE/VJzZ1UIFbeBqwIB0FFLzpHJ25BBuJkLwnuQ9SAwyAlY0eJNSY19/8 0xiMBDB1Ng+Q5t3aaOGq5mgbwGoi+K6Zo9+AAengxWgYoXASB6HCx3ORiZxZCm2Ysb3m 7361tCA48TLU/9m7QXy9FCpsyylsd+SgC5Jw6NlxT/b/BD4Dl3AMz/9CRD47wRsnY++G VzGg== 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=rk2t1XkPTXXcMcmxPU09lxslxbkTrSoFbQ/4D0T9NUt7+vUa/mK6Jyb4+Lhy5xs9Bl 2boHWVLGIHXAku2b3Q9COWXxUAUeyzDXR6L6b3I2Eu7UvGIvWqeiz6op21T9arI7jFTV eK/xTu2+2P7zZhQqsN686mg4kGV+EPl+vLaKRhWGnJK7sShx5bi9SLbAHOHie4JKan/H eoowBloiHaMxrEJYjfEhLBUwhtqx0X+xwLTG2NUpnzyO0BS+/3iU4QC3sBXmXYe2l72i j8qBu24cl5hfaox5cJYOYNHvQRBQRizovjpNvUnvRyM2ra/dDUWyojGKWuCuHS69ideW qbjA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20210112 header.b=AmhJkNJp; 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 b16-20020a1709063f9000b00780488c11bbsi5548466ejj.388.2022.10.30.17.33.25; Sun, 30 Oct 2022 17:33:25 -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=AmhJkNJp; 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 897E468BDD0; Mon, 31 Oct 2022 02:33:10 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pg1-f169.google.com (mail-pg1-f169.google.com [209.85.215.169]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 83CFE68BCD2 for ; Mon, 31 Oct 2022 02:33:02 +0200 (EET) Received: by mail-pg1-f169.google.com with SMTP id 128so9412174pga.1 for ; Sun, 30 Oct 2022 17:33: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 :message-id:reply-to; bh=gA54uSmepfSWjONf2GDMCk9UPzM21oyq2EuT7HkLuD4=; b=AmhJkNJpRjpmTSsz+LSZbS0awCs3egFFhY4l6S+7CTrvjwqGAwaHPJ/L1LWg2gewGO kjSdCKS7A00iOU3UkzxLifyp6D13DKQcwyc2SVZX+HWOQIt7t8ZfKn5Sgh63sxdknxTf pifHMfjVXZYoCYio7+TuSncRRMEBJmFUvdwNNYvJq7aIcFozgSUiwaXkd9Tvaof5AaAK tE/eixWGB0yOV5VppkvT6dc1JUxP6zWzvM5Qnz8OdWWl03ZL98ORvmDH7AqbyybTXcuu 6attvPXm0mAh7ESGJhqAgW7Brey9V7S02KVBEr+4HLB2484wVeh2f7K5ct2o8QEH6wuP 5P2w== 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=ApoG/cWtPLtrHJzzzorm8QL6R6r906hG7r1Kcx4mlOxE+AaTc6F0QxdtMFJ/vPXNl9 VCf+lXiDVbjgF+wdOdabTVe29VhXcFojXR/Bq82obep6vkieox7O/kxjiyKsAbLYN2oN Bgh7n2ajUH1VbWHUTMJjA4qLqoUViKX1VV0prRs3e1CQbWiHsB/X8IqjRvZU4Gv+UA8o TluQBdWteQ2Da8mf7e9RZEayMgcZ64yOcD6d3uwpWboTYiu+yMjvfUDUZdoLHrR9H9QH Qvo4BgJGD3VBcKZjJ5LGqSWMKHIUbsY37I5ApS82Hq/DXpKgHxa8e5Qse+HfRY9N7M3Y GhBQ== X-Gm-Message-State: ACrzQf3T+okHsmjeMlnZSr8+zQj7WlkZw82+d2lAB7q5VkPLvTfa/5hg 6PCuGXYVLLAQEoGDRGskfEVt1jHyVf0= X-Received: by 2002:a63:2a55:0:b0:46f:8fcd:a853 with SMTP id q82-20020a632a55000000b0046f8fcda853mr7421469pgq.145.1667176380235; Sun, 30 Oct 2022 17:33:00 -0700 (PDT) Received: from localhost.localdomain (S0106bc4dfba470f3.vc.shawcable.net. [174.7.244.175]) by smtp.gmail.com with ESMTPSA id m18-20020a62a212000000b0056bd737fdf3sm3175699pff.123.2022.10.30.17.32.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 30 Oct 2022 17:32:59 -0700 (PDT) From: mindmark@gmail.com To: ffmpeg-devel@ffmpeg.org Date: Sun, 30 Oct 2022 17:32:33 -0700 Message-Id: <20221031003235.348-3-mindmark@gmail.com> X-Mailer: git-send-email 2.31.1.windows.1 In-Reply-To: <20221031003235.348-1-mindmark@gmail.com> References: <20221031003235.348-1-mindmark@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v2 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: WadAxlI6yX/K 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; }