Loading...
Searching...
No Matches
intreadwrite.h File Reference
`#include <stdint.h>`
`#include "libavutil/avconfig.h"`
`#include "attributes.h"`
`#include "bswap.h"`

Go to the source code of this file.

## Data Structures

union | av_alias
union | unaligned_64
union | unaligned_32
union | unaligned_16

## Macros

#define | AV_RN(s, p)
#define | AV_WN(s, p, v)
#define | AV_RN16(p)
#define | AV_RN32(p)
#define | AV_RN64(p)
#define | AV_WN16(p, v)
#define | AV_WN32(p, v)
#define | AV_WN64(p, v)
#define | AV_RB(s, p)
#define | AV_WB(s, p, v)
#define | AV_RL(s, p)
#define | AV_WL(s, p, v)
#define | AV_RB8(x)
#define | AV_WB8(p, d)
#define | AV_RL8(x)
#define | AV_WL8(p, d)
#define | AV_RB16(p)
#define | AV_WB16(p, v)
#define | AV_RL16(p)
#define | AV_WL16(p, v)
#define | AV_RB32(p)
#define | AV_WB32(p, v)
#define | AV_RL32(p)
#define | AV_WL32(p, v)
#define | AV_RB64(p)
#define | AV_WB64(p, v)
#define | AV_RL64(p)
#define | AV_WL64(p, v)
#define | AV_RB24(x)
#define | AV_WB24(p, d)
#define | AV_RL24(x)
#define | AV_WL24(p, d)
#define | AV_RB48(x)
#define | AV_WB48(p, darg)
#define | AV_RL48(x)
#define | AV_WL48(p, darg)
#define | AV_RNA(s, p)
#define | AV_WNA(s, p, v)
#define | AV_RN16A(p)
#define | AV_RN32A(p)
#define | AV_RN64A(p)
#define | AV_WN16A(p, v)
#define | AV_WN32A(p, v)
#define | AV_WN64A(p, v)
#define | AV_RLA(s, p)
#define | AV_WLA(s, p, v)
#define | AV_RBA(s, p)
#define | AV_WBA(s, p, v)
#define | AV_RL16A(p)
#define | AV_WL16A(p, v)
#define | AV_RB16A(p)
#define | AV_WB16A(p, v)
#define | AV_RL32A(p)
#define | AV_WL32A(p, v)
#define | AV_RB32A(p)
#define | AV_WB32A(p, v)
#define | AV_RL64A(p)
#define | AV_WL64A(p, v)
#define | AV_RB64A(p)
#define | AV_WB64A(p, v)
#define | AV_COPYU(n, d, s)
#define | AV_COPY16U(d, s)
#define | AV_COPY32U(d, s)
#define | AV_COPY64U(d, s)
#define | AV_COPY128U(d, s)
#define | AV_COPY(n, d, s)
#define | AV_COPY16(d, s)
#define | AV_COPY32(d, s)
#define | AV_COPY64(d, s)
#define | AV_COPY128(d, s)
#define | AV_SWAP(n, a, b)
#define | AV_SWAP64(a, b)
#define | AV_ZERO(n, d)
#define | AV_ZERO16(d)
#define | AV_ZERO32(d)
#define | AV_ZERO64(d)
#define | AV_ZERO128(d)

## Variables

union unaligned_64 | av_alias

## Macro Definition Documentation

## AV_RN

#define AV_RN | ( |  | s,
|  |  | p )

Value:
(((const union unaligned_##s *) (p))->l)

Definition at line 220 of file intreadwrite.h.

## AV_WN

#define AV_WN | ( |  | s,
|  |  | p,
|  |  | v )

Value:
((((union unaligned_##s *) (p))->l) = (v))

Definition at line 221 of file intreadwrite.h.

## AV_RN16

#define AV_RN16 | ( |  | p | ) |

Value:
AV_RN(16, p)
AV_RN
#define AV_RN(s, p)
Definition intreadwrite.h:220

Definition at line 356 of file intreadwrite.h.

## AV_RN32

#define AV_RN32 | ( |  | p | ) |

Value:
AV_RN(32, p)

Definition at line 360 of file intreadwrite.h.

## AV_RN64

#define AV_RN64 | ( |  | p | ) |

Value:
AV_RN(64, p)

Definition at line 364 of file intreadwrite.h.

## AV_WN16

#define AV_WN16 | ( |  | p,
|  |  | v )

Value:
AV_WN(16, p, v)
AV_WN
#define AV_WN(s, p, v)
Definition intreadwrite.h:221

Definition at line 368 of file intreadwrite.h.

## AV_WN32

#define AV_WN32 | ( |  | p,
|  |  | v )

Value:
AV_WN(32, p, v)

Definition at line 372 of file intreadwrite.h.

## AV_WN64

#define AV_WN64 | ( |  | p,
|  |  | v )

Value:
AV_WN(64, p, v)

Definition at line 376 of file intreadwrite.h.

## AV_RB

#define AV_RB | ( |  | s,
|  |  | p )

Value:
av_bswap##s(AV_RN##s(p))

Definition at line 385 of file intreadwrite.h.

## AV_WB

#define AV_WB | ( |  | s,
|  |  | p,
|  |  | v )

Value:
AV_WN##s(p, av_bswap##s(v))

Definition at line 386 of file intreadwrite.h.

## AV_RL

#define AV_RL | ( |  | s,
|  |  | p )

Value:
AV_RN##s(p)

Definition at line 387 of file intreadwrite.h.

## AV_WL

#define AV_WL | ( |  | s,
|  |  | p,
|  |  | v )

Value:
AV_WN##s(p, v)

Definition at line 388 of file intreadwrite.h.

## AV_RB8

#define AV_RB8 | ( |  | x | ) |

Value:
(((const uint8_t*)(x))[0])

Definition at line 391 of file intreadwrite.h.

## AV_WB8

#define AV_WB8 | ( |  | p,
|  |  | d )

Value:
do { ((uint8_t*)(p))[0] = (d); } while(0)

Definition at line 392 of file intreadwrite.h.

## AV_RL8

#define AV_RL8 | ( |  | x | ) |

Value:
AV_RB8(x)
AV_RB8
#define AV_RB8(x)
Definition intreadwrite.h:391

Definition at line 394 of file intreadwrite.h.

## AV_WL8

#define AV_WL8 | ( |  | p,
|  |  | d )

Value:
AV_WB8(p, d)
AV_WB8
#define AV_WB8(p, d)
Definition intreadwrite.h:392

Definition at line 395 of file intreadwrite.h.

## AV_RB16

#define AV_RB16 | ( |  | p | ) |

Value:
AV_RB(16, p)
AV_RB
#define AV_RB(s, p)
Definition intreadwrite.h:385

Definition at line 398 of file intreadwrite.h.

## AV_WB16

#define AV_WB16 | ( |  | p,
|  |  | v )

Value:
AV_WB(16, p, v)
AV_WB
#define AV_WB(s, p, v)
Definition intreadwrite.h:386

Definition at line 401 of file intreadwrite.h.

## AV_RL16

#define AV_RL16 | ( |  | p | ) |

Value:
AV_RL(16, p)
AV_RL
#define AV_RL(s, p)
Definition intreadwrite.h:387

Definition at line 405 of file intreadwrite.h.

## AV_WL16

#define AV_WL16 | ( |  | p,
|  |  | v )

Value:
AV_WL(16, p, v)
AV_WL
#define AV_WL(s, p, v)
Definition intreadwrite.h:388

Definition at line 408 of file intreadwrite.h.

## AV_RB32

#define AV_RB32 | ( |  | p | ) |

Value:
AV_RB(32, p)

Definition at line 412 of file intreadwrite.h.

## AV_WB32

#define AV_WB32 | ( |  | p,
|  |  | v )

Value:
AV_WB(32, p, v)

Definition at line 415 of file intreadwrite.h.

## AV_RL32

#define AV_RL32 | ( |  | p | ) |

Value:
AV_RL(32, p)

Definition at line 419 of file intreadwrite.h.

## AV_WL32

#define AV_WL32 | ( |  | p,
|  |  | v )

Value:
AV_WL(32, p, v)

Definition at line 422 of file intreadwrite.h.

## AV_RB64

#define AV_RB64 | ( |  | p | ) |

Value:
AV_RB(64, p)

Definition at line 426 of file intreadwrite.h.

## AV_WB64

#define AV_WB64 | ( |  | p,
|  |  | v )

Value:
AV_WB(64, p, v)

Definition at line 429 of file intreadwrite.h.

## AV_RL64

#define AV_RL64 | ( |  | p | ) |

Value:
AV_RL(64, p)

Definition at line 433 of file intreadwrite.h.

## AV_WL64

#define AV_WL64 | ( |  | p,
|  |  | v )

Value:
AV_WL(64, p, v)

Definition at line 436 of file intreadwrite.h.

## AV_RB24

#define AV_RB24 | ( |  | x | ) |

Value:
((((const uint8_t*)(x))[0] << 16) | \
(((const uint8_t*)(x))[1] << 8) | \
((const uint8_t*)(x))[2])

Definition at line 440 of file intreadwrite.h.

## AV_WB24

#define AV_WB24 | ( |  | p,
|  |  | d )

Value:
do { \
((uint8_t*)(p))[2] = (d); \
((uint8_t*)(p))[1] = (d)>>8; \
((uint8_t*)(p))[0] = (d)>>16; \
} while(0)

Definition at line 446 of file intreadwrite.h.

## AV_RL24

#define AV_RL24 | ( |  | x | ) |

Value:
((((const uint8_t*)(x))[2] << 16) | \
(((const uint8_t*)(x))[1] << 8) | \
((const uint8_t*)(x))[0])

Definition at line 454 of file intreadwrite.h.

## AV_WL24

#define AV_WL24 | ( |  | p,
|  |  | d )

Value:
do { \
((uint8_t*)(p))[0] = (d); \
((uint8_t*)(p))[1] = (d)>>8; \
((uint8_t*)(p))[2] = (d)>>16; \
} while(0)

Definition at line 460 of file intreadwrite.h.

## AV_RB48

#define AV_RB48 | ( |  | x | ) |

Value:
(((uint64_t)((const uint8_t*)(x))[0] << 40) | \
((uint64_t)((const uint8_t*)(x))[1] << 32) | \
((uint64_t)((const uint8_t*)(x))[2] << 24) | \
((uint64_t)((const uint8_t*)(x))[3] << 16) | \
((uint64_t)((const uint8_t*)(x))[4] << 8) | \
(uint64_t)((const uint8_t*)(x))[5])

Definition at line 468 of file intreadwrite.h.

## AV_WB48

#define AV_WB48 | ( |  | p,
|  |  | darg )

Value:
do { \
uint64_t d = (darg); \
((uint8_t*)(p))[5] = (d); \
((uint8_t*)(p))[4] = (d)>>8; \
((uint8_t*)(p))[3] = (d)>>16; \
((uint8_t*)(p))[2] = (d)>>24; \
((uint8_t*)(p))[1] = (d)>>32; \
((uint8_t*)(p))[0] = (d)>>40; \
} while(0)

Definition at line 477 of file intreadwrite.h.

## AV_RL48

#define AV_RL48 | ( |  | x | ) |

Value:
(((uint64_t)((const uint8_t*)(x))[5] << 40) | \
((uint64_t)((const uint8_t*)(x))[4] << 32) | \
((uint64_t)((const uint8_t*)(x))[3] << 24) | \
((uint64_t)((const uint8_t*)(x))[2] << 16) | \
((uint64_t)((const uint8_t*)(x))[1] << 8) | \
(uint64_t)((const uint8_t*)(x))[0])

Definition at line 489 of file intreadwrite.h.

## AV_WL48

#define AV_WL48 | ( |  | p,
|  |  | darg )

Value:
do { \
uint64_t d = (darg); \
((uint8_t*)(p))[0] = (d); \
((uint8_t*)(p))[1] = (d)>>8; \
((uint8_t*)(p))[2] = (d)>>16; \
((uint8_t*)(p))[3] = (d)>>24; \
((uint8_t*)(p))[4] = (d)>>32; \
((uint8_t*)(p))[5] = (d)>>40; \
} while(0)

Definition at line 498 of file intreadwrite.h.

## AV_RNA

#define AV_RNA | ( |  | s,
|  |  | p )

Value:
(((const av_alias##s*)(p))->u##s)
av_alias
#define av_alias
Definition attributes.h:173

Definition at line 514 of file intreadwrite.h.

## AV_WNA

#define AV_WNA | ( |  | s,
|  |  | p,
|  |  | v )

Value:
(((av_alias##s*)(p))->u##s = (v))

Definition at line 515 of file intreadwrite.h.

## AV_RN16A

#define AV_RN16A | ( |  | p | ) |

Value:
AV_RNA(16, p)
AV_RNA
#define AV_RNA(s, p)
Definition intreadwrite.h:514

Definition at line 518 of file intreadwrite.h.

## AV_RN32A

#define AV_RN32A | ( |  | p | ) |

Value:
AV_RNA(32, p)

Definition at line 522 of file intreadwrite.h.

## AV_RN64A

#define AV_RN64A | ( |  | p | ) |

Value:
AV_RNA(64, p)

Definition at line 526 of file intreadwrite.h.

## AV_WN16A

#define AV_WN16A | ( |  | p,
|  |  | v )

Value:
AV_WNA(16, p, v)
AV_WNA
#define AV_WNA(s, p, v)
Definition intreadwrite.h:515

Definition at line 530 of file intreadwrite.h.

## AV_WN32A

#define AV_WN32A | ( |  | p,
|  |  | v )

Value:
AV_WNA(32, p, v)

Definition at line 534 of file intreadwrite.h.

## AV_WN64A

#define AV_WN64A | ( |  | p,
|  |  | v )

Value:
AV_WNA(64, p, v)

Definition at line 538 of file intreadwrite.h.

## AV_RLA

#define AV_RLA | ( |  | s,
|  |  | p )

Value:
AV_RN##s##A(p)

Definition at line 547 of file intreadwrite.h.

## AV_WLA

#define AV_WLA | ( |  | s,
|  |  | p,
|  |  | v )

Value:
AV_WN##s##A(p, v)

Definition at line 548 of file intreadwrite.h.

## AV_RBA

#define AV_RBA | ( |  | s,
|  |  | p )

Value:
av_bswap##s(AV_RN##s##A(p))

Definition at line 549 of file intreadwrite.h.

## AV_WBA

#define AV_WBA | ( |  | s,
|  |  | p,
|  |  | v )

Value:
AV_WN##s##A(p, av_bswap##s(v))

Definition at line 550 of file intreadwrite.h.

## AV_RL16A

#define AV_RL16A | ( |  | p | ) |

Value:
AV_RLA(16, p)
AV_RLA
#define AV_RLA(s, p)
Definition intreadwrite.h:547

Definition at line 554 of file intreadwrite.h.

## AV_WL16A

#define AV_WL16A | ( |  | p,
|  |  | v )

Value:
AV_WLA(16, p, v)
AV_WLA
#define AV_WLA(s, p, v)
Definition intreadwrite.h:548

Definition at line 557 of file intreadwrite.h.

## AV_RB16A

#define AV_RB16A | ( |  | p | ) |

Value:
AV_RBA(16, p)
AV_RBA
#define AV_RBA(s, p)
Definition intreadwrite.h:549

Definition at line 561 of file intreadwrite.h.

## AV_WB16A

#define AV_WB16A | ( |  | p,
|  |  | v )

Value:
AV_WBA(16, p, v)
AV_WBA
#define AV_WBA(s, p, v)
Definition intreadwrite.h:550

Definition at line 564 of file intreadwrite.h.

## AV_RL32A

#define AV_RL32A | ( |  | p | ) |

Value:
AV_RLA(32, p)

Definition at line 568 of file intreadwrite.h.

## AV_WL32A

#define AV_WL32A | ( |  | p,
|  |  | v )

Value:
AV_WLA(32, p, v)

Definition at line 571 of file intreadwrite.h.

## AV_RB32A

#define AV_RB32A | ( |  | p | ) |

Value:
AV_RBA(32, p)

Definition at line 575 of file intreadwrite.h.

## AV_WB32A

#define AV_WB32A | ( |  | p,
|  |  | v )

Value:
AV_WBA(32, p, v)

Definition at line 578 of file intreadwrite.h.

## AV_RL64A

#define AV_RL64A | ( |  | p | ) |

Value:
AV_RLA(64, p)

Definition at line 582 of file intreadwrite.h.

## AV_WL64A

#define AV_WL64A | ( |  | p,
|  |  | v )

Value:
AV_WLA(64, p, v)

Definition at line 585 of file intreadwrite.h.

## AV_RB64A

#define AV_RB64A | ( |  | p | ) |

Value:
AV_RBA(64, p)

Definition at line 589 of file intreadwrite.h.

## AV_WB64A

#define AV_WB64A | ( |  | p,
|  |  | v )

Value:
AV_WBA(64, p, v)

Definition at line 592 of file intreadwrite.h.

## AV_COPYU

#define AV_COPYU | ( |  | n,
|  |  | d,
|  |  | s )

Value:
AV_WN##n(d, AV_RN##n(s));

Definition at line 600 of file intreadwrite.h.

## AV_COPY16U

#define AV_COPY16U | ( |  | d,
|  |  | s )

Value:
AV_COPYU(16, d, s)
AV_COPYU
#define AV_COPYU(n, d, s)
Definition intreadwrite.h:600

Definition at line 603 of file intreadwrite.h.

## AV_COPY32U

#define AV_COPY32U | ( |  | d,
|  |  | s )

Value:
AV_COPYU(32, d, s)

Definition at line 607 of file intreadwrite.h.

## AV_COPY64U

#define AV_COPY64U | ( |  | d,
|  |  | s )

Value:
AV_COPYU(64, d, s)

Definition at line 611 of file intreadwrite.h.

## AV_COPY128U

#define AV_COPY128U | ( |  | d,
|  |  | s )

Value:
do { \
AV_COPY64U(d, s); \
AV_COPY64U((char *)(d) + 8, (const char *)(s) + 8); \
} while(0)

Definition at line 615 of file intreadwrite.h.

## AV_COPY

#define AV_COPY | ( |  | n,
|  |  | d,
|  |  | s )

Value:
(((av_alias##n*)(d))->u##n = ((const av_alias##n*)(s))->u##n)

Definition at line 626 of file intreadwrite.h.

## AV_COPY16

#define AV_COPY16 | ( |  | d,
|  |  | s )

Value:
AV_COPY(16, d, s)
AV_COPY
#define AV_COPY(n, d, s)
Definition intreadwrite.h:626

Definition at line 630 of file intreadwrite.h.

## AV_COPY32

#define AV_COPY32 | ( |  | d,
|  |  | s )

Value:
AV_COPY(32, d, s)

Definition at line 634 of file intreadwrite.h.

## AV_COPY64

#define AV_COPY64 | ( |  | d,
|  |  | s )

Value:
AV_COPY(64, d, s)

Definition at line 638 of file intreadwrite.h.

## AV_COPY128

#define AV_COPY128 | ( |  | d,
|  |  | s )

Value:
do { \
AV_COPY64(d, s); \
AV_COPY64((char*)(d)+8, (char*)(s)+8); \
} while(0)

Definition at line 642 of file intreadwrite.h.

## AV_SWAP

#define AV_SWAP | ( |  | n,
|  |  | a,
|  |  | b )

Value:
FFSWAP(av_alias##n, *(av_alias##n*)(a), *(av_alias##n*)(b))
FFSWAP
#define FFSWAP(type, a, b)
Definition macros.h:52

Definition at line 649 of file intreadwrite.h.

## AV_SWAP64

#define AV_SWAP64 | ( |  | a,
|  |  | b )

Value:
AV_SWAP(64, a, b)
AV_SWAP
#define AV_SWAP(n, a, b)
Definition intreadwrite.h:649

Definition at line 652 of file intreadwrite.h.

## AV_ZERO

#define AV_ZERO | ( |  | n,
|  |  | d )

Value:
(((av_alias##n*)(d))->u##n = 0)

Definition at line 655 of file intreadwrite.h.

## AV_ZERO16

#define AV_ZERO16 | ( |  | d | ) |

Value:
AV_ZERO(16, d)
AV_ZERO
#define AV_ZERO(n, d)
Definition intreadwrite.h:655

Definition at line 658 of file intreadwrite.h.

## AV_ZERO32

#define AV_ZERO32 | ( |  | d | ) |

Value:
AV_ZERO(32, d)

Definition at line 662 of file intreadwrite.h.

## AV_ZERO64

#define AV_ZERO64 | ( |  | d | ) |

Value:
AV_ZERO(64, d)

Definition at line 666 of file intreadwrite.h.

## AV_ZERO128

#define AV_ZERO128 | ( |  | d | ) |

Value:
do { \
AV_ZERO64(d); \
AV_ZERO64((char*)(d)+8); \
} while(0)

Definition at line 670 of file intreadwrite.h.

## Variable Documentation

## av_alias

union unaligned_16 av_alias