/* * Copyright (c) 2016, 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.
*/
// Provides a simplified interface to manage one video decoding. // Similar to Encoder class, the exact services should be added // as more tests are added. class Decoder { public: explicit Decoder(aom_codec_dec_cfg_t cfg)
: cfg_(cfg), flags_(0), init_done_(false) {
memset(&decoder_, 0, sizeof(decoder_));
}
// Common test functionality for all Decoder tests. class DecoderTest { public: // Main decoding loop virtualvoid RunLoop(CompressedVideoSource *video); virtualvoid RunLoop(CompressedVideoSource *video, const aom_codec_dec_cfg_t &dec_cfg);
// Hook to be called before decompressing every frame. virtualvoid PreDecodeFrameHook(const CompressedVideoSource & /*video*/,
Decoder * /*decoder*/) {}
// Hook to be called to handle decode result. Return true to continue. virtualbool HandleDecodeResult(const aom_codec_err_t res_dec, const CompressedVideoSource & /*video*/,
Decoder *decoder) {
EXPECT_EQ(AOM_CODEC_OK, res_dec) << decoder->DecodeError(); return AOM_CODEC_OK == res_dec;
}
// Hook to be called on every decompressed frame. virtualvoid DecompressedFrameHook(const aom_image_t & /*img*/, constunsignedint/*frame_number*/) {}
// Hook to be called on peek result virtualvoid HandlePeekResult(Decoder *const decoder,
CompressedVideoSource *video, const aom_codec_err_t res_peek);
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.