/* * 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.
*/
// 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(vpx_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 vpx_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 vpx_codec_err_t res_dec, const CompressedVideoSource & /*video*/,
Decoder *decoder) {
EXPECT_EQ(VPX_CODEC_OK, res_dec) << decoder->DecodeError(); return VPX_CODEC_OK == res_dec;
}
// Hook to be called on every decompressed frame. virtualvoid DecompressedFrameHook(const vpx_image_t & /*img*/, constunsignedint/*frame_number*/) {}
// Hook to be called on peek result virtualvoid HandlePeekResult(Decoder *const decoder,
CompressedVideoSource *video, const vpx_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.