# HG changeset patch # User mru # Date 1265732029 0 # Node ID 0198e3582544e5f7b2124d0bce0585442408ee58 # Parent 3fba8a5c62881314a5fcf01063071adf14036629 ARMv6 optimised pix_norm1 diff -r 3fba8a5c6288 -r 0198e3582544 arm/dsputil_armv6.S --- a/arm/dsputil_armv6.S Tue Feb 09 16:13:45 2010 +0000 +++ b/arm/dsputil_armv6.S Tue Feb 09 16:13:49 2010 +0000 @@ -564,3 +564,33 @@ pop {r4-r9, pc} .endfunc + +function ff_pix_norm1_armv6, export=1 + push {r4-r6, lr} + mov r12, #16 + mov lr, #0 +1: + ldm r0, {r2-r5} + uxtb16 r6, r2 + uxtb16 r2, r2, ror #8 + smlad lr, r6, r6, lr + uxtb16 r6, r3 + smlad lr, r2, r2, lr + uxtb16 r3, r3, ror #8 + smlad lr, r6, r6, lr + uxtb16 r6, r4 + smlad lr, r3, r3, lr + uxtb16 r4, r4, ror #8 + smlad lr, r6, r6, lr + uxtb16 r6, r5 + smlad lr, r4, r4, lr + uxtb16 r5, r5, ror #8 + smlad lr, r6, r6, lr + subs r12, r12, #1 + add r0, r0, r1 + smlad lr, r5, r5, lr + bgt 1b + + mov r0, lr + pop {r4-r6, pc} +.endfunc diff -r 3fba8a5c6288 -r 0198e3582544 arm/dsputil_init_armv6.c --- a/arm/dsputil_init_armv6.c Tue Feb 09 16:13:45 2010 +0000 +++ b/arm/dsputil_init_armv6.c Tue Feb 09 16:13:49 2010 +0000 @@ -67,6 +67,8 @@ int ff_sse16_armv6(void *s, uint8_t *blk1, uint8_t *blk2, int line_size, int h); +int ff_pix_norm1_armv6(uint8_t *pix, int line_size); + void av_cold ff_dsputil_init_armv6(DSPContext* c, AVCodecContext *avctx) { if (!avctx->lowres && (avctx->idct_algo == FF_IDCT_AUTO || @@ -112,4 +114,6 @@ c->sad[1] = ff_pix_abs8_armv6; c->sse[0] = ff_sse16_armv6; + + c->pix_norm1 = ff_pix_norm1_armv6; }