/* * 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.
*/
staticinlineint av1_mv_class_base(MV_CLASS_TYPE c) { return c ? CLASS0_SIZE << (c + 2) : 0;
}
// If n != 0, returns the floor of log base 2 of n. If n == 0, returns 0. staticinline uint8_t av1_log_in_base_2(unsignedint n) { // get_msb() is only valid when n != 0. return n == 0 ? 0 : get_msb(n);
}
staticinline MV_CLASS_TYPE av1_get_mv_class(int z, int *offset) {
assert(z >= 0); const MV_CLASS_TYPE c = (MV_CLASS_TYPE)av1_log_in_base_2(z >> 3);
assert(c <= MV_CLASS_10); if (offset) *offset = z - av1_mv_class_base(c); return c;
}
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.