This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch master in repository ffmpeg.
commit be7c1cb620aef43e4335c4f609d5bbdc9854a850 Author: James Almer <[email protected]> AuthorDate: Sun Nov 8 23:24:27 2026 -0300 Commit: James Almer <[email protected]> CommitDate: Tue Nov 10 13:46:34 2026 +0000 avfilter/vf_transpose: support packed formats with 96 and 128 bytes per pixel Will be needed by a following change. Signed-off-by: James Almer <[email protected]> --- libavfilter/vf_transpose.c | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/libavfilter/vf_transpose.c b/libavfilter/vf_transpose.c index b12e0bb53d..8b858d0f45 100644 --- a/libavfilter/vf_transpose.c +++ b/libavfilter/vf_transpose.c @@ -176,6 +176,45 @@ 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++) { + int64_t v1 = AV_RB48(src + x*src_linesize); + int64_t v2 = AV_RB48(src + 6 + x*src_linesize); + AV_WB48(dst + 12*x, v1); + AV_WB48(dst + 6 + 12*x, v2); + } + } +} + +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++) { + AV_COPY128U(dst + 16*x, src + 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; @@ -234,6 +273,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; default: return AVERROR_BUG; } -- To stop receiving notification emails like this one, please contact [email protected]. _______________________________________________ ffmpeg-cvslog mailing list -- [email protected] To unsubscribe send an email to [email protected]
