const int kNumBlocks = 25; const int kNumBlockEntries = 16;
using VP8Quantize = void (*)(BLOCK *b, BLOCKD *d);
using VP8QuantizeParam = std::tuple<VP8Quantize, VP8Quantize>;
using libvpx_test::ACMRandom; using std::make_tuple;
// Create and populate a VP8_COMP instance which has a complete set of // quantization inputs as well as a second MACROBLOCKD for output. class QuantizeTestBase { public: virtual ~QuantizeTestBase() {
vp8_remove_compressor(&vp8_comp_);
vp8_comp_ = nullptr;
vpx_free(macroblockd_dst_);
macroblockd_dst_ = nullptr;
libvpx_test::ClearSystemState();
}
// The full configuration is necessary to generate the quantization tables.
VP8_CONFIG vp8_config;
memset(&vp8_config, 0, sizeof(vp8_config));
vp8_comp_ = vp8_create_compressor(&vp8_config);
// Set the tables based on a quantizer of 0.
vp8_set_quantizer(vp8_comp_, 0);
// Set up all the block/blockd pointers for the mb in vp8_comp_.
vp8cx_frame_init_quantizer(vp8_comp_);
// Copy macroblockd from the reference to get pre-set-up dequant values.
macroblockd_dst_ = reinterpret_cast<MACROBLOCKD *>(
vpx_memalign(32, sizeof(*macroblockd_dst_)));
*macroblockd_dst_ = vp8_comp_->mb.e_mbd; // Fix block pointers - currently they point to the blocks in the reference // structure.
vp8_setup_block_dptrs(macroblockd_dst_);
}
TEST_P(QuantizeTest, TestLargeNegativeInput) {
FillCoeffConstant(0); // Generate a qcoeff which contains 512/-512 (0x0100/0xFE00) to catch issues // like BUG=883 where the constant being compared was incorrectly initialized.
vp8_comp_->mb.coeff[0] = -8191;
RunComparison();
}
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.