WebM VP8 Codec SDK
vpx/vp8.h
Go to the documentation of this file.
00001 /*
00002  *  Copyright (c) 2010 The WebM project authors. All Rights Reserved.
00003  *
00004  *  Use of this source code is governed by a BSD-style license
00005  *  that can be found in the LICENSE file in the root of the source
00006  *  tree. An additional intellectual property rights grant can be found
00007  *  in the file PATENTS.  All contributing project authors may
00008  *  be found in the AUTHORS file in the root of the source tree.
00009  */
00010 
00011 
00031 #ifndef VP8_H
00032 #define VP8_H
00033 #include "vpx/vpx_codec_impl_top.h"
00034 
00039 enum vp8_com_control_id
00040 {
00041     VP8_SET_REFERENCE           = 1,    
00042     VP8_COPY_REFERENCE          = 2,    
00043     VP8_SET_POSTPROC            = 3,    
00044     VP8_SET_DBG_COLOR_REF_FRAME = 4,    
00045     VP8_SET_DBG_COLOR_MB_MODES  = 5,    
00046     VP8_SET_DBG_COLOR_B_MODES   = 6,    
00047     VP8_SET_DBG_DISPLAY_MV      = 7,    
00048     VP8_COMMON_CTRL_ID_MAX,
00049     VP8_DECODER_CTRL_ID_START   = 256,
00050 };
00051 
00056 enum vp8_postproc_level
00057 {
00058     VP8_NOFILTERING             = 0,
00059     VP8_DEBLOCK                 = 1<<0,
00060     VP8_DEMACROBLOCK            = 1<<1,
00061     VP8_ADDNOISE                = 1<<2,
00062     VP8_DEBUG_TXT_FRAME_INFO    = 1<<3, 
00063     VP8_DEBUG_TXT_MBLK_MODES    = 1<<4, 
00064     VP8_DEBUG_TXT_DC_DIFF       = 1<<5, 
00065     VP8_DEBUG_TXT_RATE_INFO     = 1<<6, 
00066 };
00067 
00075 typedef struct vp8_postproc_cfg
00076 {
00077     int post_proc_flag;         
00078     int deblocking_level;       
00079     int noise_level;            
00080 } vp8_postproc_cfg_t;
00081 
00086 typedef enum vpx_ref_frame_type
00087 {
00088     VP8_LAST_FRAME = 1,
00089     VP8_GOLD_FRAME = 2,
00090     VP8_ALTR_FRAME = 4
00091 } vpx_ref_frame_type_t;
00092 
00098 typedef struct vpx_ref_frame
00099 {
00100     vpx_ref_frame_type_t  frame_type;   
00101     vpx_image_t           img;          
00102 } vpx_ref_frame_t;
00103 
00104 
00110 VPX_CTRL_USE_TYPE(VP8_SET_REFERENCE,           vpx_ref_frame_t *)
00111 VPX_CTRL_USE_TYPE(VP8_COPY_REFERENCE,          vpx_ref_frame_t *)
00112 VPX_CTRL_USE_TYPE(VP8_SET_POSTPROC,            vp8_postproc_cfg_t *)
00113 VPX_CTRL_USE_TYPE(VP8_SET_DBG_COLOR_REF_FRAME, int)
00114 VPX_CTRL_USE_TYPE(VP8_SET_DBG_COLOR_MB_MODES,  int)
00115 VPX_CTRL_USE_TYPE(VP8_SET_DBG_COLOR_B_MODES,   int)
00116 VPX_CTRL_USE_TYPE(VP8_SET_DBG_DISPLAY_MV,      int)
00117 
00118 
00121 #if !defined(VPX_CODEC_DISABLE_COMPAT) || !VPX_CODEC_DISABLE_COMPAT
00122 /* The following definitions are provided for backward compatibility with
00123  * the VP8 1.0.x SDK. USE IN PRODUCTION CODE IS NOT RECOMMENDED.
00124  */
00125 
00126 DECLSPEC_DEPRECATED extern vpx_codec_iface_t vpx_codec_vp8_algo DEPRECATED;
00127 #endif
00128 
00129 #include "vpx/vpx_codec_impl_bottom.h"
00130 #endif