michael@0: /* michael@0: * Copyright (c) 2010 The WebM project authors. All Rights Reserved. michael@0: * michael@0: * Use of this source code is governed by a BSD-style license michael@0: * that can be found in the LICENSE file in the root of the source michael@0: * tree. An additional intellectual property rights grant can be found michael@0: * in the file PATENTS. All contributing project authors may michael@0: * be found in the AUTHORS file in the root of the source tree. michael@0: */ michael@0: michael@0: michael@0: #include "vp8.h" michael@0: michael@0: /*!\defgroup vp8_decoder WebM VP8 Decoder michael@0: * \ingroup vp8 michael@0: * michael@0: * @{ michael@0: */ michael@0: /*!\file michael@0: * \brief Provides definitions for using the VP8 algorithm within the vpx Decoder michael@0: * interface. michael@0: */ michael@0: #ifndef VP8DX_H michael@0: #define VP8DX_H michael@0: michael@0: #ifdef __cplusplus michael@0: extern "C" { michael@0: #endif michael@0: michael@0: /*!\name Algorithm interface for VP8 michael@0: * michael@0: * This interface provides the capability to decode raw VP8 streams, as would michael@0: * be found in AVI files and other non-Flash uses. michael@0: * @{ michael@0: */ michael@0: extern vpx_codec_iface_t vpx_codec_vp8_dx_algo; michael@0: extern vpx_codec_iface_t *vpx_codec_vp8_dx(void); michael@0: michael@0: /* TODO(jkoleszar): These move to VP9 in a later patch set. */ michael@0: extern vpx_codec_iface_t vpx_codec_vp9_dx_algo; michael@0: extern vpx_codec_iface_t *vpx_codec_vp9_dx(void); michael@0: /*!@} - end algorithm interface member group*/ michael@0: michael@0: /* Include controls common to both the encoder and decoder */ michael@0: #include "vp8.h" michael@0: michael@0: michael@0: /*!\enum vp8_dec_control_id michael@0: * \brief VP8 decoder control functions michael@0: * michael@0: * This set of macros define the control functions available for the VP8 michael@0: * decoder interface. michael@0: * michael@0: * \sa #vpx_codec_control michael@0: */ michael@0: enum vp8_dec_control_id { michael@0: /** control function to get info on which reference frames were updated michael@0: * by the last decode michael@0: */ michael@0: VP8D_GET_LAST_REF_UPDATES = VP8_DECODER_CTRL_ID_START, michael@0: michael@0: /** check if the indicated frame is corrupted */ michael@0: VP8D_GET_FRAME_CORRUPTED, michael@0: michael@0: /** control function to get info on which reference frames were used michael@0: * by the last decode michael@0: */ michael@0: VP8D_GET_LAST_REF_USED, michael@0: michael@0: /** decryption function to decrypt encoded buffer data immediately michael@0: * before decoding. Takes a vp8_decrypt_init, which contains michael@0: * a callback function and opaque context pointer. michael@0: */ michael@0: VP8D_SET_DECRYPTOR, michael@0: michael@0: /** For testing. */ michael@0: VP9_INVERT_TILE_DECODE_ORDER, michael@0: michael@0: VP8_DECODER_CTRL_ID_MAX michael@0: }; michael@0: michael@0: /*!\brief Structure to hold decryption state michael@0: * michael@0: * Defines a structure to hold the decryption state and access function. michael@0: */ michael@0: typedef struct vp8_decrypt_init { michael@0: /** Decrypt n bytes of data from input -> output, using the decrypt_state michael@0: * passed in VP8D_SET_DECRYPTOR. michael@0: */ michael@0: void (*decrypt_cb)(void *decrypt_state, const unsigned char *input, michael@0: unsigned char *output, int count); michael@0: /*! Decryption state. */ michael@0: void *decrypt_state; michael@0: } vp8_decrypt_init; michael@0: michael@0: /*!\brief VP8 decoder control function parameter type michael@0: * michael@0: * Defines the data types that VP8D control functions take. Note that michael@0: * additional common controls are defined in vp8.h michael@0: * michael@0: */ michael@0: michael@0: michael@0: VPX_CTRL_USE_TYPE(VP8D_GET_LAST_REF_UPDATES, int *) michael@0: VPX_CTRL_USE_TYPE(VP8D_GET_FRAME_CORRUPTED, int *) michael@0: VPX_CTRL_USE_TYPE(VP8D_GET_LAST_REF_USED, int *) michael@0: VPX_CTRL_USE_TYPE(VP8D_SET_DECRYPTOR, vp8_decrypt_init *) michael@0: VPX_CTRL_USE_TYPE(VP9_INVERT_TILE_DECODE_ORDER, int) michael@0: michael@0: /*! @} - end defgroup vp8_decoder */ michael@0: michael@0: #ifdef __cplusplus michael@0: } // extern "C" michael@0: #endif michael@0: michael@0: #endif