1/* 2 * Copyright (c) 2009 Mans Rullgard <mans@mansr.com> 3 * 4 * This file is part of FFmpeg. 5 * 6 * FFmpeg is free software; you can redistribute it and/or 7 * modify it under the terms of the GNU Lesser General Public 8 * License as published by the Free Software Foundation; either 9 * version 2.1 of the License, or (at your option) any later version. 10 * 11 * FFmpeg is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 * Lesser General Public License for more details. 15 * 16 * You should have received a copy of the GNU Lesser General Public 17 * License along with FFmpeg; if not, write to the Free Software 18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 */ 20 21#include "libavutil/arm/asm.S" 22 23function ff_get_pixels_armv6, export=1 24 pld [r1, r2] 25 push {r4-r8, lr} 26 mov lr, #8 271: 28 ldrd_post r4, r5, r1, r2 29 subs lr, lr, #1 30 uxtb16 r6, r4 31 uxtb16 r4, r4, ror #8 32 uxtb16 r12, r5 33 uxtb16 r8, r5, ror #8 34 pld [r1, r2] 35 pkhbt r5, r6, r4, lsl #16 36 pkhtb r6, r4, r6, asr #16 37 pkhbt r7, r12, r8, lsl #16 38 pkhtb r12, r8, r12, asr #16 39 stm r0!, {r5,r6,r7,r12} 40 bgt 1b 41 42 pop {r4-r8, pc} 43endfunc 44 45function ff_diff_pixels_armv6, export=1 46 pld [r1, r3] 47 pld [r2, r3] 48 push {r4-r9, lr} 49 mov lr, #8 501: 51 ldrd_post r4, r5, r1, r3 52 ldrd_post r6, r7, r2, r3 53 uxtb16 r8, r4 54 uxtb16 r4, r4, ror #8 55 uxtb16 r9, r6 56 uxtb16 r6, r6, ror #8 57 pld [r1, r3] 58 ssub16 r9, r8, r9 59 ssub16 r6, r4, r6 60 uxtb16 r8, r5 61 uxtb16 r5, r5, ror #8 62 pld [r2, r3] 63 pkhbt r4, r9, r6, lsl #16 64 pkhtb r6, r6, r9, asr #16 65 uxtb16 r9, r7 66 uxtb16 r7, r7, ror #8 67 ssub16 r9, r8, r9 68 ssub16 r5, r5, r7 69 subs lr, lr, #1 70 pkhbt r8, r9, r5, lsl #16 71 pkhtb r9, r5, r9, asr #16 72 stm r0!, {r4,r6,r8,r9} 73 bgt 1b 74 75 pop {r4-r9, pc} 76endfunc 77