1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-21 10:55:51 +02:00
Commit Graph

5740 Commits

Author SHA1 Message Date
Zhao Zhili
0ff18a7d6d avcodec: add MediaCodec encoder
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2022-11-21 23:56:16 +08:00
Zhao Zhili
4df9cb918e avcodec/mediacodec: add NDK media codec wrapper
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2022-11-21 23:52:34 +08:00
Zhao Zhili
36a8d1e729 avcodec/libx265: fix build error
x265_sei is available since X265_BUILD 88. Bump required version
to 89 to fix the regression from commit 1f58503013, and remove a
conditional compilation.

Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2022-11-18 23:18:21 +08:00
Paul B Mahol
4f6c06e8ff avfilter/af_firequalizer: switch to TX from lavu 2022-11-17 13:28:58 +01:00
Paul B Mahol
59b16355ec avfilter/avf_showspatial: switch to lavu TX
Also try harder to make output constant frame rate.
2022-11-17 12:37:22 +01:00
erankor
6043352bd9 libx265: support ATSC A/53 captions
added a new option 'a53cc' (on by default, as in libx264) for rendering
AV_FRAME_DATA_A53_CC as hevc sei payloads.
the code is a blend of the libx265.c code for writing
AV_FRAME_DATA_SEI_UNREGISTERED with the libx264.c code for writing atsc
a/53 payloads.
2022-11-10 16:28:07 +01:00
Timo Rothenpieler
939273d3b4 avcodec/nvenc: remove unsupported AV1 High Profile 2022-11-10 15:26:43 +01:00
Andreas Rheinhardt
fd0e37f126 avcodec/mpegvideo_enc: Move initializing QpelDSPCtx to mpeg4videoenc.c
It is the only encoder supporting quarter samples.
This also allows to remove the qpeldsp dependency from
mpegvideo_enc.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-11-06 17:41:26 +01:00
Andreas Rheinhardt
496b3c6987 avcodec/vc1dec: Remove VC-1 decoders->H.263 decoder dependency
The only thing from the H.263 decoder that is reachable
by the VC-1 decoder is ff_h263_decode_init(); but it does
not even use all of it; e.g. h263dsp is unused and so are
the VLCs initialized in ff_h263_decode_init() (they amount
to about 77KB which are now no longer touched).

Notice that one could also call ff_idctdsp_init()
directly instead of ff_mpv_idct_init(); one could even
do so in ff_vc1_init_common().

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-11-06 17:41:26 +01:00
Andreas Rheinhardt
cbe6ef1031 avcodec/vc1dec: Split VC-1 decoders from msmpeg4
The only msmpeg4 code that is ever executed by the VC-1 based
decoders is ff_msmpeg4_decode_init() and what is directly
reachable from it. This is:
a) A call to av_image_check_size(), then ff_h263_decode_init(),
b) followed by setting [yc]_dc_scale_table and initializing
scantable/permutations.
c) Afterwards, some static tables are initialized.
d) Finally, slice_height is set.

The replacement for ff_msmpeg4_decode_init() performs a)
just like now; it also sets [yc]_dc_scale_table,
but it only initializes inter_scantable and intra_scantable
and not permutated_intra_[hv]_scantable: The latter are only
used inside decode_mb callbacks which are only called
in ff_h263_decode_frame() which is unused for VC-1.*

The static tables initialized in c) are not used at all by
VC-1 (the ones that are used have been factored out in
previous commits); this avoids touching 327KiB of .bss.

slice_height is also not used by the VC-1 decoder (setting
it in ff_msmpeg4_decode_init() is probably redundant after
b34397b4cd).

*: It follows from this that the VC-1 decoder is not really
based upon the H.263 decoder either; changing this will
be done in a future commit.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-11-06 17:41:26 +01:00
Lynne
1aeedd277a
qdm2: convert to lavu/tx 2022-11-06 14:39:42 +01:00
Lynne
e6afa61be9
imc: convert to lavu/tx, remove NIH iMDCT and replace with a standard one 2022-11-06 14:39:42 +01:00
Lynne
b85e106d5f
libavcodec: remove mdct15
It's not needed nor used by anything anymore, lavu/tx is faster,
and better in every way. RIP.
2022-11-06 14:39:41 +01:00
Lynne
774ea6a00b
vorbisenc: convert to lavu/tx 2022-11-06 14:39:41 +01:00
Lynne
34330adb29
atrac3plus: convert to lavu/tx 2022-11-06 14:39:40 +01:00
Lynne
b59e6b5d99
atrac3: convert to lavu/tx 2022-11-06 14:39:40 +01:00
Lynne
5f52094f3d
atrac1: convert to lavu/tx 2022-11-06 14:39:39 +01:00
Lynne
978963a77b
wma: convert to lavu/tx
Converts both the decoder and encoders.
2022-11-06 14:39:39 +01:00
Lynne
6ba0aa1770
on2avc: convert to lavu/tx 2022-11-06 14:39:38 +01:00
Lynne
8cd46c48ac
nellymoserenc: convert to lavu/tx 2022-11-06 14:39:38 +01:00
Lynne
61e1a7d958
nellymoserdec: convert to lavu/tx 2022-11-06 14:39:38 +01:00
Lynne
b428003c1c
dcaenc: convert to lavu/tx
The encoder is fixed point, and uses an MDCT only for analysis. Due
to the slightly different rounding, the encoder makes a different
decision, so the tests have to be adjusted as well.
2022-11-06 14:39:37 +01:00
Lynne
055413788f
dca_lbr: convert to lavu/tx
Fully converts the DCA decoder to lavu/tx.
2022-11-06 14:39:37 +01:00
Lynne
2689038f08
dolby_e: convert to lavu/tx 2022-11-06 14:39:36 +01:00
Lynne
1d810b650c
cookdec: convert to lavu/tx 2022-11-06 14:39:36 +01:00
Lynne
8f3e062314
aacenc: convert to lavu/tx 2022-11-06 14:39:35 +01:00
Lynne
5f1111e42e
wmaprodec: convert to lavu/tx 2022-11-06 14:39:34 +01:00
Lynne
eb0e25f078
atrac9dec: convert to lavu/tx 2022-11-06 14:39:34 +01:00
Lynne
7af43a46d9
twinvq: convert to lavu/tx 2022-11-06 14:39:33 +01:00
Lynne
60c704677a
vorbisdec: convert to lavu/tx
This also fixes not checking the return values on transform init.

Total decoder speedup on Zen 3: 9%
2022-11-06 14:39:33 +01:00
Lynne
469cd8d7fa
aacdec: convert to lavu/tx and support fixed-point 960-sample decoding
This patch replaces the transform used in AAC with lavu/tx and removes
the limitation on only being able to decode 960-sample files
with the float decoder.
This commit also removes a whole bunch of unnecessary and slow
lifting steps the decoder did to compensate for the poor accuracy
of the old integer transformation code.

Overall float decoder speedup on Zen 3 for 64kbps: 32%
2022-11-06 14:39:33 +01:00
Lynne
4cee7ebd75
ac3: convert to lavu/tx 2022-11-06 14:39:27 +01:00
Timo Rothenpieler
5c288a44ad avcodec/nvenc: add AV1 encoding support
The encoder seems to be trading blows with hevc_nvenc.
In terms of quality at low bitrate cbr settings, it seems to
outperform it even. It produces fewer artifacts and the ones it
does produce are less jarring to my perception.

At higher bitrates I had a hard time finding differences between
the two encoders in terms of subjective visual quality.

Using the 'slow' preset, av1_nvenc outperformed hevc_nvenc in terms
of encoding speed by 75% to 100% while performing above tests.

Needless to say, it always massively outperformed h264_nvenc in terms
of quality for a given bitrate, while also being slightly faster.
2022-11-05 21:17:37 +01:00
Timo Rothenpieler
0957d62fb0 configure: add pkg-config check for chromaprint 2022-11-03 12:37:41 +01:00
Timo Rothenpieler
d772419237 configure: add pkg-config check for OpenAL 2022-10-31 18:42:12 +01:00
Martin Storsjö
2eb601e865 configure: Remove a leftover comment about MSVC C99 support
Support for building with older versions of MSVC (with the
c99wrap/c99conv frontend) was removed in
ce943dd6ac.

Signed-off-by: Martin Storsjö <martin@martin.st>
2022-10-27 21:49:26 +03:00
Andreas Rheinhardt
22fc0375e8 configure: Remove unnecessary mpeg[12]video_enc->h263dsp dependencies
This effectively reverts 9b78abae19.
The underlying issue has been fixed properly in commit
cff480e49d.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-10-27 19:39:07 +02:00
Andreas Rheinhardt
938c62b368 avcodec/mpegvideo: Don't initialize H264Chroma ctx unnecessarily
It is only used by the decoders' lowres code, so only initialize
it for decoders.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-10-27 19:37:44 +02:00
Wenbin Chen
dc9e4789a3 libavcodec/qsvenc_av1: add av1_qsv encoder
It is available only when libvpl is enabled. MSDK doesn't support av1
encoding.

sample command:
ffmpeg -f rawvideo -pix_fmt nv12 -s 1920x1080 -i input.yuv \
-c:v av1_qsv output.ivf

Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
2022-10-24 13:30:22 +08:00
Anton Khirnov
f66e794672 lavu/thread: add an internal function for setting thread name
Linux-only for now.
2022-10-24 02:00:31 +02:00
Andreas Rheinhardt
3cabe958a7 avcodec/eatqi: Don't use IDCTDSP-API unnecessarily
The eatqi decoder uses a custom IDCT and actually does not
use the IDCTDSP API at all. Somehow it was nevertheless
used to simply apply the identity permutation on ff_zigzag_direct.
This commit stops doing so.

Reviewed-by: Peter Ross <pross@xvid.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-10-24 00:46:53 +02:00
Andreas Rheinhardt
a8f34f0877 avcodec/eatgq: Don't use IDCTDSP-API unnecessarily
The eatgq decoder uses a custom IDCT and actually does not
use the IDCTDSP API at all. Somehow it was nevertheless
used to simply apply the identity permutation on ff_zigzag_direct.
This commit stops doing so. It also renames perm to scantable,
because it is only the scantable as given by the spec without
any further permutation performed by us.

Reviewed-by: Peter Ross <pross@xvid.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-10-24 00:46:49 +02:00
Andreas Rheinhardt
c262245fd3 avcodec/eamad: Don't use IDCTDSP-API unnecessarily
The eamad decoder uses a custom IDCT and actually does not
use the IDCTDSP API at all. Somehow it was nevertheless
used to simply apply the identity permutation on ff_zigzag_direct.
This commit stops doing so.

Reviewed-by: Peter Ross <pross@xvid.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-10-24 00:46:39 +02:00
Andreas Rheinhardt
ba85e0ce41 configure: Add idctdsp dependency to codecs that need it
Currently masked by faan.

Reviewed-by: Peter Ross <pross@xvid.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-10-24 00:15:03 +02:00
James Almer
1f63225f2b avcodec/librav1e: support AV_CODEC_CAP_ENCODER_RECON_FRAME
This bumps the minimum required version to 0.5.0

Signed-off-by: James Almer <jamrial@gmail.com>
2022-10-19 11:15:38 -03:00
James Almer
f58f238936 avcodec/librav1e: export extradata on init()
librav1e provides a function to create extradata, so use it instead of
extracting the sequence header OBU from packets.

Signed-off-by: James Almer <jamrial@gmail.com>
2022-10-19 10:13:37 -03:00
Andreas Rheinhardt
28ac2279ad avcodec/snow: Move initializing MotionEstContext to snowenc.c
Only used by the encoder.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-10-12 10:58:15 +02:00
Andreas Rheinhardt
2a7ee6dda0 configure: Add (dnxhd|snow)_encoder->videodsp dependency
These encoders currently rely on an implicit dependency via mpegvideo.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-10-12 10:57:24 +02:00
Andreas Rheinhardt
1ed41ec343 configure: Remove unnecessary wmavoice->mdct dependency
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-10-12 10:57:24 +02:00
Andreas Rheinhardt
fe4cb1f718 configure: Remove unnecessary qdm2_decoder->mdct dependency
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-10-12 10:57:24 +02:00
Andreas Rheinhardt
faf16c5ca8 configure: Remove unnecessary binkaudio dependencies
The binkaudio decoders don't need mdct or sinewin at all;
and binkaudio_dct doesn't need rdft directly (but nevertheless
uses it indirectly via dct).

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-10-12 10:57:24 +02:00
Andreas Rheinhardt
7260e69a61 configure: Remove unnecessary me_cmp dependencies
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-10-12 10:57:24 +02:00
Andreas Rheinhardt
c672751e33 configure: Add mpegvideoenc->fdctdsp dependency
Currently masked by an unnecessary me_cmp->fdctdsp dependency.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-10-12 10:57:24 +02:00
Andreas Rheinhardt
8dcc1eef75 configure: Add missing prores_(aw|ks)_encoder->fdctdsp dependencies
Fixes builds with --disable-everything --disable-faan.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-10-12 10:57:24 +02:00
Andreas Rheinhardt
382083caed configure: Remove dependencies of inexistant rtjpeg decoder
rtjpeg is a mode of nuv and not a decoder in its own right.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-10-12 10:57:24 +02:00
Andreas Rheinhardt
5bd55b488f avcodec/ljpegenc: Remove unused IDCTDSPContext
It is basically write-only.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-10-09 19:28:11 +02:00
Andreas Rheinhardt
ef285d59ac configure, avcodec/Makefile: Remove obsolete mpegvideo dependencies
As long as ff_mpeg12_common_init() existed in mpeg12.c,
it added a dependency of mpeg12.o on mpegvideodata.o
(which provides ff_mpeg2_dc_scale_table, which is used
in ff_mpeg12_common_init()). mpegvideodata.o is normally
provided by the mpegvideo subsystem and therefore several
codecs and the MPEG-1/2 parser added a configure dependency
on said subsystem (additionally, the eatqi decoder just
added a Makefile dependency on mpegvideodata.o).

Given that ff_mpeg12_common_init() is no more, these dependencies
can be removed.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-10-04 17:41:34 +02:00
James Almer
b92e14147f avcodec: add a bsf to reorder DTS into PTS
Starting with an h264 implementation. Can be extended to support other codecs.

A few caveats:
- OpenGOP streams are currently not supported. The firt packet must be an IDR
  frame.
- In some streams, a few frames at the end may not get a reordered PTS when
  they reference frames past EOS. The code added to derive timestamps from
  previous frames needs to extended.

Addresses ticket #502.

Signed-off-by: James Almer <jamrial@gmail.com>
2022-10-04 08:40:16 -03:00
Lynne
0bc7ba4488
configure: remove mdct15 from the encoder/decoder's list of requirements 2022-09-28 00:08:48 +02:00
Rémi Denis-Courmont
1b6aee52a5 configure: probe RISC-V Vector extension 2022-09-27 13:19:52 +02:00
Andreas Rheinhardt
2ec59d2973 configure: Remove obsolete APTX decoder dependencies
Forgotten in 18e55de45a.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-09-18 22:43:47 +02:00
Roman Arzumanyan
cc81ab283c libavfilter: add vf_colorrange_cuda, CUDA-accelerated color conversion filter
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2022-09-13 22:59:30 +02:00
Rémi Denis-Courmont
ff14e37393 configure/riscv: detect fast CLZ
RISC-V defines the CLZ instruction as part of the ratified Zbb subset
of the (not yet ratified) bit mapulation extension (B). We can detect
it from the __riscv_zbb predefined constant. At least GCC 12 already
supports this correctly.

Note that the macro will be non-zero if supported, zero if enabled
in the compiler flags (e.g. -march=rv64gzbb) but not known to the
compiler, and undefined otherwise.
2022-09-13 16:50:43 -03:00
Anton Khirnov
b6196cb2ef lavf/dv: always provide avpriv_dv_* symbols
They are used from libavdevice.
2022-09-05 08:01:17 +02:00
Mohamed Khaled Mohamed
1a5cd79f51 avfilter: add bilateral_cuda filter
GSoC 2022

Signed-off-by: Mohamed Khaled <mohamed.elbassiony00@eng-st.cu.edu.eg>
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2022-09-03 15:18:56 +02:00
Hendrik Leppkes
89ea7a2442 configure: enable the av1_frame_split bsf for the av1 decoder
The BSF is required to make use of the AV1 decoder, thus configure
should also ensure it is built.
2022-08-23 14:30:28 +02:00
Timo Rothenpieler
ef2c2a2220 avutil/half2float: use native _Float16 if available
_Float16 support was available on arm/aarch64 for a while, and with gcc
12 was enabled on x86 as long as SSE2 is supported.

If the target arch supports f16c, gcc emits fairly efficient assembly,
taking advantage of it. This is the case on x86-64-v3 or higher.
Same goes on arm, which has native float16 support.
On x86, without f16c, it emulates it in software using sse2 instructions.

This has shown to perform rather poorly:

_Float16 full SSE2 emulation:
frame=50074 fps=848 q=-0.0 size=N/A time=00:33:22.96 bitrate=N/A speed=33.9x

_Float16 f16c accelerated (Zen2, --cpu=znver2):
frame=50636 fps=1965 q=-0.0 Lsize=N/A time=00:33:45.40 bitrate=N/A speed=78.6x

classic half2float full software implementation:
frame=49926 fps=1605 q=-0.0 Lsize=N/A time=00:33:17.00 bitrate=N/A speed=64.2x

Hence an additional check was introduced, that only enables use of
_Float16 on x86 if f16c is being utilized.

On aarch64, a similar uplift in performance is seen:

RPi4 half2float full software implementation:
frame= 6088 fps=126 q=-0.0 Lsize=N/A time=00:04:03.48 bitrate=N/A speed=5.06x

RPi4 _Float16:
frame= 6103 fps=158 q=-0.0 Lsize=N/A time=00:04:04.08 bitrate=N/A speed=6.32x

Since arm/aarch64 always natively support 16 bit floats, it can always
be considered fast there.

I'm not aware of any additional platforms that currently support
_Float16. And if there are, they should be considered non-fast until
proven fast.
2022-08-19 22:09:36 +02:00
Timo Rothenpieler
9ca3b8b7cd compat: add msvc windres wrapper
This is by no means a complete wrapper. It's only designed to fit the
usecase ffmpegs build system has.
2022-08-13 14:42:52 +02:00
Timo Rothenpieler
b77fff47d0 configure: always enable gnu_windres if available
Use the appropiate Makefile variable to ensure the resource file is
only built into shared libraries instead.
2022-08-13 14:42:36 +02:00
Haihao Xiang
7158f1e64d configure: add --enable-libvpl option
This allows user to build FFmpeg against Intel oneVPL. oneVPL 2.6
is the required minimum version when building Intel oneVPL code.

It will fail to run configure script if both libmfx and libvpl are
enabled.

It is recommended to use oneVPL for new work, even for currently available
hardwares [1]

Note the preferred child device type is d3d11va for libvpl on Windows.
The commands below will use d3d11va if d3d11va is available on Windows.
$ ffmpeg -hwaccel qsv -c:v h264_qsv ...
$ ffmpeg -qsv_device 0 -hwaccel qsv -c:v h264_qsv ...
$ ffmpeg -init_hw_device qsv=qsv:hw_any -hwaccel qsv -c:v h264_qsv ...
$ ffmpeg -init_hw_device qsv=qsv:hw_any,child_device=0 -hwaccel qsv -c:v h264_qsv ...

User may use child_device_type option to specify child device type to
dxva2 or derive a qsv device from a dxva2 device
$ ffmpeg -init_hw_device qsv=qsv:hw_any,child_device=0,child_device_type=dxva2 -hwaccel qsv -c:v h264_qsv ...
$ ffmpeg -init_hw_device dxva2=d3d9:0 -init_hw_device qsv=qsv@d3d9 -hwaccel qsv -c:v h264_qsv ...

[1] https://www.intel.com/content/www/us/en/develop/documentation/upgrading-from-msdk-to-onevpl/top.html
2022-08-12 10:43:39 +08:00
Haihao Xiang
3e61b7dd7f qsv: remove mfx/ prefix from mfx headers
The following Cflags has been added to libmfx.pc, so mfx/ prefix is no
longer needed when including mfx headers in FFmpeg.
   Cflags: -I${includedir} -I${includedir}/mfx

Some old versions of libmfx have the following Cflags in libmfx.pc
   Cflags: -I${includedir}

We may add -I${includedir}/mfx to CFLAGS when running 'configure
--enable-libmfx' for old versions of libmfx, if so, mfx headers without
mfx/ prefix can be included too.

If libmfx comes without pkg-config support, we may do a small change to
the settings of the environment(e.g. set -I/opt/intel/mediasdk/include/mfx
instead of -I/opt/intel/mediasdk/include to CFLAGS), then the build can
find the mfx headers without mfx/ prefix

After applying this change, we won't need to change #include for mfx
headers when mfx headers are installed under a new directory.

This is in preparation for oneVPL support (mfx headers in oneVPL are
installed under vpl directory)
2022-08-12 10:43:39 +08:00
Haihao Xiang
7c713ab42c configure: fix the check for MFX_CODEC_VP9
The data structures for VP9 in mfxvp9.h is wrapped by
MFX_VERSION_NEXT, which means those data structures have never been used
in a public release. Actually MFX_CODEC_VP9 and other VP9 stuffs are
added in mfxstructures.h. In addition, mfxdefs.h is included in
mfxvp9.h, so we may use the check in this patch for MFX_CODEC_VP9

This is in preparation for oneVPL support because mfxvp9.h is removed
from oneVPL [1]

[1]: https://github.com/oneapi-src/oneVPL
2022-08-12 10:43:39 +08:00
Haihao Xiang
fea5aed279 configure: ensure --enable-libmfx uses libmfx 1.x
Intel's oneVPL is a successor to MediaSDK, but removed some obsolete
features of MediaSDK[1], some early versions of oneVPL still use libmfx
as library name[2]. However some of obsolete features, including OPAQUE
memory, multi-frame encode, user plugins and LA_EXT rate control mode
etc, have been enabled in QSV, so user can not use --enable-libmfx to
enable QSV if using an early version of oneVPL SDK. In order to ensure
user builds FFmpeg against a right version of libmfx, this patch added a
check for version < 2.0 and warning message about the used obsolete
features.

[1] https://spec.oneapi.io/versions/latest/elements/oneVPL/source/VPL_intel_media_sdk.html
[2] https://github.com/oneapi-src/oneVPL
2022-08-12 10:43:39 +08:00
Andreas Rheinhardt
6c4595190e avcodec/flacdsp: Split encoder-only parts into a ctx of its own
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-08-05 03:28:45 +02:00
Andreas Rheinhardt
b0e38c7d1e configure: Add msmpeg4(dec|enc) subsystems
The msmpeg4 decoders/encoders share a common set of prerequisites,
ergo it makes sense to use common subsystems for them. This also
allows to remove the CONFIG_MSMPEG4_DECODER/ENCODER ad-hoc defines
(which violated the CONFIG_ namespace).

Reviewed-by: Martin Storsjö <martin@martin.st>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-08-03 21:18:25 +02:00
Andreas Rheinhardt
b10e218df1 configure, avcodec/Makefile: Make IntraX8 select WMV2DSP, fix MIPS build
IntraX8 uses WMV2DSP directly, so it should have a direct dependency
on it. Also remove the indirect Makefile dependency of the VC-1 decoder
on wmv2dsp.o. Notice that since the addition of the MIPS WMV2DSP
implementation building only the VC-1 decoder would fail, because
no Makefile dependency VC1->wmv2dsp_init_mips.o has been added.
This is of course fixed by this commit.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-08-03 21:17:56 +02:00
Andreas Rheinhardt
eb5c5ae658 avcodec/intrax8: Remove unused IDCTDSPContext
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-08-03 21:10:00 +02:00
Anton Khirnov
c6f22940e4 lavc/libx264: support AV_CODEC_CAP_ENCODER_RECON_FRAME
Bump the version requirement to 122, which introduced b_full_recon.
2022-08-02 10:52:15 +02:00
Martin Storsjö
8e6759f10c configure: Check for DXGI_OUTDUPL_FRAME_INFO for the ddagrab filter
The DXGI_OUTDUPL_FRAME_INFO type isn't available in Windows API
subsets other than "desktop", while the IDXGIOutput1 interface is
available for all API subsets.

This fixes compilation for UWP/"Windows Store" configurations (and
older API subsets like Windows Phone).

Signed-off-by: Martin Storsjö <martin@martin.st>
2022-08-01 15:41:25 +03:00
Niklas Haas
c688ddc067 avcodec: add common fflcms2 boilerplate
Handling this in general code makes more sense than handling it in
individual codec files, because it would be a lot of unnecessary code
duplication for the plenty of formats that support exporting ICC
profiles (jpg, png, tiff, webp, jxl, ...).

encode.c and decode.c will be in charge of initializing this state as
needed, so we merely need to make sure to uninit it afterwards from the
common destructor path.

Signed-off-by: Niklas Haas <git@haasn.dev>
2022-07-30 11:42:06 +02:00
Marvin Scholz
564d7946de configure: properly require libx264 if enabled
When libx264 can not be found even though it is enabled, it should error
out properly instead of silently disabling it.
2022-07-24 17:41:21 +03:00
Anton Khirnov
760ce4bc0b fftools/ffmpeg: depend on threads
ffmpeg will be switched to a fully threaded architecture, starting with
muxers.
2022-07-23 11:53:19 +02:00
Timo Rothenpieler
926f355aff avfilter/vsrc_ddagrab: check for existence of DPI_AWARENESS_CONTEXT
Apparently some (broken?) Windows SDK versions define IDXGIOutput5
but not DPI_AWARENESS_CONTEXT. So we need to explicitly check for its
existence.
2022-07-19 13:57:38 +02:00
Timo Rothenpieler
61c151a098 avfilter/vsrc_ddagrab: dynamically load SetThreadDpiAwarenessContext
It's a Windows 10 only function, and its presence alone prevents the
binary from loading on older Windows versions.
2022-07-19 01:29:00 +02:00
Timo Rothenpieler
f611255480 avfilter: add vsrc_ddagrab 2022-07-18 02:08:27 +02:00
Timo Rothenpieler
be983d2354 configure: add missing deps for chromakey_cuda filter
Not sure how those went missing at some point during the review process,
but it went unnoticed since all my test machines obviously have the
deps.
2022-07-10 17:42:58 +02:00
dvhh
c6fdbe26ef configure: fix SDL2 version check for pkg_config fallback
pkg_config fallback for SDL2 use 2.1.0 as max (excluded) version
where the pkg_config specify 3.0.0
Correcting fallback version to be in line with the pkg_config version

Signed-off-by: dvhh <dvhh@yahoo.com>
Signed-off-by: Marton Balint <cus@passwd.hu>
2022-07-09 21:33:38 +02:00
Paul B Mahol
6ed9eaf664 avfilter: add remap opencl filter 2022-07-07 17:52:32 +02:00
Jan Ekström
3bb23a8b3c {configure,avformat/movenc}: enable AC-3 parser for movenc
This simplifies the code to no longer have #ifs in a manner which
does not require handling avpriv_ac3_parse_header returning ENOSYS.

As an existing example, the MPEG-TS muxer already requires the AC-3
parser, and in order to fix existing issues with the current AC-3
movenc code, switching to use the AC-3 parser is required, so this
is an enabling change for that.

Signed-off-by: Jan Ekström <jan.ekstrom@24i.com>
2022-06-30 16:14:05 +03:00
ManojGuptaBonda
a44fba0b5b AV1 VDPAU hwaccel Decode support
Support for VDPAU accelerated AV1 decoding was added with libvdpau-1.5.
Support for the same in ffmpeg is added with this patch. Profiles
related to VDPAU AV1 can be found in latest vdpau.h present in
libvdpau-1.5.

Add AV1 VDPAU to list of hwaccels and supported formats
Added file vdpau_av1.c and Modified configure to add VDPAU AV1 support.
Mapped AV1 profiles to VDPAU AV1 profiles. Populated the codec specific
params that need to be passed to VDPAU.

Signed-off-by: Philip Langdale <philipl@overt.org>
2022-06-25 09:05:58 +08:00
Zhao Zhili
58d6463296 configure: select avs2 parser for libdavs2 decoder
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2022-06-24 15:37:23 +08:00
Nil Admirari
cc5844da98 libavutil: Add wchartoutf8(), wchartoansi(), utf8toansi(), getenv_utf8(), freeenv_utf8() and getenv_dup()
wchartoutf8() converts strings returned by WinAPI into UTF-8,
which is FFmpeg's preffered encoding.

Some external dependencies, such as AviSynth, are still
not Unicode-enabled. utf8toansi() converts UTF-8 strings
into ANSI in two steps: UTF-8 -> wchar_t -> ANSI.
wchartoansi() is responsible for the second step of the conversion.
Conversion in just one step is not supported by WinAPI.

Since these character converting functions allocate the buffer
of necessary size, they also facilitate the removal of MAX_PATH limit
in places where fixed-size ANSI/WCHAR strings were used
as filename buffers.

On Windows, getenv_utf8() wraps _wgetenv() converting its input from
and its output to UTF-8. Strings returned by getenv_utf8()
must be freed by freeenv_utf8().

On all other platforms getenv_utf8() is a wrapper around getenv(),
and freeenv_utf8() is a no-op.

The value returned by plain getenv() cannot be modified;
av_strdup() is usually used when modifications are required.
However, on Windows, av_strdup() after getenv_utf8() leads to
unnecessary allocation. getenv_dup() is introduced to avoid
such an allocation. Value returned by getenv_dup() must be freed
by av_free().

Because of cleanup complexities, in places that only test the existence
of an environment variable or compare its value with a string
consisting entirely of ASCII characters, the use of plain getenv()
is still preferred. (libavutil/log.c check_color_terminal()
is an example of such a place.)

Plain getenv() is also preffered in UNIX-only code,
such as bktr.c, fbdev_common.c, oss.c in libavdevice
or af_ladspa.c in libavfilter.

Signed-off-by: Martin Storsjö <martin@martin.st>
2022-06-21 13:27:46 +03:00
Marton Balint
b3cca50638 avformat/librist: bump required version to 0.2.7
This is the first version for which fifo size setting actually works.

Signed-off-by: Marton Balint <cus@passwd.hu>
2022-06-18 16:32:23 +02:00
Matt Oliver
dd5a0302d5 avcodec/libx264: Set min build version to 158 for msvc
Was "[PATCH] libx264: Do not explicitly set X264_API_IMPORTS"

Setting X264_API_IMPORTS only affects msvc builds and it breaks
linking to static builds (although is required for shared builds).
This flag is set by x264 in its pkgconfig as required since build
158 (a615f027ed172e2dd5380e736d487aa858a0c4ff) from July 2019.
So this patch updates configure to require a newer x264 build that
correctly sets the imports flag.

The min version requirement of 158 is applied for msvc builds only.

This is also removing the check for 'libx264 without pkg-config'
which was left for compatibility reasons about 7 years ago when
the pkg-config check was introduced by commit
e06263ef1e.

Co-authored-by: softworkz <softworkz@hotmail.com>
Signed-off-by: softworkz <softworkz@hotmail.com>
Signed-off-by: Matt Oliver <protogonoi@gmail.com>
Signed-off-by: Marton Balint <cus@passwd.hu>
2022-06-11 14:15:16 +02:00
Haihao Xiang
f912cefb83 qsv: check for libmfx.pc instead of mfx.pc
This fixed the regression caused by commit 478e1a98a

Reported-by: Timo Rothenpieler <timo@rothenpieler.org>
Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
2022-05-26 23:21:37 +08:00
Trystan Mata
1cb601ad10 avcodec/mfenc: Dynamically load MFPlat.DLL
Allows non-UWP builds of FFmpeg with MediaFoundation to work on
N editions of Windows which are without MediaFoundation by default.

On UWP target, FFmpeg is linked directly against MediaFoundation since
LoadLibrary is not available.

This commit adresses https://trac.ffmpeg.org/ticket/9788

Signed-off-by: Martin Storsjö <martin@martin.st>
2022-05-25 23:45:42 +03:00
Haihao Xiang
478e1a98a2 qsv: add requirement for the mininal version of libmfx
libmfx 1.28 was released 3 years ago, it is easy to get a greater
version than 1.28. We may remove lots of compile-time checks if adding
the requirement for the minimal version in the configure script.

Reviewed-by: softworkz <softworkz@hotmail.com>
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
2022-05-25 15:17:35 +08:00
Vignesh Venkatasubramanian
84241e63cf avformat/movenc: Add support for AVIF muxing
Add an AVIF muxer by re-using the existing the mov/mp4 muxer.

AVIF Specification: https://aomediacodec.github.io/av1-avif

Sample usage for still image:
ffmpeg -i image.png -c:v libaom-av1 -still-picture 1 image.avif

Sample usage for animated AVIF image:
ffmpeg -i video.mp4 animated.avif

We can re-use any of the AV1 encoding options that will make
sense for image encoding (like bitrate, tiles, encoding speed,
etc).

The files generated by this muxer has been verified to be valid
AVIF files by the following:
1) Displays on Chrome (both still and animated images).
2) Displays on Firefox (only still images, firefox does not support
   animated AVIF yet).
3) Verified to be valid by Compliance Warden:
   https://github.com/gpac/ComplianceWarden

Fixes the encoder/muxer part of Trac Ticket #7621

Signed-off-by: Vignesh Venkatasubramanian <vigneshv@google.com>
2022-05-13 12:46:21 +05:30
Christopher Degawa
e5163b1d34 configure: extend SDL check to accept all 2.x versions
sdl2 recently changed their versioning, moving the patch level to minor level
cd7c2f1de7
and have said that they will instead ship sdl3.pc for 3.0.0

Fixes ticket 9768

Signed-off-by: Christopher Degawa <ccom@randomderp.com>
Signed-off-by: Gyan Doshi <ffmpeg@gyani.pro>
2022-05-12 11:51:07 +05:30
John Stebbins
7f5b57766b lavf/matroskaenc: enable PGS merge auto bsf
PGS segments must be merged to one packet for muxing to mkv

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-05-10 10:03:32 +02:00
Niklas Haas
2cb0cebd11 lavfi: add vf_iccdetect for parsing ICC profiles
This filter is designed to parse embedded ICC profiles and attempt
extracting colorspace tags from them, updating the AVFrame metadata
accordingly.

This is intentionally made a separate filter, rather than being part of
libavcodec itself, so that it's an opt-in behavior for the time being.
This also gives the user more flexibility to e.g. first attach an ICC
profile and then also set the colorspace tags from it.

This makes #9673 possible, though not automatic.

Signed-off-by: Niklas Haas <git@haasn.dev>
2022-04-23 21:51:55 +02:00
Niklas Haas
5cfeaeef0c lavfi: add vf_iccgen for generating ICC profiles
This filter is designed to specifically cover the task of generating ICC
profiles (and attaching them to output frames) on demand. Other tasks,
such as ICC profile loading/stripping, or ICC profile application, are
better left to separate filters (or included into e.g. vf_setparams).

Signed-off-by: Niklas Haas <git@haasn.dev>
2022-04-23 21:51:55 +02:00
Niklas Haas
b9a25963f7 lavfi: add ICC profile support via lcms2
This introduces an optional dependency on lcms2 into FFmpeg. lcms2 is a
widely used library for ICC profile handling, which apart from being
used in almost all major image processing programs and video players,
has also been deployed in browsers. As such, it's both widely available
and well-tested.

Add a few helpers to cover our major use cases. This commit merely
introduces the helpers (and configure check), even though nothing uses
them yet.

It's worth pointing out that the reason the cmsToneCurves for each
AVCOL_TRC are cached inside the context, is because constructing a
cmsToneCurve requires evaluating the curve at 4096 (by default) grid
points and constructing a LUT. So, we ideally only want to do this once
per curve. This matters for e.g. ff_icc_profile_detect_transfer, which
essentially compares a profile against all of these generated LUTs.
Re-generating the LUTs for every iteration would be unnecessarily
wasteful.

The same consideration does not apply to e.g. cmsCreate*Profile, which
is a very lightweight operation just involving struct allocation and
setting a few pointers.

The cutoff value of 0.01 was determined by experimentation. The lowest
"false positive" delta I saw in practice was 0.13, and the largest
"false negative" delta was 0.0008. So a value of 0.01 sits comfortaby
almost exactly in the middle.

Signed-off-by: Niklas Haas <git@haasn.dev>
2022-04-23 21:51:55 +02:00
Leo Izen
5f0b4e9c70 avcodec/libjxl: add Jpeg XL encoding via libjxl
This commit adds encoding support to libavcodec
for Jpeg XL images via the external library libjxl.
2022-04-23 19:51:46 +02:00
Leo Izen
458cc7e314 avcodec/libjxl: add Jpeg XL decoding via libjxl
This commit adds decoding support to libavcodec
for Jpeg XL images via the external library libjxl.
2022-04-23 19:51:46 +02:00
Mark Gaiser
f889837e00 avformat: Add IPFS protocol support.
This patch adds support for:
- ffplay ipfs://<cid>
- ffplay ipns://<cid>

IPFS data can be played from so called "ipfs gateways".
A gateway is essentially a webserver that gives access to the
distributed IPFS network.

This protocol support (ipfs and ipns) therefore translates
ipfs:// and ipns:// to a http:// url. This resulting url is
then handled by the http protocol. It could also be https
depending on the gateway provided.

To use this protocol, a gateway must be provided.
If you do nothing it will try to find it in your
$HOME/.ipfs/gateway file. The ways to set it manually are:
1. Define a -gateway <url> to the gateway.
2. Define $IPFS_GATEWAY with the full http link to the gateway.
3. Define $IPFS_PATH and point it to the IPFS data path.
4. Have IPFS running in your local user folder (under $HOME/.ipfs).

Signed-off-by: Mark Gaiser <markg85@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2022-04-12 19:58:33 +02:00
Marton Balint
ee50cc18b3 avcodec/vbnenc: add VBN encoder
Signed-off-by: Marton Balint <cus@passwd.hu>
2022-04-10 20:12:23 +02:00
Marton Balint
013d774e22 avcodec/vbndec: add VBN decoder
Add support for decoding Vizrt Binary Image (VBN) files.

LZW-compressed data is not supported yet.

Signed-off-by: Marton Balint <cus@passwd.hu>
2022-04-10 20:12:23 +02:00
Andreas Rheinhardt
f4098bbc3b avcodec/bsf: Add FFBitStreamFilter, hide internals of BSFs
This patch is analogous to 20f9727018:
It hides the internal part of AVBitStreamFilter by adding a new
internal structure FFBitStreamFilter (declared in bsf_internal.h)
that has an AVBitStreamFilter as its first member; the internal
part of AVBitStreamFilter is moved to this new structure.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-03-23 23:45:45 +01:00
Andreas Rheinhardt
20f9727018 avcodec/codec_internal: Add FFCodec, hide internal part of AVCodec
Up until now, codec.h contains both public and private parts
of AVCodec. This exposes the internals of AVCodec to users
and leads them into the temptation of actually using them
and forces us to forward-declare structures and types that
users can't use at all.

This commit changes this by adding a new structure FFCodec to
codec_internal.h that extends AVCodec, i.e. contains the public
AVCodec as first member; the private fields of AVCodec are moved
to this structure, leaving codec.h clean.

Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-03-21 01:33:09 +01:00
Andreas Rheinhardt
df2edfe1b0 configure: Add missing cri->mjpegdec dependency
The CRI decoder is useless without the MJPEG-decoder
(its init-function always errors out).

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-03-19 06:54:48 +01:00
Andreas Rheinhardt
30c08b42f2 avcodec/flashsv2enc: Avoid opening and closing z_stream
Instead initialize a z_stream during init and reset it when needed.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-03-19 00:18:36 +01:00
Andreas Rheinhardt
c3c2b5423d avcodec/lclenc: Use ff_deflate_init/end() wrappers
They return nicer error messages on error; furthermore,
they also use our allocation functions. It also stops
calling deflateEnd() on a z_stream that might not have been
successfully initialized.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-03-19 00:18:36 +01:00
Andreas Rheinhardt
1692a97251 avcodec/pngenc: Use ff_deflate_init/end() wrappers
They return nicer error messages.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-03-19 00:18:36 +01:00
Andreas Rheinhardt
e85095b524 avcodec/zmbvenc: Use ff_deflate_init/end() wrappers
They emit better error messages (it does not claim that inflateInit
failed upon an error from deflateInit!) and uses our allocation functions.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-03-19 00:18:36 +01:00
Andreas Rheinhardt
9cae7f9450 avcodec/zlib_wrapper: Add wrapper for deflateInit()
The rationale is the same as for the wrappers for inflateInit(),
although the case for it is admittedly not so strong because
there are less users of deflateInit().
Also remove an unnecessary inclusion of config.h in
libavformat/protocols.c in order to trigger a request for reconfigure
(which is needed for CONFIG_DEFLATE_WRAPPER to take effect).

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-03-19 00:18:36 +01:00
Andreas Rheinhardt
74c930e1b8 avcodec/pngdec: Don't open and close z_streams unnecessarily
Instead reuse and reset a single z_stream.
Also use FFZStream in decode_zbuf(), because it has nicer error
messages.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-03-19 00:18:36 +01:00
Andreas Rheinhardt
7ca99e1f15 avcodec/lscrdec: Don't open and close z_streams unnecessarily
Instead reuse and reset a single z_stream.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-03-19 00:18:36 +01:00
Andreas Rheinhardt
aaa3868b10 avcodec/flashsv: Use ff_inflate_init/end()
This fixes the problem of potentially closing a z_stream
that has never been successfully initialized.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-03-19 00:18:36 +01:00
Andreas Rheinhardt
8231080fd3 avcodec/lcldec: Use ff_inflate_init/end(), cleanup generically
Returns better error messages in case of error and deduplicates
the inflateInit() code and also allows to cleanup generically
in case of errors as it is save to call ff_inflate_end() if
ff_inflate_init() has not been called successfully.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-03-19 00:18:35 +01:00
Andreas Rheinhardt
7fffa718c3 avcodec/mscc: Use ff_inflate_init/end()
This fixes the problem of potentially closing a z_stream
that has never been successfully initialized.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-03-19 00:18:35 +01:00
Andreas Rheinhardt
4960c62944 avcodec/mvha: Use ff_inflate_init/end()
This fixes the problem of potentially closing a z_stream
that has never been successfully initialized.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-03-19 00:18:35 +01:00
Andreas Rheinhardt
c1b0b8f9be avcodec/mwsc: Use ff_inflate_init/end()
This fixes the problem of potentially closing a z_stream
that has never been successfully initialized.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-03-19 00:18:35 +01:00
Andreas Rheinhardt
ac692aa8e9 avcodec/rasc: Use ff_inflate_init/end()
This fixes the problem of potentially closing a z_stream
that has never been successfully initialized.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-03-19 00:18:35 +01:00
Andreas Rheinhardt
79fe1c8f3a avcodec/tscc: Use ff_inflate_init/end()
Returns better error messages in case of error and deduplicates
the inflateInit() code.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-03-19 00:18:35 +01:00
Andreas Rheinhardt
c78d39b641 avcodec/wcmv: Use ff_inflate_init/end()
This fixes the problem of potentially closing a z_stream
that has never been successfully initialized.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-03-19 00:18:35 +01:00
Andreas Rheinhardt
93c70b8555 avcodec/zerocodec: Use ff_inflate_init/end()
This fixes the problem of potentially closing a z_stream
that has never been successfully initialized.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-03-19 00:18:35 +01:00
Andreas Rheinhardt
3d4634f1ff avcodec/zmbv: Use ff_inflate_init/end()
Returns better error messages in case of error and deduplicates
the inflateInit() code.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-03-19 00:18:35 +01:00
Andreas Rheinhardt
dd8a55cb3e avcodec/zlib_wrapper: Add wrappers for zlib inflateInit, inflateEnd
It is not documented to be safe to call inflateEnd() on a z_stream
that has never been successfully been initialized by inflateInit(),
but just zeroed. It just happens to work and several codecs rely
on this (they have FF_CODEC_CAP_INIT_CLEANUP set and even call
inflateEnd() when inflateInit() failed or has never been called).
To avoid this, other codecs recorded whether their zstream has been
initialized successfully or not.

This commit adds wrappers for inflateInit() and inflateEnd() that
do what these other codecs do; furthermore, they also take care of
properly setting up the zstream before inflateInit() and emit
an error message in case of error.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-03-19 00:18:35 +01:00
Martin Storsjö
a78f136f3f configure: Use a separate config_components.h header for $ALL_COMPONENTS
This avoids unnecessary rebuilds of most source files if only the
list of enabled components has changed, but not the other properties
of the build, set in config.h.

Signed-off-by: Martin Storsjö <martin@martin.st>
2022-03-16 14:12:49 +02:00
Adrian Ratiu
bc5ccea3b9 configure: move ranlib -D test after setting defaults
In Gentoo and ChromeOS we want to allow pure LLVM builds without
using GNU tools, so we block any unwanted mixed GNU/LLVM usages
(GNU tools are still kept around in our chroots for projects
like glibc which cannot yet be built otherwise).

The default ${cross_prefix}${ranlib_default} points to GNU and
fails, so move the test a bit later - after the defaults are
set and the proper values get overriden - such that ffmpeg
configure calls the llvm-ranlib we desire. [1]

[1] https://gitweb.gentoo.org/repo/gentoo.git/tree/media-video/ffmpeg/ffmpeg-4.4.1-r1.ebuild?id=7a34377e3277a6a0e2eedd40e90452a44c55f1e6#n477

Signed-off-by: Adrian Ratiu <adrian.ratiu@collabora.com>
Signed-off-by: Martin Storsjö <martin@martin.st>
2022-03-11 14:20:14 +02:00
Wu Jianhua
f629ea2e18 avutil/cpu: add AVX512 Icelake flag
Signed-off-by: Wu Jianhua <jianhua.wu@intel.com>
Reviewed-by: Henrik Gramner <henrik@gramner.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2022-03-10 16:45:48 -03:00
Martin Storsjö
c619c54e0d configure: Fix detecting/using getauxval
While trying to detect getauxval, this actually never output
HAVE_GETAUXVAL into config.h before.

Signed-off-by: Martin Storsjö <martin@martin.st>
2022-03-04 14:29:42 +02:00
James Almer
df272928ff configure: stop allowing disabling lzo
The module is now always compiled in.

Signed-off-by: James Almer <jamrial@gmail.com>
2022-02-26 14:22:07 -03:00
James Almer
1dddb930aa avcodec/libsvtav1: update some options and defaults
And bump the minimum required version to 0.9.0

Signed-off-by: James Almer <jamrial@gmail.com>
2022-02-24 20:36:53 -03:00
Paul B Mahol
18ad9fb0c5 avfilter/af_superequalizer: switch rdft to lavu/tx 2022-02-16 17:28:14 +01:00
Anton Khirnov
be95df12bb lavc/mpeg*: drop the XvMC hwaccel code
XvMC was last relevant over 10 years ago, if ever. There is no reason to
use it today.
2022-02-15 10:16:15 +01:00
Paul B Mahol
8e825ec3ab avfilter/vf_fftfilt: switch to rdft from lavu/tx 2022-02-14 17:52:09 +01:00
Paul B Mahol
e26a0afabd avfilter/vf_fftdnoiz: switch to fft from lavu/tx 2022-02-14 17:52:09 +01:00
Stephen Hutchinson
da9cc25c88 configure: check avisynth header version
The headers from version 3.7.1 are needed in order to support
parsing of frame properties. avs/version.h has been generated
as part of the AviSynth+ build process for a long time, but was
never installed with the includes until version 3.7.1a. Checking
for the presence of avs/version.h might have been sufficient,
but a version check mechanism might be useful in the future.

This does not change the version compatibility with the library
itself; previous 3.x versions of AviSynth+ as well as AviSynth 2.6
can still be used with the demuxer.

Signed-off-by: Stephen Hutchinson <qyot27@gmail.com>
2022-02-13 18:24:42 -05:00
Paul B Mahol
fad5c6d743 avcodec/qdmc: switch to fft from lavu/tx 2022-02-12 14:24:35 +01:00
Paul B Mahol
b015c101ab avfilter/af_surround: switch to rdft from avutil/tx 2022-02-12 12:48:18 +01:00
Paul B Mahol
800dfd2eac avfilter/af_atempo: switch to rdft from lavu/tx 2022-02-12 12:45:43 +01:00
Aman Karmani
2f299c0b8b avutil: use getauxval(3) for CPU capabilities on linux/android ARM
getauxval is marginally faster, and works even when procfs is not mounted

support on Linux was added in glibc 2.16
support on Android was added in 4.4 (API 20)
fixes #6578

Signed-off-by: Aman Karmani <aman@tmm1.net>
2022-02-07 13:42:40 -08:00
Paul B Mahol
e597ea4c0e avfilter/asrc_sinc: switch to rdft from lavu/tx 2022-02-06 12:45:47 +01:00
Paul B Mahol
cfe6df99fa configure: afir filter no longer depends on rdft from avcodec 2022-02-06 11:28:27 +01:00
Zhao Zhili
2b15acb96a configure: add libplacebo to help message 2022-01-27 10:05:27 +01:00
Kyle Swanson
3d29724c00 avfilter/vf_libvmaf: update filter for libvmaf v2.0.0 2022-01-23 11:41:30 -08:00
Anton Khirnov
2f0a214a62 configure: link to libatomic when it's present
C11 atomics in some configurations (e.g. 64bit operations on ppc64 with
GCC) require linking to libatomic.

Fixes #9275
2022-01-21 09:28:59 +01:00
Xinpeng Sun
516496069d avfilter: add overlay vaapi filter
Overlay one video on the top of another.

It takes two inputs and has one output. The first input is the "main" video on
which the second input is overlaid. This filter requires same memory layout for
all the inputs.

An example command to use this filter to overlay overlay.mp4 at the top-left
corner of the main.mp4:

ffmpeg -init_hw_device vaapi=foo:/dev/dri/renderD128 \
-hwaccel vaapi -hwaccel_device foo -hwaccel_output_format vaapi -c:v h264 -i main.mp4 \
-hwaccel vaapi -hwaccel_device foo -hwaccel_output_format vaapi -c:v h264 -i overlay.mp4 \
-filter_complex "[0:v][1:v]overlay_vaapi=0:0:100💯0.5[t1]" \
-map "[t1]" -an -c:v h264_vaapi -y out_vaapi.mp4

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Signed-off-by: Xinpeng Sun <xinpeng.sun@intel.com>
Signed-off-by: Zachary Zhou <zachary.zhou@intel.com>
Signed-off-by: Fei Wang <fei.w.wang@intel.com>
Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
2022-01-17 16:32:17 +08:00