/* * Copyright (c) 2016, Alliance for Open Media. All rights reserved. * * This source code is subject to the terms of the BSD 2 Clause License and * the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License * was not distributed with this source code in the LICENSE file, you can * obtain it at www.aomedia.org/license/software. If the Alliance for Open * Media Patent License 1.0 was not distributed with this source code in the * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
*/
/* \file * \brief Provides portable memory access primitives for operating on aligned * data * * This file is split from mem_ops.h for easier maintenance. See mem_ops.h * for a more detailed description of these primitives.
*/ #ifndef INCLUDED_BY_MEM_OPS_H #error Include mem_ops.h, not mem_ops_aligned.h directly. #endif
/* Architectures that provide instructions for doing this byte swapping * could redefine these macros.
*/ #define swap_endian_16(val, raw) \ do { \
val = (uint16_t)(((raw >> 8) & 0x00ff) | ((raw << 8) & 0xff00)); \
} while (0) #define swap_endian_32(val, raw) \ do { \
val = ((raw >> 24) & 0x000000ff) | ((raw >> 8) & 0x0000ff00) | \
((raw << 8) & 0x00ff0000) | ((raw << 24) & 0xff000000); \
} while (0) #define swap_endian_16_se(val, raw) \ do { \
swap_endian_16(val, raw); \
val = ((val << 16) >> 16); \
} while (0) #define swap_endian_32_se(val, raw) swap_endian_32(val, raw)
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.