Commit b9309825 authored by Wonkap Jang's avatar Wonkap Jang Committed by James Zern

avcodec/libvpxenc: add VP9 temporal scalability encoding option

This commit reuses the configuration options for VP8 that enables
temporal scalability for VP9. It also adds a way to enable three
preset temporal structures (refer to the documentation for more
detail) that can be used in offline encoding.
Signed-off-by: 's avatarJames Zern <jzern@google.com>
parent c4e29d0b
...@@ -1888,8 +1888,6 @@ Enable error resiliency features. ...@@ -1888,8 +1888,6 @@ Enable error resiliency features.
Increase sharpness at the expense of lower PSNR. Increase sharpness at the expense of lower PSNR.
The valid range is [0, 7]. The valid range is [0, 7].
@item VP8-specific options
@table @option
@item ts-parameters @item ts-parameters
Sets the temporal scalability configuration using a :-separated list of Sets the temporal scalability configuration using a :-separated list of
key=value pairs. For example, to specify temporal scalability parameters key=value pairs. For example, to specify temporal scalability parameters
...@@ -1897,7 +1895,7 @@ with @code{ffmpeg}: ...@@ -1897,7 +1895,7 @@ with @code{ffmpeg}:
@example @example
ffmpeg -i INPUT -c:v libvpx -ts-parameters ts_number_layers=3:\ ffmpeg -i INPUT -c:v libvpx -ts-parameters ts_number_layers=3:\
ts_target_bitrate=250,500,1000:ts_rate_decimator=4,2,1:\ ts_target_bitrate=250,500,1000:ts_rate_decimator=4,2,1:\
ts_periodicity=4:ts_layer_id=0,2,1,2 OUTPUT ts_periodicity=4:ts_layer_id=0,2,1,2:ts_layering_mode=3 OUTPUT
@end example @end example
Below is a brief explanation of each of the parameters, please Below is a brief explanation of each of the parameters, please
refer to @code{struct vpx_codec_enc_cfg} in @code{vpx/vpx_encoder.h} for more refer to @code{struct vpx_codec_enc_cfg} in @code{vpx/vpx_encoder.h} for more
...@@ -1914,6 +1912,20 @@ Frame rate decimation factor for each temporal layer. ...@@ -1914,6 +1912,20 @@ Frame rate decimation factor for each temporal layer.
Length of the sequence defining frame temporal layer membership. Length of the sequence defining frame temporal layer membership.
@item ts_layer_id @item ts_layer_id
Template defining the membership of frames to temporal layers. Template defining the membership of frames to temporal layers.
@item ts_layering_mode
(optional) Selecting the temporal structure from a set of pre-defined temporal layering modes.
Currently supports the following options.
@table @option
@item 0
No temporal layering flags are provided internally,
relies on flags being passed in using metadata in AVFrame.
@item 2
Two temporal layers. 0-1...
@item 3
Three temporal layers. 0-2-1-2...; with single reference frame.
@item 4
Same as option "3", except there is a dependency between
the two temporal layer 2 frames within the temporal period.
@end table @end table
@end table @end table
......
This diff is collapsed.
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
#define LIBAVCODEC_VERSION_MAJOR 58 #define LIBAVCODEC_VERSION_MAJOR 58
#define LIBAVCODEC_VERSION_MINOR 67 #define LIBAVCODEC_VERSION_MINOR 67
#define LIBAVCODEC_VERSION_MICRO 100 #define LIBAVCODEC_VERSION_MICRO 101
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \ #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
LIBAVCODEC_VERSION_MINOR, \ LIBAVCODEC_VERSION_MINOR, \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment