/* * Copyright (c) 2024, 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.
*/
// Experimental multilayer metadata defined in CWG-E050.
// std::pair<T, bool> is used to indicate presence of a field, // like an std::optional (which cannot be used because it's C++17). // If the boolean is true, then the value is present.
struct ColorProperties { bool color_range; // true for full range values
uint8_t color_primaries;
uint8_t transfer_characteristics;
uint8_t matrix_coefficients;
};
struct AlphaInformation {
AlphaUse alpha_use_idc; // [0, 7]
uint8_t alpha_bit_depth; // [8, 15]
uint8_t alpha_clip_idc; // [0, 3] bool alpha_incr_flag;
uint16_t alpha_transparent_value; // [0, 1<<(alpha_bit_depth+1))
uint16_t alpha_opaque_value; // [0, 1<<(alpha_bit_depth+1)) // Relevant for ALPHA_STRAIGHT only.
std::pair<ColorProperties, bool> alpha_color_description; // Relevant for ALPHA_SEGMENTATION only. // Must be either empty or have the same size as the number of values between // alpha_transparent_value and alpha_opaque_value, inclusively.
std::vector<uint16_t> label_type_id;
};
// Parses a multilayer metadata file. // The metadata is expected to be in a subset of the YAML format supporting // simple lists and maps with integer values, and comments. // Checks that the metadata is valid and terminates the process in case of // error. bool parse_multilayer_file(constchar *metadata_path,
MultilayerMetadata *multilayer);
// Prints the multilayer metadata to stdout for debugging. void print_multilayer_metadata(const MultilayerMetadata &multilayer);
// Converts a double value to a DepthRepresentationElement struct. bool double_to_depth_representation_element( double v, DepthRepresentationElement *element); // Converts a DepthRepresentationElement struct to a double value. double depth_representation_element_to_double( const DepthRepresentationElement &e);
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.