/* * 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.
*/
// AOM Set Active and ROI Maps // =========================== // // This is an example demonstrating how to control the AOM encoder's // ROI and Active maps. // // ROI (Region of Interest) maps are a way for the application to assign // each macroblock in the image to a region, and then set quantizer and // filtering parameters on that image. // // Active maps are a way for the application to specify on a // macroblock-by-macroblock basis whether there is any activity in that // macroblock. // // // Configuration // ------------- // An ROI map is set on frame 22. If the width of the image in macroblocks // is evenly divisible by 4, then the output will appear to have distinct // columns, where the quantizer, loopfilter, and static threshold differ // from column to column. // // An active map is set on frame 33. If the width of the image in macroblocks // is evenly divisible by 4, then the output will appear to have distinct // columns, where one column will have motion and the next will not. // // The active map is cleared on frame 44. // // Observing The Effects // --------------------- // Use the `simple_decoder` example to decode this sample, and observe // the change in the image at frames 22, 33, and 44.
map.active_map = (uint8_t *)malloc(map.rows * map.cols); if (!map.active_map) die("Failed to allocate active map"); for (i = 0; i < map.rows * map.cols; ++i) map.active_map[i] = i % 2;
if (aom_codec_control(codec, AOME_SET_ACTIVEMAP, &map))
die_codec(codec, "Failed to set active map");
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.