Message ID | tencent_5F9E35ED3E5756A39C4AE1885A2835398009@qq.com |
---|---|
State | Accepted |
Commit | c41761676276968b9f2f33c5c62357cde3a51dbc |
Headers | show |
Series | [FFmpeg-devel] lavc/{av1, h264, h265}_metadata_bsf: fix description of tick_rate | expand |
Context | Check | Description |
---|---|---|
andriy/commit_msg_x86 | warning | The first line of the commit message must start with a context terminated by a colon and a space, for example "lavu/opt: " or "doc: ". |
andriy/make_x86 | success | Make finished |
andriy/make_fate_x86 | success | Make fate finished |
andriy/commit_msg_ppc | warning | The first line of the commit message must start with a context terminated by a colon and a space, for example "lavu/opt: " or "doc: ". |
andriy/make_ppc | success | Make finished |
andriy/make_fate_ppc | success | Make fate finished |
Ping for review. > On Aug 27, 2021, at 3:13 PM, Zhao Zhili <quinkblack@foxmail.com> wrote: > > Users may take the description literally which leads to inverted > results. > --- > doc/bitstream_filters.texi | 8 ++++---- > libavcodec/av1_metadata_bsf.c | 2 +- > libavcodec/h264_metadata_bsf.c | 2 +- > libavcodec/h265_metadata_bsf.c | 2 +- > 4 files changed, 7 insertions(+), 7 deletions(-) > > diff --git a/doc/bitstream_filters.texi b/doc/bitstream_filters.texi > index 1900eb4352..6051dc28d2 100644 > --- a/doc/bitstream_filters.texi > +++ b/doc/bitstream_filters.texi > @@ -81,7 +81,7 @@ Top-left position. > @end table > > @item tick_rate > -Set the tick rate (@emph{num_units_in_display_tick / time_scale}) in > +Set the tick rate (@emph{time_scale / num_units_in_display_tick}) in > the timing info in the sequence header. > @item num_ticks_per_picture > Set the number of ticks in each picture, to indicate that the stream > @@ -244,7 +244,7 @@ Set the chroma sample location in the stream (see H.264 section > E.2.1 and figure E-1). > > @item tick_rate > -Set the tick rate (num_units_in_tick / time_scale) in the VUI > +Set the tick rate (time_scale / num_units_in_tick) in the VUI > parameters. This is the smallest time unit representable in the > stream, and in many cases represents the field rate of the stream > (double the frame rate). > @@ -352,8 +352,8 @@ Set the chroma sample location in the stream (see H.265 section > E.3.1 and figure E.1). > > @item tick_rate > -Set the tick rate in the VPS and VUI parameters (num_units_in_tick / > -time_scale). Combined with @option{num_ticks_poc_diff_one}, this can > +Set the tick rate in the VPS and VUI parameters (time_scale / > +num_units_in_tick). Combined with @option{num_ticks_poc_diff_one}, this can > set a constant framerate in the stream. Note that it is likely to be > overridden by container parameters when the stream is in a container. > > diff --git a/libavcodec/av1_metadata_bsf.c b/libavcodec/av1_metadata_bsf.c > index 1fb85d88b7..c52673bf6a 100644 > --- a/libavcodec/av1_metadata_bsf.c > +++ b/libavcodec/av1_metadata_bsf.c > @@ -194,7 +194,7 @@ static const AVOption av1_metadata_options[] = { > { "colocated", "Top-left chroma sample position", 0, AV_OPT_TYPE_CONST, > { .i64 = AV1_CSP_COLOCATED }, .flags = FLAGS, .unit = "csp" }, > > - { "tick_rate", "Set display tick rate (num_units_in_display_tick / time_scale)", > + { "tick_rate", "Set display tick rate (time_scale / num_units_in_display_tick)", > OFFSET(tick_rate), AV_OPT_TYPE_RATIONAL, > { .dbl = 0.0 }, 0, UINT_MAX, FLAGS }, > { "num_ticks_per_picture", "Set display ticks per picture for CFR streams", > diff --git a/libavcodec/h264_metadata_bsf.c b/libavcodec/h264_metadata_bsf.c > index 452a8ec5dc..c79d91dcef 100644 > --- a/libavcodec/h264_metadata_bsf.c > +++ b/libavcodec/h264_metadata_bsf.c > @@ -617,7 +617,7 @@ static const AVOption h264_metadata_options[] = { > OFFSET(chroma_sample_loc_type), AV_OPT_TYPE_INT, > { .i64 = -1 }, -1, 6, FLAGS }, > > - { "tick_rate", "Set VUI tick rate (num_units_in_tick / time_scale)", > + { "tick_rate", "Set VUI tick rate (time_scale / num_units_in_tick)", > OFFSET(tick_rate), AV_OPT_TYPE_RATIONAL, > { .dbl = 0.0 }, 0, UINT_MAX, FLAGS }, > { "fixed_frame_rate_flag", "Set VUI fixed frame rate flag", > diff --git a/libavcodec/h265_metadata_bsf.c b/libavcodec/h265_metadata_bsf.c > index d841839762..e5f70cfbc1 100644 > --- a/libavcodec/h265_metadata_bsf.c > +++ b/libavcodec/h265_metadata_bsf.c > @@ -439,7 +439,7 @@ static const AVOption h265_metadata_options[] = { > { .i64 = -1 }, -1, 6, FLAGS }, > > { "tick_rate", > - "Set VPS and VUI tick rate (num_units_in_tick / time_scale)", > + "Set VPS and VUI tick rate (time_scale / num_units_in_tick)", > OFFSET(tick_rate), AV_OPT_TYPE_RATIONAL, > { .dbl = 0.0 }, 0, UINT_MAX, FLAGS }, > { "num_ticks_poc_diff_one", > -- > 2.31.1 > > _______________________________________________ > 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". >
> On Sep 29, 2021, at 11:21 AM, zhilizhao(赵志立) <quinkblack@foxmail.com> wrote: > > Ping for review. > >> On Aug 27, 2021, at 3:13 PM, Zhao Zhili <quinkblack@foxmail.com> wrote: >> >> Users may take the description literally which leads to inverted >> results. >> --- >> doc/bitstream_filters.texi | 8 ++++---- >> libavcodec/av1_metadata_bsf.c | 2 +- >> libavcodec/h264_metadata_bsf.c | 2 +- >> libavcodec/h265_metadata_bsf.c | 2 +- >> 4 files changed, 7 insertions(+), 7 deletions(-) >> > Ping.
On Fri, Aug 27, 2021 at 3:14 PM Zhao Zhili <quinkblack@foxmail.com> wrote: > > Users may take the description literally which leads to inverted > results. > --- > doc/bitstream_filters.texi | 8 ++++---- > libavcodec/av1_metadata_bsf.c | 2 +- > libavcodec/h264_metadata_bsf.c | 2 +- > libavcodec/h265_metadata_bsf.c | 2 +- > 4 files changed, 7 insertions(+), 7 deletions(-) > > diff --git a/doc/bitstream_filters.texi b/doc/bitstream_filters.texi > index 1900eb4352..6051dc28d2 100644 > --- a/doc/bitstream_filters.texi > +++ b/doc/bitstream_filters.texi > @@ -81,7 +81,7 @@ Top-left position. > @end table > > @item tick_rate > -Set the tick rate (@emph{num_units_in_display_tick / time_scale}) in > +Set the tick rate (@emph{time_scale / num_units_in_display_tick}) in > the timing info in the sequence header. > @item num_ticks_per_picture > Set the number of ticks in each picture, to indicate that the stream > @@ -244,7 +244,7 @@ Set the chroma sample location in the stream (see H.264 section > E.2.1 and figure E-1). > > @item tick_rate > -Set the tick rate (num_units_in_tick / time_scale) in the VUI > +Set the tick rate (time_scale / num_units_in_tick) in the VUI > parameters. This is the smallest time unit representable in the > stream, and in many cases represents the field rate of the stream > (double the frame rate). > @@ -352,8 +352,8 @@ Set the chroma sample location in the stream (see H.265 section > E.3.1 and figure E.1). > > @item tick_rate > -Set the tick rate in the VPS and VUI parameters (num_units_in_tick / > -time_scale). Combined with @option{num_ticks_poc_diff_one}, this can > +Set the tick rate in the VPS and VUI parameters (time_scale / > +num_units_in_tick). Combined with @option{num_ticks_poc_diff_one}, this can > set a constant framerate in the stream. Note that it is likely to be > overridden by container parameters when the stream is in a container. > > diff --git a/libavcodec/av1_metadata_bsf.c b/libavcodec/av1_metadata_bsf.c > index 1fb85d88b7..c52673bf6a 100644 > --- a/libavcodec/av1_metadata_bsf.c > +++ b/libavcodec/av1_metadata_bsf.c > @@ -194,7 +194,7 @@ static const AVOption av1_metadata_options[] = { > { "colocated", "Top-left chroma sample position", 0, AV_OPT_TYPE_CONST, > { .i64 = AV1_CSP_COLOCATED }, .flags = FLAGS, .unit = "csp" }, > > - { "tick_rate", "Set display tick rate (num_units_in_display_tick / time_scale)", > + { "tick_rate", "Set display tick rate (time_scale / num_units_in_display_tick)", > OFFSET(tick_rate), AV_OPT_TYPE_RATIONAL, > { .dbl = 0.0 }, 0, UINT_MAX, FLAGS }, > { "num_ticks_per_picture", "Set display ticks per picture for CFR streams", > diff --git a/libavcodec/h264_metadata_bsf.c b/libavcodec/h264_metadata_bsf.c > index 452a8ec5dc..c79d91dcef 100644 > --- a/libavcodec/h264_metadata_bsf.c > +++ b/libavcodec/h264_metadata_bsf.c > @@ -617,7 +617,7 @@ static const AVOption h264_metadata_options[] = { > OFFSET(chroma_sample_loc_type), AV_OPT_TYPE_INT, > { .i64 = -1 }, -1, 6, FLAGS }, > > - { "tick_rate", "Set VUI tick rate (num_units_in_tick / time_scale)", > + { "tick_rate", "Set VUI tick rate (time_scale / num_units_in_tick)", > OFFSET(tick_rate), AV_OPT_TYPE_RATIONAL, > { .dbl = 0.0 }, 0, UINT_MAX, FLAGS }, > { "fixed_frame_rate_flag", "Set VUI fixed frame rate flag", > diff --git a/libavcodec/h265_metadata_bsf.c b/libavcodec/h265_metadata_bsf.c > index d841839762..e5f70cfbc1 100644 > --- a/libavcodec/h265_metadata_bsf.c > +++ b/libavcodec/h265_metadata_bsf.c > @@ -439,7 +439,7 @@ static const AVOption h265_metadata_options[] = { > { .i64 = -1 }, -1, 6, FLAGS }, > > { "tick_rate", > - "Set VPS and VUI tick rate (num_units_in_tick / time_scale)", > + "Set VPS and VUI tick rate (time_scale / num_units_in_tick)", > OFFSET(tick_rate), AV_OPT_TYPE_RATIONAL, > { .dbl = 0.0 }, 0, UINT_MAX, FLAGS }, > { "num_ticks_poc_diff_one", > -- Patch is Ok,tick rate is likes to frame rate, so time_scale / num_units_in_tick is the correct way to calculate it. Thx
On Tue, Dec 14, 2021 at 11:26 AM mypopy@gmail.com <mypopy@gmail.com> wrote: > > On Fri, Aug 27, 2021 at 3:14 PM Zhao Zhili <quinkblack@foxmail.com> wrote: > > > > Users may take the description literally which leads to inverted > > results. > > --- > > doc/bitstream_filters.texi | 8 ++++---- > > libavcodec/av1_metadata_bsf.c | 2 +- > > libavcodec/h264_metadata_bsf.c | 2 +- > > libavcodec/h265_metadata_bsf.c | 2 +- > > 4 files changed, 7 insertions(+), 7 deletions(-) > > > > diff --git a/doc/bitstream_filters.texi b/doc/bitstream_filters.texi > > index 1900eb4352..6051dc28d2 100644 > > --- a/doc/bitstream_filters.texi > > +++ b/doc/bitstream_filters.texi > > @@ -81,7 +81,7 @@ Top-left position. > > @end table > > > > @item tick_rate > > -Set the tick rate (@emph{num_units_in_display_tick / time_scale}) in > > +Set the tick rate (@emph{time_scale / num_units_in_display_tick}) in > > the timing info in the sequence header. > > @item num_ticks_per_picture > > Set the number of ticks in each picture, to indicate that the stream > > @@ -244,7 +244,7 @@ Set the chroma sample location in the stream (see H.264 section > > E.2.1 and figure E-1). > > > > @item tick_rate > > -Set the tick rate (num_units_in_tick / time_scale) in the VUI > > +Set the tick rate (time_scale / num_units_in_tick) in the VUI > > parameters. This is the smallest time unit representable in the > > stream, and in many cases represents the field rate of the stream > > (double the frame rate). > > @@ -352,8 +352,8 @@ Set the chroma sample location in the stream (see H.265 section > > E.3.1 and figure E.1). > > > > @item tick_rate > > -Set the tick rate in the VPS and VUI parameters (num_units_in_tick / > > -time_scale). Combined with @option{num_ticks_poc_diff_one}, this can > > +Set the tick rate in the VPS and VUI parameters (time_scale / > > +num_units_in_tick). Combined with @option{num_ticks_poc_diff_one}, this can > > set a constant framerate in the stream. Note that it is likely to be > > overridden by container parameters when the stream is in a container. > > > > diff --git a/libavcodec/av1_metadata_bsf.c b/libavcodec/av1_metadata_bsf.c > > index 1fb85d88b7..c52673bf6a 100644 > > --- a/libavcodec/av1_metadata_bsf.c > > +++ b/libavcodec/av1_metadata_bsf.c > > @@ -194,7 +194,7 @@ static const AVOption av1_metadata_options[] = { > > { "colocated", "Top-left chroma sample position", 0, AV_OPT_TYPE_CONST, > > { .i64 = AV1_CSP_COLOCATED }, .flags = FLAGS, .unit = "csp" }, > > > > - { "tick_rate", "Set display tick rate (num_units_in_display_tick / time_scale)", > > + { "tick_rate", "Set display tick rate (time_scale / num_units_in_display_tick)", > > OFFSET(tick_rate), AV_OPT_TYPE_RATIONAL, > > { .dbl = 0.0 }, 0, UINT_MAX, FLAGS }, > > { "num_ticks_per_picture", "Set display ticks per picture for CFR streams", > > diff --git a/libavcodec/h264_metadata_bsf.c b/libavcodec/h264_metadata_bsf.c > > index 452a8ec5dc..c79d91dcef 100644 > > --- a/libavcodec/h264_metadata_bsf.c > > +++ b/libavcodec/h264_metadata_bsf.c > > @@ -617,7 +617,7 @@ static const AVOption h264_metadata_options[] = { > > OFFSET(chroma_sample_loc_type), AV_OPT_TYPE_INT, > > { .i64 = -1 }, -1, 6, FLAGS }, > > > > - { "tick_rate", "Set VUI tick rate (num_units_in_tick / time_scale)", > > + { "tick_rate", "Set VUI tick rate (time_scale / num_units_in_tick)", > > OFFSET(tick_rate), AV_OPT_TYPE_RATIONAL, > > { .dbl = 0.0 }, 0, UINT_MAX, FLAGS }, > > { "fixed_frame_rate_flag", "Set VUI fixed frame rate flag", > > diff --git a/libavcodec/h265_metadata_bsf.c b/libavcodec/h265_metadata_bsf.c > > index d841839762..e5f70cfbc1 100644 > > --- a/libavcodec/h265_metadata_bsf.c > > +++ b/libavcodec/h265_metadata_bsf.c > > @@ -439,7 +439,7 @@ static const AVOption h265_metadata_options[] = { > > { .i64 = -1 }, -1, 6, FLAGS }, > > > > { "tick_rate", > > - "Set VPS and VUI tick rate (num_units_in_tick / time_scale)", > > + "Set VPS and VUI tick rate (time_scale / num_units_in_tick)", > > OFFSET(tick_rate), AV_OPT_TYPE_RATIONAL, > > { .dbl = 0.0 }, 0, UINT_MAX, FLAGS }, > > { "num_ticks_poc_diff_one", > > -- > > Patch is Ok,tick rate is likes to frame rate, so time_scale / > num_units_in_tick is the correct way to calculate it. Thx Will apply if no other comments after 3 days, thx
diff --git a/doc/bitstream_filters.texi b/doc/bitstream_filters.texi index 1900eb4352..6051dc28d2 100644 --- a/doc/bitstream_filters.texi +++ b/doc/bitstream_filters.texi @@ -81,7 +81,7 @@ Top-left position. @end table @item tick_rate -Set the tick rate (@emph{num_units_in_display_tick / time_scale}) in +Set the tick rate (@emph{time_scale / num_units_in_display_tick}) in the timing info in the sequence header. @item num_ticks_per_picture Set the number of ticks in each picture, to indicate that the stream @@ -244,7 +244,7 @@ Set the chroma sample location in the stream (see H.264 section E.2.1 and figure E-1). @item tick_rate -Set the tick rate (num_units_in_tick / time_scale) in the VUI +Set the tick rate (time_scale / num_units_in_tick) in the VUI parameters. This is the smallest time unit representable in the stream, and in many cases represents the field rate of the stream (double the frame rate). @@ -352,8 +352,8 @@ Set the chroma sample location in the stream (see H.265 section E.3.1 and figure E.1). @item tick_rate -Set the tick rate in the VPS and VUI parameters (num_units_in_tick / -time_scale). Combined with @option{num_ticks_poc_diff_one}, this can +Set the tick rate in the VPS and VUI parameters (time_scale / +num_units_in_tick). Combined with @option{num_ticks_poc_diff_one}, this can set a constant framerate in the stream. Note that it is likely to be overridden by container parameters when the stream is in a container. diff --git a/libavcodec/av1_metadata_bsf.c b/libavcodec/av1_metadata_bsf.c index 1fb85d88b7..c52673bf6a 100644 --- a/libavcodec/av1_metadata_bsf.c +++ b/libavcodec/av1_metadata_bsf.c @@ -194,7 +194,7 @@ static const AVOption av1_metadata_options[] = { { "colocated", "Top-left chroma sample position", 0, AV_OPT_TYPE_CONST, { .i64 = AV1_CSP_COLOCATED }, .flags = FLAGS, .unit = "csp" }, - { "tick_rate", "Set display tick rate (num_units_in_display_tick / time_scale)", + { "tick_rate", "Set display tick rate (time_scale / num_units_in_display_tick)", OFFSET(tick_rate), AV_OPT_TYPE_RATIONAL, { .dbl = 0.0 }, 0, UINT_MAX, FLAGS }, { "num_ticks_per_picture", "Set display ticks per picture for CFR streams", diff --git a/libavcodec/h264_metadata_bsf.c b/libavcodec/h264_metadata_bsf.c index 452a8ec5dc..c79d91dcef 100644 --- a/libavcodec/h264_metadata_bsf.c +++ b/libavcodec/h264_metadata_bsf.c @@ -617,7 +617,7 @@ static const AVOption h264_metadata_options[] = { OFFSET(chroma_sample_loc_type), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 6, FLAGS }, - { "tick_rate", "Set VUI tick rate (num_units_in_tick / time_scale)", + { "tick_rate", "Set VUI tick rate (time_scale / num_units_in_tick)", OFFSET(tick_rate), AV_OPT_TYPE_RATIONAL, { .dbl = 0.0 }, 0, UINT_MAX, FLAGS }, { "fixed_frame_rate_flag", "Set VUI fixed frame rate flag", diff --git a/libavcodec/h265_metadata_bsf.c b/libavcodec/h265_metadata_bsf.c index d841839762..e5f70cfbc1 100644 --- a/libavcodec/h265_metadata_bsf.c +++ b/libavcodec/h265_metadata_bsf.c @@ -439,7 +439,7 @@ static const AVOption h265_metadata_options[] = { { .i64 = -1 }, -1, 6, FLAGS }, { "tick_rate", - "Set VPS and VUI tick rate (num_units_in_tick / time_scale)", + "Set VPS and VUI tick rate (time_scale / num_units_in_tick)", OFFSET(tick_rate), AV_OPT_TYPE_RATIONAL, { .dbl = 0.0 }, 0, UINT_MAX, FLAGS }, { "num_ticks_poc_diff_one",