/* * Copyright (c) 2012 The WebM project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source * tree. An additional intellectual property rights grant can be found * in the file PATENTS. All contributing project authors may * be found in the AUTHORS file in the root of the source tree.
*/
// Returns a context number for the given MB prediction signal staticINLINEint get_pred_context_switchable_interp(const MACROBLOCKD *xd) { // Note: // The mode info data structure has a one element border above and to the // left of the entries corresponding to real macroblocks. // The prediction flags in these dummy entries are initialized to 0. const MODE_INFO *const left_mi = xd->left_mi; constint left_type = left_mi ? left_mi->interp_filter : SWITCHABLE_FILTERS; const MODE_INFO *const above_mi = xd->above_mi; constint above_type =
above_mi ? above_mi->interp_filter : SWITCHABLE_FILTERS;
// The mode info data structure has a one element border above and to the // left of the entries corresponding to real macroblocks. // The prediction flags in these dummy entries are initialized to 0. // 0 - inter/inter, inter/--, --/inter, --/-- // 1 - intra/inter, inter/intra // 2 - intra/--, --/intra // 3 - intra/intra staticINLINEint get_intra_inter_context(const MACROBLOCKD *xd) { const MODE_INFO *const above_mi = xd->above_mi; const MODE_INFO *const left_mi = xd->left_mi; constint has_above = !!above_mi; constint has_left = !!left_mi;
if (has_above && has_left) { // both edges available constint above_intra = !is_inter_block(above_mi); constint left_intra = !is_inter_block(left_mi); return left_intra && above_intra ? 3 : left_intra || above_intra;
} elseif (has_above || has_left) { // one edge available return 2 * !is_inter_block(has_above ? above_mi : left_mi);
} return 0;
}
// Returns a context number for the given MB prediction signal // The mode info data structure has a one element border above and to the // left of the entries corresponding to real blocks. // The prediction flags in these dummy entries are initialized to 0. staticINLINEint get_tx_size_context(const MACROBLOCKD *xd) { constint max_tx_size = max_txsize_lookup[xd->mi[0]->sb_type]; const MODE_INFO *const above_mi = xd->above_mi; const MODE_INFO *const left_mi = xd->left_mi; constint has_above = !!above_mi; constint has_left = !!left_mi; int above_ctx =
(has_above && !above_mi->skip) ? (int)above_mi->tx_size : max_tx_size; int left_ctx =
(has_left && !left_mi->skip) ? (int)left_mi->tx_size : max_tx_size; if (!has_left) left_ctx = above_ctx;
if (!has_above) above_ctx = left_ctx;
return (above_ctx + left_ctx) > max_tx_size;
}
staticINLINEconst vpx_prob *get_tx_probs(TX_SIZE max_tx_size, int ctx, conststruct tx_probs *tx_probs) { switch (max_tx_size) { case TX_8X8: return tx_probs->p8x8[ctx]; case TX_16X16: return tx_probs->p16x16[ctx]; case TX_32X32: return tx_probs->p32x32[ctx]; default: assert(0 && "Invalid max_tx_size."); return NULL;
}
}
staticINLINEunsignedint *get_tx_counts(TX_SIZE max_tx_size, int ctx, struct tx_counts *tx_counts) { switch (max_tx_size) { case TX_8X8: return tx_counts->p8x8[ctx]; case TX_16X16: return tx_counts->p16x16[ctx]; case TX_32X32: return tx_counts->p32x32[ctx]; default: assert(0 && "Invalid max_tx_size."); return NULL;
}
}
#ifdef __cplusplus
} // extern "C" #endif
#endif// VPX_VP9_COMMON_VP9_PRED_COMMON_H_
Messung V0.5
¤ Dauer der Verarbeitung: 0.13 Sekunden
(vorverarbeitet)
¤
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.