/* * Copyright (c) 2020, 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.
*/
typedefstruct { // Superblock size constunsignedint sb_size; // number of tile widths constunsignedint tile_width_count; // list of tile widths int tile_widths[AOM_MAX_TILE_COLS]; // number of tile heights constunsignedint tile_height_count; // list of tile heights int tile_heights[AOM_MAX_TILE_ROWS];
} nonUniformTileConfigParam;
::libaom_test::TestMode encoding_mode_; const uniformTileConfigParam tile_config_param_; int max_tile_cols_log2_; int max_tile_rows_log2_; bool tile_config_violated_;
aom_rc_mode end_usage_check_;
};
// This class is used to validate tile configuration for non uniform spacing. class NonUniformTileConfigTestLarge
: public ::libaom_test::CodecTestWith3Params<
libaom_test::TestMode, nonUniformTileConfigParam, aom_rc_mode>, public ::libaom_test::EncoderTest { protected:
NonUniformTileConfigTestLarge()
: EncoderTest(GET_PARAM(0)), encoding_mode_(GET_PARAM(1)),
tile_config_param_(GET_PARAM(2)), rc_end_usage_(GET_PARAM(3)) {
tile_config_violated_ = false;
}
~NonUniformTileConfigTestLarge() override = default;
// check validity of tile cols int tile_col_idx, tile_col = 0; for (tile_col_idx = 0; tile_col_idx < tile_info.tile_columns - 1;
tile_col_idx++) { if (tile_config_param_.tile_widths[tile_col] !=
tile_info.tile_widths[tile_col_idx])
tile_config_violated_ = true;
tile_col = (tile_col + 1) % (int)tile_config_param_.tile_width_count;
} // last column may not be able to accommodate config, but if it is // greater than what is configured, there is a violation. if (tile_config_param_.tile_widths[tile_col] <
tile_info.tile_widths[tile_col_idx])
tile_config_violated_ = true;
// check validity of tile rows int tile_row_idx, tile_row = 0; for (tile_row_idx = 0; tile_row_idx < tile_info.tile_rows - 1;
tile_row_idx++) { if (tile_config_param_.tile_heights[tile_row] !=
tile_info.tile_heights[tile_row_idx])
tile_config_violated_ = true;
tile_row = (tile_row + 1) % (int)tile_config_param_.tile_height_count;
} // last row may not be able to accommodate config, but if it is // greater than what is configured, there is a violation. if (tile_config_param_.tile_heights[tile_row] <
tile_info.tile_heights[tile_row_idx])
tile_config_violated_ = true;
} return AOM_CODEC_OK == res_dec;
}
typedefstruct { // Number of tile groups to set. constint num_tg; // Number of tile rows to set constint num_tile_rows; // Number of tile columns to set constint num_tile_cols;
} TileGroupConfigParams;
// This class is used to test number of tile groups present in header. class TileGroupTestLarge
: public ::libaom_test::CodecTestWith2Params<libaom_test::TestMode,
TileGroupConfigParams>, public ::libaom_test::EncoderTest { protected:
TileGroupTestLarge()
: EncoderTest(GET_PARAM(0)), encoding_mode_(GET_PARAM(1)),
tile_group_config_params_(GET_PARAM(2)) {
tile_group_config_violated_ = false;
}
~TileGroupTestLarge() override = default;
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.