/* * Copyright (c) 2021, 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.
*/
// Reorders 'qcoeff_lexico', which is in lexicographic order (row by row), into // scan order (zigzag) in 'qcoeff_scan'. void ToScanOrder(TX_SIZE tx_size, TX_TYPE tx_type, tran_low_t *qcoeff_lexico,
tran_low_t *qcoeff_scan) { constint max_eob = av1_get_max_eob(tx_size); const SCAN_ORDER *const scan_order = get_scan(tx_size, tx_type); for (int i = 0; i < max_eob; ++i) {
qcoeff_scan[i] = qcoeff_lexico[scan_order->scan[i]];
}
}
// Reorders 'qcoeff_scan', which is in scan order (zigzag), into lexicographic // order (row by row) in 'qcoeff_lexico'. void ToLexicoOrder(TX_SIZE tx_size, TX_TYPE tx_type, tran_low_t *qcoeff_scan,
tran_low_t *qcoeff_lexico) { constint max_eob = av1_get_max_eob(tx_size); const SCAN_ORDER *const scan_order = get_scan(tx_size, tx_type); for (int i = 0; i < max_eob; ++i) {
qcoeff_lexico[scan_order->scan[i]] = qcoeff_scan[i];
}
}
// Runs coefficient dropout on 'qcoeff_scan'. void Dropout(TX_SIZE tx_size, TX_TYPE tx_type, int dropout_num_before, int dropout_num_after, tran_low_t *qcoeff_scan) {
tran_low_t qcoeff[MAX_TX_SQUARE]; // qcoeff_scan is assumed to be in scan order, since tests are easier to // understand this way, but av1_dropout_qcoeff expects coeffs in lexico order // so we convert to lexico then back to scan afterwards.
ToLexicoOrder(tx_size, tx_type, qcoeff_scan, qcoeff);
constint max_eob = av1_get_max_eob(tx_size); constint kDequantFactor = 10;
tran_low_t dqcoeff[MAX_TX_SQUARE]; for (int i = 0; i < max_eob; ++i) {
dqcoeff[i] = qcoeff[i] * kDequantFactor;
}
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.