00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00016 #include "vp8.h"
00017
00022 #ifndef VP8CX_H
00023 #define VP8CX_H
00024 #include "vpx_codec_impl_top.h"
00025
00031 extern vpx_codec_iface_t vpx_codec_vp8_cx_algo;
00032
00033
00034
00035
00036
00037
00044 #define VP8_EFLAG_NO_REF_LAST (1<<16)
00045
00046
00053 #define VP8_EFLAG_NO_REF_GF (1<<17)
00054
00055
00062 #define VP8_EFLAG_NO_REF_ARF (1<<21)
00063
00064
00070 #define VP8_EFLAG_NO_UPD_LAST (1<<18)
00071
00072
00078 #define VP8_EFLAG_NO_UPD_GF (1<<22)
00079
00080
00086 #define VP8_EFLAG_NO_UPD_ARF (1<<23)
00087
00088
00094 #define VP8_EFLAG_FORCE_GF (1<<19)
00095
00096
00102 #define VP8_EFLAG_FORCE_ARF (1<<24)
00103
00104
00110 #define VP8_EFLAG_NO_UPD_ENTROPY (1<<20)
00111
00112
00117 enum vp8e_enc_control_id
00118 {
00119 VP8E_UPD_ENTROPY = 5,
00120 VP8E_UPD_REFERENCE,
00121 VP8E_USE_REFERENCE,
00122 VP8E_SET_ROI_MAP,
00123 VP8E_SET_ACTIVEMAP,
00124 VP8E_SET_SCALEMODE = 11,
00125 VP8E_SET_CPUUSED = 13,
00126 VP8E_SET_ENABLEAUTOALTREF,
00127 VP8E_SET_NOISE_SENSITIVITY,
00128 VP8E_SET_SHARPNESS,
00129 VP8E_SET_STATIC_THRESHOLD,
00130 VP8E_SET_TOKEN_PARTITIONS,
00131 VP8E_GET_LAST_QUANTIZER,
00134 VP8E_GET_LAST_QUANTIZER_64,
00138 VP8E_SET_ARNR_MAXFRAMES,
00139 VP8E_SET_ARNR_STRENGTH ,
00140 VP8E_SET_ARNR_TYPE ,
00141 } ;
00142
00147 typedef enum vpx_scaling_mode_1d
00148 {
00149 VP8E_NORMAL = 0,
00150 VP8E_FOURFIVE = 1,
00151 VP8E_THREEFIVE = 2,
00152 VP8E_ONETWO = 3
00153 } VPX_SCALING_MODE;
00154
00155
00162 typedef struct vpx_roi_map
00163 {
00164 unsigned char *roi_map;
00165 unsigned int rows;
00166 unsigned int cols;
00167 int delta_q[4];
00168 int delta_lf[4];
00169 unsigned int static_threshold[4];
00170 } vpx_roi_map_t;
00171
00179 typedef struct vpx_active_map
00180 {
00181 unsigned char *active_map;
00182 unsigned int rows;
00183 unsigned int cols;
00184 } vpx_active_map_t;
00185
00191 typedef struct vpx_scaling_mode
00192 {
00193 VPX_SCALING_MODE h_scaling_mode;
00194 VPX_SCALING_MODE v_scaling_mode;
00195 } vpx_scaling_mode_t;
00196
00202 typedef enum
00203 {
00204 VP8_BEST_QUALITY_ENCODING,
00205 VP8_GOOD_QUALITY_ENCODING,
00206 VP8_REAL_TIME_ENCODING
00207 } vp8e_encoding_mode;
00208
00216 typedef enum
00217 {
00218 VP8_ONE_TOKENPARTITION = 0,
00219 VP8_TWO_TOKENPARTITION = 1,
00220 VP8_FOUR_TOKENPARTITION = 2,
00221 VP8_EIGHT_TOKENPARTITION = 3,
00222 } vp8e_token_partitions;
00223
00224
00233
00234
00235
00236 VPX_CTRL_USE_TYPE_DEPRECATED(VP8E_UPD_ENTROPY, int)
00237 VPX_CTRL_USE_TYPE_DEPRECATED(VP8E_UPD_REFERENCE, int)
00238 VPX_CTRL_USE_TYPE_DEPRECATED(VP8E_USE_REFERENCE, int)
00239
00240 VPX_CTRL_USE_TYPE(VP8E_SET_ROI_MAP, vpx_roi_map_t *)
00241 VPX_CTRL_USE_TYPE(VP8E_SET_ACTIVEMAP, vpx_active_map_t *)
00242 VPX_CTRL_USE_TYPE(VP8E_SET_SCALEMODE, vpx_scaling_mode_t *)
00243
00244 VPX_CTRL_USE_TYPE(VP8E_SET_CPUUSED, int)
00245 VPX_CTRL_USE_TYPE(VP8E_SET_ENABLEAUTOALTREF, unsigned int)
00246 VPX_CTRL_USE_TYPE(VP8E_SET_NOISE_SENSITIVITY, unsigned int)
00247 VPX_CTRL_USE_TYPE(VP8E_SET_SHARPNESS, unsigned int)
00248 VPX_CTRL_USE_TYPE(VP8E_SET_STATIC_THRESHOLD, unsigned int)
00249 VPX_CTRL_USE_TYPE(VP8E_SET_TOKEN_PARTITIONS, vp8e_token_partitions)
00250
00251 VPX_CTRL_USE_TYPE(VP8E_SET_ARNR_MAXFRAMES, unsigned int)
00252 VPX_CTRL_USE_TYPE(VP8E_SET_ARNR_STRENGTH , unsigned int)
00253 VPX_CTRL_USE_TYPE(VP8E_SET_ARNR_TYPE , unsigned int)
00254
00255
00256 VPX_CTRL_USE_TYPE(VP8E_GET_LAST_QUANTIZER, int *)
00257 VPX_CTRL_USE_TYPE(VP8E_GET_LAST_QUANTIZER_64, int *)
00258
00260 #include "vpx_codec_impl_bottom.h"
00261 #endif