annotate arm/asm-offsets.h @ 12265:b120f1854e35 libavcodec

aacenc: TLS: Save maximum values for each swb in a table. This gives an almost 20% speedup.
author alexc
date Sat, 24 Jul 2010 17:11:51 +0000
parents 7c0b1b1593d6
children 71fbfa6cda8f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
11813
fda5ab5d31bb ARM: fail build if hardcoded struct offsets are wrong
mru
parents:
diff changeset
1 /*
fda5ab5d31bb ARM: fail build if hardcoded struct offsets are wrong
mru
parents:
diff changeset
2 * Copyright (c) 2010 Mans Rullgard
fda5ab5d31bb ARM: fail build if hardcoded struct offsets are wrong
mru
parents:
diff changeset
3 *
fda5ab5d31bb ARM: fail build if hardcoded struct offsets are wrong
mru
parents:
diff changeset
4 * This file is part of FFmpeg.
fda5ab5d31bb ARM: fail build if hardcoded struct offsets are wrong
mru
parents:
diff changeset
5 *
fda5ab5d31bb ARM: fail build if hardcoded struct offsets are wrong
mru
parents:
diff changeset
6 * FFmpeg is free software; you can redistribute it and/or
fda5ab5d31bb ARM: fail build if hardcoded struct offsets are wrong
mru
parents:
diff changeset
7 * modify it under the terms of the GNU Lesser General Public
fda5ab5d31bb ARM: fail build if hardcoded struct offsets are wrong
mru
parents:
diff changeset
8 * License as published by the Free Software Foundation; either
fda5ab5d31bb ARM: fail build if hardcoded struct offsets are wrong
mru
parents:
diff changeset
9 * version 2.1 of the License, or (at your option) any later version.
fda5ab5d31bb ARM: fail build if hardcoded struct offsets are wrong
mru
parents:
diff changeset
10 *
fda5ab5d31bb ARM: fail build if hardcoded struct offsets are wrong
mru
parents:
diff changeset
11 * FFmpeg is distributed in the hope that it will be useful,
fda5ab5d31bb ARM: fail build if hardcoded struct offsets are wrong
mru
parents:
diff changeset
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
fda5ab5d31bb ARM: fail build if hardcoded struct offsets are wrong
mru
parents:
diff changeset
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
fda5ab5d31bb ARM: fail build if hardcoded struct offsets are wrong
mru
parents:
diff changeset
14 * Lesser General Public License for more details.
fda5ab5d31bb ARM: fail build if hardcoded struct offsets are wrong
mru
parents:
diff changeset
15 *
fda5ab5d31bb ARM: fail build if hardcoded struct offsets are wrong
mru
parents:
diff changeset
16 * You should have received a copy of the GNU Lesser General Public
fda5ab5d31bb ARM: fail build if hardcoded struct offsets are wrong
mru
parents:
diff changeset
17 * License along with FFmpeg; if not, write to the Free Software
fda5ab5d31bb ARM: fail build if hardcoded struct offsets are wrong
mru
parents:
diff changeset
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
fda5ab5d31bb ARM: fail build if hardcoded struct offsets are wrong
mru
parents:
diff changeset
19 */
fda5ab5d31bb ARM: fail build if hardcoded struct offsets are wrong
mru
parents:
diff changeset
20
fda5ab5d31bb ARM: fail build if hardcoded struct offsets are wrong
mru
parents:
diff changeset
21 #ifndef AVCODEC_ARM_ASM_OFFSETS_H
fda5ab5d31bb ARM: fail build if hardcoded struct offsets are wrong
mru
parents:
diff changeset
22 #define AVCODEC_ARM_ASM_OFFSETS_H
fda5ab5d31bb ARM: fail build if hardcoded struct offsets are wrong
mru
parents:
diff changeset
23
fda5ab5d31bb ARM: fail build if hardcoded struct offsets are wrong
mru
parents:
diff changeset
24 #ifndef __ASSEMBLER__
fda5ab5d31bb ARM: fail build if hardcoded struct offsets are wrong
mru
parents:
diff changeset
25 #include <stddef.h>
fda5ab5d31bb ARM: fail build if hardcoded struct offsets are wrong
mru
parents:
diff changeset
26 #define CHK_OFFS(s, m, o) struct check_##o { \
fda5ab5d31bb ARM: fail build if hardcoded struct offsets are wrong
mru
parents:
diff changeset
27 int x_##o[offsetof(s, m) == o? 1: -1]; \
fda5ab5d31bb ARM: fail build if hardcoded struct offsets are wrong
mru
parents:
diff changeset
28 }
fda5ab5d31bb ARM: fail build if hardcoded struct offsets are wrong
mru
parents:
diff changeset
29 #endif
fda5ab5d31bb ARM: fail build if hardcoded struct offsets are wrong
mru
parents:
diff changeset
30
fda5ab5d31bb ARM: fail build if hardcoded struct offsets are wrong
mru
parents:
diff changeset
31 /* MpegEncContext */
11966
7c0b1b1593d6 ARM: fix build with TI compiler
mru
parents: 11818
diff changeset
32 #if defined(__ARM_EABI__) || defined(__eabi__)
11813
fda5ab5d31bb ARM: fail build if hardcoded struct offsets are wrong
mru
parents:
diff changeset
33 #define Y_DC_SCALE 0xa54
fda5ab5d31bb ARM: fail build if hardcoded struct offsets are wrong
mru
parents:
diff changeset
34 #define C_DC_SCALE 0xa58
fda5ab5d31bb ARM: fail build if hardcoded struct offsets are wrong
mru
parents:
diff changeset
35 #define AC_PRED 0xa80
fda5ab5d31bb ARM: fail build if hardcoded struct offsets are wrong
mru
parents:
diff changeset
36 #define BLOCK_LAST_INDEX 0x2278
fda5ab5d31bb ARM: fail build if hardcoded struct offsets are wrong
mru
parents:
diff changeset
37 #define INTER_SCANTAB_RASTER_END 0x2478
fda5ab5d31bb ARM: fail build if hardcoded struct offsets are wrong
mru
parents:
diff changeset
38 #define H263_AIC 0x2728
11818
fd38b5438c26 ARM: struct offsets for Apple ABI
mru
parents: 11813
diff changeset
39 #elif defined(__APPLE__)
fd38b5438c26 ARM: struct offsets for Apple ABI
mru
parents: 11813
diff changeset
40 #define Y_DC_SCALE 0xa30
fd38b5438c26 ARM: struct offsets for Apple ABI
mru
parents: 11813
diff changeset
41 #define C_DC_SCALE 0xa34
fd38b5438c26 ARM: struct offsets for Apple ABI
mru
parents: 11813
diff changeset
42 #define AC_PRED 0xa5c
fd38b5438c26 ARM: struct offsets for Apple ABI
mru
parents: 11813
diff changeset
43 #define BLOCK_LAST_INDEX 0x2254
fd38b5438c26 ARM: struct offsets for Apple ABI
mru
parents: 11813
diff changeset
44 #define INTER_SCANTAB_RASTER_END 0x2454
fd38b5438c26 ARM: struct offsets for Apple ABI
mru
parents: 11813
diff changeset
45 #define H263_AIC 0x26f8
fd38b5438c26 ARM: struct offsets for Apple ABI
mru
parents: 11813
diff changeset
46 #endif
11813
fda5ab5d31bb ARM: fail build if hardcoded struct offsets are wrong
mru
parents:
diff changeset
47
fda5ab5d31bb ARM: fail build if hardcoded struct offsets are wrong
mru
parents:
diff changeset
48 #endif