This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch master in repository ffmpeg.
commit 4be657ffd84f6dcaf622a8ce04418a6b71bab2b3 Author: Michael Niedermayer <[email protected]> AuthorDate: Wed Aug 12 05:38:19 2026 +0200 Commit: Timo Rothenpieler <[email protected]> CommitDate: Wed Aug 12 20:05:32 2026 +0200 avcodec/ppc/vp8dsp: store the 16 pixel wide rows at any alignment --- libavcodec/ppc/vp8dsp_altivec.c | 12 ++++++------ libavutil/ppc/util_altivec.h | 18 ++++++++++++++++++ 2 files changed, 24 insertions(+), 6 deletions(-) diff --git a/libavcodec/ppc/vp8dsp_altivec.c b/libavcodec/ppc/vp8dsp_altivec.c index 9d637af00b..2898868ba9 100644 --- a/libavcodec/ppc/vp8dsp_altivec.c +++ b/libavcodec/ppc/vp8dsp_altivec.c @@ -136,7 +136,7 @@ void put_vp8_epel_h_altivec_core(uint8_t *dst, ptrdiff_t dst_stride, if (w == 16) { FILTER_H(f16l, 8); filt = vec_packsu(f16h, f16l); - vec_st(filt, 0, dst); + unaligned_store(filt, dst); } else { filt = vec_packsu(f16h, f16h); vec_ste((vec_u32)filt, 0, (uint32_t*)dst); @@ -235,7 +235,7 @@ void put_vp8_epel_v_altivec_core(uint8_t *dst, ptrdiff_t dst_stride, if (w == 16) { FILTER_V(f16l, vec_mulo); filt = vec_packsu(f16h, f16l); - vec_st(filt, 0, dst); + unaligned_store(filt, dst); } else { filt = vec_packsu(f16h, f16h); if (w == 4) @@ -317,10 +317,10 @@ static void put_vp8_pixels16_altivec(uint8_t *dst, ptrdiff_t dstride, const uint // -funroll-loops w/ this is bad - 74 cycles again. // all this is on a 7450, tuning for the 7450 for (i = 0; i < h; i += 4) { - vec_st(load_with_perm_vec(0, src, perm), 0, dst); - vec_st(load_with_perm_vec(sstride, src, perm), dstride, dst); - vec_st(load_with_perm_vec(sstride2, src, perm), dstride2, dst); - vec_st(load_with_perm_vec(sstride3, src, perm), dstride3, dst); + unaligned_store(load_with_perm_vec(0, src, perm), dst); + unaligned_store(load_with_perm_vec(sstride, src, perm), dst + dstride); + unaligned_store(load_with_perm_vec(sstride2, src, perm), dst + dstride2); + unaligned_store(load_with_perm_vec(sstride3, src, perm), dst + dstride3); src += sstride4; dst += dstride4; } diff --git a/libavutil/ppc/util_altivec.h b/libavutil/ppc/util_altivec.h index 2548011be5..9d9c6f7705 100644 --- a/libavutil/ppc/util_altivec.h +++ b/libavutil/ppc/util_altivec.h @@ -144,6 +144,24 @@ static inline vec_u8 load_with_perm_vec(int offset, const uint8_t *src, vec_u8 p #define load_with_perm_vec(a,b,c) VEC_LD(a,b) #endif +#if HAVE_BIGENDIAN +static inline void unaligned_store(vec_u8 v, uint8_t *dst) +{ + vec_u8 lo = vec_ld(0, dst); + vec_u8 hi = vec_ld(15, dst); + vec_u8 edges = vec_perm(hi, lo, vec_lvsl(0, dst)); + vec_u8 align = vec_lvsr(0, dst); + + vec_st(vec_perm(v, edges, align), 15, dst); + vec_st(vec_perm(edges, v, align), 0, dst); +} +#else +static inline void unaligned_store(vec_u8 v, uint8_t *dst) +{ + vec_vsx_st(v, 0, dst); +} +#endif + /** * loads vector known misalignment _______________________________________________ ffmpeg-cvslog mailing list -- [email protected] To unsubscribe send an email to [email protected]
