Mercurial > libavcodec.hg
comparison armv4l/dsputil_iwmmxt_rnd.h @ 6636:43c97362dfa8 libavcodec
cosmetics: __asm__ __volatile__ --> asm volatile
author | diego |
---|---|
date | Thu, 17 Apr 2008 21:57:52 +0000 |
parents | 533bfc034f45 |
children | eebc7209c47f |
comparison
equal
deleted
inserted
replaced
6635:b3d2659c756b | 6636:43c97362dfa8 |
---|---|
24 * value of certain #defines. */ | 24 * value of certain #defines. */ |
25 | 25 |
26 void DEF(put, pixels8)(uint8_t *block, const uint8_t *pixels, const int line_size, int h) | 26 void DEF(put, pixels8)(uint8_t *block, const uint8_t *pixels, const int line_size, int h) |
27 { | 27 { |
28 int stride = line_size; | 28 int stride = line_size; |
29 __asm__ __volatile__ ( | 29 asm volatile ( |
30 "and r12, %[pixels], #7 \n\t" | 30 "and r12, %[pixels], #7 \n\t" |
31 "bic %[pixels], %[pixels], #7 \n\t" | 31 "bic %[pixels], %[pixels], #7 \n\t" |
32 "tmcr wcgr1, r12 \n\t" | 32 "tmcr wcgr1, r12 \n\t" |
33 "add r4, %[pixels], %[line_size] \n\t" | 33 "add r4, %[pixels], %[line_size] \n\t" |
34 "add r5, %[block], %[line_size] \n\t" | 34 "add r5, %[block], %[line_size] \n\t" |
58 } | 58 } |
59 | 59 |
60 void DEF(avg, pixels8)(uint8_t *block, const uint8_t *pixels, const int line_size, int h) | 60 void DEF(avg, pixels8)(uint8_t *block, const uint8_t *pixels, const int line_size, int h) |
61 { | 61 { |
62 int stride = line_size; | 62 int stride = line_size; |
63 __asm__ __volatile__ ( | 63 asm volatile ( |
64 "and r12, %[pixels], #7 \n\t" | 64 "and r12, %[pixels], #7 \n\t" |
65 "bic %[pixels], %[pixels], #7 \n\t" | 65 "bic %[pixels], %[pixels], #7 \n\t" |
66 "tmcr wcgr1, r12 \n\t" | 66 "tmcr wcgr1, r12 \n\t" |
67 "add r4, %[pixels], %[line_size] \n\t" | 67 "add r4, %[pixels], %[line_size] \n\t" |
68 "add r5, %[block], %[line_size] \n\t" | 68 "add r5, %[block], %[line_size] \n\t" |
100 } | 100 } |
101 | 101 |
102 void DEF(put, pixels16)(uint8_t *block, const uint8_t *pixels, const int line_size, int h) | 102 void DEF(put, pixels16)(uint8_t *block, const uint8_t *pixels, const int line_size, int h) |
103 { | 103 { |
104 int stride = line_size; | 104 int stride = line_size; |
105 __asm__ __volatile__ ( | 105 asm volatile ( |
106 "and r12, %[pixels], #7 \n\t" | 106 "and r12, %[pixels], #7 \n\t" |
107 "bic %[pixels], %[pixels], #7 \n\t" | 107 "bic %[pixels], %[pixels], #7 \n\t" |
108 "tmcr wcgr1, r12 \n\t" | 108 "tmcr wcgr1, r12 \n\t" |
109 "add r4, %[pixels], %[line_size] \n\t" | 109 "add r4, %[pixels], %[line_size] \n\t" |
110 "add r5, %[block], %[line_size] \n\t" | 110 "add r5, %[block], %[line_size] \n\t" |
140 } | 140 } |
141 | 141 |
142 void DEF(avg, pixels16)(uint8_t *block, const uint8_t *pixels, const int line_size, int h) | 142 void DEF(avg, pixels16)(uint8_t *block, const uint8_t *pixels, const int line_size, int h) |
143 { | 143 { |
144 int stride = line_size; | 144 int stride = line_size; |
145 __asm__ __volatile__ ( | 145 asm volatile ( |
146 "pld [%[pixels]] \n\t" | 146 "pld [%[pixels]] \n\t" |
147 "pld [%[pixels], #32] \n\t" | 147 "pld [%[pixels], #32] \n\t" |
148 "pld [%[block]] \n\t" | 148 "pld [%[block]] \n\t" |
149 "pld [%[block], #32] \n\t" | 149 "pld [%[block], #32] \n\t" |
150 "and r12, %[pixels], #7 \n\t" | 150 "and r12, %[pixels], #7 \n\t" |
199 { | 199 { |
200 int stride = line_size; | 200 int stride = line_size; |
201 // [wr0 wr1 wr2 wr3] for previous line | 201 // [wr0 wr1 wr2 wr3] for previous line |
202 // [wr4 wr5 wr6 wr7] for current line | 202 // [wr4 wr5 wr6 wr7] for current line |
203 SET_RND(wr15); // =2 for rnd and =1 for no_rnd version | 203 SET_RND(wr15); // =2 for rnd and =1 for no_rnd version |
204 __asm__ __volatile__( | 204 asm volatile( |
205 "pld [%[pixels]] \n\t" | 205 "pld [%[pixels]] \n\t" |
206 "pld [%[pixels], #32] \n\t" | 206 "pld [%[pixels], #32] \n\t" |
207 "and r12, %[pixels], #7 \n\t" | 207 "and r12, %[pixels], #7 \n\t" |
208 "bic %[pixels], %[pixels], #7 \n\t" | 208 "bic %[pixels], %[pixels], #7 \n\t" |
209 "tmcr wcgr1, r12 \n\t" | 209 "tmcr wcgr1, r12 \n\t" |
248 { | 248 { |
249 int stride = line_size; | 249 int stride = line_size; |
250 // [wr0 wr1 wr2 wr3] for previous line | 250 // [wr0 wr1 wr2 wr3] for previous line |
251 // [wr4 wr5 wr6 wr7] for current line | 251 // [wr4 wr5 wr6 wr7] for current line |
252 SET_RND(wr15); // =2 for rnd and =1 for no_rnd version | 252 SET_RND(wr15); // =2 for rnd and =1 for no_rnd version |
253 __asm__ __volatile__( | 253 asm volatile( |
254 "pld [%[pixels]] \n\t" | 254 "pld [%[pixels]] \n\t" |
255 "pld [%[pixels], #32] \n\t" | 255 "pld [%[pixels], #32] \n\t" |
256 "and r12, %[pixels], #7 \n\t" | 256 "and r12, %[pixels], #7 \n\t" |
257 "bic %[pixels], %[pixels], #7 \n\t" | 257 "bic %[pixels], %[pixels], #7 \n\t" |
258 "tmcr wcgr1, r12 \n\t" | 258 "tmcr wcgr1, r12 \n\t" |
309 { | 309 { |
310 int stride = line_size; | 310 int stride = line_size; |
311 // [wr0 wr1 wr2 wr3] for previous line | 311 // [wr0 wr1 wr2 wr3] for previous line |
312 // [wr4 wr5 wr6 wr7] for current line | 312 // [wr4 wr5 wr6 wr7] for current line |
313 SET_RND(wr15); // =2 for rnd and =1 for no_rnd version | 313 SET_RND(wr15); // =2 for rnd and =1 for no_rnd version |
314 __asm__ __volatile__( | 314 asm volatile( |
315 "pld [%[pixels]] \n\t" | 315 "pld [%[pixels]] \n\t" |
316 "pld [%[pixels], #32] \n\t" | 316 "pld [%[pixels], #32] \n\t" |
317 "pld [%[block]] \n\t" | 317 "pld [%[block]] \n\t" |
318 "pld [%[block], #32] \n\t" | 318 "pld [%[block], #32] \n\t" |
319 "and r12, %[pixels], #7 \n\t" | 319 "and r12, %[pixels], #7 \n\t" |
370 { | 370 { |
371 int stride = line_size; | 371 int stride = line_size; |
372 // [wr0 wr1 wr2 wr3] for previous line | 372 // [wr0 wr1 wr2 wr3] for previous line |
373 // [wr4 wr5 wr6 wr7] for current line | 373 // [wr4 wr5 wr6 wr7] for current line |
374 SET_RND(wr15); // =2 for rnd and =1 for no_rnd version | 374 SET_RND(wr15); // =2 for rnd and =1 for no_rnd version |
375 __asm__ __volatile__( | 375 asm volatile( |
376 "pld [%[pixels]] \n\t" | 376 "pld [%[pixels]] \n\t" |
377 "pld [%[pixels], #32] \n\t" | 377 "pld [%[pixels], #32] \n\t" |
378 "pld [%[block]] \n\t" | 378 "pld [%[block]] \n\t" |
379 "pld [%[block], #32] \n\t" | 379 "pld [%[block], #32] \n\t" |
380 "and r12, %[pixels], #7 \n\t" | 380 "and r12, %[pixels], #7 \n\t" |
446 void DEF(avg, pixels8_y2)(uint8_t *block, const uint8_t *pixels, const int line_size, int h) | 446 void DEF(avg, pixels8_y2)(uint8_t *block, const uint8_t *pixels, const int line_size, int h) |
447 { | 447 { |
448 int stride = line_size; | 448 int stride = line_size; |
449 // [wr0 wr1 wr2 wr3] for previous line | 449 // [wr0 wr1 wr2 wr3] for previous line |
450 // [wr4 wr5 wr6 wr7] for current line | 450 // [wr4 wr5 wr6 wr7] for current line |
451 __asm__ __volatile__( | 451 asm volatile( |
452 "pld [%[pixels]] \n\t" | 452 "pld [%[pixels]] \n\t" |
453 "pld [%[pixels], #32] \n\t" | 453 "pld [%[pixels], #32] \n\t" |
454 "and r12, %[pixels], #7 \n\t" | 454 "and r12, %[pixels], #7 \n\t" |
455 "tmcr wcgr1, r12 \n\t" | 455 "tmcr wcgr1, r12 \n\t" |
456 "bic %[pixels], %[pixels], #7 \n\t" | 456 "bic %[pixels], %[pixels], #7 \n\t" |
500 void DEF(put, pixels16_y2)(uint8_t *block, const uint8_t *pixels, const int line_size, int h) | 500 void DEF(put, pixels16_y2)(uint8_t *block, const uint8_t *pixels, const int line_size, int h) |
501 { | 501 { |
502 int stride = line_size; | 502 int stride = line_size; |
503 // [wr0 wr1 wr2 wr3] for previous line | 503 // [wr0 wr1 wr2 wr3] for previous line |
504 // [wr4 wr5 wr6 wr7] for current line | 504 // [wr4 wr5 wr6 wr7] for current line |
505 __asm__ __volatile__( | 505 asm volatile( |
506 "pld [%[pixels]] \n\t" | 506 "pld [%[pixels]] \n\t" |
507 "pld [%[pixels], #32] \n\t" | 507 "pld [%[pixels], #32] \n\t" |
508 "and r12, %[pixels], #7 \n\t" | 508 "and r12, %[pixels], #7 \n\t" |
509 "tmcr wcgr1, r12 \n\t" | 509 "tmcr wcgr1, r12 \n\t" |
510 "bic %[pixels], %[pixels], #7 \n\t" | 510 "bic %[pixels], %[pixels], #7 \n\t" |
557 void DEF(avg, pixels16_y2)(uint8_t *block, const uint8_t *pixels, const int line_size, int h) | 557 void DEF(avg, pixels16_y2)(uint8_t *block, const uint8_t *pixels, const int line_size, int h) |
558 { | 558 { |
559 int stride = line_size; | 559 int stride = line_size; |
560 // [wr0 wr1 wr2 wr3] for previous line | 560 // [wr0 wr1 wr2 wr3] for previous line |
561 // [wr4 wr5 wr6 wr7] for current line | 561 // [wr4 wr5 wr6 wr7] for current line |
562 __asm__ __volatile__( | 562 asm volatile( |
563 "pld [%[pixels]] \n\t" | 563 "pld [%[pixels]] \n\t" |
564 "pld [%[pixels], #32] \n\t" | 564 "pld [%[pixels], #32] \n\t" |
565 "and r12, %[pixels], #7 \n\t" | 565 "and r12, %[pixels], #7 \n\t" |
566 "tmcr wcgr1, r12 \n\t" | 566 "tmcr wcgr1, r12 \n\t" |
567 "bic %[pixels], %[pixels], #7 \n\t" | 567 "bic %[pixels], %[pixels], #7 \n\t" |
625 void DEF(put, pixels8_xy2)(uint8_t *block, const uint8_t *pixels, const int line_size, int h) | 625 void DEF(put, pixels8_xy2)(uint8_t *block, const uint8_t *pixels, const int line_size, int h) |
626 { | 626 { |
627 // [wr0 wr1 wr2 wr3] for previous line | 627 // [wr0 wr1 wr2 wr3] for previous line |
628 // [wr4 wr5 wr6 wr7] for current line | 628 // [wr4 wr5 wr6 wr7] for current line |
629 SET_RND(wr15); // =2 for rnd and =1 for no_rnd version | 629 SET_RND(wr15); // =2 for rnd and =1 for no_rnd version |
630 __asm__ __volatile__( | 630 asm volatile( |
631 "pld [%[pixels]] \n\t" | 631 "pld [%[pixels]] \n\t" |
632 "mov r12, #2 \n\t" | 632 "mov r12, #2 \n\t" |
633 "pld [%[pixels], #32] \n\t" | 633 "pld [%[pixels], #32] \n\t" |
634 "tmcr wcgr0, r12 \n\t" /* for shift value */ | 634 "tmcr wcgr0, r12 \n\t" /* for shift value */ |
635 "and r12, %[pixels], #7 \n\t" | 635 "and r12, %[pixels], #7 \n\t" |
719 void DEF(put, pixels16_xy2)(uint8_t *block, const uint8_t *pixels, const int line_size, int h) | 719 void DEF(put, pixels16_xy2)(uint8_t *block, const uint8_t *pixels, const int line_size, int h) |
720 { | 720 { |
721 // [wr0 wr1 wr2 wr3] for previous line | 721 // [wr0 wr1 wr2 wr3] for previous line |
722 // [wr4 wr5 wr6 wr7] for current line | 722 // [wr4 wr5 wr6 wr7] for current line |
723 SET_RND(wr15); // =2 for rnd and =1 for no_rnd version | 723 SET_RND(wr15); // =2 for rnd and =1 for no_rnd version |
724 __asm__ __volatile__( | 724 asm volatile( |
725 "pld [%[pixels]] \n\t" | 725 "pld [%[pixels]] \n\t" |
726 "mov r12, #2 \n\t" | 726 "mov r12, #2 \n\t" |
727 "pld [%[pixels], #32] \n\t" | 727 "pld [%[pixels], #32] \n\t" |
728 "tmcr wcgr0, r12 \n\t" /* for shift value */ | 728 "tmcr wcgr0, r12 \n\t" /* for shift value */ |
729 /* alignment */ | 729 /* alignment */ |
861 void DEF(avg, pixels8_xy2)(uint8_t *block, const uint8_t *pixels, const int line_size, int h) | 861 void DEF(avg, pixels8_xy2)(uint8_t *block, const uint8_t *pixels, const int line_size, int h) |
862 { | 862 { |
863 // [wr0 wr1 wr2 wr3] for previous line | 863 // [wr0 wr1 wr2 wr3] for previous line |
864 // [wr4 wr5 wr6 wr7] for current line | 864 // [wr4 wr5 wr6 wr7] for current line |
865 SET_RND(wr15); // =2 for rnd and =1 for no_rnd version | 865 SET_RND(wr15); // =2 for rnd and =1 for no_rnd version |
866 __asm__ __volatile__( | 866 asm volatile( |
867 "pld [%[block]] \n\t" | 867 "pld [%[block]] \n\t" |
868 "pld [%[block], #32] \n\t" | 868 "pld [%[block], #32] \n\t" |
869 "pld [%[pixels]] \n\t" | 869 "pld [%[pixels]] \n\t" |
870 "mov r12, #2 \n\t" | 870 "mov r12, #2 \n\t" |
871 "pld [%[pixels], #32] \n\t" | 871 "pld [%[pixels], #32] \n\t" |
965 void DEF(avg, pixels16_xy2)(uint8_t *block, const uint8_t *pixels, const int line_size, int h) | 965 void DEF(avg, pixels16_xy2)(uint8_t *block, const uint8_t *pixels, const int line_size, int h) |
966 { | 966 { |
967 // [wr0 wr1 wr2 wr3] for previous line | 967 // [wr0 wr1 wr2 wr3] for previous line |
968 // [wr4 wr5 wr6 wr7] for current line | 968 // [wr4 wr5 wr6 wr7] for current line |
969 SET_RND(wr15); // =2 for rnd and =1 for no_rnd version | 969 SET_RND(wr15); // =2 for rnd and =1 for no_rnd version |
970 __asm__ __volatile__( | 970 asm volatile( |
971 "pld [%[block]] \n\t" | 971 "pld [%[block]] \n\t" |
972 "pld [%[block], #32] \n\t" | 972 "pld [%[block], #32] \n\t" |
973 "pld [%[pixels]] \n\t" | 973 "pld [%[pixels]] \n\t" |
974 "mov r12, #2 \n\t" | 974 "mov r12, #2 \n\t" |
975 "pld [%[pixels], #32] \n\t" | 975 "pld [%[pixels], #32] \n\t" |