2 * Copyright (c) 2010 The VP8 project authors. All Rights Reserved.
4 * Use of this source code is governed by a BSD-style license and patent
5 * grant that can be found in the LICENSE file in the root of the source
6 * tree. All contributing project authors may be found in the AUTHORS
7 * file in the root of the source tree.
13 * VP8 is vpx's newest video compression algorithm that uses motion
14 * compensated prediction, Discrete Cosine Transform (DCT) coding of the
15 * prediction error signal and context dependent entropy coding techniques
16 * based on arithmatic principles. It features:
17 * - YUV 4:2:0 image format
18 * - Macro-block based coding (16x16 luma plus two 8x8 chroma)
19 * - 1/4 (1/8) pixel accuracy motion compensated prediction
21 * - 128 level linear quantizer
22 * - In loop deblocking filter
23 * - Context-based entropy coding
28 * \brief Provides controls common to both the VP8 encoder and decoder.
32 #include "vpx/vpx_codec_impl_top.h"
34 /*!\brief Control functions
36 * The set of macros define the control functions of VP8 interface
38 enum vp8_dec_control_id
40 VP8_SET_REFERENCE = 1, /**< pass in an external frame into decoder to be used as reference frame */
41 VP8_COPY_REFERENCE = 2, /**< get a copy of reference frame from the decoder */
42 VP8_SET_POSTPROC = 3, /**< set decoder's the post processing settings */
43 VP8_COMMON_CTRL_ID_MAX
46 /*!\brief post process flags
48 * The set of macros define VP8 decoder post processing flags
50 enum vp8_postproc_level
58 /*!\brief post process flags
60 * This define a structure that describe the post processing settings. For
61 * the best objective measure (using thet PSNR metric) set post_proc_flag
62 * to VP8_DEBLOCK and deblocking_level to 1.
65 typedef struct vp8_postproc_cfg
67 int post_proc_flag; /**< the types of post processing to be done, should be combination of "vp8_postproc_level" */
68 int deblocking_level; /**< the strength of deblocking, valid range [0, 16] */
69 int noise_level; /**< the strength of additive noise, valid range [0, 16] */
72 /*!\brief reference frame type
74 * The set of macros define the type of VP8 reference frames
76 typedef enum vpx_ref_frame_type
81 } vpx_ref_frame_type_t;
83 /*!\brief reference frame data struct
85 * define the data struct to access vp8 reference frames
88 typedef struct vpx_ref_frame
90 vpx_ref_frame_type_t frame_type; /**< which reference frame */
91 vpx_image_t img; /**< reference frame data in image format */
95 /*!\brief vp8 decoder control funciton parameter type
97 * defines the data type for each of VP8 decoder control funciton requires
100 VPX_CTRL_USE_TYPE(VP8_SET_REFERENCE, vpx_ref_frame_t *)
101 VPX_CTRL_USE_TYPE(VP8_COPY_REFERENCE, vpx_ref_frame_t *)
102 VPX_CTRL_USE_TYPE(VP8_SET_POSTPROC, vp8_postproc_cfg_t *)
105 /*! @} - end defgroup vp8 */
107 #if !defined(VPX_CODEC_DISABLE_COMPAT) || !VPX_CODEC_DISABLE_COMPAT
108 /* The following definitions are provided for backward compatibility with
109 * the VP8 1.0.x SDK. USE IN PRODUCTION CODE IS NOT RECOMMENDED.
112 DECLSPEC_DEPRECATED extern vpx_codec_iface_t vpx_codec_vp8_algo DEPRECATED;
115 #include "vpx/vpx_codec_impl_bottom.h"