1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/media/libvpx/vpx/vp8dx.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,116 @@ 1.4 +/* 1.5 + * Copyright (c) 2010 The WebM project authors. All Rights Reserved. 1.6 + * 1.7 + * Use of this source code is governed by a BSD-style license 1.8 + * that can be found in the LICENSE file in the root of the source 1.9 + * tree. An additional intellectual property rights grant can be found 1.10 + * in the file PATENTS. All contributing project authors may 1.11 + * be found in the AUTHORS file in the root of the source tree. 1.12 + */ 1.13 + 1.14 + 1.15 +#include "vp8.h" 1.16 + 1.17 +/*!\defgroup vp8_decoder WebM VP8 Decoder 1.18 + * \ingroup vp8 1.19 + * 1.20 + * @{ 1.21 + */ 1.22 +/*!\file 1.23 + * \brief Provides definitions for using the VP8 algorithm within the vpx Decoder 1.24 + * interface. 1.25 + */ 1.26 +#ifndef VP8DX_H 1.27 +#define VP8DX_H 1.28 + 1.29 +#ifdef __cplusplus 1.30 +extern "C" { 1.31 +#endif 1.32 + 1.33 +/*!\name Algorithm interface for VP8 1.34 + * 1.35 + * This interface provides the capability to decode raw VP8 streams, as would 1.36 + * be found in AVI files and other non-Flash uses. 1.37 + * @{ 1.38 + */ 1.39 +extern vpx_codec_iface_t vpx_codec_vp8_dx_algo; 1.40 +extern vpx_codec_iface_t *vpx_codec_vp8_dx(void); 1.41 + 1.42 +/* TODO(jkoleszar): These move to VP9 in a later patch set. */ 1.43 +extern vpx_codec_iface_t vpx_codec_vp9_dx_algo; 1.44 +extern vpx_codec_iface_t *vpx_codec_vp9_dx(void); 1.45 +/*!@} - end algorithm interface member group*/ 1.46 + 1.47 +/* Include controls common to both the encoder and decoder */ 1.48 +#include "vp8.h" 1.49 + 1.50 + 1.51 +/*!\enum vp8_dec_control_id 1.52 + * \brief VP8 decoder control functions 1.53 + * 1.54 + * This set of macros define the control functions available for the VP8 1.55 + * decoder interface. 1.56 + * 1.57 + * \sa #vpx_codec_control 1.58 + */ 1.59 +enum vp8_dec_control_id { 1.60 + /** control function to get info on which reference frames were updated 1.61 + * by the last decode 1.62 + */ 1.63 + VP8D_GET_LAST_REF_UPDATES = VP8_DECODER_CTRL_ID_START, 1.64 + 1.65 + /** check if the indicated frame is corrupted */ 1.66 + VP8D_GET_FRAME_CORRUPTED, 1.67 + 1.68 + /** control function to get info on which reference frames were used 1.69 + * by the last decode 1.70 + */ 1.71 + VP8D_GET_LAST_REF_USED, 1.72 + 1.73 + /** decryption function to decrypt encoded buffer data immediately 1.74 + * before decoding. Takes a vp8_decrypt_init, which contains 1.75 + * a callback function and opaque context pointer. 1.76 + */ 1.77 + VP8D_SET_DECRYPTOR, 1.78 + 1.79 + /** For testing. */ 1.80 + VP9_INVERT_TILE_DECODE_ORDER, 1.81 + 1.82 + VP8_DECODER_CTRL_ID_MAX 1.83 +}; 1.84 + 1.85 +/*!\brief Structure to hold decryption state 1.86 + * 1.87 + * Defines a structure to hold the decryption state and access function. 1.88 + */ 1.89 +typedef struct vp8_decrypt_init { 1.90 + /** Decrypt n bytes of data from input -> output, using the decrypt_state 1.91 + * passed in VP8D_SET_DECRYPTOR. 1.92 + */ 1.93 + void (*decrypt_cb)(void *decrypt_state, const unsigned char *input, 1.94 + unsigned char *output, int count); 1.95 + /*! Decryption state. */ 1.96 + void *decrypt_state; 1.97 +} vp8_decrypt_init; 1.98 + 1.99 +/*!\brief VP8 decoder control function parameter type 1.100 + * 1.101 + * Defines the data types that VP8D control functions take. Note that 1.102 + * additional common controls are defined in vp8.h 1.103 + * 1.104 + */ 1.105 + 1.106 + 1.107 +VPX_CTRL_USE_TYPE(VP8D_GET_LAST_REF_UPDATES, int *) 1.108 +VPX_CTRL_USE_TYPE(VP8D_GET_FRAME_CORRUPTED, int *) 1.109 +VPX_CTRL_USE_TYPE(VP8D_GET_LAST_REF_USED, int *) 1.110 +VPX_CTRL_USE_TYPE(VP8D_SET_DECRYPTOR, vp8_decrypt_init *) 1.111 +VPX_CTRL_USE_TYPE(VP9_INVERT_TILE_DECODE_ORDER, int) 1.112 + 1.113 +/*! @} - end defgroup vp8_decoder */ 1.114 + 1.115 +#ifdef __cplusplus 1.116 +} // extern "C" 1.117 +#endif 1.118 + 1.119 +#endif