summaryrefslogtreecommitdiffstats
path: root/libvpx/vpx/vp8cx.h
diff options
context:
space:
mode:
Diffstat (limited to 'libvpx/vpx/vp8cx.h')
-rw-r--r--libvpx/vpx/vp8cx.h61
1 files changed, 37 insertions, 24 deletions
diff --git a/libvpx/vpx/vp8cx.h b/libvpx/vpx/vp8cx.h
index f3ea6d3..433cc0d 100644
--- a/libvpx/vpx/vp8cx.h
+++ b/libvpx/vpx/vp8cx.h
@@ -7,7 +7,8 @@
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
-
+#ifndef VP8CX_H
+#define VP8CX_H
/*!\defgroup vp8_encoder WebM VP8 Encoder
* \ingroup vp8
@@ -20,9 +21,10 @@
* \brief Provides definitions for using the VP8 encoder algorithm within the
* vpx Codec Interface.
*/
-#ifndef VP8CX_H
-#define VP8CX_H
-#include "vpx_codec_impl_top.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
/*!\name Algorithm interface for VP8
*
@@ -192,13 +194,8 @@ enum vp8e_enc_control_id {
VP9E_SET_TILE_ROWS,
VP9E_SET_FRAME_PARALLEL_DECODING,
- VP9E_SET_WIDTH = 99,
- VP9E_SET_HEIGHT,
- VP9E_SET_LAYER,
VP9E_SET_SVC,
-
- VP9E_SET_MAX_Q,
- VP9E_SET_MIN_Q
+ VP9E_SET_SVC_PARAMETERS
};
/*!\brief vpx 1-D scaling mode
@@ -220,16 +217,17 @@ typedef enum vpx_scaling_mode_1d {
*/
typedef struct vpx_roi_map {
- unsigned char *roi_map; /**< specify an id between 0 and 3 for each 16x16 region within a frame */
- unsigned int rows; /**< number of rows */
- unsigned int cols; /**< number of cols */
+ /*! An id between 0 and 3 for each 16x16 region within a frame. */
+ unsigned char *roi_map;
+ unsigned int rows; /**< Number of rows. */
+ unsigned int cols; /**< Number of columns. */
// TODO(paulwilkins): broken for VP9 which has 8 segments
// q and loop filter deltas for each segment
// (see MAX_MB_SEGMENTS)
- int delta_q[4];
- int delta_lf[4];
- // Static breakout threshold for each segment
- unsigned int static_threshold[4];
+ int delta_q[4]; /**< Quantizer deltas. */
+ int delta_lf[4]; /**< Loop filter deltas. */
+ /*! Static breakout threshold for each segment. */
+ unsigned int static_threshold[4];
} vpx_roi_map_t;
/*!\brief vpx active region map
@@ -280,6 +278,23 @@ typedef enum {
VP8_TUNE_SSIM
} vp8e_tuning;
+/*!\brief vp9 svc parameters
+ *
+ * This defines parameters for svc encoding.
+ *
+ */
+typedef struct vpx_svc_parameters {
+ unsigned int width; /**< width of current spatial layer */
+ unsigned int height; /**< height of current spatial layer */
+ int layer; /**< current layer number - 0 = base */
+ int flags; /**< encode frame flags */
+ int max_quantizer; /**< max quantizer for current layer */
+ int min_quantizer; /**< min quantizer for current layer */
+ int distance_from_i_frame; /**< frame number within current gop */
+ int lst_fb_idx; /**< last frame frame buffer index */
+ int gld_fb_idx; /**< golden frame frame buffer index */
+ int alt_fb_idx; /**< alt reference frame frame buffer index */
+} vpx_svc_parameters_t;
/*!\brief VP8 encoder control function parameter type
*
@@ -300,11 +315,8 @@ VPX_CTRL_USE_TYPE(VP8E_SET_ROI_MAP, vpx_roi_map_t *)
VPX_CTRL_USE_TYPE(VP8E_SET_ACTIVEMAP, vpx_active_map_t *)
VPX_CTRL_USE_TYPE(VP8E_SET_SCALEMODE, vpx_scaling_mode_t *)
-VPX_CTRL_USE_TYPE(VP9E_SET_LAYER, int *)
VPX_CTRL_USE_TYPE(VP9E_SET_SVC, int)
-
-VPX_CTRL_USE_TYPE(VP9E_SET_WIDTH, unsigned int *)
-VPX_CTRL_USE_TYPE(VP9E_SET_HEIGHT, unsigned int *)
+VPX_CTRL_USE_TYPE(VP9E_SET_SVC_PARAMETERS, vpx_svc_parameters_t *)
VPX_CTRL_USE_TYPE(VP8E_SET_CPUUSED, int)
VPX_CTRL_USE_TYPE(VP8E_SET_ENABLEAUTOALTREF, unsigned int)
@@ -331,8 +343,9 @@ VPX_CTRL_USE_TYPE(VP9E_SET_LOSSLESS, unsigned int)
VPX_CTRL_USE_TYPE(VP9E_SET_FRAME_PARALLEL_DECODING, unsigned int)
-VPX_CTRL_USE_TYPE(VP9E_SET_MAX_Q, unsigned int)
-VPX_CTRL_USE_TYPE(VP9E_SET_MIN_Q, unsigned int)
/*! @} - end defgroup vp8_encoder */
-#include "vpx_codec_impl_bottom.h"
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
#endif