/* * Copyright (c) 2017, 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.
*/
/* TODO(negge) This function may be called by more than one thread when using
a multi-threaded decoder and this may cause a data race. */ int ifd_inspect(insp_frame_data *fd, void *decoder, int skip_not_transform) { struct AV1Decoder *pbi = (struct AV1Decoder *)decoder;
AV1_COMMON *const cm = &pbi->common; const CommonModeInfoParams *const mi_params = &cm->mi_params; const CommonQuantParams *quant_params = &cm->quant_params;
if (fd->mi_rows != mi_params->mi_rows || fd->mi_cols != mi_params->mi_cols) {
ifd_clear(fd);
ifd_init_mi_rc(fd, mi_params->mi_rows, mi_params->mi_cols);
}
fd->show_existing_frame = cm->show_existing_frame;
fd->frame_number = cm->current_frame.frame_number;
fd->show_frame = cm->show_frame;
fd->frame_type = cm->current_frame.frame_type;
fd->base_qindex = quant_params->base_qindex; // Set width and height of the first tile until generic support can be added
TileInfo tile_info;
av1_tile_set_row(&tile_info, cm, 0);
av1_tile_set_col(&tile_info, cm, 0);
fd->tile_mi_cols = tile_info.mi_col_end - tile_info.mi_col_start;
fd->tile_mi_rows = tile_info.mi_row_end - tile_info.mi_row_start;
fd->delta_q_present_flag = cm->delta_q_info.delta_q_present_flag;
fd->delta_q_res = cm->delta_q_info.delta_q_res; #if CONFIG_ACCOUNTING
fd->accounting = &pbi->accounting; #endif // TODO(negge): copy per frame CDEF data int i, j; for (i = 0; i < MAX_SEGMENTS; i++) { for (j = 0; j < 2; j++) {
fd->y_dequant[i][j] = quant_params->y_dequant_QTX[i][j];
fd->u_dequant[i][j] = quant_params->u_dequant_QTX[i][j];
fd->v_dequant[i][j] = quant_params->v_dequant_QTX[i][j];
}
} for (j = 0; j < mi_params->mi_rows; j++) { for (i = 0; i < mi_params->mi_cols; i++) { const MB_MODE_INFO *mbmi =
mi_params->mi_grid_base[j * mi_params->mi_stride + i];
insp_mi_data *mi = &fd->mi_grid[j * mi_params->mi_cols + i]; // Segment
mi->segment_id = mbmi->segment_id; // Motion Vectors
mi->mv[0].row = mbmi->mv[0].as_mv.row;
mi->mv[0].col = mbmi->mv[0].as_mv.col;
mi->mv[1].row = mbmi->mv[1].as_mv.row;
mi->mv[1].col = mbmi->mv[1].as_mv.col; // Reference Frames
mi->ref_frame[0] = mbmi->ref_frame[0];
mi->ref_frame[1] = mbmi->ref_frame[1]; // Prediction Mode
mi->mode = mbmi->mode;
mi->intrabc = (int16_t)mbmi->use_intrabc;
mi->palette = (int16_t)mbmi->palette_mode_info.palette_size[0];
mi->uv_palette = (int16_t)mbmi->palette_mode_info.palette_size[1]; // Prediction Mode for Chromatic planes if (mi->mode < INTRA_MODES) {
mi->uv_mode = mbmi->uv_mode;
} else {
mi->uv_mode = UV_MODE_INVALID;
}
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.