Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(13)

Unified Diff: source/libvpx/vpx/vp8cx.h

Issue 1169543007: libvpx: Pull from upstream (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/libvpx.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « source/libvpx/vpx/svc_context.h ('k') | source/libvpx/vpx/vp8dx.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: source/libvpx/vpx/vp8cx.h
diff --git a/source/libvpx/vpx/vp8cx.h b/source/libvpx/vpx/vp8cx.h
index db31d42afbff75fea6512d8504499f2d2a0f314d..19bc4bdcce110cbd1fc31f93b28c8d01468cbabc 100644
--- a/source/libvpx/vpx/vp8cx.h
+++ b/source/libvpx/vpx/vp8cx.h
@@ -450,7 +450,6 @@ enum vp8e_enc_control_id {
*/
VP9E_SET_SVC,
-#if VPX_ENCODER_ABI_VERSION > (4 + VPX_CODEC_ABI_VERSION)
/*!\brief Codec control function to set parameters for SVC.
* \note Parameters contain min_q, max_q, scaling factor for each of the
* SVC layers.
@@ -458,7 +457,6 @@ enum vp8e_enc_control_id {
* Supported in codecs: VP9
*/
VP9E_SET_SVC_PARAMETERS,
-#endif
/*!\brief Codec control function to set svc layer for spatial and temporal.
* \note Valid ranges: 0..#vpx_codec_enc_cfg::ss_number_layers for spatial
@@ -478,7 +476,6 @@ enum vp8e_enc_control_id {
*/
VP9E_SET_TUNE_CONTENT,
-#if VPX_ENCODER_ABI_VERSION > (4 + VPX_CODEC_ABI_VERSION)
/*!\brief Codec control function to get svc layer ID.
* \note The layer ID returned is for the data packet from the registered
* callback function.
@@ -494,7 +491,6 @@ enum vp8e_enc_control_id {
* Supported in codecs: VP9
*/
VP9E_REGISTER_CX_CALLBACK,
-#endif
/*!\brief Codec control function to set color space info.
* \note Valid ranges: 0..7, default is "UNKNOWN".
@@ -511,6 +507,17 @@ enum vp8e_enc_control_id {
*/
VP9E_SET_COLOR_SPACE,
+ /*!\brief Codec control function to set temporal layering mode.
+ * \note Valid ranges: 0..3, default is "0" (VP9E_TEMPORAL_LAYERING_MODE_NOLAYERING).
+ * 0 = VP9E_TEMPORAL_LAYERING_MODE_NOLAYERING
+ * 1 = VP9E_TEMPORAL_LAYERING_MODE_BYPASS
+ * 2 = VP9E_TEMPORAL_LAYERING_MODE_0101
+ * 3 = VP9E_TEMPORAL_LAYERING_MODE_0212
+ *
+ * Supported in codecs: VP9
+ */
+ VP9E_SET_TEMPORAL_LAYERING_MODE,
+
/*!\brief Codec control function to get an Active map back from the encoder.
*
* Supported in codecs: VP9
@@ -529,6 +536,32 @@ typedef enum vpx_scaling_mode_1d {
VP8E_ONETWO = 3
} VPX_SCALING_MODE;
+/*!\brief Temporal layering mode enum for VP9 SVC.
+ *
+ * This set of macros define the different temporal layering modes.
+ * Supported codecs: VP9 (in SVC mode)
+ *
+ */
+typedef enum vp9e_temporal_layering_mode {
+ /*!\brief No temporal layering.
+ * Used when only spatial layering is used.
+ */
+ VP9E_TEMPORAL_LAYERING_MODE_NOLAYERING = 0,
+
+ /*!\brief Bypass mode.
+ * Used when application needs to control temporal layering.
+ * This will only work when the number of spatial layers equals 1.
+ */
+ VP9E_TEMPORAL_LAYERING_MODE_BYPASS = 1,
+
+ /*!\brief 0-1-0-1... temporal layering scheme with two temporal layers.
+ */
+ VP9E_TEMPORAL_LAYERING_MODE_0101 = 2,
+
+ /*!\brief 0-2-1-2... temporal layering scheme with three temporal layers.
+ */
+ VP9E_TEMPORAL_LAYERING_MODE_0212 = 3
+} VP9E_TEMPORAL_LAYERING_MODE;
/*!\brief vpx region of interest map
*
@@ -604,7 +637,6 @@ typedef enum {
VP8_TUNE_SSIM
} vp8e_tuning;
-#if VPX_ENCODER_ABI_VERSION > (4 + VPX_CODEC_ABI_VERSION)
/*!\brief vp9 svc layer parameters
*
* This defines the spatial and temporal layer id numbers for svc encoding.
@@ -616,18 +648,6 @@ typedef struct vpx_svc_layer_id {
int spatial_layer_id; /**< Spatial layer id number. */
int temporal_layer_id; /**< Temporal layer id number. */
} vpx_svc_layer_id_t;
-#else
-/*!\brief vp9 svc layer parameters
- *
- * This defines the temporal layer id numbers for svc encoding.
- * This is used with the #VP9E_SET_SVC_LAYER_ID control to set the
- * temporal layer id for the current frame.
- *
- */
-typedef struct vpx_svc_layer_id {
- int temporal_layer_id; /**< Temporal layer id number. */
-} vpx_svc_layer_id_t;
-#endif
/*!\brief VP8 encoder control function parameter type
*
@@ -651,10 +671,8 @@ 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_SVC, int)
-#if VPX_ENCODER_ABI_VERSION > (4 + VPX_CODEC_ABI_VERSION)
VPX_CTRL_USE_TYPE(VP9E_SET_SVC_PARAMETERS, void *)
VPX_CTRL_USE_TYPE(VP9E_REGISTER_CX_CALLBACK, void *)
-#endif
VPX_CTRL_USE_TYPE(VP9E_SET_SVC_LAYER_ID, vpx_svc_layer_id_t *)
VPX_CTRL_USE_TYPE(VP8E_SET_CPUUSED, int)
@@ -675,9 +693,7 @@ VPX_CTRL_USE_TYPE(VP9E_SET_TILE_ROWS, int)
VPX_CTRL_USE_TYPE(VP8E_GET_LAST_QUANTIZER, int *)
VPX_CTRL_USE_TYPE(VP8E_GET_LAST_QUANTIZER_64, int *)
-#if VPX_ENCODER_ABI_VERSION > (4 + VPX_CODEC_ABI_VERSION)
VPX_CTRL_USE_TYPE(VP9E_GET_SVC_LAYER_ID, vpx_svc_layer_id_t *)
-#endif
VPX_CTRL_USE_TYPE(VP8E_SET_MAX_INTRA_BITRATE_PCT, unsigned int)
VPX_CTRL_USE_TYPE(VP8E_SET_MAX_INTER_BITRATE_PCT, unsigned int)
« no previous file with comments | « source/libvpx/vpx/svc_context.h ('k') | source/libvpx/vpx/vp8dx.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698