From: mindmark@gmail.com
To: ffmpeg-devel@ffmpeg.org
Cc: Mark Reid <mindmark@gmail.com>
Subject: [FFmpeg-devel] [PATCH v5 3/4] avfilter/vf_transpose: add support for packed rgb float formats
Date: Wed, 23 Nov 2022 11:35:39 -0800
Message-ID: <20221123193540.741-4-mindmark@gmail.com> (raw)
In-Reply-To: <20221123193540.741-1-mindmark@gmail.com>
From: Mark Reid <mindmark@gmail.com>
---
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;
}
}
--
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".
next prev parent reply other threads:[~2022-11-23 19:36 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-23 19:35 [FFmpeg-devel] [PATCH v5 0/4] swscale: rgbaf32 input/output support mindmark
2022-11-23 19:35 ` [FFmpeg-devel] [PATCH v5 1/4] swscale/input: add rgbaf32 input support mindmark
2022-11-23 19:35 ` [FFmpeg-devel] [PATCH v5 2/4] avfilter/vf_hflip: add support for packed rgb float formats mindmark
2022-11-23 19:35 ` mindmark [this message]
2022-11-23 19:35 ` [FFmpeg-devel] [PATCH v5 4/4] swscale/output: add rgbaf32 output support mindmark
2022-12-05 0:05 ` Michael Niedermayer
2022-12-05 5:39 ` Mark Reid
2022-12-04 21:48 ` [FFmpeg-devel] [PATCH v5 0/4] swscale: rgbaf32 input/output support 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=20221123193540.741-4-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