[FFmpeg-devel] [PATCH v2 2/2] avcodec/noise: allow various cadence for dropping packets
Michael Niedermayer
michael at niedermayer.cc
Fri Jul 23 22:49:01 EEST 2021
On Fri, Jul 23, 2021 at 04:04:50PM +0530, Gyan Doshi wrote:
> Packets can now be dropped at fixed intervals or
> with varying degrees of irregularity
> ---
> doc/bitstream_filters.texi | 22 +++++++
> libavcodec/noise_bsf.c | 65 +++++++++++++++----
> libavcodec/version.h | 2 +-
> .../fate/matroska-mastering-display-metadata | 5 +-
> 4 files changed, 76 insertions(+), 18 deletions(-)
>
> diff --git a/doc/bitstream_filters.texi b/doc/bitstream_filters.texi
> index 2b84bda1fc..4ab6cc15ab 100644
> --- a/doc/bitstream_filters.texi
> +++ b/doc/bitstream_filters.texi
> @@ -539,6 +539,22 @@ with @var{1} meaning every byte is modified. Default is @var{0}.
> @item dropamount
> Accepts a positive integer. Lower the value, more frequently packets will be dropped,
> with @var{1} meaning every packet is dropped. Default is @var{0}.
> + at item drop_pattern
> +Regulate how packets are dropped, starting with packet index of @var{drop_offset}.
> +Possible values are
> + at table @option
> + at item 0 (@emph{default})
> +Drop at fixed intervals of @var{dropamount}, e.g. with dropamount @var{5} and drop_offset @var{2},
> +packets no. @code{2, 7, 12...} will be dropped.
> + at item 1
> +Drop a random packet in each interval of size @var{dropamount}.
> + at item 2
> +Drop a random packet in roughly inverse frequency to @var{dropamount}. Over a short range of packets,
> +the drop frequency is less stable than pattern value @var{1}.
> + at end table
> + at item drop_offset
> +Accepts a positive integer. Represents the index of the first packet at which drop evaluations
> +start. Default is @var{0}.
> @end table
I suggest that if a more powerful& fancy logic is added then libavutil/eval is
used, its more generic and it uses the same syntax&functions used in many other
places in ffmpeg.
it could do all kinds of interresting things like droping packets based on
their number, size, content, timestamp, duration
thx
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
I am the wisest man alive, for I know one thing, and that is that I know
nothing. -- Socrates
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20210723/91d5adcf/attachment.sig>
More information about the ffmpeg-devel
mailing list