| OLD | NEW | 
|---|
| 1 /* | 1 /* | 
| 2  *  Copyright (c) 2010 The WebM project authors. All Rights Reserved. | 2  *  Copyright (c) 2010 The WebM project authors. All Rights Reserved. | 
| 3  * | 3  * | 
| 4  *  Use of this source code is governed by a BSD-style license | 4  *  Use of this source code is governed by a BSD-style license | 
| 5  *  that can be found in the LICENSE file in the root of the source | 5  *  that can be found in the LICENSE file in the root of the source | 
| 6  *  tree. An additional intellectual property rights grant can be found | 6  *  tree. An additional intellectual property rights grant can be found | 
| 7  *  in the file PATENTS.  All contributing project authors may | 7  *  in the file PATENTS.  All contributing project authors may | 
| 8  *  be found in the AUTHORS file in the root of the source tree. | 8  *  be found in the AUTHORS file in the root of the source tree. | 
| 9  */ | 9  */ | 
| 10 | 10 | 
| 11 | 11 | 
| 12 /*!\defgroup vp8_encoder WebM VP8 Encoder | 12 /*!\defgroup vp8_encoder WebM VP8 Encoder | 
| 13  * \ingroup vp8 | 13  * \ingroup vp8 | 
| 14  * | 14  * | 
| 15  * @{ | 15  * @{ | 
| 16  */ | 16  */ | 
| 17 #include "vp8.h" | 17 #include "vp8.h" | 
| 18 | 18 | 
| 19 /*!\file | 19 /*!\file | 
| 20  * \brief Provides definitions for using the VP8 encoder algorithm within the | 20  * \brief Provides definitions for using the VP8 encoder algorithm within the | 
| 21  *        vpx Codec Interface. | 21  *        vpx Codec Interface. | 
| 22  */ | 22  */ | 
| 23 #ifndef VP8CX_H | 23 #ifndef VP8CX_H | 
| 24 #define VP8CX_H | 24 #define VP8CX_H | 
| 25 #include "vpx/vpx_codec_impl_top.h" | 25 #include "vpx_codec_impl_top.h" | 
| 26 | 26 | 
| 27 /*!\name Algorithm interface for VP8 | 27 /*!\name Algorithm interface for VP8 | 
| 28  * | 28  * | 
| 29  * This interface provides the capability to encode raw VP8 streams, as would | 29  * This interface provides the capability to encode raw VP8 streams, as would | 
| 30  * be found in AVI files. | 30  * be found in AVI files. | 
| 31  * @{ | 31  * @{ | 
| 32  */ | 32  */ | 
| 33 extern vpx_codec_iface_t  vpx_codec_vp8_cx_algo; | 33 extern vpx_codec_iface_t  vpx_codec_vp8_cx_algo; | 
| 34 extern vpx_codec_iface_t* vpx_codec_vp8_cx(void); | 34 extern vpx_codec_iface_t* vpx_codec_vp8_cx(void); | 
| 35 /*!@} - end algorithm interface member group*/ | 35 /*!@} - end algorithm interface member group*/ | 
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 131     VP8E_SET_SCALEMODE         = 11, /**< control function to set encoder scalin
     g mode */ | 131     VP8E_SET_SCALEMODE         = 11, /**< control function to set encoder scalin
     g mode */ | 
| 132     /*!\brief control function to set vp8 encoder cpuused | 132     /*!\brief control function to set vp8 encoder cpuused | 
| 133      * | 133      * | 
| 134      * Changes in this value influences, among others, the encoder's selection | 134      * Changes in this value influences, among others, the encoder's selection | 
| 135      * of motion estimation methods. Values greater than 0 will increase encoder | 135      * of motion estimation methods. Values greater than 0 will increase encoder | 
| 136      * speed at the expense of quality. | 136      * speed at the expense of quality. | 
| 137      * The full set of adjustments can be found in | 137      * The full set of adjustments can be found in | 
| 138      * onyx_if.c:vp8_set_speed_features(). | 138      * onyx_if.c:vp8_set_speed_features(). | 
| 139      * \todo List highlights of the changes at various levels. | 139      * \todo List highlights of the changes at various levels. | 
| 140      * | 140      * | 
| 141      * \note Valid range: -16..16 or {-16..-4, 4..16} w/CONFIG_REALTIME_ONLY | 141      * \note Valid range: -16..16 | 
| 142      */ | 142      */ | 
| 143     VP8E_SET_CPUUSED           = 13, | 143     VP8E_SET_CPUUSED           = 13, | 
| 144     VP8E_SET_ENABLEAUTOALTREF,       /**< control function to enable vp8 to auto
     matic set and use altref frame */ | 144     VP8E_SET_ENABLEAUTOALTREF,       /**< control function to enable vp8 to auto
     matic set and use altref frame */ | 
| 145     VP8E_SET_NOISE_SENSITIVITY,      /**< control function to set noise sensitiv
     ity */ | 145     VP8E_SET_NOISE_SENSITIVITY,      /**< control function to set noise sensitiv
     ity */ | 
| 146     VP8E_SET_SHARPNESS,              /**< control function to set sharpness */ | 146     VP8E_SET_SHARPNESS,              /**< control function to set sharpness */ | 
| 147     VP8E_SET_STATIC_THRESHOLD,       /**< control function to set the threshold 
     for macroblocks treated static */ | 147     VP8E_SET_STATIC_THRESHOLD,       /**< control function to set the threshold 
     for macroblocks treated static */ | 
| 148     VP8E_SET_TOKEN_PARTITIONS,       /**< control function to set the number of 
     token partitions  */ | 148     VP8E_SET_TOKEN_PARTITIONS,       /**< control function to set the number of 
     token partitions  */ | 
| 149     VP8E_GET_LAST_QUANTIZER,         /**< return the quantizer chosen by the | 149     VP8E_GET_LAST_QUANTIZER,         /**< return the quantizer chosen by the | 
| 150                                           encoder for the last frame using the i
     nternal | 150                                           encoder for the last frame using the i
     nternal | 
| 151                                           scale */ | 151                                           scale */ | 
| 152     VP8E_GET_LAST_QUANTIZER_64,      /**< return the quantizer chosen by the | 152     VP8E_GET_LAST_QUANTIZER_64,      /**< return the quantizer chosen by the | 
| 153                                           encoder for the last frame, using the 
     0..63 | 153                                           encoder for the last frame, using the 
     0..63 | 
| 154                                           scale as used by the rc_*_quantizer co
     nfig | 154                                           scale as used by the rc_*_quantizer co
     nfig | 
| 155                                           parameters */ | 155                                           parameters */ | 
| 156     VP8E_SET_ARNR_MAXFRAMES,         /**< control function to set the max number
      of frames blurred creating arf*/ | 156     VP8E_SET_ARNR_MAXFRAMES,         /**< control function to set the max number
      of frames blurred creating arf*/ | 
| 157     VP8E_SET_ARNR_STRENGTH ,         /**< control function to set the filter str
     ength for the arf */ | 157     VP8E_SET_ARNR_STRENGTH ,         /**< control function to set the filter str
     ength for the arf */ | 
| 158     VP8E_SET_ARNR_TYPE     ,         /**< control function to set the type of fi
     lter to use for the arf*/ | 158     VP8E_SET_ARNR_TYPE     ,         /**< control function to set the type of fi
     lter to use for the arf*/ | 
| 159     VP8E_SET_TUNING,                 /**< control function to set visual tuning 
     */ | 159     VP8E_SET_TUNING,                 /**< control function to set visual tuning 
     */ | 
| 160     /*!\brief control function to set constrained quality level | 160     /*!\brief control function to set constrained quality level | 
| 161      * | 161      * | 
| 162      * \attention For this value to be used vpx_codec_enc_cfg_t::g_usage must be | 162      * \attention For this value to be used vpx_codec_enc_cfg_t::g_usage must be | 
| 163      *            set to #VPX_CQ. | 163      *            set to #VPX_CQ. | 
| 164      * \note Valid range: 0..63 | 164      * \note Valid range: 0..63 | 
| 165      */ | 165      */ | 
| 166     VP8E_SET_CQ_LEVEL, | 166     VP8E_SET_CQ_LEVEL, | 
|  | 167 | 
|  | 168     /*!\brief Max data rate for Intra frames | 
|  | 169      * | 
|  | 170      * This value controls additional clamping on the maximum size of a | 
|  | 171      * keyframe. It is expressed as a percentage of the average | 
|  | 172      * per-frame bitrate, with the special (and default) value 0 meaning | 
|  | 173      * unlimited, or no additional clamping beyond the codec's built-in | 
|  | 174      * algorithm. | 
|  | 175      * | 
|  | 176      * For example, to allocate no more than 4.5 frames worth of bitrate | 
|  | 177      * to a keyframe, set this to 450. | 
|  | 178      * | 
|  | 179      */ | 
|  | 180     VP8E_SET_MAX_INTRA_BITRATE_PCT, | 
| 167 }; | 181 }; | 
| 168 | 182 | 
| 169 /*!\brief vpx 1-D scaling mode | 183 /*!\brief vpx 1-D scaling mode | 
| 170  * | 184  * | 
| 171  * This set of constants define 1-D vpx scaling modes | 185  * This set of constants define 1-D vpx scaling modes | 
| 172  */ | 186  */ | 
| 173 typedef enum vpx_scaling_mode_1d | 187 typedef enum vpx_scaling_mode_1d | 
| 174 { | 188 { | 
| 175     VP8E_NORMAL      = 0, | 189     VP8E_NORMAL      = 0, | 
| 176     VP8E_FOURFIVE    = 1, | 190     VP8E_FOURFIVE    = 1, | 
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 288 | 302 | 
| 289 VPX_CTRL_USE_TYPE(VP8E_SET_ARNR_MAXFRAMES,     unsigned int) | 303 VPX_CTRL_USE_TYPE(VP8E_SET_ARNR_MAXFRAMES,     unsigned int) | 
| 290 VPX_CTRL_USE_TYPE(VP8E_SET_ARNR_STRENGTH ,     unsigned int) | 304 VPX_CTRL_USE_TYPE(VP8E_SET_ARNR_STRENGTH ,     unsigned int) | 
| 291 VPX_CTRL_USE_TYPE(VP8E_SET_ARNR_TYPE     ,     unsigned int) | 305 VPX_CTRL_USE_TYPE(VP8E_SET_ARNR_TYPE     ,     unsigned int) | 
| 292 VPX_CTRL_USE_TYPE(VP8E_SET_TUNING,             vp8e_tuning) | 306 VPX_CTRL_USE_TYPE(VP8E_SET_TUNING,             vp8e_tuning) | 
| 293 VPX_CTRL_USE_TYPE(VP8E_SET_CQ_LEVEL     ,      unsigned int) | 307 VPX_CTRL_USE_TYPE(VP8E_SET_CQ_LEVEL     ,      unsigned int) | 
| 294 | 308 | 
| 295 VPX_CTRL_USE_TYPE(VP8E_GET_LAST_QUANTIZER,     int *) | 309 VPX_CTRL_USE_TYPE(VP8E_GET_LAST_QUANTIZER,     int *) | 
| 296 VPX_CTRL_USE_TYPE(VP8E_GET_LAST_QUANTIZER_64,  int *) | 310 VPX_CTRL_USE_TYPE(VP8E_GET_LAST_QUANTIZER_64,  int *) | 
| 297 | 311 | 
|  | 312 VPX_CTRL_USE_TYPE(VP8E_SET_MAX_INTRA_BITRATE_PCT, unsigned int) | 
|  | 313 | 
|  | 314 | 
| 298 /*! @} - end defgroup vp8_encoder */ | 315 /*! @} - end defgroup vp8_encoder */ | 
| 299 #include "vpx/vpx_codec_impl_bottom.h" | 316 #include "vpx_codec_impl_bottom.h" | 
| 300 #endif | 317 #endif | 
| OLD | NEW | 
|---|