Commit Graph

8120 Commits

Author SHA1 Message Date
Gyan Doshi
c5341d415c doc/filters: remove option band in delogo
Deprecated option removed in 74fe697f96 but I forgot to remove
the docs entry.
2021-03-19 17:21:03 +05:30
Gyan Doshi
3a79ab8317 doc/ffmpeg: document parameters set by -target 2021-03-19 17:00:17 +05:30
Andreas Rheinhardt
e8c0bca6bd avutil/adler32: Switch av_adler32_update() to size_t on bump
av_adler32_update() is used by av_hash_update() which will be switched
to size_t at the next bump. So it also has to be made to use size_t.
This is also necessary for framecrcenc.c, because the size of side data
will become a size_t, too.

Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-03-19 04:19:53 +01:00
Andreas Rheinhardt
e318438f2f avformat: Make AVChapter.id an int64_t on next major bump
64 bits are needed in order to retain the uid values of Matroska
chapters; the type is kept signed because the semantics of NUT chapters
depend upon whether the id is > 0 or < 0.

Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-03-19 02:36:58 +01:00
James Almer
d492b17024 doc/examples/vaapi_transcode: use av_packet_alloc() to allocate packets
Signed-off-by: James Almer <jamrial@gmail.com>
2021-03-17 15:19:37 -03:00
James Almer
6394c7d51a doc/examples/vaapi_encode: use av_packet_alloc() to allocate packets
Signed-off-by: James Almer <jamrial@gmail.com>
2021-03-17 15:19:37 -03:00
James Almer
b896832b78 doc/examples/transcoding: use av_packet_alloc() to allocate packets
Signed-off-by: James Almer <jamrial@gmail.com>
2021-03-17 15:19:37 -03:00
James Almer
16dba17329 doc/examples/transcode_aac: use av_packet_alloc() to allocate packets
Signed-off-by: James Almer <jamrial@gmail.com>
2021-03-17 15:19:37 -03:00
James Almer
07b788c8af doc/examples/demuxing_decoding: use av_packet_alloc() to allocate packets
Signed-off-by: James Almer <jamrial@gmail.com>
2021-03-17 15:19:37 -03:00
James Almer
f7db77bd87 avcodec/packet: deprecate av_init_packet()
Once removed, sizeof(AVPacket) will stop being a part of the public ABI.

Signed-off-by: James Almer <jamrial@gmail.com>
2021-03-17 14:12:17 -03:00
Anton Khirnov
7d09579190 lavc: rename AV_CODEC_CAP_AUTO_THREADS->AV_CODEC_CAP_OTHER_THREADS
This cap is currently used to mark multithreading-capable codecs that
wrap external libraries with their own multithreading code. The name is
highly confusing for our API users, since libavcodec ALWAYS handles
thread_count=0 (see commit message in previous commit). Therefore rename
the cap and update its documentation to make its meaning clear.

The old name is kept deprecated until next+1 major bump.
2021-03-16 10:38:41 +01:00
Tobias Rapp
b60fe9508f doc/encoders: Remove text about single bit-depth libx264 support
In the meanwhile libx264 allows to be configured for including both 8/10 bit
support within a single library. The new libx264 interface was enabled in
2f96190732.

Signed-off-by: Tobias Rapp <t.rapp@noa-archive.com>
2021-03-16 08:40:30 +01:00
Michael Niedermayer
cc15bb0bbf doc/APIchanges: Fill in some missing information
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-03-14 23:42:47 +01:00
sgerwk
07de796b5d avdevice/xcbgrab: Add option for grabbing a window
The option allows to select a specific window instead of the whole
screen.

Reviewed-by: Andriy Gelman <andriy.gelman@gmail.com>
Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2021-03-14 18:16:18 -04:00
Gyan Doshi
1d61a31497 doc/filters: note default for zoompan's duration 2021-03-14 14:07:24 +05:30
Marton Balint
5bd1d0f4e7 avformat/librist: clarify and limit buffer_size
As suggested by librist developers.

Signed-off-by: Marton Balint <cus@passwd.hu>
2021-03-13 17:36:48 +01:00
Marton Balint
4217e091fe avformat/librist: increase default loglevel
Also remove AV_LOG_SIMULATE from the list as it is not used directly, and do
not use panic level on unknown loglevel, but make them warn. Also fix mapping of
NOTICE/INFO/VERBOSE and add documentation about when the option should actually
be used.

Signed-off-by: Marton Balint <cus@passwd.hu>
2021-03-13 17:36:48 +01:00
Marton Balint
deffb5ddce avformat/librist: make packet size adjustable for writing, fix it for reading
Maximum packet size is 10000 (RIST_MAX_PACKET_SIZE, which is unfortunately
private) minus the RIST protocol overhead which is 28 bytes for the unencrypted
case, 36 for the encrypted case.

Signed-off-by: Marton Balint <cus@passwd.hu>
2021-03-13 17:36:48 +01:00
Paul B Mahol
4098f809d6 libavformat: add librist protocol
This work is sponsored by Open Broadcast Systems.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2021-03-13 17:36:48 +01:00
James Almer
6e7e3a3820 avcodec: add a get_encode_buffer() callback to AVCodecContext
This callback is functionally the same as get_buffer2() is for decoders, and
implements for the new encode API the functionality of the old encode API had
where the user could provide their own buffers.

Reviewed-by: Lynne <dev@lynne.ee>
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Reviewed-by: Mark Thompson <sw@jkqxz.net>
Signed-off-by: James Almer <jamrial@gmail.com>
2021-03-12 19:49:08 -03:00
parazyd
51367267c8 avformat/gopher: Add support for Gopher over TLS
This commit adds a "gophers" handler to the gopher protocol. gophers
is a community-adopted protocol that acts the same way like normal
gopher with the added TLS encapsulation.

The gophers protocol is supported by gopher servers like geomydae(8),
and clients like curl(1), clic(1), and hurl(1).

This commit also adds compilation guards to both gopher and gophers,
since now there are two protocols in the file it makes sense to
have this addition.

Signed-off-by: parazyd <parazyd@dyne.org>
Signed-off-by: Marton Balint <cus@passwd.hu>
2021-03-11 23:47:19 +01:00
Jean-Baptiste Kempf
b7bf631f91 Doc: Tech Resolution Process 2021-03-11 10:03:38 +01:00
James Almer
42e68fe015 avformat/utils: change AVStream side data related public function and struct size types to size_t
av_stream_add_side_data() already defines size as a size_t, so this makes it
consistent across all side data functions.

Signed-off-by: James Almer <jamrial@gmail.com>
2021-03-10 20:26:36 -03:00
James Almer
d79e0fe65c avcodec/packet: change side data related public function and struct size types to size_t
av_packet_add_side_data() already defines size as a size_t, so this makes it
consistent across all side data functions

Signed-off-by: James Almer <jamrial@gmail.com>
2021-03-10 20:26:36 -03:00
James Almer
dbd47b7990 avutil/frame: change av_frame_new_side_data() size parameter type to size_t
Signed-off-by: James Almer <jamrial@gmail.com>
2021-03-10 20:26:36 -03:00
James Almer
14040a1d91 avutil/buffer: change public function and struct size parameter types to size_t
Signed-off-by: James Almer <jamrial@gmail.com>
2021-03-10 20:26:36 -03:00
Andreas Rheinhardt
a7f841718f doc/muxers.texi: Readd documentation removed accidentally
Happened in e7c04eaf50.

Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-03-07 01:25:32 +01:00
Paul B Mahol
17127f81c5 avfilter: add msad video filter 2021-03-06 12:42:16 +01:00
Paul B Mahol
4a69cd4e4e avfilter: add identity video filter 2021-03-06 12:41:30 +01:00
Jan Ekström
64af14555b avformat: add TTML muxer
Enables writing TTML documents or encoded TTML paragraphs as such
documents.

Additionally, a test for the combined TTML encoder and muxer has
been added to validate that the components still work.

Signed-off-by: Jan Ekström <jan.ekstrom@24i.com>
2021-03-05 19:45:00 +02:00
Jan Ekström
18713d22a2 avcodec: add TTML encoder
Enables encoding of other subtitle formats into TTML paragraphs.

Signed-off-by: Jan Ekström <jan.ekstrom@24i.com>
2021-03-05 19:45:00 +02:00
Jan Ekström
a0eec776b6 avcodec: enable usage of err_recognition for encoders
Enables the usage of such values as AV_EF_EXPLODE in encoders, which
can be useful in cases such as subtitle encoders where they have the
responsibility to validate the correctness of an incoming ASS dialog line.

Signed-off-by: Jan Ekström <jan.ekstrom@24i.com>
2021-03-05 19:45:00 +02:00
Andreas Rheinhardt
2ff40b98ec avformat: Deprecate AVFMT_FLAG_PRIV_OPT, remove av_demuxer_open on bump
This flag was added in 492026209b
in conjunction with av_demuxer_open() to allow to pass private
options to demuxers. It worked as follows: av_open_input_stream()
(the predecessor of avformat_open_input()) would not call the
read_header function if this flag is set. Instead the user could set
private options of the demuxer via the format's private class after
avformat_open_input() and then call av_demuxer_open() which called
the format's read_header function.

This approach was abandoned in e37f161e66
and av_demuxer_open() deprecated; instead the AVDictionary based way of
passing private options to the demuxer was choosen. Yet
AVFMT_FLAG_PRIV_OPT has never been deprecated and av_demuxer_open()
never removed. This commit implements the deprecation of the flag and
schedules av_demuxer_open for removal on the next major bump.
Given that av_demuxer_open() has been deprecated in 2012 and that this
flag is useless without it, the flag will be ignored after the next
major version bump.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-03-03 14:41:08 +01:00
Andreas Rheinhardt
3072438429 doc/codecs.texi: Remove removed or ineffective options
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-28 17:55:39 +01:00
James Almer
dd9227e48f avcodec/options: deprecate avcodec_get_frame_class()
AVFrame hasn't been a struct defined in libavcodec for a decade now, when
it was moved to libavutil.

Found-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2021-02-27 11:23:42 -03:00
Derek Buitenhuis
113a99270d doc/encoders: Add documentation for the GIF encoder
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2021-02-25 16:41:24 +00:00
Anton Khirnov
313c91beb8 ffprobe: stop printing deprecated fields
The FF_API macros are private and must not be used by external callers.
As the fields in question are to be removed without replacement, just
drop them.
The fields are:
AVPacket.convergence_duration
AVCodecContext.time_base
AVCodecContext.timecode_frame_start
AV_PIX_FMT_FLAG_PSEUDOPAL pixel descriptor flag
2021-02-22 11:14:29 +01:00
Lynne
5ca40d6d94
lavu/tx: support in-place FFT transforms
This commit adds support for in-place FFT transforms. Since our
internal transforms were all in-place anyway, this only changes
the permutation on the input.

Unfortunately, research papers were of no help here. All focused
on dry hardware implementations, where permutes are free, or on
software implementations where binary bloat is of no concern so
storing dozen times the transforms for each permutation and version
is not considered bad practice.
Still, for a pure C implementation, it's only around 28% slower
than the multi-megabyte FFTW3 in unaligned mode.

Unlike a closed permutation like with PFA, split-radix FFT bit-reversals
contain multiple NOPs, multiple simple swaps, and a few chained swaps,
so regular single-loop single-state permute loops were not possible.
Instead, we filter out parts of the input indices which are redundant.
This allows for a single branch, and with some clever AVX512 asm,
could possibly be SIMD'd without refactoring.

The inplace_idx array is guaranteed to never be larger than the
revtab array, and in practice only requires around log2(len) entries.

The power-of-two MDCTs can be done in-place as well. And it's
possible to eliminate a copy in the compound MDCTs too, however
it'll be slower than doing them out of place, and we'd need to dirty
the input array.
2021-02-21 17:05:16 +01:00
Ashish Singh
38aea9b041 avfilter: add vif filter
This is Visual Information Fidelity (VIF) filter and one of the component
filters of VMAF. It outputs the average VIF score over all frames.

Signed-off-by: Ashish Singh <ashk43712@gmail.com>
2021-02-16 15:00:50 +01:00
Paul B Mahol
6941d93faa avcodec/setts_bsf: add sample rate for expressions 2021-02-15 20:52:44 +01:00
Andreas Rheinhardt
4f49ca7bbc avdevice/avdevice: Deprecate AVDevice Capabilities API
It has been added in 6db42a2b6b,
yet since then none of the necessary create/free_device_capabilities
functions has been implemented, making this API completely useless.

Because of this one can already simplify
avdevice_capabilities_free/create and can already remove the function
pointers at the next major bump; given that the documentation explicitly
states that av_device_capabilities is not to be used by a user, it's
options can already be removed (save for the sentinel).

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-14 21:07:57 +01:00
Paul B Mahol
bbf6183e11 avfilter/vf_datascope: pixscope: add commands support 2021-02-13 12:38:15 +01:00
Paul B Mahol
95b854dd06 avfilter/af_amix: rename sum option to normalize
It makes more sense to still use provided weights.
2021-02-12 23:01:52 +01:00
Paul B Mahol
48a0eb21aa avcodec: add setts bitstream filter 2021-02-12 19:50:07 +01:00
Paul B Mahol
edc45d1bd5 avfilter: add monochrome video filter 2021-02-12 00:08:39 +01:00
Jan Ekström
58e59396f5 avfilter/vf_zscale: add support for setting scaling filter parameters
param_a/b are utilized for this.
2021-02-11 20:45:56 +02:00
Paul B Mahol
0ef53cc72f avfilter/vf_pseudocolor: add two more presets 2021-02-11 14:37:14 +01:00
Paul B Mahol
2859c30cd9 avfilter/vf_pseudocolor: add opacity option 2021-02-11 14:37:14 +01:00
Paul B Mahol
ba2cebb49c avfilter/af_adeclick: add more descriptive options names 2021-02-11 11:39:55 +01:00
Paul B Mahol
4390573c44 avfilter: add exposure video filter 2021-02-10 19:23:48 +01:00
Paul B Mahol
579e4e57a2 avfilter: add aexciter audio filter 2021-02-10 19:21:01 +01:00
Michael Niedermayer
1bda9bb68a libavutil/common: Add FFABS64U()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-02-10 12:28:29 +01:00
Paul B Mahol
aa8adc9206 avfilter/vf_datascope: add commands support 2021-02-10 11:28:47 +01:00
Bohan Li
82aab8a4ee avcodec/libaomenc: add support for setting arbitrary libaom options
A new key & value API lets us gain access to newly added parameters
without adding explicit support for them in our wrapper. Add an
option utilizing this functionality in a similar manner to other
encoder libraries' wrappers.

Signed-off-by: Bohan Li <bohanli@google.com>
2021-02-10 11:52:46 +02:00
Paul B Mahol
d7cb8c51f0 avfilter/vf_curves: add commands support 2021-02-09 18:20:15 +01:00
Paul B Mahol
73ff84c3d4 avfilter/vf_swaprect: add support for commands 2021-02-09 11:39:26 +01:00
Paul B Mahol
ca042675ee avfilter/vf_maskfun: add support for commands 2021-02-09 11:24:31 +01:00
Paul B Mahol
a00ff56321 avfilter/vf_lut: add support for commands
While here remove excessive log and uninit() call in negate_init().
2021-02-08 16:37:23 +01:00
Paul B Mahol
dd01165f19 avfilter/vf_deband: add support for commands 2021-02-08 16:10:51 +01:00
Paul B Mahol
89f78dd0fe avfilter/vf_lut3d: lut3d, haldclut: add support for commands 2021-02-08 00:55:07 +01:00
Paul B Mahol
5f592136eb avfilter/vf_lut2: add support for commands 2021-02-07 22:41:49 +01:00
Paul B Mahol
bd5226704a avfilter: add colorize filter 2021-02-07 11:48:28 +01:00
Paul B Mahol
a52b9464e4 doc/general_contents: add few more entries
Also extend description of some entries.
2021-02-07 00:01:12 +01:00
Paul B Mahol
4b2968d305 avfilter/vf_deblock: add support for commands 2021-02-06 15:26:39 +01:00
Paul B Mahol
d8181cbbc4 avfilter/vf_lut3d: lut1d: add support for commands 2021-02-06 12:47:21 +01:00
Paul B Mahol
d0a24bfad1 avfilter/vf_mix: add support for commands 2021-02-06 11:34:28 +01:00
Gyan Doshi
d99cc17825 ffmpeg: add -fpsmax to clamp output framerate
Useful when encoding in batch or with aberrant inputs.
2021-02-05 22:54:18 +05:30
Paul B Mahol
fb9c56bbd5 avfilter/af_arnndn: add support for commands 2021-02-05 00:43:11 +01:00
Paul B Mahol
3d7ee5c91a avfilter/vf_blend: add support for commands 2021-02-04 21:44:31 +01:00
Paul B Mahol
5765149392 avfilter/af_amix: add sum option 2021-02-04 17:52:45 +01:00
Paul B Mahol
f6621a8e72 avfilter: add colorcorrect filter 2021-02-03 15:49:13 +01:00
Paul B Mahol
090f31f813 avfilter: add colorcontrast filter 2021-02-02 14:27:06 +01:00
Limin Wang
38caef3876 avformat/hlsenc: use AV_OPT_TYPE_DURATION
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2021-02-02 20:55:50 +08:00
Gyan Doshi
6c92557756 doc/ffmpeg: document apad option 2021-01-31 10:02:18 +05:30
Paul B Mahol
54de7dc372 avfilter/af_acrusher: add commands support 2021-01-30 23:53:38 +01:00
Paul B Mahol
633e344d96 avfilter/vf_lagfun: add support for commands 2021-01-30 17:28:26 +01:00
Paul B Mahol
d43a27ab6f avfilter/vf_pseudocolor: allow more advanced presets 2021-01-29 23:42:24 +01:00
Paul B Mahol
50dd020f04 avfilter/vf_lut3d: add prism interpolation 2021-01-29 23:41:07 +01:00
Paul B Mahol
26a53519dc avfilter/vf_lut3d: add pyramid interpolation 2021-01-29 23:41:07 +01:00
Paul B Mahol
ed51890191 doc/filters: mention commands support for pseudocolor 2021-01-28 20:56:16 +01:00
Paul B Mahol
d01aa49753 avfilter/vf_pseudocolor: add presets 2021-01-28 20:07:37 +01:00
Paul B Mahol
a9d23d33a1 avfilter: add colortemperature filter 2021-01-27 11:48:00 +01:00
Paul B Mahol
35f8628047 avfilter: add kirsch video filter 2021-01-27 11:46:26 +01:00
Paul B Mahol
021dc4f107 doc/filters: mention that shear filter supports commands 2021-01-27 11:45:31 +01:00
Paul B Mahol
2ee2e4cd41 avfilter/vf_colorchannelmixer: extend pl option functionality 2021-01-27 00:57:26 +01:00
Paul B Mahol
46f170e544 avfilter/vf_lenscorrection: add support for commands 2021-01-26 20:08:05 +01:00
Michael Niedermayer
5dd9567080 avutil/common: Add FFABSU() for a signed -> unsigned ABS
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-01-26 18:37:12 +01:00
Paul B Mahol
37f76c81d6 avfilter: add shear video filter 2021-01-26 12:19:09 +01:00
James Almer
56709ca8aa avcodec: deprecate AVCodecContext.debug_mv
It's been unused for almost three years now.

Signed-off-by: James Almer <jamrial@gmail.com>
2021-01-25 19:31:04 -03:00
Paul B Mahol
a2a06029cf avfilter/vf_lenscorrection: allow to change colors of unmapped pixels 2021-01-25 12:34:57 +01:00
Paul B Mahol
b897b52618 avfilter: add epx pixel art scaler 2021-01-25 00:48:35 +01:00
Paul B Mahol
e41a92910a avfilter/vf_lenscorrection: add bilinear interpolation 2021-01-25 00:47:06 +01:00
Paul B Mahol
b2bbcede5e avfilter/vf_colorchannelmixer: add option to preserve lightness 2021-01-23 22:28:35 +01:00
Gyan Doshi
d8a585d4d5 doc/ffmpeg: document adrift_threshold 2021-01-23 16:43:51 +05:30
Gyan Doshi
e8b46b2c73 doc/ffmpeg: restore location of stray passage
Added in 88fc1438c6, this passage was separated from its original
context over the years with unrelated entries sandwiched in between.
2021-01-23 15:41:52 +05:30
Gyan Doshi
c52ced7ca2 doc/fftools-common-opts: document max_alloc 2021-01-23 14:59:47 +05:30
Gyan Doshi
e73a8ecb38 doc/fftools-common-opts: document buildconf 2021-01-23 13:58:01 +05:30
Paul B Mahol
bb66fd7f90 avfilter/vf_estdif: make interpolation used user configurable 2021-01-22 18:03:12 +01:00
Paul B Mahol
95183d25e8 avfilter/vf_atadenoise: add sigma options 2021-01-22 16:21:22 +01:00
Paul B Mahol
117bf7394f avfilter/vf_nnedi: rewrite and cleanup code
Also add slice threading support.
Also add support for >8 depth formats.
Also add support for commands.
2021-01-18 14:05:51 +01:00
Paul B Mahol
9e1956175c avfilter/vf_maskedmerge: add yuv440p10 and commands support 2021-01-17 15:56:31 +01:00
Paul B Mahol
8d86d58941 avfilter/vf_datascope: add option to show only subset of components 2021-01-17 13:18:23 +01:00
Paul B Mahol
eb0f532c98 avfilter/vf_bbox: add support for commands 2021-01-17 12:22:28 +01:00
Paul B Mahol
b7817f23c0 avfilter/vf_phase: add support for commands 2021-01-16 20:47:52 +01:00
Paul B Mahol
e722b443e4 avfilter: add estdif video filter 2021-01-16 14:08:59 +01:00
Wonkap Jang
57dae5723f avcodec/libvpxenc: add a way to set VP9E_SET_SVC_REF_FRAME_CONFIG
In order to fine-control referencing schemes in VP9 encoding, there
is a need to use VP9E_SET_SVC_REF_FRAME_CONFIG method. This commit
provides a way to use the API through frame metadata.
2021-01-14 11:08:33 -08:00
Lynne
2d85e6e723
ac3enc_fixed: convert to 32-bit sample format
The AC3 encoder used to be a separate library called "Aften", which
got merged into libavcodec (literally, SVN commits and all).
The merge preserved as much features from the library as possible.

The code had two versions - a fixed point version and a floating
point version. FFmpeg had floating point DSP code used by other
codecs, the AC3 decoder including, so the floating-point DSP was
simply replaced with FFmpeg's own functions.
However, FFmpeg had no fixed-point audio code at that point. So
the encoder brought along its own fixed-point DSP functions,
including a fixed-point MDCT.

The fixed-point MDCT itself is trivially just a float MDCT with a
different type and each multiply being a fixed-point multiply.
So over time, it got refactored, and the FFT used for all other codecs
was templated.

Due to design decisions at the time, the fixed-point version of the
encoder operates at 16-bits of precision. Although convenient, this,
even at the time, was inadequate and inefficient. The encoder is noisy,
does not produce output comparable to the float encoder, and even
rings at higher frequencies due to the badly approximated winow function.

Enter MIPS (owned by Imagination Technologies at the time). They wanted
quick fixed-point decoding on their FPUless cores. So they contributed
patches to template the AC3 decoder so it had both a fixed-point
and a floating-point version. They also did the same for the AAC decoder.
They however, used 32-bit samples. Not 16-bits. And we did not have
32-bit fixed-point DSP functions, including an MDCT. But instead of
templating our MDCT to output 3 versions (float, 32-bit fixed and 16-bit fixed),
they simply copy-pasted their own MDCT into ours, and completely
ifdeffed our own MDCT code out if a 32-bit fixed point MDCT was selected.

This is also the status quo nowadays - 2 separate MDCTs, one which
produces floating point and 16-bit fixed point versions, and one
sort-of integrated which produces 32-bit MDCT.

MIPS weren't all that interested in encoding, so they left the encoder
as-is, and they didn't care much about the ifdeffery, mess or quality - it's
not their problem.

So the MDCT/FFT code has always been a thorn in anyone looking to clean up
code's eye.

Backstory over. Internally AC3 operates on 25-bit fixed-point coefficients.
So for the floating point version, the encoder simply runs the float MDCT,
and converts the resulting coefficients to 25-bit fixed-point, as AC3 is inherently
a fixed-point codec. For the fixed-point version, the input is 16-bit samples,
so to maximize precision the frame samples are analyzed and the highest set
bit is detected via ac3_max_msb_abs_int16(), and the coefficients are then
scaled up via ac3_lshift_int16(), so the input for the FFT is always at least 14 bits,
computed in normalize_samples(). After FFT, the coefficients are scaled up to 25 bits.

This patch simply changes the encoder to accept 32-bit samples, reusing
the already well-optimized 32-bit MDCT code, allowing us to clean up and drop
a large part of a very messy code of ours, as well as prepare for the future lavu/tx
conversion. The coefficients are simply scaled down to 25 bits during windowing,
skipping 2 separate scalings, as the hacks to extend precision are simply no longer
necessary. There's no point in running the MDCT always at 32 bits when you're
going to drop 6 bits off anyway, the headroom is plenty, and the MDCT rounds
properly.

This also makes the encoder even slightly more accurate over the float version,
as there's no coefficient conversion step necessary.

SIZE SAVINGS:
ARM32:
HARDCODED TABLES:
BASE           - 10709590
DROP  DSP      - 10702872 - diff:   -6.56KiB
DROP  MDCT     - 10667932 - diff:  -34.12KiB - both:   -40.68KiB
DROP  FFT      - 10336652 - diff: -323.52KiB - all:   -364.20KiB
SOFTCODED TABLES:
BASE           -  9685096
DROP  DSP      -  9678378 - diff:   -6.56KiB
DROP  MDCT     -  9643466 - diff:  -34.09KiB - both:   -40.65KiB
DROP  FFT      -  9573918 - diff:  -67.92KiB - all:   -108.57KiB

ARM64:
HARDCODED TABLES:
BASE           - 14641112
DROP  DSP      - 14633806 - diff:   -7.13KiB
DROP  MDCT     - 14604812 - diff:  -28.31KiB - both:   -35.45KiB
DROP  FFT      - 14286826 - diff: -310.53KiB - all:   -345.98KiB
SOFTCODED TABLES:
BASE           - 13636238
DROP  DSP      - 13628932 - diff:   -7.13KiB
DROP  MDCT     - 13599866 - diff:  -28.38KiB - both:   -35.52KiB
DROP  FFT      - 13542080 - diff:  -56.43KiB - all:    -91.95KiB

x86:
HARDCODED TABLES:
BASE           - 12367336
DROP  DSP      - 12354698 - diff:  -12.34KiB
DROP  MDCT     - 12331024 - diff:  -23.12KiB - both:   -35.46KiB
DROP  FFT      - 12029788 - diff: -294.18KiB - all:   -329.64KiB
SOFTCODED TABLES:
BASE           - 11358094
DROP  DSP      - 11345456 - diff:  -12.34KiB
DROP  MDCT     - 11321742 - diff:  -23.16KiB - both:   -35.50KiB
DROP  FFT      - 11276946 - diff:  -43.75KiB - all:    -79.25KiB

PERFORMANCE (10min random s32le):
ARM32 - before -  39.9x - 0m15.046s
ARM32 - after  -  28.2x - 0m21.525s
                       Speed:  -30%

ARM64 - before -  36.1x - 0m16.637s
ARM64 - after  -  36.0x - 0m16.727s
                       Speed: -0.5%

x86   - before - 184x -    0m3.277s
x86   - after  - 190x -    0m3.187s
                       Speed:   +3%
2021-01-14 01:44:12 +01:00
Nuo Mi
ebdd33086a avcodec: add vvc codec id and profiles
Signed-off-by: James Almer <jamrial@gmail.com>
2021-01-11 17:01:34 -03:00
Gyan Doshi
0fff6c039c doc/ffmpeg: document max_error_rate 2021-01-10 19:14:37 +05:30
Lingjiang Fang
c4407a3e00 doc/protocols: explain tcp listen option description
Signed-off-by: Marton Balint <cus@passwd.hu>
2021-01-09 17:08:27 +01:00
James Almer
5f9632e491 avcodec/av1dec: add an option to select an operating point
Signed-off-by: James Almer <jamrial@gmail.com>
2021-01-04 16:28:29 -03:00
Paul B Mahol
b112c86a2e avfilter/vf_w3fdif: add two more useful options 2021-01-03 22:23:51 +01:00
erankor
fde5593c7c avformat/http: support retry on connection error
Add 2 new options:
- reconnect_on_http_error - a list of http status codes that should be
    retried. the list can contain explicit status codes / the strings
    4xx/5xx.
- reconnect_on_network_error - reconnects on arbitrary errors during
    connect, e.g. ECONNRESET/ETIMEDOUT

the retry employs the same exponential backoff logic as the existing
reconnect/reconnect_at_eof flags.

related tickets:
https://trac.ffmpeg.org/ticket/6066
https://trac.ffmpeg.org/ticket/7768

Signed-off-by: Marton Balint <cus@passwd.hu>
2021-01-03 16:47:29 +01:00
Anton Khirnov
baecaa16c1 mpegvideo: use the AVVideoEncParams API for exporting QP tables
Do it only when requested with the AV_CODEC_EXPORT_DATA_VIDEO_ENC_PARAMS
flag.

Drop previous code using the long-deprecated AV_FRAME_DATA_QP_TABLE*
API. Temporarily disable fate-filter-pp, fate-filter-pp7,
fate-filter-spp. They will be reenabled once these filters are converted
in following commits.
2021-01-01 14:23:19 +01:00
Paul B Mahol
54cd025a82 avfilter: add temporal midway equalizer filter 2021-01-01 12:43:42 +01:00
Paul B Mahol
2f20e35892 avfilter/vf_w3fdif: add support for commands 2020-12-30 16:33:30 +01:00
Guo, Yejun
c720286ee3 vf_dnn_processing.c: add async support
Signed-off-by: Xie, Lin <lin.xie@intel.com>
Signed-off-by: Wu Zhiwen <zhiwen.wu@intel.com>
Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
2020-12-29 09:31:06 +08:00
Steven Liu
e6e341b2f0 doc/muxers: correct description of hls_enc_key and hls_enc_iv
because hls_enc_key and hls_enc_iv get 16byte char
for example:
-hls_enc_key 0123456789abcdef -hls_enc_iv abcdefghijklmnop

Reviewed-by: Gyan Doshi <ffmpeg@gyani.pro>
Signed-off-by: Steven Liu <liuqi05@kuaishou.com>
2020-12-28 11:09:14 +08:00
Gyan Doshi
bff6fbead8 doc/protocols: document cache option
Add entry for read_ahead_limit
2020-12-27 14:50:24 +05:30
Paul B Mahol
5b48d2af43 avfilter/vf_xmedian: add support for commands 2020-12-25 16:43:14 +01:00
Gyan Doshi
842714b5cb ffmpeg: add option stats_period
At present, progress stats are updated at a hardcoded interval of
half a second. For long processes, this can lead to bloated
logs and progress reports.

Users can now set a custom period using option -stats_period
Default is kept at 0.5 seconds.
2020-12-23 00:41:07 +05:30
Paul B Mahol
204a906437 avfilter/af_crystalizer: implement inverse filtering 2020-12-21 13:15:27 +01:00
Paul B Mahol
c1c2e6f968 avfilter/af_crystalizer: improve filter description 2020-12-21 11:51:00 +01:00
Andriy Gelman
cd97e1ff4d avformat/libamqp: parse vhost in uri
Reviewed-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2020-12-21 01:27:33 -05:00
Paul B Mahol
6e96e3d970 avfilter: add shufflepixels video filter 2020-12-20 21:44:13 +01:00
Gyan Doshi
ab6a56773f doc/codecs: add entries for export_side_data
Document addition of venc_params and film_grain.
2020-12-20 15:09:28 +05:30
Paul B Mahol
3336ca4644 avfilter/vf_maskedthreshold: add support for commands 2020-12-19 23:08:09 +01:00
Paul B Mahol
64e572db46 avfilter/vf_maskedminmax: add support for commands 2020-12-19 20:46:00 +01:00
Paul B Mahol
4fcfecdd66 avfilter/vf_maskedclamp: add support for commands 2020-12-19 20:46:00 +01:00
Paul B Mahol
d6a356f115 avfilter/vf_bilateral: add support for commands 2020-12-19 20:46:00 +01:00
Paul B Mahol
31aa6bdb59 doc/filters: document that cas filter supports commands 2020-12-19 20:46:00 +01:00
Paul B Mahol
50a9210739 avfilter/vf_fillborders: add fade mode 2020-12-18 23:11:51 +01:00
Paul B Mahol
90720da511 avfilter/vf_fillborders: add more fill modes 2020-12-18 19:40:31 +01:00
Paul B Mahol
7e3f20c43c avfilter/af_asoftclip: add two more useful options for finer filtering 2020-12-18 13:11:53 +01:00
Paul B Mahol
69be00aa61 avfilter/af_biquads: add one-pole shelf filters by adding pole option 2020-12-16 18:38:51 +01:00
Paul B Mahol
32586a42da avfilter/vf_limiter: add support for commands 2020-12-15 20:35:01 +01:00
Paul B Mahol
fc50a8de55 avfilter/af_afade: add support for commands to afade filter 2020-12-11 23:02:03 +01:00
Paul B Mahol
d76469378d avfilter/vf_convolution: add support for commands 2020-12-11 18:33:48 +01:00
Paul B Mahol
7adb747fd7 avfilter/vf_chromanr: add options for finer controls of filtering 2020-12-11 13:39:50 +01:00
Paul B Mahol
b607f19374 avfilter: add asuperpass and asuperstop filter 2020-12-11 12:07:06 +01:00
Gyan Doshi
7777e5119a avfilter/cropdetect: add option for initial skip
The cropdetect filter, at present, skips the first two frames. This
behaviour is hardcoded.

New option 'skip' allows users to change this. Convenient for when
input is a single image or a trimmed video stream.

Default is kept at 2 to preserve current behaviour.
2020-12-09 12:52:09 +05:30
Nikola Pajkovsky
3ffed80eba hlsenc: expand hls_fmp4_init_filename with strftime()
the init.mp4 can be expanded with strftime the same way as
hls_segment_filename.

Signed-off-by: Nikola Pajkovsky <nikola@pajkovsky.cz>
Signed-off-by: liuqi05 <liuqi05@kuaishou.com>
2020-12-08 21:02:23 +08:00
Paul B Mahol
fcae745f46 doc/filters: fix obvious mistake for minimum accepted value 2020-12-07 13:13:47 +01:00
Paul B Mahol
88b6ebdace avfilter/af_biquads: add shortcut to set internal precision 2020-12-06 14:51:21 +01:00
Peter Ross
2aab42bc40 avformat/mspdec: Microsoft Paint (MSP) demuxer
Signed-off-by: Peter Ross <pross@xvid.org>
2020-12-06 20:03:47 +11:00
Paul B Mahol
530d1dbcef avfilter/af_afreqshift: add level option 2020-12-05 14:46:16 +01:00
Paul B Mahol
34773ee69f avfilter: add asubcut filter 2020-12-05 12:02:59 +01:00
Paul B Mahol
7025c91d07 avfilter/af_arnndn: add mix option
Mostly useful to listen to actual noise.
2020-12-04 23:57:01 +01:00
Paul B Mahol
51f8848e36 avfilter/af_stereotools: add support for commands 2020-12-04 15:40:42 +01:00
Paul B Mahol
456146356a avfilter/af_stereotools: add two more modes 2020-12-04 11:58:31 +01:00