Mercurial > libavcodec.hg
annotate ppc/types_altivec.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 | ae57be2ef58c |
| children |
| rev | line source |
|---|---|
|
4214
6a546bbe5b31
Add useful Altivec types, taken from with permission from x264 authors
gpoirier
parents:
diff
changeset
|
1 /* |
|
6a546bbe5b31
Add useful Altivec types, taken from with permission from x264 authors
gpoirier
parents:
diff
changeset
|
2 * Copyright (c) 2006 Guillaume Poirier <gpoirier@mplayerhq.hu> |
|
6a546bbe5b31
Add useful Altivec types, taken from with permission from x264 authors
gpoirier
parents:
diff
changeset
|
3 * |
|
6a546bbe5b31
Add useful Altivec types, taken from with permission from x264 authors
gpoirier
parents:
diff
changeset
|
4 * This file is part of FFmpeg. |
|
6a546bbe5b31
Add useful Altivec types, taken from with permission from x264 authors
gpoirier
parents:
diff
changeset
|
5 * |
|
6a546bbe5b31
Add useful Altivec types, taken from with permission from x264 authors
gpoirier
parents:
diff
changeset
|
6 * FFmpeg is free software; you can redistribute it and/or |
|
6a546bbe5b31
Add useful Altivec types, taken from with permission from x264 authors
gpoirier
parents:
diff
changeset
|
7 * modify it under the terms of the GNU Lesser General Public |
|
6a546bbe5b31
Add useful Altivec types, taken from with permission from x264 authors
gpoirier
parents:
diff
changeset
|
8 * License as published by the Free Software Foundation; either |
|
6a546bbe5b31
Add useful Altivec types, taken from with permission from x264 authors
gpoirier
parents:
diff
changeset
|
9 * version 2.1 of the License, or (at your option) any later version. |
|
6a546bbe5b31
Add useful Altivec types, taken from with permission from x264 authors
gpoirier
parents:
diff
changeset
|
10 * |
|
6a546bbe5b31
Add useful Altivec types, taken from with permission from x264 authors
gpoirier
parents:
diff
changeset
|
11 * FFmpeg is distributed in the hope that it will be useful, |
|
6a546bbe5b31
Add useful Altivec types, taken from with permission from x264 authors
gpoirier
parents:
diff
changeset
|
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
6a546bbe5b31
Add useful Altivec types, taken from with permission from x264 authors
gpoirier
parents:
diff
changeset
|
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|
6a546bbe5b31
Add useful Altivec types, taken from with permission from x264 authors
gpoirier
parents:
diff
changeset
|
14 * Lesser General Public License for more details. |
|
6a546bbe5b31
Add useful Altivec types, taken from with permission from x264 authors
gpoirier
parents:
diff
changeset
|
15 * |
|
6a546bbe5b31
Add useful Altivec types, taken from with permission from x264 authors
gpoirier
parents:
diff
changeset
|
16 * You should have received a copy of the GNU Lesser General Public |
|
6a546bbe5b31
Add useful Altivec types, taken from with permission from x264 authors
gpoirier
parents:
diff
changeset
|
17 * License along with FFmpeg; if not, write to the Free Software |
|
6a546bbe5b31
Add useful Altivec types, taken from with permission from x264 authors
gpoirier
parents:
diff
changeset
|
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
|
6a546bbe5b31
Add useful Altivec types, taken from with permission from x264 authors
gpoirier
parents:
diff
changeset
|
19 */ |
|
6a546bbe5b31
Add useful Altivec types, taken from with permission from x264 authors
gpoirier
parents:
diff
changeset
|
20 |
| 7760 | 21 #ifndef AVCODEC_PPC_TYPES_ALTIVEC_H |
| 22 #define AVCODEC_PPC_TYPES_ALTIVEC_H | |
| 5163 | 23 |
|
4214
6a546bbe5b31
Add useful Altivec types, taken from with permission from x264 authors
gpoirier
parents:
diff
changeset
|
24 /*********************************************************************** |
|
6a546bbe5b31
Add useful Altivec types, taken from with permission from x264 authors
gpoirier
parents:
diff
changeset
|
25 * Vector types |
|
6a546bbe5b31
Add useful Altivec types, taken from with permission from x264 authors
gpoirier
parents:
diff
changeset
|
26 **********************************************************************/ |
| 8494 | 27 #define vec_u8 vector unsigned char |
| 28 #define vec_s8 vector signed char | |
| 29 #define vec_u16 vector unsigned short | |
| 30 #define vec_s16 vector signed short | |
| 31 #define vec_u32 vector unsigned int | |
| 32 #define vec_s32 vector signed int | |
| 12046 | 33 #define vec_f vector float |
|
4214
6a546bbe5b31
Add useful Altivec types, taken from with permission from x264 authors
gpoirier
parents:
diff
changeset
|
34 |
|
6a546bbe5b31
Add useful Altivec types, taken from with permission from x264 authors
gpoirier
parents:
diff
changeset
|
35 /*********************************************************************** |
|
6a546bbe5b31
Add useful Altivec types, taken from with permission from x264 authors
gpoirier
parents:
diff
changeset
|
36 * Null vector |
|
6a546bbe5b31
Add useful Altivec types, taken from with permission from x264 authors
gpoirier
parents:
diff
changeset
|
37 **********************************************************************/ |
| 8494 | 38 #define LOAD_ZERO const vec_u8 zerov = vec_splat_u8( 0 ) |
|
4214
6a546bbe5b31
Add useful Altivec types, taken from with permission from x264 authors
gpoirier
parents:
diff
changeset
|
39 |
| 8494 | 40 #define zero_u8v (vec_u8) zerov |
| 41 #define zero_s8v (vec_s8) zerov | |
| 42 #define zero_u16v (vec_u16) zerov | |
| 43 #define zero_s16v (vec_s16) zerov | |
| 44 #define zero_u32v (vec_u32) zerov | |
| 45 #define zero_s32v (vec_s32) zerov | |
| 5163 | 46 |
| 7760 | 47 #endif /* AVCODEC_PPC_TYPES_ALTIVEC_H */ |
