Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: mindmark@gmail.com
To: ffmpeg-devel@ffmpeg.org
Cc: Mark Reid <mindmark@gmail.com>
Subject: [FFmpeg-devel] [PATCH 2/4] avfilter/vf_hflip: add support for packed rgb float formats
Date: Thu, 29 Sep 2022 11:08:39 -0700
Message-ID: <20220929180841.614-3-mindmark@gmail.com> (raw)
In-Reply-To: <20220929180841.614-1-mindmark@gmail.com>

From: Mark Reid <mindmark@gmail.com>

---
 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;
         }
-- 
2.31.1.windows.1

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

  parent reply	other threads:[~2022-09-29 18:09 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-29 18:08 [FFmpeg-devel] [PATCH 0/4] swscale rgbaf32 input/output support mindmark
2022-09-29 18:08 ` [FFmpeg-devel] [PATCH 1/4] swscale/input: add rgbaf32 input support mindmark
2022-09-29 18:08 ` mindmark [this message]
2022-09-29 18:08 ` [FFmpeg-devel] [PATCH 3/4] avfilter/vf_transpose: add support for packed rgb float formats mindmark
2022-09-29 18:08 ` [FFmpeg-devel] [PATCH 4/4] swscale/output: add rgbaf32 output support mindmark
2022-10-12 22:06 ` [FFmpeg-devel] [PATCH 0/4] swscale rgbaf32 input/output support Mark Reid
2022-10-30 20:48   ` Mark Reid
2022-10-30 23:14     ` Mark Reid

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220929180841.614-3-mindmark@gmail.com \
    --to=mindmark@gmail.com \
    --cc=ffmpeg-devel@ffmpeg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git