mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-28 20:53:54 +02:00
686959e87e
* qatar/master: doxygen: Consistently use '@' instead of '\' for Doxygen markup. Use av_printf_format to check the usage of printf style functions Add av_printf_format, for marking printf style format strings and their parameters ARM: enable thumb for Cortex-M* CPUs nsvdec: Propagate error values instead of returning 0 in nsv_read_header(). build: remove SRC_PATH_BARE variable build: move basic rules and variables to main Makefile build: move special targets to end of main Makefile lavdev: improve feedback in case of invalid frame rate/size vfwcap: prefer "framerate_q" over "fps" in vfw_read_header() v4l2: prefer "framerate_q" over "fps" in v4l2_set_parameters() fbdev: prefer "framerate_q" over "fps" in device context bktr: prefer "framerate" over "fps" for grab_read_header() ALSA: implement channel layout for playback. alsa: support unsigned variants of already supported signed formats. alsa: add support for more formats. ARM: allow building in Thumb2 mode Conflicts: common.mak doc/APIchanges libavcodec/vdpau.h libavdevice/alsa-audio-common.c libavdevice/fbdev.c libavdevice/libdc1394.c libavutil/avutil.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
190 lines
4.5 KiB
ArmAsm
190 lines
4.5 KiB
ArmAsm
/*
|
|
* Copyright (c) 2008 Mans Rullgard <mans@mansr.com>
|
|
*
|
|
* This file is part of FFmpeg.
|
|
*
|
|
* FFmpeg is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
* License as published by the Free Software Foundation; either
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
*
|
|
* FFmpeg is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
* Lesser General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
* License along with FFmpeg; if not, write to the Free Software
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
*/
|
|
|
|
#include "config.h"
|
|
|
|
#ifdef __ELF__
|
|
# define ELF
|
|
#else
|
|
# define ELF @
|
|
#endif
|
|
|
|
#if CONFIG_THUMB
|
|
# define A @
|
|
# define T
|
|
#else
|
|
# define A
|
|
# define T @
|
|
#endif
|
|
|
|
.syntax unified
|
|
T .thumb
|
|
|
|
.macro require8 val=1
|
|
ELF .eabi_attribute 24, \val
|
|
.endm
|
|
|
|
.macro preserve8 val=1
|
|
ELF .eabi_attribute 25, \val
|
|
.endm
|
|
|
|
.macro function name, export=0
|
|
.macro endfunc
|
|
ELF .size \name, . - \name
|
|
.endfunc
|
|
.purgem endfunc
|
|
.endm
|
|
.text
|
|
.if \export
|
|
.global EXTERN_ASM\name
|
|
EXTERN_ASM\name:
|
|
.endif
|
|
ELF .type \name, %function
|
|
.func \name
|
|
\name:
|
|
.endm
|
|
|
|
.macro const name, align=2
|
|
.macro endconst
|
|
ELF .size \name, . - \name
|
|
.purgem endconst
|
|
.endm
|
|
.section .rodata
|
|
.align \align
|
|
\name:
|
|
.endm
|
|
|
|
.macro mov32 rd, val
|
|
#if HAVE_ARMV6T2
|
|
movw \rd, #(\val) & 0xffff
|
|
.if (\val) >> 16
|
|
movt \rd, #(\val) >> 16
|
|
.endif
|
|
#else
|
|
ldr \rd, =\val
|
|
#endif
|
|
.endm
|
|
|
|
.macro movrel rd, val
|
|
#if HAVE_ARMV6T2 && !CONFIG_PIC && !defined(__APPLE__)
|
|
movw \rd, #:lower16:\val
|
|
movt \rd, #:upper16:\val
|
|
#else
|
|
ldr \rd, =\val
|
|
#endif
|
|
.endm
|
|
|
|
.macro ldr_pre rt, rn, rm:vararg
|
|
A ldr \rt, [\rn, \rm]!
|
|
T add \rn, \rn, \rm
|
|
T ldr \rt, [\rn]
|
|
.endm
|
|
|
|
.macro ldr_post rt, rn, rm:vararg
|
|
A ldr \rt, [\rn], \rm
|
|
T ldr \rt, [\rn]
|
|
T add \rn, \rn, \rm
|
|
.endm
|
|
|
|
.macro ldrd_reg rt, rt2, rn, rm
|
|
A ldrd \rt, \rt2, [\rn, \rm]
|
|
T add \rt, \rn, \rm
|
|
T ldrd \rt, \rt2, [\rt]
|
|
.endm
|
|
|
|
.macro ldrd_post rt, rt2, rn, rm
|
|
A ldrd \rt, \rt2, [\rn], \rm
|
|
T ldrd \rt, \rt2, [\rn]
|
|
T add \rn, \rn, \rm
|
|
.endm
|
|
|
|
.macro ldrh_pre rt, rn, rm
|
|
A ldrh \rt, [\rn, \rm]!
|
|
T add \rn, \rn, \rm
|
|
T ldrh \rt, [\rn]
|
|
.endm
|
|
|
|
.macro ldrh_dpre rt, rn, rm
|
|
A ldrh \rt, [\rn, -\rm]!
|
|
T sub \rn, \rn, \rm
|
|
T ldrh \rt, [\rn]
|
|
.endm
|
|
|
|
.macro ldrh_post rt, rn, rm
|
|
A ldrh \rt, [\rn], \rm
|
|
T ldrh \rt, [\rn]
|
|
T add \rn, \rn, \rm
|
|
.endm
|
|
|
|
.macro str_post rt, rn, rm:vararg
|
|
A str \rt, [\rn], \rm
|
|
T str \rt, [\rn]
|
|
T add \rn, \rn, \rm
|
|
.endm
|
|
|
|
.macro strb_post rt, rn, rm:vararg
|
|
A strb \rt, [\rn], \rm
|
|
T strb \rt, [\rn]
|
|
T add \rn, \rn, \rm
|
|
.endm
|
|
|
|
.macro strd_post rt, rt2, rn, rm
|
|
A strd \rt, \rt2, [\rn], \rm
|
|
T strd \rt, \rt2, [\rn]
|
|
T add \rn, \rn, \rm
|
|
.endm
|
|
|
|
.macro strh_pre rt, rn, rm
|
|
A strh \rt, [\rn, \rm]!
|
|
T add \rn, \rn, \rm
|
|
T strh \rt, [\rn]
|
|
.endm
|
|
|
|
.macro strh_dpre rt, rn, rm
|
|
A strh \rt, [\rn, -\rm]!
|
|
T sub \rn, \rn, \rm
|
|
T strh \rt, [\rn]
|
|
.endm
|
|
|
|
.macro strh_post rt, rn, rm
|
|
A strh \rt, [\rn], \rm
|
|
T strh \rt, [\rn]
|
|
T add \rn, \rn, \rm
|
|
.endm
|
|
|
|
.macro strh_dpost rt, rn, rm
|
|
A strh \rt, [\rn], -\rm
|
|
T strh \rt, [\rn]
|
|
T sub \rn, \rn, \rm
|
|
.endm
|
|
|
|
#if HAVE_VFP_ARGS
|
|
.eabi_attribute 28, 1
|
|
# define VFP
|
|
# define NOVFP @
|
|
#else
|
|
# define VFP @
|
|
# define NOVFP
|
|
#endif
|
|
|
|
#define GLUE(a, b) a ## b
|
|
#define JOIN(a, b) GLUE(a, b)
|
|
#define X(s) JOIN(EXTERN_ASM, s)
|