annotate arm/asm-offsets.h @ 12530:63edd10ad4bc libavcodec tip

Try to fix crashes introduced by r25218 r25218 made assumptions about the existence of past reference frames that weren't necessarily true.
author darkshikari
date Tue, 28 Sep 2010 09:06:22 +0000
parents 01562fcb773d
children
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
12419
1bb066014406 ARM: update struct offsets
mru
parents: 12357
diff changeset
36 #define BLOCK_LAST_INDEX 0x2160
1bb066014406 ARM: update struct offsets
mru
parents: 12357
diff changeset
37 #define INTER_SCANTAB_RASTER_END 0x2360
12357
71fbfa6cda8f ARM: update struct offsets
mru
parents: 11966
diff changeset
38 #define H263_AIC 0x2610
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
12419
1bb066014406 ARM: update struct offsets
mru
parents: 12357
diff changeset
43 #define BLOCK_LAST_INDEX 0x213c
1bb066014406 ARM: update struct offsets
mru
parents: 12357
diff changeset
44 #define INTER_SCANTAB_RASTER_END 0x233c
12484
01562fcb773d Update H263_AIC asm offset for the apple variant
lu_zero
parents: 12419
diff changeset
45 #define H263_AIC 0x25e0
11818
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