Mercurial > libavcodec.hg
comparison bfin/vp3_idct_bfin.S @ 6362:78aa57eba353 libavcodec
FLAT objects cannot have multiple sections, so using the L1 attributes breaks
linking. The FDPIC relocs also break for any other format. Thus check the
compiler environment and select the appropriate sections/relocs.
patch by Mike Frysinger, vapier.adi a gmail d com
author | diego |
---|---|
date | Sat, 16 Feb 2008 15:17:31 +0000 |
parents | 73ec16dbcbc1 |
children | 8327c5b4df9b |
comparison
equal
deleted
inserted
replaced
6361:3d999e9c2093 | 6362:78aa57eba353 |
---|---|
28 | 28 |
29 */ | 29 */ |
30 | 30 |
31 #include "config_bfin.h" | 31 #include "config_bfin.h" |
32 | 32 |
33 #ifdef __FDPIC__ | |
33 .section .l1.data.B,"aw",@progbits | 34 .section .l1.data.B,"aw",@progbits |
35 #else | |
36 .data | |
37 #endif | |
34 | 38 |
35 .align 4; | 39 .align 4; |
36 coefs: | 40 coefs: |
37 .short 0x5a82; // C4 | 41 .short 0x5a82; // C4 |
38 .short 0x5a82; // C4 | 42 .short 0x5a82; // C4 |
43 .short 0x471D; //cos(5pi/16) | 47 .short 0x471D; //cos(5pi/16) |
44 .short 0x6A6E; //cos(3pi/16) | 48 .short 0x6A6E; //cos(3pi/16) |
45 .short 0x18F9; //cos(7pi/16) | 49 .short 0x18F9; //cos(7pi/16) |
46 .short 0x7D8A; //cos(pi/16) | 50 .short 0x7D8A; //cos(pi/16) |
47 | 51 |
52 #ifdef __FDPIC__ | |
48 .section .l1.data.A | 53 .section .l1.data.A |
54 #endif | |
49 | 55 |
50 vtmp: .space 256 | 56 vtmp: .space 256 |
51 | 57 |
52 #define TMP0 FP-8 | 58 #define TMP0 FP-8 |
53 #define TMP1 FP-12 | 59 #define TMP1 FP-12 |
54 #define TMP2 FP-16 | 60 #define TMP2 FP-16 |
55 | 61 |
56 | 62 |
63 .text | |
57 DEFUN(vp3_idct,mL1, | 64 DEFUN(vp3_idct,mL1, |
58 (DCTELEM *block)): | 65 (DCTELEM *block)): |
59 | 66 |
60 /********************** Function Prologue *********************************/ | 67 /********************** Function Prologue *********************************/ |
61 link 16; | 68 link 16; |
62 [--SP] = (R7:4, P5:3); // Push the registers onto the stack. | 69 [--SP] = (R7:4, P5:3); // Push the registers onto the stack. |
63 B0 = R0; // Pointer to Input matrix | 70 B0 = R0; // Pointer to Input matrix |
64 R1 = [P3+coefs@GOT17M4]; // Pointer to Coefficients | 71 RELOC(R1, P3, coefs); // Pointer to Coefficients |
65 R2 = [P3+vtmp@GOT17M4]; // Pointer to Temporary matrix | 72 RELOC(R2, P3, vtmp); // Pointer to Temporary matrix |
66 B3 = R1; | 73 B3 = R1; |
67 B2 = R2; | 74 B2 = R2; |
68 L3 = 20; // L3 is used for making the coefficient array | 75 L3 = 20; // L3 is used for making the coefficient array |
69 // circular. | 76 // circular. |
70 // MUST BE RESTORED TO ZERO at function exit. | 77 // MUST BE RESTORED TO ZERO at function exit. |