Mercurial > libavcodec.hg
comparison indeo3.c @ 12129:8b28e74de2c0 libavcodec
Add av_ prefix to bswap macros
author | mru |
---|---|
date | Sat, 10 Jul 2010 22:12:30 +0000 |
parents | ee740a4e80c5 |
children | 914f484bb476 |
comparison
equal
deleted
inserted
replaced
12128:ee740a4e80c5 | 12129:8b28e74de2c0 |
---|---|
357 cur_lp = ((uint32_t *)cur_frm_pos) + width_tbl[lp2]; | 357 cur_lp = ((uint32_t *)cur_frm_pos) + width_tbl[lp2]; |
358 ref_lp = ((uint32_t *)ref_frm_pos) + width_tbl[lp2]; | 358 ref_lp = ((uint32_t *)ref_frm_pos) + width_tbl[lp2]; |
359 | 359 |
360 switch(correction_type_sp[0][k]) { | 360 switch(correction_type_sp[0][k]) { |
361 case 0: | 361 case 0: |
362 *cur_lp = le2ne_32(((le2ne_32(*ref_lp) >> 1) + correction_lp[lp2 & 0x01][k]) << 1); | 362 *cur_lp = av_le2ne32(((av_le2ne32(*ref_lp) >> 1) + correction_lp[lp2 & 0x01][k]) << 1); |
363 lp2++; | 363 lp2++; |
364 break; | 364 break; |
365 case 1: | 365 case 1: |
366 res = ((le2ne_16(((unsigned short *)(ref_lp))[0]) >> 1) + correction_lp[lp2 & 0x01][*buf1]) << 1; | 366 res = ((av_le2ne16(((unsigned short *)(ref_lp))[0]) >> 1) + correction_lp[lp2 & 0x01][*buf1]) << 1; |
367 ((unsigned short *)cur_lp)[0] = le2ne_16(res); | 367 ((unsigned short *)cur_lp)[0] = av_le2ne16(res); |
368 res = ((le2ne_16(((unsigned short *)(ref_lp))[1]) >> 1) + correction_lp[lp2 & 0x01][k]) << 1; | 368 res = ((av_le2ne16(((unsigned short *)(ref_lp))[1]) >> 1) + correction_lp[lp2 & 0x01][k]) << 1; |
369 ((unsigned short *)cur_lp)[1] = le2ne_16(res); | 369 ((unsigned short *)cur_lp)[1] = av_le2ne16(res); |
370 buf1++; | 370 buf1++; |
371 lp2++; | 371 lp2++; |
372 break; | 372 break; |
373 case 2: | 373 case 2: |
374 if(lp2 == 0) { | 374 if(lp2 == 0) { |
460 cur_lp = ((uint32_t *)cur_frm_pos) + width_tbl[lp2 * 2]; | 460 cur_lp = ((uint32_t *)cur_frm_pos) + width_tbl[lp2 * 2]; |
461 ref_lp = ((uint32_t *)cur_frm_pos) + width_tbl[(lp2 * 2) - 1]; | 461 ref_lp = ((uint32_t *)cur_frm_pos) + width_tbl[(lp2 * 2) - 1]; |
462 | 462 |
463 switch(correction_type_sp[lp2 & 0x01][k]) { | 463 switch(correction_type_sp[lp2 & 0x01][k]) { |
464 case 0: | 464 case 0: |
465 cur_lp[width_tbl[1]] = le2ne_32(((le2ne_32(*ref_lp) >> 1) + correction_lp[lp2 & 0x01][k]) << 1); | 465 cur_lp[width_tbl[1]] = av_le2ne32(((av_le2ne32(*ref_lp) >> 1) + correction_lp[lp2 & 0x01][k]) << 1); |
466 if(lp2 > 0 || flag1 == 0 || strip->ypos != 0) | 466 if(lp2 > 0 || flag1 == 0 || strip->ypos != 0) |
467 cur_lp[0] = ((cur_lp[-width_tbl[1]] >> 1) + (cur_lp[width_tbl[1]] >> 1)) & 0xFEFEFEFE; | 467 cur_lp[0] = ((cur_lp[-width_tbl[1]] >> 1) + (cur_lp[width_tbl[1]] >> 1)) & 0xFEFEFEFE; |
468 else | 468 else |
469 cur_lp[0] = le2ne_32(((le2ne_32(*ref_lp) >> 1) + correction_lp[lp2 & 0x01][k]) << 1); | 469 cur_lp[0] = av_le2ne32(((av_le2ne32(*ref_lp) >> 1) + correction_lp[lp2 & 0x01][k]) << 1); |
470 lp2++; | 470 lp2++; |
471 break; | 471 break; |
472 | 472 |
473 case 1: | 473 case 1: |
474 res = ((le2ne_16(((unsigned short *)ref_lp)[0]) >> 1) + correction_lp[lp2 & 0x01][*buf1]) << 1; | 474 res = ((av_le2ne16(((unsigned short *)ref_lp)[0]) >> 1) + correction_lp[lp2 & 0x01][*buf1]) << 1; |
475 ((unsigned short *)cur_lp)[width_tbl[2]] = le2ne_16(res); | 475 ((unsigned short *)cur_lp)[width_tbl[2]] = av_le2ne16(res); |
476 res = ((le2ne_16(((unsigned short *)ref_lp)[1]) >> 1) + correction_lp[lp2 & 0x01][k]) << 1; | 476 res = ((av_le2ne16(((unsigned short *)ref_lp)[1]) >> 1) + correction_lp[lp2 & 0x01][k]) << 1; |
477 ((unsigned short *)cur_lp)[width_tbl[2]+1] = le2ne_16(res); | 477 ((unsigned short *)cur_lp)[width_tbl[2]+1] = av_le2ne16(res); |
478 | 478 |
479 if(lp2 > 0 || flag1 == 0 || strip->ypos != 0) | 479 if(lp2 > 0 || flag1 == 0 || strip->ypos != 0) |
480 cur_lp[0] = ((cur_lp[-width_tbl[1]] >> 1) + (cur_lp[width_tbl[1]] >> 1)) & 0xFEFEFEFE; | 480 cur_lp[0] = ((cur_lp[-width_tbl[1]] >> 1) + (cur_lp[width_tbl[1]] >> 1)) & 0xFEFEFEFE; |
481 else | 481 else |
482 cur_lp[0] = cur_lp[width_tbl[1]]; | 482 cur_lp[0] = cur_lp[width_tbl[1]]; |
589 #endif | 589 #endif |
590 } | 590 } |
591 | 591 |
592 switch(correction_type_sp[lp2 & 0x01][k]) { | 592 switch(correction_type_sp[lp2 & 0x01][k]) { |
593 case 0: | 593 case 0: |
594 cur_lp[width_tbl[1]] = le2ne_32(((le2ne_32(lv1) >> 1) + correctionloworder_lp[lp2 & 0x01][k]) << 1); | 594 cur_lp[width_tbl[1]] = av_le2ne32(((av_le2ne32(lv1) >> 1) + correctionloworder_lp[lp2 & 0x01][k]) << 1); |
595 cur_lp[width_tbl[1]+1] = le2ne_32(((le2ne_32(lv2) >> 1) + correctionhighorder_lp[lp2 & 0x01][k]) << 1); | 595 cur_lp[width_tbl[1]+1] = av_le2ne32(((av_le2ne32(lv2) >> 1) + correctionhighorder_lp[lp2 & 0x01][k]) << 1); |
596 if(lp2 > 0 || strip->ypos != 0 || flag1 == 0) { | 596 if(lp2 > 0 || strip->ypos != 0 || flag1 == 0) { |
597 cur_lp[0] = ((cur_lp[-width_tbl[1]] >> 1) + (cur_lp[width_tbl[1]] >> 1)) & 0xFEFEFEFE; | 597 cur_lp[0] = ((cur_lp[-width_tbl[1]] >> 1) + (cur_lp[width_tbl[1]] >> 1)) & 0xFEFEFEFE; |
598 cur_lp[1] = ((cur_lp[-width_tbl[1]+1] >> 1) + (cur_lp[width_tbl[1]+1] >> 1)) & 0xFEFEFEFE; | 598 cur_lp[1] = ((cur_lp[-width_tbl[1]+1] >> 1) + (cur_lp[width_tbl[1]+1] >> 1)) & 0xFEFEFEFE; |
599 } else { | 599 } else { |
600 cur_lp[0] = cur_lp[width_tbl[1]]; | 600 cur_lp[0] = cur_lp[width_tbl[1]]; |
602 } | 602 } |
603 lp2++; | 603 lp2++; |
604 break; | 604 break; |
605 | 605 |
606 case 1: | 606 case 1: |
607 cur_lp[width_tbl[1]] = le2ne_32(((le2ne_32(lv1) >> 1) + correctionloworder_lp[lp2 & 0x01][*buf1]) << 1); | 607 cur_lp[width_tbl[1]] = av_le2ne32(((av_le2ne32(lv1) >> 1) + correctionloworder_lp[lp2 & 0x01][*buf1]) << 1); |
608 cur_lp[width_tbl[1]+1] = le2ne_32(((le2ne_32(lv2) >> 1) + correctionloworder_lp[lp2 & 0x01][k]) << 1); | 608 cur_lp[width_tbl[1]+1] = av_le2ne32(((av_le2ne32(lv2) >> 1) + correctionloworder_lp[lp2 & 0x01][k]) << 1); |
609 if(lp2 > 0 || strip->ypos != 0 || flag1 == 0) { | 609 if(lp2 > 0 || strip->ypos != 0 || flag1 == 0) { |
610 cur_lp[0] = ((cur_lp[-width_tbl[1]] >> 1) + (cur_lp[width_tbl[1]] >> 1)) & 0xFEFEFEFE; | 610 cur_lp[0] = ((cur_lp[-width_tbl[1]] >> 1) + (cur_lp[width_tbl[1]] >> 1)) & 0xFEFEFEFE; |
611 cur_lp[1] = ((cur_lp[-width_tbl[1]+1] >> 1) + (cur_lp[width_tbl[1]+1] >> 1)) & 0xFEFEFEFE; | 611 cur_lp[1] = ((cur_lp[-width_tbl[1]+1] >> 1) + (cur_lp[width_tbl[1]+1] >> 1)) & 0xFEFEFEFE; |
612 } else { | 612 } else { |
613 cur_lp[0] = cur_lp[width_tbl[1]]; | 613 cur_lp[0] = cur_lp[width_tbl[1]]; |
746 | 746 |
747 switch(correction_type_sp[lp2 & 0x01][k]) { | 747 switch(correction_type_sp[lp2 & 0x01][k]) { |
748 case 0: | 748 case 0: |
749 lv1 = correctionloworder_lp[lp2 & 0x01][k]; | 749 lv1 = correctionloworder_lp[lp2 & 0x01][k]; |
750 lv2 = correctionhighorder_lp[lp2 & 0x01][k]; | 750 lv2 = correctionhighorder_lp[lp2 & 0x01][k]; |
751 cur_lp[0] = le2ne_32(((le2ne_32(ref_lp[0]) >> 1) + lv1) << 1); | 751 cur_lp[0] = av_le2ne32(((av_le2ne32(ref_lp[0]) >> 1) + lv1) << 1); |
752 cur_lp[1] = le2ne_32(((le2ne_32(ref_lp[1]) >> 1) + lv2) << 1); | 752 cur_lp[1] = av_le2ne32(((av_le2ne32(ref_lp[1]) >> 1) + lv2) << 1); |
753 cur_lp[width_tbl[1]] = le2ne_32(((le2ne_32(ref_lp[width_tbl[1]]) >> 1) + lv1) << 1); | 753 cur_lp[width_tbl[1]] = av_le2ne32(((av_le2ne32(ref_lp[width_tbl[1]]) >> 1) + lv1) << 1); |
754 cur_lp[width_tbl[1]+1] = le2ne_32(((le2ne_32(ref_lp[width_tbl[1]+1]) >> 1) + lv2) << 1); | 754 cur_lp[width_tbl[1]+1] = av_le2ne32(((av_le2ne32(ref_lp[width_tbl[1]+1]) >> 1) + lv2) << 1); |
755 lp2++; | 755 lp2++; |
756 break; | 756 break; |
757 | 757 |
758 case 1: | 758 case 1: |
759 lv1 = correctionloworder_lp[lp2 & 0x01][*buf1++]; | 759 lv1 = correctionloworder_lp[lp2 & 0x01][*buf1++]; |
760 lv2 = correctionloworder_lp[lp2 & 0x01][k]; | 760 lv2 = correctionloworder_lp[lp2 & 0x01][k]; |
761 cur_lp[0] = le2ne_32(((le2ne_32(ref_lp[0]) >> 1) + lv1) << 1); | 761 cur_lp[0] = av_le2ne32(((av_le2ne32(ref_lp[0]) >> 1) + lv1) << 1); |
762 cur_lp[1] = le2ne_32(((le2ne_32(ref_lp[1]) >> 1) + lv2) << 1); | 762 cur_lp[1] = av_le2ne32(((av_le2ne32(ref_lp[1]) >> 1) + lv2) << 1); |
763 cur_lp[width_tbl[1]] = le2ne_32(((le2ne_32(ref_lp[width_tbl[1]]) >> 1) + lv1) << 1); | 763 cur_lp[width_tbl[1]] = av_le2ne32(((av_le2ne32(ref_lp[width_tbl[1]]) >> 1) + lv1) << 1); |
764 cur_lp[width_tbl[1]+1] = le2ne_32(((le2ne_32(ref_lp[width_tbl[1]+1]) >> 1) + lv2) << 1); | 764 cur_lp[width_tbl[1]+1] = av_le2ne32(((av_le2ne32(ref_lp[width_tbl[1]+1]) >> 1) + lv2) << 1); |
765 lp2++; | 765 lp2++; |
766 break; | 766 break; |
767 | 767 |
768 case 2: | 768 case 2: |
769 if(lp2 == 0) { | 769 if(lp2 == 0) { |
847 cur_lp = ((uint32_t *)cur_frm_pos) + width_tbl[lp2 * 2]; | 847 cur_lp = ((uint32_t *)cur_frm_pos) + width_tbl[lp2 * 2]; |
848 ref_lp = ((uint32_t *)ref_frm_pos) + width_tbl[lp2 * 2]; | 848 ref_lp = ((uint32_t *)ref_frm_pos) + width_tbl[lp2 * 2]; |
849 | 849 |
850 switch(correction_type_sp[lp2 & 0x01][k]) { | 850 switch(correction_type_sp[lp2 & 0x01][k]) { |
851 case 0: | 851 case 0: |
852 cur_lp[0] = le2ne_32(((le2ne_32(*ref_lp) >> 1) + correction_lp[lp2 & 0x01][k]) << 1); | 852 cur_lp[0] = av_le2ne32(((av_le2ne32(*ref_lp) >> 1) + correction_lp[lp2 & 0x01][k]) << 1); |
853 cur_lp[width_tbl[1]] = le2ne_32(((le2ne_32(ref_lp[width_tbl[1]]) >> 1) + correction_lp[lp2 & 0x01][k]) << 1); | 853 cur_lp[width_tbl[1]] = av_le2ne32(((av_le2ne32(ref_lp[width_tbl[1]]) >> 1) + correction_lp[lp2 & 0x01][k]) << 1); |
854 lp2++; | 854 lp2++; |
855 break; | 855 break; |
856 | 856 |
857 case 1: | 857 case 1: |
858 lv1 = (unsigned short)(correction_lp[lp2 & 0x01][*buf1++]); | 858 lv1 = (unsigned short)(correction_lp[lp2 & 0x01][*buf1++]); |
859 lv2 = (unsigned short)(correction_lp[lp2 & 0x01][k]); | 859 lv2 = (unsigned short)(correction_lp[lp2 & 0x01][k]); |
860 res = (unsigned short)(((le2ne_16(((unsigned short *)ref_lp)[0]) >> 1) + lv1) << 1); | 860 res = (unsigned short)(((av_le2ne16(((unsigned short *)ref_lp)[0]) >> 1) + lv1) << 1); |
861 ((unsigned short *)cur_lp)[0] = le2ne_16(res); | 861 ((unsigned short *)cur_lp)[0] = av_le2ne16(res); |
862 res = (unsigned short)(((le2ne_16(((unsigned short *)ref_lp)[1]) >> 1) + lv2) << 1); | 862 res = (unsigned short)(((av_le2ne16(((unsigned short *)ref_lp)[1]) >> 1) + lv2) << 1); |
863 ((unsigned short *)cur_lp)[1] = le2ne_16(res); | 863 ((unsigned short *)cur_lp)[1] = av_le2ne16(res); |
864 res = (unsigned short)(((le2ne_16(((unsigned short *)ref_lp)[width_tbl[2]]) >> 1) + lv1) << 1); | 864 res = (unsigned short)(((av_le2ne16(((unsigned short *)ref_lp)[width_tbl[2]]) >> 1) + lv1) << 1); |
865 ((unsigned short *)cur_lp)[width_tbl[2]] = le2ne_16(res); | 865 ((unsigned short *)cur_lp)[width_tbl[2]] = av_le2ne16(res); |
866 res = (unsigned short)(((le2ne_16(((unsigned short *)ref_lp)[width_tbl[2]+1]) >> 1) + lv2) << 1); | 866 res = (unsigned short)(((av_le2ne16(((unsigned short *)ref_lp)[width_tbl[2]+1]) >> 1) + lv2) << 1); |
867 ((unsigned short *)cur_lp)[width_tbl[2]+1] = le2ne_16(res); | 867 ((unsigned short *)cur_lp)[width_tbl[2]+1] = av_le2ne16(res); |
868 lp2++; | 868 lp2++; |
869 break; | 869 break; |
870 | 870 |
871 case 2: | 871 case 2: |
872 if(lp2 == 0) { | 872 if(lp2 == 0) { |