Commit Graph

5833 Commits

Author SHA1 Message Date
Kyle Swanson 7f685d0f49 avfilter: add libvmaf_cuda
Signed-off-by: Kyle Swanson <kswanson@netflix.com>
2023-09-27 10:22:33 -07:00
Fei Wang 3be81e3b44 lavc/vaapi_encode: Add VAAPI AV1 encoder
Signed-off-by: Fei Wang <fei.w.wang@intel.com>
Acked-by: Neal Gompa <ngompa13@gmail.com>
2023-09-22 13:15:00 +08:00
James Almer abc346de73 configure: rework parsing --cpu arguments to support all features unless blacklisted
Keeping an ever growing list of CPUs just to pass -march to the compiler and
enable fast_cmov is a waste of time. Every CPU we know has limitations is
already handled here, so just fallback to enabling everything when a passed in
argument is not one of those.

This will enable optimizations for CPU architectures released in the past 7 or
so years with supported GCC and clang compilers when used as argument in
configure, instead of silently ignoring them.

Signed-off-by: James Almer <jamrial@gmail.com>
2023-09-19 12:47:38 -03:00
Leo Izen 9b454fdaef
avformat/libssh: avoid deprecated functions
Avoid using the deprecated functions ssh_try_publickey_from_file among
others in favor of symbols introduced in libssh 0.6.0 (Jan 2014) and
update configure to require this version.

Signed-off-by: Leo Izen <leo.izen@gmail.com>
2023-09-18 08:43:24 -04:00
Lynne 358919506d
vulkan: enable VK_KHR_cooperative_matrix
It's of interest to API users, and of interest to us,
as a DCT/DST can be implemented via matrix multiplies.
2023-08-26 23:14:53 +02:00
Wenbin Chen e79bd1f1b1 lavfi/dnn: Add OpenVINO API 2.0 support
OpenVINO API 2.0 was released in March 2022, which introduced new
features.
This commit implements current OpenVINO features with new 2.0 APIs. And
will add other features in API 2.0.
Please add installation path, which include openvino.pc, to
PKG_CONFIG_PATH mannually for new OpenVINO libs config.

Signed-off-by: Ting Fu <ting.fu@intel.com>
Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
2023-08-26 14:12:10 +08:00
Martin Storsjö aea2d269db configure: Include objbase.h when checking for CoTaskMemFree
ddc1cd5cdd defined WIN32_LEAN_AND_MEAN
globally, which makes for much fewer transitive includes from
windows.h. With that define, CoTaskMemFree no longer gets
implicitly declared by just including windows.h, but one has to
include the right header objbase.h too.

That commit caused ole32 to no longer get detected, which caused
dxva2 to no longer be enabled. This gets fixed by this patch.

Signed-off-by: Martin Storsjö <martin@martin.st>
2023-08-21 23:11:43 +03:00
L. E. Segovia ddc1cd5cdd configure: Set WIN32_LEAN_AND_MEAN at configure time
Including winsock2.h or windows.h without WIN32_LEAN_AND_MEAN cause
bzlib.h to parse as nonsense, due to an instance of #define char small
in rpcndr.h.

See:

https://stackoverflow.com/a/27794577

Signed-off-by: L. E. Segovia <amy@amyspark.me>
Signed-off-by: Martin Storsjö <martin@martin.st>
2023-08-14 22:57:28 +03:00
Brad Smith f6d8464590
configure: use just the pkg-config for sndio
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2023-08-07 22:31:06 +02:00
Andreas Rheinhardt e35dfe864d avcodec/avcodec: Add FFHWAccel, hide internals of AVHWAccel
This commit is the AVHWAccel analogue of commit
20f972701806be20a77f808db332d9489343bb78: It moves the private fields
of AVHWAccel to a new struct FFHWAccel extending AVHWAccel
in an internal header (namely hwaccel_internal.h).

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2023-08-07 09:50:29 +02:00
Zhao Zhili 89f5124d0a avfilter: add transpose_vt for videotoolbox pix_fmt
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2023-07-23 11:52:28 +08:00
Zhao Zhili c2c96c4c24 avfilter: add scale_vt for videotoolbox pix_fmt
For example,

./ffmpeg -hwaccel videotoolbox \
	-hwaccel_output_format videotoolbox_vld \
	-i ios-265.mov \
	-c:v hevc_videotoolbox \
	-profile:v main \
	-b:v 3M \
	-vf scale_vt=w=iw/2:h=ih/2:color_matrix=bt709:color_primaries=bt709:color_transfer=bt709 \
	-c:a copy \
	-tag:v hvc1 \
	/tmp/test.mp4

Input: hevc (Main 10) (hvc1 / 0x31637668), yuv420p10le(tv, bt2020nc/bt2020/arib-std-b67), 3840x2160
Output: hevc (Main) (hvc1 / 0x31637668), yuv420p(tv, bt709, progressive), 1920x1080
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2023-07-23 11:51:57 +08:00
Kieran Kunhya a4e616824b libavutil: Remove TOMI CPU 2023-07-22 00:36:53 +01:00
Stephen Hutchinson efa6cec759 configure: bump minimum AviSynth+ header version
AVISYNTH_INTERFACE_VERSION 10 fell in-between the releases of
3.7.2 and 3.7.3, and is required to be able to read the channel
layout information.

Signed-off-by: Stephen Hutchinson <qyot27@gmail.com>
2023-07-19 19:33:20 -04:00
Marton Balint 36f4e6f8f4 avformat/hlsenc: use av_random_bytes() for generating AES128 key
av_random_bytes() can use OS provided strong random functions and does not
depend soley on openssl/gcrypt external libraries.

Fixes ticket #10441.

Signed-off-by: Marton Balint <cus@passwd.hu>
2023-07-16 11:48:31 +02:00
Rémi Denis-Courmont f032234953 aarch64: remove VFP feature check
This is not actually used for anything. The configure check causes the
CPU feature flag to be set, but nothing consumes it at all.

While AArch64 does have VFP, it is only used for the scalar C code.
Conversely, it is still possible to disable VFP, by changing the
C compiler flags as before (though that only makes sense for an
hypothetical non-standard Armv8 platform without VFP).

Note that this retains the "vfp" option flag, for backward
compatibility and on the very remote but theoretically possible chance
that FFmpeg actually makes use of it in the future.

AV_CPU_FLAG_VFP is retained as it is actually used by AArch32.
2023-07-15 22:56:30 +03:00
Pavel Koshevoy 0056d9f176 avutil: fix build failure on osx 10.4
libavutil/random_seed.c calls arc4random_buf which is
not available on OSX 10.4 Tiger, but the configuration
script tests for arc4random which is available.

Fix the configuration test to match the actual API used.

Co-authored-by: James Almer <jamrial@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2023-07-08 14:51:15 -03:00
James Almer b7f4d5fa7e avutil/random_seed: add support for gcrypt and OpenSSL as source of randomness
Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: James Almer <jamrial@gmail.com>
2023-07-06 15:30:27 -03:00
Nuo Mi c7864a9987 avcodec: add Metadata bsf for H266/VVC
Add H.266/VVC metadata bsf.

Signed-off-by: James Almer <jamrial@gmail.com>
2023-06-29 14:12:50 -03:00
Nuo Mi b5aefb6e70 avcodec: add bitstream parser for H266/VVC
Add nal parser ff_vvc_parser to parse vvc elementary bitstreams.

Co-authored-by: Thomas Siedel <thomas.ff@spin-digital.com>
Co-authored-by: James Almer <jamrial@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2023-06-29 14:12:50 -03:00
Nuo Mi dfc62fd1c6 avcodec/cbs: add cbs implementation for H266/VVC
Add CodedBitstreamContext to parse VPS,SPS,PPS in VVC nal units.
Implement parsing and writing of SPS,PPS,VPS,PH,AUD,SEI and slices.
Add ff_cbs_type_h266 to cbs types tables and AV_CODEC_ID_H266
to cbs codec ids.

Co-authored-by: Thomas Siedel <thomas.ff@spin-digital.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2023-06-29 14:12:50 -03:00
Dmitrii Ovchinnikov 9e3f07aa21 amfenc: Update the min version to 1.4.29.0 for AMF SDK. 2023-06-29 10:49:33 -03:00
yethie 1eeb59a209 avfilter/vf_drawtext: improve glyph shaping and positioning
- text is now shaped using libharfbuz
- glyphs position is now accurate to 1/4 pixel in both directions
- the default line height is now the one defined in the font

Adds libharfbuzz dependency.
2023-06-19 22:35:52 +02:00
James Almer be91c5c80d configure: fix evc related dependencies
Signed-off-by: James Almer <jamrial@gmail.com>
2023-06-17 10:16:45 -03:00
Philip Langdale 73a2252f1d avfilter/vf_bwdif_cuda: CUDA accelerated bwdif deinterlacer
I've been sitting on this for 3 1/2 years now(!), and I finally got
around to fixing the loose ends and convincing myself that it was
correct. It follows the same basic structure as yadif_cuda, including
leaving out the edge handling, to avoid expensive branching.
2023-06-16 12:52:32 -07:00
Dawid Kozinski 34e4f18360 avcodec/evc_parser: Added parser implementation for EVC format
- Added constants definitions for EVC parser
- Provided NAL units parsing following ISO_IEC_23094-1
- EVC parser registration

Signed-off-by: Dawid Kozinski <d.kozinski@samsung.com>
2023-06-15 09:51:04 -03:00
Paul B Mahol 2d59ca0a66 avcodec: add VMX1 decoder 2023-06-12 23:43:05 +02:00
Zhao Zhili 6220252f42 configure: add pkg-config check for libopenvino
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2023-06-08 10:50:37 +08:00
Marvin Scholz dae393fe72 libavfilter: add vf_xfade_vulkan
This is an initial version of vf_xfade_vulkan based
on vf_xfade_opencl, for now only a subset of transitions
are supported.
2023-06-07 23:59:06 +02:00
Paul B Mahol f11515c77f avcodec: add RTV1 decoder 2023-06-07 09:00:18 +02:00
Martin Storsjö 9b0052200a aarch64: Add Apple runtime detection of dotprod and i8mm using sysctl
For now, there's not much value in this since Clang don't support
enabling the dotprod or i8mm features with either .arch_extension
or .arch (it has to be enabled by the base arch flags passed to
the compiler). But it may be supported in the future.

Signed-off-by: Martin Storsjö <martin@martin.st>
2023-06-06 12:41:20 +03:00
Martin Storsjö 493fcde50a aarch64: Add Linux runtime cpu feature detection using HWCAP_CPUID
Based partially on code by Janne Grunau.

Signed-off-by: Martin Storsjö <martin@martin.st>
2023-06-06 12:40:57 +03:00
Martin Storsjö fb1b88af77 configure: aarch64: Support assembling the dotprod and i8mm arch extensions
These are available since ARMv8.4-a and ARMv8.6-a respectively,
but can also be available optionally since ARMv8.2-a.

Check if ".arch armv8.2-a" and ".arch_extension {dotprod,i8mm}" are
supported, and check if the instructions can be assembled.

Current clang versions fail to support the dotprod and i8mm
features in the .arch_extension directive, but do support them
if enabled with -march=armv8.4-a on the command line. (Curiously,
lowering the arch level with ".arch armv8.2-a" doesn't make the
extensions unavailable if they were enabled with -march; if that
changes, Clang should also learn to support these extensions via
.arch_extension for them to remain usable here.)

Signed-off-by: Martin Storsjö <martin@martin.st>
2023-06-06 12:40:26 +03:00
Timo Rothenpieler 03823ac0c6 configure: use non-deprecated nvenc GUID for conftest 2023-06-01 23:24:43 +02:00
Lynne 160a415e22
lavfi: add nlmeans_vulkan filter 2023-05-29 00:42:01 +02:00
Lynne 7cfd7e4af4
lavfi: add color_vulkan filter 2023-05-29 00:42:00 +02:00
Lynne 77478f6793
av1dec: add Vulkan hwaccel 2023-05-29 00:42:00 +02:00
Lynne 36c16a06b2
hevcdec: add Vulkan hwaccel
Thanks to Dave Airlie for figuring out a lot of the parameters.
2023-05-29 00:41:58 +02:00
Lynne a9fbe8b472
h264dec: add Vulkan hwaccel
Thanks to Dave Airlie for figuring out a lot of the parameters.
2023-05-29 00:41:58 +02:00
Lynne 023ae6103f
libavcodec: add Vulkan common video code 2023-05-29 00:41:57 +02:00
Lynne 09dc9193ea
lavfi: add bwdif_vulkan 2023-05-29 00:41:56 +02:00
Lynne 59707cc485
hwcontext_vulkan: initialize and require instance version 1.3
This just bumps the required loader library version (libvulkan).
All device-related features, such as video decoding, atomics, etc.
are still optional and the code deals with their loss on a local level
(e.g. the decoder or filter checks for the features it needs, not
the hwcontext).

Bumping the required version essentially packs all maintenance
extensions which correct the spec rather than requiring to enable
them individually.
2023-05-29 00:41:36 +02:00
James Almer 97f4263457 avcodec/av1dec: convert to receive_frame()
This removes the overhead of inserting the av1_frame_split bsf as part of the
decoding process.

Signed-off-by: James Almer <jamrial@gmail.com>
2023-05-25 11:21:35 -03:00
Samuel Mira 416fd1b43b avcodec/mediacodec: Add VP8 encoder
Connected FFmpeg to Mediacodec VP8 encoder.

Signed-off-by: Samuel Mira <samuel.mira@qt.io>
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2023-05-17 19:20:57 +08:00
Samuel Mira acd37fd566 avcodec/mediacodec: Add AV1 encoder
Connected FFmpeg to Mediacodec AV1 encoder

Signed-off-by: Samuel Mira <samuel.mira@qt.io>
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2023-05-17 19:19:51 +08:00
Sil Vilerino d54127c41a lavu/hwcontext_vaapi: Add Windows/VAAPI support with vaGetDisplayWin32
Libva 2.17+ adds a new libva-win32 node and Mesa 22.3 adds a VAAPI driver
based on Direct3D 12 for Windows. Both of them are available at:
https://www.nuget.org/packages/Microsoft.Direct3D.VideoAccelerationCompatibilityPack

Initial review at https://github.com/intel-media-ci/ffmpeg/pull/619/

Signed-off-by: Sil Vilerino <sivileri@microsoft.com>
Reviewed-by: Dmitry Rogozhkin <dmitry.v.rogozhkin@intel.com>
Reviewed-by: Wu, Tong1 <tong1.wu@intel.com>
2023-04-24 13:24:41 +08:00
Paul B Mahol 40bae5be5e avcodec: add PDV decoder 2023-04-20 15:44:38 +02:00
Zhao Zhili 4dffa564d1 configure: remove duplicated extralibs of android_camera
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2023-04-11 19:57:09 +08:00
Zhao Zhili ef09db1eac configure: add mediacodec_extralibs to avutil
Fix #10299

Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2023-04-11 19:57:00 +08:00
Zhao Zhili ab177c7469 configure: cleanup mediacodec dependency
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2023-04-11 19:56:50 +08:00
Michael Niedermayer 60ccb3fe78
Remove libopenjpeg decoder
We do not support other video/image decoders when we have our own.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2023-04-02 23:54:51 +02:00
Samuel Raposo Vieira Mira b4eca5cce2 avcodec/mediacodec: add mpeg4 encoder
This patch will add MPEG4 encoder using Android Mediacodec

Signed-off-by: Samuel Mira <samuel.mira@qt.io<mailto:samuel.mira@qt.io>>
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2023-04-02 15:10:15 +08:00
Samuel Raposo Vieira Mira 139f3352ed avcodec/mediacodec: add vp9 encoder using mediacodec
The only encoders avaliable using mediacodec were h264 and hevc. This
patch adds the vp9 encoder.

Signed-off-by: Samuel Mira <samuel.mira@qt.io<mailto:samuel.mira@qt.io>>
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2023-04-02 15:09:45 +08:00
TADANO Tokumei b6138633cd lavc/libaribcaption.c: add ARIB caption decoder using libaribcaption
This patch add another ARIB caption decoder using libaribcaption
external library.

Unlike libaribb24, it supports 3 types of subtitle outputs:
* text: plain text
* ass: ASS formatted text
* bitmap: bitmap image

Default subtitle type is ass as same as libaribb24.
Advantages compared with libaribb24 on ASS subtitle are:
* Subtitle positioning.
* Multi-rect subtitle: some captions are displayed at different
  position at a time.
* More stability and reproducibility.

To compile with this feature:
* libaribcaption external library has to be pre-installed.
  https://github.com/xqq/libaribcaption
* configure with `--enable-libaribcaption` option.

`--enable-libaribb24` and `--enable-libaribcaption` options are
not exclusive. If both enabled, libaribcaption precedes as
order listed in `libavcodec/allcodecs.c`.

Signed-off-by: rcombs <rcombs@rcombs.me>
2023-03-28 12:05:19 -04:00
J. Dekker 4f55568217 configure: add LTO optarg
This allows users to specify an argument such as './configure
--enable-lto=thin' to use ThinLTO with Clang. The old functionality with
'./configure --enable-lto' is preserved.

Signed-off-by: J. Dekker <jdek@itanimul.li>
2023-03-27 08:42:44 +02:00
Michael Niedermayer 06b451d276
avfilter/vf_mcdeint: update to new API
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2023-03-26 01:46:49 +01:00
Anton Khirnov c29e5ab5c1 fftools/ffplay: depend on avfilter
Making lavfi optional adds a lot of complexity for very questionable
gain.
2023-03-20 10:42:09 +01:00
Michael Niedermayer 771c27119d
avfilter/vf_uspp: update to new APIs
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2023-03-18 18:20:02 +01:00
James Almer 8e5e578453 avocdec/Makefile: add missing dependencies to av1 and libdav1d decoders
Missed in d6d5765051 and b465e6fed0
Respectively.

Signed-off-by: James Almer <jamrial@gmail.com>
2023-03-12 16:31:54 -03:00
Gyan Doshi 9f7e51e513 configure: select subordinate formats for HLS
HLS segments may be MPEG-TS or fragmented MP4, so those (de)muxers are
required for reading/writing HLS media segments.

Fixes functionality with --disable-everything --enable-demuxer=hls
--enable-muxer=hls
2023-02-18 14:31:23 +05:30
Haihao Xiang 0f407cdea2 avfilter: add QSV variants of the stack filters
Include hstack_qsv, vstack_qsv and xstack_qsv. They may accept input
streams with different sizes.

Examples:
$ ffmpeg -hwaccel qsv -hwaccel_output_format qsv -i input.mp4 \
-filter_complex "[0:v][0:v]hstack_qsv" -f null -

$ ffmpeg \
-hwaccel qsv -hwaccel_output_format qsv -i input.mp4 \
-hwaccel qsv -hwaccel_output_format qsv -i input.mp4 \
-hwaccel qsv -hwaccel_output_format qsv -i input.mp4 \
-hwaccel qsv -hwaccel_output_format qsv -i input.mp4 \
-filter_complex "[0:v][1:v][2:v][3:v]xstack_qsv=inputs=4:fill=0x000000:layout=0_0_1920x1080|w0_0_1920x1080|0_h0_1920x1080|w0_h0_1920x1080" \
-f null -

Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
2023-02-16 11:15:50 +08:00
Stefano Sabatini 3d4dc6aa77 examples: rename transcoding to transcode 2023-02-11 17:49:01 +01:00
Stefano Sabatini 3856f82ef9 examples: rename scaling_video to scale_video 2023-02-11 17:49:01 +01:00
Stefano Sabatini cd8211527e examples: rename resampling audio to resample_audio 2023-02-11 17:49:01 +01:00
Stefano Sabatini 0a69ca656b examples: rename remuxing to remux 2023-02-11 17:49:01 +01:00
Stefano Sabatini ab2ec8ef01 examples: rename qsvdec to qsv_decode 2023-02-11 17:49:01 +01:00
Stefano Sabatini eac4324bfb examples: rename muxing to mux 2023-02-11 17:49:01 +01:00
Stefano Sabatini 7a53ae931d examples: rename metadata to show_metadata 2023-02-11 17:49:01 +01:00
Stefano Sabatini 2e4694707e examples: rename http_multiclient to avio_http_serve_files 2023-02-11 17:49:01 +01:00
Stefano Sabatini 1ae619e8ee examples: rename filtering_video to decode_filter_video 2023-02-11 17:49:01 +01:00
Stefano Sabatini 3367bd56d1 examples: rename filtering_audio to decode_filter_audio 2023-02-11 17:49:01 +01:00
Stefano Sabatini 7f5630a899 examples: rename demuxing_decoding to demux_decode
Follow general scheme VERB_OBJECT.
2023-02-11 17:49:01 +01:00
Stefano Sabatini f0a415c7eb examples: rename avio_reading to avio_read_callback
Adopt general scheme VERB_OBJECT.
2023-02-11 17:49:01 +01:00
Andreas Rheinhardt 59c9dc82f4 avformat/avformat: Move AVOutputFormat internals out of public header
This commit does for AVOutputFormat what commit
20f9727018 did for AVCodec:
It adds a new type FFOutputFormat, moves all the internals
of AVOutputFormat to it and adds a now reduced AVOutputFormat
as first member.

This does not affect/improve extensibility of both public
or private fields for muxers (it is still a mess due to lavd).

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2023-02-09 15:24:15 +01:00
Anton Khirnov 63a348659b configure: make flite depend on threads
The filter calls pthreads functions unconditionally.
2023-02-09 12:45:53 +01:00
Anton Khirnov 82da22066c lavc: deprecate CrystalHD decoders
The hardware is old and not relevant today. The decoders also have many
special quirks and are effectively unmaintained.
2023-02-04 13:12:28 +01:00
Haihao Xiang a48c95d3c9 lavfi/deinterlace_qsv: simplify deinterlace_qsv filter
Like what we did for scale_qsv filter, we use QSVVPPContext as a base
context to manage MFX session for deinterlace_qsv filter.

Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
2023-02-03 10:27:58 +08:00
Paul B Mahol 00994e8be1 avcodec: add media100_to_mjpegb bitstream filter and use it 2023-01-31 17:06:29 +01:00
Haihao Xiang d66312cf27 lavfi/scale_qsv: simplify scale_qsv filter
Use QSVVPPContext as a base context of QSVScaleContext, hence we may
re-use functions defined for QSVVPPContext to manage MFX session for
scale_qsv filter.

In addition, system memory has been taken into account in
QSVVVPPContext, we may add support for non-QSV pixel formats in the
future.

Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
2023-01-30 08:48:58 +08:00
Haihao Xiang aecfec6f80 avfilter: add VA-API variants of the stack filters
Include hstack_vaapi, vstack_vaapi and xstack_vaapi. They may accept
input streams with different sizes.  libva2 (VA-API 1.0+) is required.

Example:
$ ffmpeg -hwaccel vaapi -hwaccel_output_format vaapi -i input.h265 -filter_complex
"[0:v][0:v]hstack_vaapi" -c:v h264_vaapi out.h264

$ ffmpeg \
-hwaccel vaapi -hwaccel_output_format vaapi -i input.h264 \
-hwaccel vaapi -hwaccel_output_format vaapi -i input.h264 \
-hwaccel vaapi -hwaccel_output_format vaapi -i input.h264 \
-hwaccel vaapi -hwaccel_output_format vaapi -i input.h264 \
-filter_complex "[0:v][1:v][2:v][3:v]xstack_vaapi=inputs=4:fill=0x000000:layout=0_0_1920x1080|w0_0_1920x1080|0_h0_1920x1080|w0_h0_1920x1080" \
-c:v hevc_vaapi out.h265

Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
2023-01-30 08:48:58 +08:00
Dmitrii Ovchinnikov 5f0a7a9169 libavcodec/amfenc: add AV1 encoding support
Tested-by: Jean-Baptiste Kempf <jb@videolan.org>
2023-01-27 22:38:45 +05:30
Dmitrii Ovchinnikov 23d4f9223a amfenc: Update the min version to 1.4.28.0 for AMF SDK.
Tested-by: Jean-Baptiste Kempf <jb@videolan.org>
2023-01-27 22:35:35 +05:30
Aman Karmani f5f1c1fd6b avcodec/vaapi_encode_h26x: passthrough A53 CC data as H264/HEVC SEI
Signed-off-by: Aman Karmani <aman@tmm1.net>
2023-01-17 10:10:52 +08:00
Derek Buitenhuis 94aa70d757 avformat: Rename IPFS to IPFS gateway
It is a URL rewriter for IPFS gateways, not an actual implementation of
IPFS, and naming it as such was both incorrect and misleading.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2023-01-09 12:14:47 -05:00
Zhao Zhili f0d2ed135c avcodec/mediacodecdec: add AV1 decoding support
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2023-01-03 19:23:03 +08:00
Lynne 62da0b4a74
configure: update copyright year 2023-01-01 00:24:04 +01:00
James Darnley f1f41d6ff5 configure: support lsan as toolchain 2022-12-20 15:02:45 +01:00
Zhao Zhili e3f2d01d70 avcodec/mediacodecenc: use bsf to handle crop
It's well known that mediacodec encoder requires 16x16 alignment.
Use our bsf to fix the crop info.

Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2022-12-17 04:28:27 +08:00
Paul B Mahol 6c814093d8 avfilter/vf_bm3d: switch to TX from lavu 2022-12-04 23:02:07 +01:00
Andreas Rheinhardt 4d9c0b3efa configure: Add (h264|hevc)_sei subsystems
Currently, several components select atsc_a53, despite
not using anything from it themselves. They only select
it because parsing SEI messages adds an indirect dependency.
But using direct dependencies is more natural, so add
dedicated subsystems for them.

It already allows to remove a superfluous dependency of
the HEVC QSV encoder on hevc_sei and atsc_a53.

Adding new subsystems only becomes effective after a reconfiguration.
In order to force this, some needed headers (which are only included
implicitly before this commit) were included explicitly in
libavformat/allformats.c.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-12-01 11:00:40 +01:00
Lynne ca8aaf24df
binkaudio: convert to lavu/tx 2022-11-24 15:58:36 +01:00
Anton Khirnov 703e76f917 configure: drop support for complex functions
They are not used since 520a5d33f0.
2022-11-23 10:40:55 +01:00
Wenbin Chen efe2b63c89 doc/examples: Add qsv_transcode example
Add qsv_transcode example which shows how to use qsv to do hardware
accelerated transcoding, also show how to dynamically set encoding
parameters.

examples:
Normal usage:
qsv_transcode input.mp4 h264_qsv output.mp4 "g 60"

Dynamic setting usage:
qsv_transcode input.mp4 hevc_qsv output.mp4 "g 60 asyne_depth 1"
100 "g 120"
This command initializes codec with gop_size 60 and change it to
120 after 100 frames

Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
2022-11-22 13:52:38 +08:00
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