WebM VP8 Codec SDK
|
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_codec_impl_top.h" 00034 00039 enum vp8_com_control_id { 00040 VP8_SET_REFERENCE = 1, 00041 VP8_COPY_REFERENCE = 2, 00042 VP8_SET_POSTPROC = 3, 00043 VP8_SET_DBG_COLOR_REF_FRAME = 4, 00044 VP8_SET_DBG_COLOR_MB_MODES = 5, 00045 VP8_SET_DBG_COLOR_B_MODES = 6, 00046 VP8_SET_DBG_DISPLAY_MV = 7, 00048 /* TODO(jkoleszar): The encoder incorrectly reuses some of these values (5+) 00049 * for its control ids. These should be migrated to something like the 00050 * VP8_DECODER_CTRL_ID_START range next time we're ready to break the ABI. 00051 */ 00052 VP9_GET_REFERENCE = 128, 00053 VP8_COMMON_CTRL_ID_MAX, 00054 VP8_DECODER_CTRL_ID_START = 256 00055 }; 00056 00061 enum vp8_postproc_level { 00062 VP8_NOFILTERING = 0, 00063 VP8_DEBLOCK = 1 << 0, 00064 VP8_DEMACROBLOCK = 1 << 1, 00065 VP8_ADDNOISE = 1 << 2, 00066 VP8_DEBUG_TXT_FRAME_INFO = 1 << 3, 00067 VP8_DEBUG_TXT_MBLK_MODES = 1 << 4, 00068 VP8_DEBUG_TXT_DC_DIFF = 1 << 5, 00069 VP8_DEBUG_TXT_RATE_INFO = 1 << 6, 00070 VP8_MFQE = 1 << 10 00071 }; 00072 00080 typedef struct vp8_postproc_cfg { 00081 int post_proc_flag; 00082 int deblocking_level; 00083 int noise_level; 00084 } vp8_postproc_cfg_t; 00085 00090 typedef enum vpx_ref_frame_type { 00091 VP8_LAST_FRAME = 1, 00092 VP8_GOLD_FRAME = 2, 00093 VP8_ALTR_FRAME = 4 00094 } vpx_ref_frame_type_t; 00095 00101 typedef struct vpx_ref_frame { 00102 vpx_ref_frame_type_t frame_type; 00103 vpx_image_t img; 00104 } vpx_ref_frame_t; 00105 00106 typedef struct vp9_ref_frame { 00107 int idx; 00108 vpx_image_t img; 00109 } vp9_ref_frame_t; 00110 00116 VPX_CTRL_USE_TYPE(VP8_SET_REFERENCE, vpx_ref_frame_t *) 00117 VPX_CTRL_USE_TYPE(VP8_COPY_REFERENCE, vpx_ref_frame_t *) 00118 VPX_CTRL_USE_TYPE(VP8_SET_POSTPROC, vp8_postproc_cfg_t *) 00119 VPX_CTRL_USE_TYPE(VP8_SET_DBG_COLOR_REF_FRAME, int) 00120 VPX_CTRL_USE_TYPE(VP8_SET_DBG_COLOR_MB_MODES, int) 00121 VPX_CTRL_USE_TYPE(VP8_SET_DBG_COLOR_B_MODES, int) 00122 VPX_CTRL_USE_TYPE(VP8_SET_DBG_DISPLAY_MV, int) 00123 VPX_CTRL_USE_TYPE(VP9_GET_REFERENCE, vp9_ref_frame_t *) 00124 00125 00128 #include "vpx_codec_impl_bottom.h" 00129 #endif