| @@ -539,9 +539,41 @@ union unaligned_16 { uint16_t l; } __attribute__((packed)) av_alias; · 538 unmodified lines |
| 539 | 539 | #if AV_HAVE_BIGENDIAN |
| 540 | 540 | # define AV_RLA(s, p) av_bswap##s(AV_RN##s##A(p)) |
| 541 | 541 | # define AV_WLA(s, p, v) AV_WN##s##A(p, av_bswap##s(v)) |
| 542 | +# define AV_RBA(s, p) AV_RN##s##A(p) |
| 543 | +# define AV_WBA(s, p, v) AV_WN##s##A(p, v) |
| 542 | 544 | #else |
| 543 | 545 | # define AV_RLA(s, p) AV_RN##s##A(p) |
| 544 | 546 | # define AV_WLA(s, p, v) AV_WN##s##A(p, v) |
| 547 | +# define AV_RBA(s, p) av_bswap##s(AV_RN##s##A(p)) |
| 548 | +# define AV_WBA(s, p, v) AV_WN##s##A(p, av_bswap##s(v)) |
| 549 | +#endif |
| 550 | + |
| 551 | +#ifndef AV_RL16A |
| 552 | +# define AV_RL16A(p) AV_RLA(16, p) |
| 553 | +#endif |
| 554 | +#ifndef AV_WL16A |
| 555 | +# define AV_WL16A(p, v) AV_WLA(16, p, v) |
| 556 | +#endif |
| 557 | + |
| 558 | +#ifndef AV_RB16A |
| 559 | +# define AV_RB16A(p) AV_RBA(16, p) |
| 560 | +#endif |
| 561 | +#ifndef AV_WB16A |
| 562 | +# define AV_WB16A(p, v) AV_WBA(16, p, v) |
| 563 | +#endif |
| 564 | + |
| 565 | +#ifndef AV_RL32A |
| 566 | +# define AV_RL32A(p) AV_RLA(32, p) |
| 567 | +#endif |
| 568 | +#ifndef AV_WL32A |
| 569 | +# define AV_WL32A(p, v) AV_WLA(32, p, v) |
| 570 | +#endif |
| 571 | + |
| 572 | +#ifndef AV_RB32A |
| 573 | +# define AV_RB32A(p) AV_RBA(32, p) |
| 574 | +#endif |
| 575 | +#ifndef AV_WB32A |
| 576 | +# define AV_WB32A(p, v) AV_WBA(32, p, v) |
| 545 | 577 | #endif |
| 546 | 578 | |
| 547 | 579 | #ifndef AV_RL64A |
| @@ -551,6 +583,13 @@ union unaligned_16 { uint16_t l; } __attribute__((packed)) av_alias; · 3 unmodified lines |
| 551 | 583 | # define AV_WL64A(p, v) AV_WLA(64, p, v) |
| 552 | 584 | #endif |
| 553 | 585 | |
| 586 | +#ifndef AV_RB64A |
| 587 | +# define AV_RB64A(p) AV_RBA(64, p) |
| 588 | +#endif |
| 589 | +#ifndef AV_WB64A |
| 590 | +# define AV_WB64A(p, v) AV_WBA(64, p, v) |
| 591 | +#endif |
| 592 | + |
| 554 | 593 | /* |
| 555 | 594 | * The AV_COPYxxU macros are suitable for copying data to/from unaligned |
| 556 | 595 | * memory locations. |