/* * Copyright (c) 2017, 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.
*/ #include <string.h>
// Basic OBU syntax // 8 bits: Header // 7 // forbidden bit // 6,5,4,3 // type bits // 2 // extension flag bit // 1 // has size field bit // 0 // reserved bit const uint32_t kObuForbiddenBitMask = 0x1; const uint32_t kObuForbiddenBitShift = 7; const uint32_t kObuTypeBitsMask = 0xF; const uint32_t kObuTypeBitsShift = 3; const uint32_t kObuExtensionFlagBitMask = 0x1; const uint32_t kObuExtensionFlagBitShift = 2; const uint32_t kObuHasSizeFieldBitMask = 0x1; const uint32_t kObuHasSizeFieldBitShift = 1;
// When extension flag bit is set: // 8 bits: extension header // 7,6,5 // temporal ID // 4,3 // spatial ID // 2,1,0 // reserved bits const uint32_t kObuExtTemporalIdBitsMask = 0x7; const uint32_t kObuExtTemporalIdBitsShift = 5; const uint32_t kObuExtSpatialIdBitsMask = 0x3; const uint32_t kObuExtSpatialIdBitsShift = 3;
bool ValidObuType(int obu_type) { switch (obu_type) { case OBU_SEQUENCE_HEADER: case OBU_TEMPORAL_DELIMITER: case OBU_FRAME_HEADER: case OBU_TILE_GROUP: case OBU_METADATA: case OBU_FRAME: case OBU_REDUNDANT_FRAME_HEADER: case OBU_TILE_LIST: case OBU_PADDING: returntrue;
} returnfalse;
}
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.