00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00017 #include "vp8.h"
00018
00023 #ifndef VP8CX_H
00024 #define VP8CX_H
00025 #include "vpx_codec_impl_top.h"
00026
00033 extern vpx_codec_iface_t vpx_codec_vp8_cx_algo;
00034 extern vpx_codec_iface_t* vpx_codec_vp8_cx(void);
00038
00039
00040
00041
00048 #define VP8_EFLAG_NO_REF_LAST (1<<16)
00049
00050
00057 #define VP8_EFLAG_NO_REF_GF (1<<17)
00058
00059
00066 #define VP8_EFLAG_NO_REF_ARF (1<<21)
00067
00068
00074 #define VP8_EFLAG_NO_UPD_LAST (1<<18)
00075
00076
00082 #define VP8_EFLAG_NO_UPD_GF (1<<22)
00083
00084
00090 #define VP8_EFLAG_NO_UPD_ARF (1<<23)
00091
00092
00098 #define VP8_EFLAG_FORCE_GF (1<<19)
00099
00100
00106 #define VP8_EFLAG_FORCE_ARF (1<<24)
00107
00108
00114 #define VP8_EFLAG_NO_UPD_ENTROPY (1<<20)
00115
00116
00124 enum vp8e_enc_control_id
00125 {
00126 VP8E_UPD_ENTROPY = 5,
00127 VP8E_UPD_REFERENCE,
00128 VP8E_USE_REFERENCE,
00129 VP8E_SET_ROI_MAP,
00130 VP8E_SET_ACTIVEMAP,
00131 VP8E_SET_SCALEMODE = 11,
00143 VP8E_SET_CPUUSED = 13,
00144 VP8E_SET_ENABLEAUTOALTREF,
00145 VP8E_SET_NOISE_SENSITIVITY,
00146 VP8E_SET_SHARPNESS,
00147 VP8E_SET_STATIC_THRESHOLD,
00148 VP8E_SET_TOKEN_PARTITIONS,
00149 VP8E_GET_LAST_QUANTIZER,
00152 VP8E_GET_LAST_QUANTIZER_64,
00156 VP8E_SET_ARNR_MAXFRAMES,
00157 VP8E_SET_ARNR_STRENGTH ,
00158 VP8E_SET_ARNR_TYPE ,
00159 VP8E_SET_TUNING,
00166 VP8E_SET_CQ_LEVEL,
00167
00180 VP8E_SET_MAX_INTRA_BITRATE_PCT
00181 };
00182
00187 typedef enum vpx_scaling_mode_1d
00188 {
00189 VP8E_NORMAL = 0,
00190 VP8E_FOURFIVE = 1,
00191 VP8E_THREEFIVE = 2,
00192 VP8E_ONETWO = 3
00193 } VPX_SCALING_MODE;
00194
00195
00202 typedef struct vpx_roi_map
00203 {
00204 unsigned char *roi_map;
00205 unsigned int rows;
00206 unsigned int cols;
00207 int delta_q[4];
00208 int delta_lf[4];
00209 unsigned int static_threshold[4];
00210 } vpx_roi_map_t;
00211
00219 typedef struct vpx_active_map
00220 {
00221 unsigned char *active_map;
00222 unsigned int rows;
00223 unsigned int cols;
00224 } vpx_active_map_t;
00225
00231 typedef struct vpx_scaling_mode
00232 {
00233 VPX_SCALING_MODE h_scaling_mode;
00234 VPX_SCALING_MODE v_scaling_mode;
00235 } vpx_scaling_mode_t;
00236
00244 typedef enum
00245 {
00246 VP8_ONE_TOKENPARTITION = 0,
00247 VP8_TWO_TOKENPARTITION = 1,
00248 VP8_FOUR_TOKENPARTITION = 2,
00249 VP8_EIGHT_TOKENPARTITION = 3
00250 } vp8e_token_partitions;
00251
00252
00258 typedef enum
00259 {
00260 VP8_TUNE_PSNR,
00261 VP8_TUNE_SSIM
00262 } vp8e_tuning;
00263
00264
00273
00274
00275
00276 VPX_CTRL_USE_TYPE_DEPRECATED(VP8E_UPD_ENTROPY, int)
00277 VPX_CTRL_USE_TYPE_DEPRECATED(VP8E_UPD_REFERENCE, int)
00278 VPX_CTRL_USE_TYPE_DEPRECATED(VP8E_USE_REFERENCE, int)
00279
00280 VPX_CTRL_USE_TYPE(VP8E_SET_ROI_MAP, vpx_roi_map_t *)
00281 VPX_CTRL_USE_TYPE(VP8E_SET_ACTIVEMAP, vpx_active_map_t *)
00282 VPX_CTRL_USE_TYPE(VP8E_SET_SCALEMODE, vpx_scaling_mode_t *)
00283
00284 VPX_CTRL_USE_TYPE(VP8E_SET_CPUUSED, int)
00285 VPX_CTRL_USE_TYPE(VP8E_SET_ENABLEAUTOALTREF, unsigned int)
00286 VPX_CTRL_USE_TYPE(VP8E_SET_NOISE_SENSITIVITY, unsigned int)
00287 VPX_CTRL_USE_TYPE(VP8E_SET_SHARPNESS, unsigned int)
00288 VPX_CTRL_USE_TYPE(VP8E_SET_STATIC_THRESHOLD, unsigned int)
00289 VPX_CTRL_USE_TYPE(VP8E_SET_TOKEN_PARTITIONS, int)
00290
00291 VPX_CTRL_USE_TYPE(VP8E_SET_ARNR_MAXFRAMES, unsigned int)
00292 VPX_CTRL_USE_TYPE(VP8E_SET_ARNR_STRENGTH , unsigned int)
00293 VPX_CTRL_USE_TYPE(VP8E_SET_ARNR_TYPE , unsigned int)
00294 VPX_CTRL_USE_TYPE(VP8E_SET_TUNING, int)
00295 VPX_CTRL_USE_TYPE(VP8E_SET_CQ_LEVEL , unsigned int)
00296
00297 VPX_CTRL_USE_TYPE(VP8E_GET_LAST_QUANTIZER, int *)
00298 VPX_CTRL_USE_TYPE(VP8E_GET_LAST_QUANTIZER_64, int *)
00299
00300 VPX_CTRL_USE_TYPE(VP8E_SET_MAX_INTRA_BITRATE_PCT, unsigned int)
00301
00302
00304 #include "vpx_codec_impl_bottom.h"
00305 #endif