/*****************************************************************************1* bitstream-a.S: arm bitstream functions2*****************************************************************************3* Copyright (C) 2014-2016 x264 project4*5* Authors: Janne Grunau <[email protected]>6*7* This program is free software; you can redistribute it and/or modify8* it under the terms of the GNU General Public License as published by9* the Free Software Foundation; either version 2 of the License, or10* (at your option) any later version.11*12* This program is distributed in the hope that it will be useful,13* but WITHOUT ANY WARRANTY; without even the implied warranty of14* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the15* GNU General Public License for more details.16*17* You should have received a copy of the GNU General Public License18* along with this program; if not, write to the Free Software19* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111, USA.20*21* This program is also available under a commercial proprietary license.22* For more information, contact us at [email protected].23*****************************************************************************/2425#include "asm.S"2627function x264_nal_escape_neon28push {r4-r5,lr}29vmov.u8 q0, #0xff30vmov.u8 q8, #431mov r3, #332subs lr, r1, r233beq 99f340:35cmn lr, #1536blt 16f37mov r1, r238b 100f3916:40vld1.8 {q1}, [r1]!41vext.8 q2, q0, q1, #1442vext.8 q3, q0, q1, #1543vcgt.u8 q11, q8, q144vceq.u8 q9, q2, #045vceq.u8 q10, q3, #046vand q9, q9, q1147vand q9, q9, q1048vshrn.u16 d22, q9, #449vmov ip, lr, d2250orrs ip, ip, lr51beq 16f52mov lr, #-1653100:54vmov.u8 r5, d1[6]55vmov.u8 r4, d1[7]56orr r5, r4, r5, lsl #857101:58ldrb r4, [r1, lr]59orr ip, r4, r5, lsl #1660cmp ip, #361bhi 102f62strb r3, [r0], #163orr r5, r3, r5, lsl #864102:65adds lr, lr, #166strb r4, [r0], #167orr r5, r4, r5, lsl #868blt 101b69subs lr, r1, r270lsr ip, r5, #871vmov.u8 d1[6], ip72vmov.u8 d1[7], r573blt 0b7475pop {r4-r5,pc}7616:77subs lr, r1, r278vst1.8 {q1}, [r0]!79vmov q0, q180blt 0b8199:82pop {r4-r5,pc}83endfunc848586