diff mbox

[FFmpeg-devel] doc/encoders: add VP9 temporal scalability encoding option

Message ID 20191216222141.68466-1-wonkap@google.com
State New
Headers show

Commit Message

Wonkap Jang Dec. 16, 2019, 10:21 p.m. UTC
Documentation change for adding support for encoding
with temporal scalability in VP9.
---
 doc/encoders.texi | 23 ++++++++++++++++++-----
 1 file changed, 18 insertions(+), 5 deletions(-)

Comments

James Zern Dec. 18, 2019, 1:52 a.m. UTC | #1
Hi,

On Mon, Dec 16, 2019 at 2:21 PM Wonkap Jang
<wonkap-at-google.com@ffmpeg.org> wrote:
>
> Documentation change for adding support for encoding
> with temporal scalability in VP9.
> ---

This part sounds related to the other patches you're sending. The
documentation can be added with the code change for vp9.

>  doc/encoders.texi | 23 ++++++++++++++++++-----
>  1 file changed, 18 insertions(+), 5 deletions(-)
>
> diff --git a/doc/encoders.texi b/doc/encoders.texi
> index 4ee518a124..7efc446a6c 100644
> --- a/doc/encoders.texi
> +++ b/doc/encoders.texi
> [...]
>  ffmpeg -i INPUT -c:v libvpx -ts-parameters ts_number_layers=3:\
> -ts_target_bitrate=250000,500000,1000000:ts_rate_decimator=4,2,1:\
> -ts_periodicity=4:ts_layer_id=0,2,1,2 OUTPUT
> +ts_target_bitrate=250,500,1000:ts_rate_decimator=4,2,1:\
> +ts_periodicity=4:ts_layer_id=0,2,1,2:ts_layering_mode=3 OUTPUT
>  @end example
>  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
> @@ -1903,13 +1901,28 @@ details.
>  @item ts_number_layers
>  Number of temporal coding layers.
>  @item ts_target_bitrate
> -Target bitrate for each temporal layer.
> +Target bitrate for each temporal layer in kbps.
> +(bitrate should be inclusive of the lower temporal layer).

This portion is a bug fix for the existing docs (bps -> kbps). Can you
split this out to its own patch?
Wonkap Jang Dec. 18, 2019, 6:08 p.m. UTC | #2
Hi James,

Some of the changes are on lines right next to each other, and will cause
conflict... I could make it a separate commit...
Would that work?
So, I would make docs into two separate commits and the code already has
two commits... so overall 4 commits in succession.

Would this work?

Thank you,

Wonkap


On Tue, Dec 17, 2019 at 5:59 PM James Zern <jzern-at-google.com@ffmpeg.org>
wrote:

> Hi,
>
> On Mon, Dec 16, 2019 at 2:21 PM Wonkap Jang
> <wonkap-at-google.com@ffmpeg.org> wrote:
> >
> > Documentation change for adding support for encoding
> > with temporal scalability in VP9.
> > ---
>
> This part sounds related to the other patches you're sending. The
> documentation can be added with the code change for vp9.
>
> >  doc/encoders.texi | 23 ++++++++++++++++++-----
> >  1 file changed, 18 insertions(+), 5 deletions(-)
> >
> > diff --git a/doc/encoders.texi b/doc/encoders.texi
> > index 4ee518a124..7efc446a6c 100644
> > --- a/doc/encoders.texi
> > +++ b/doc/encoders.texi
> > [...]
> >  ffmpeg -i INPUT -c:v libvpx -ts-parameters ts_number_layers=3:\
> > -ts_target_bitrate=250000,500000,1000000:ts_rate_decimator=4,2,1:\
> > -ts_periodicity=4:ts_layer_id=0,2,1,2 OUTPUT
> > +ts_target_bitrate=250,500,1000:ts_rate_decimator=4,2,1:\
> > +ts_periodicity=4:ts_layer_id=0,2,1,2:ts_layering_mode=3 OUTPUT
> >  @end example
> >  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
> > @@ -1903,13 +1901,28 @@ details.
> >  @item ts_number_layers
> >  Number of temporal coding layers.
> >  @item ts_target_bitrate
> > -Target bitrate for each temporal layer.
> > +Target bitrate for each temporal layer in kbps.
> > +(bitrate should be inclusive of the lower temporal layer).
>
> This portion is a bug fix for the existing docs (bps -> kbps). Can you
> split this out to its own patch?
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
James Zern Dec. 18, 2019, 9:37 p.m. UTC | #3
Hi,

On Wed, Dec 18, 2019 at 10:16 AM Wonkap Jang <wonkapjang@gmail.com> wrote:
>
> Hi James,
>
> Some of the changes are on lines right next to each other, and will cause
> conflict... I could make it a separate commit...
> Would that work?
> So, I would make docs into two separate commits and the code already has
> two commits... so overall 4 commits in succession.
>

The doc fix should land quickly, so the other could be rebased after that.

> Would this work?
>
> Thank you,
>
> Wonkap
>
>
> On Tue, Dec 17, 2019 at 5:59 PM James Zern <jzern-at-google.com@ffmpeg.org>
> wrote:
>
> > Hi,
> >
> > On Mon, Dec 16, 2019 at 2:21 PM Wonkap Jang
> > <wonkap-at-google.com@ffmpeg.org> wrote:
> > >
> > > Documentation change for adding support for encoding
> > > with temporal scalability in VP9.
> > > ---
> >
> > This part sounds related to the other patches you're sending. The
> > documentation can be added with the code change for vp9.
> >
> > >  doc/encoders.texi | 23 ++++++++++++++++++-----
> > >  1 file changed, 18 insertions(+), 5 deletions(-)
> > >
> > > diff --git a/doc/encoders.texi b/doc/encoders.texi
> > > index 4ee518a124..7efc446a6c 100644
> > > --- a/doc/encoders.texi
> > > +++ b/doc/encoders.texi
> > > [...]
> > >  ffmpeg -i INPUT -c:v libvpx -ts-parameters ts_number_layers=3:\
> > > -ts_target_bitrate=250000,500000,1000000:ts_rate_decimator=4,2,1:\
> > > -ts_periodicity=4:ts_layer_id=0,2,1,2 OUTPUT
> > > +ts_target_bitrate=250,500,1000:ts_rate_decimator=4,2,1:\
> > > +ts_periodicity=4:ts_layer_id=0,2,1,2:ts_layering_mode=3 OUTPUT
> > >  @end example
> > >  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
> > > @@ -1903,13 +1901,28 @@ details.
> > >  @item ts_number_layers
> > >  Number of temporal coding layers.
> > >  @item ts_target_bitrate
> > > -Target bitrate for each temporal layer.
> > > +Target bitrate for each temporal layer in kbps.
> > > +(bitrate should be inclusive of the lower temporal layer).
> >
> > This portion is a bug fix for the existing docs (bps -> kbps). Can you
> > split this out to its own patch?
> > _______________________________________________
> > ffmpeg-devel mailing list
> > ffmpeg-devel@ffmpeg.org
> > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> >
> > To unsubscribe, visit link above, or email
> > ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
Wonkap Jang Dec. 18, 2019, 10:08 p.m. UTC | #4
Will do.

Thanks!

Wonkap

On Wed, Dec 18, 2019 at 1:37 PM James Zern <jzern-at-google.com@ffmpeg.org>
wrote:

> Hi,
>
> On Wed, Dec 18, 2019 at 10:16 AM Wonkap Jang <wonkapjang@gmail.com> wrote:
> >
> > Hi James,
> >
> > Some of the changes are on lines right next to each other, and will cause
> > conflict... I could make it a separate commit...
> > Would that work?
> > So, I would make docs into two separate commits and the code already has
> > two commits... so overall 4 commits in succession.
> >
>
> The doc fix should land quickly, so the other could be rebased after that.
>
> > Would this work?
> >
> > Thank you,
> >
> > Wonkap
> >
> >
> > On Tue, Dec 17, 2019 at 5:59 PM James Zern <
> jzern-at-google.com@ffmpeg.org>
> > wrote:
> >
> > > Hi,
> > >
> > > On Mon, Dec 16, 2019 at 2:21 PM Wonkap Jang
> > > <wonkap-at-google.com@ffmpeg.org> wrote:
> > > >
> > > > Documentation change for adding support for encoding
> > > > with temporal scalability in VP9.
> > > > ---
> > >
> > > This part sounds related to the other patches you're sending. The
> > > documentation can be added with the code change for vp9.
> > >
> > > >  doc/encoders.texi | 23 ++++++++++++++++++-----
> > > >  1 file changed, 18 insertions(+), 5 deletions(-)
> > > >
> > > > diff --git a/doc/encoders.texi b/doc/encoders.texi
> > > > index 4ee518a124..7efc446a6c 100644
> > > > --- a/doc/encoders.texi
> > > > +++ b/doc/encoders.texi
> > > > [...]
> > > >  ffmpeg -i INPUT -c:v libvpx -ts-parameters ts_number_layers=3:\
> > > > -ts_target_bitrate=250000,500000,1000000:ts_rate_decimator=4,2,1:\
> > > > -ts_periodicity=4:ts_layer_id=0,2,1,2 OUTPUT
> > > > +ts_target_bitrate=250,500,1000:ts_rate_decimator=4,2,1:\
> > > > +ts_periodicity=4:ts_layer_id=0,2,1,2:ts_layering_mode=3 OUTPUT
> > > >  @end example
> > > >  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
> > > > @@ -1903,13 +1901,28 @@ details.
> > > >  @item ts_number_layers
> > > >  Number of temporal coding layers.
> > > >  @item ts_target_bitrate
> > > > -Target bitrate for each temporal layer.
> > > > +Target bitrate for each temporal layer in kbps.
> > > > +(bitrate should be inclusive of the lower temporal layer).
> > >
> > > This portion is a bug fix for the existing docs (bps -> kbps). Can you
> > > split this out to its own patch?
> > > _______________________________________________
> > > ffmpeg-devel mailing list
> > > ffmpeg-devel@ffmpeg.org
> > > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> > >
> > > To unsubscribe, visit link above, or email
> > > ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
> > _______________________________________________
> > ffmpeg-devel mailing list
> > ffmpeg-devel@ffmpeg.org
> > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> >
> > To unsubscribe, visit link above, or email
> > ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
diff mbox

Patch

diff --git a/doc/encoders.texi b/doc/encoders.texi
index 4ee518a124..7efc446a6c 100644
--- a/doc/encoders.texi
+++ b/doc/encoders.texi
@@ -1885,16 +1885,14 @@  Enable error resiliency features.
 Increase sharpness at the expense of lower PSNR.
 The valid range is [0, 7].
 
-@item VP8-specific options
-@table @option
 @item ts-parameters
 Sets the temporal scalability configuration using a :-separated list of
 key=value pairs. For example, to specify temporal scalability parameters
 with @code{ffmpeg}:
 @example
 ffmpeg -i INPUT -c:v libvpx -ts-parameters ts_number_layers=3:\
-ts_target_bitrate=250000,500000,1000000:ts_rate_decimator=4,2,1:\
-ts_periodicity=4:ts_layer_id=0,2,1,2 OUTPUT
+ts_target_bitrate=250,500,1000:ts_rate_decimator=4,2,1:\
+ts_periodicity=4:ts_layer_id=0,2,1,2:ts_layering_mode=3 OUTPUT
 @end example
 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
@@ -1903,13 +1901,28 @@  details.
 @item ts_number_layers
 Number of temporal coding layers.
 @item ts_target_bitrate
-Target bitrate for each temporal layer.
+Target bitrate for each temporal layer in kbps.
+(bitrate should be inclusive of the lower temporal layer).
 @item ts_rate_decimator
 Frame rate decimation factor for each temporal layer.
 @item ts_periodicity
 Length of the sequence defining frame temporal layer membership.
 @item ts_layer_id
 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