Commit Graph

634 Commits

Author SHA1 Message Date
Andreas Rheinhardt b189550137 lib*/version.h: Bump Versions after release/5.0 branch
This is done a second time for 5.0 because master was
merged into 5.0 so that it contains the recent DOVI additions.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-01-04 14:29:06 +01:00
Andreas Rheinhardt c512be9a90 lib*/version.h: Bump Versions before release/5.0 branch
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-01-04 13:40:03 +01:00
Niklas Haas 78dc21b123 lavu/frame: Add Dolby Vision metadata side data type
In order to be able to extend this struct later (as the Dolby Vision RPU
evolves), all of the 'container' structs are considered extensible, and
the individual constituent fields must instead be accessed via offsets.
The precedent for this style of access is set in
<libavutil/detection_bbox.h>

Signed-off-by: Niklas Haas <git@haasn.dev>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-01-04 11:59:02 +01:00
Michael Niedermayer 4be85c9331 lib*/version.h: Bump Versions after release/5.0 branch
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2022-01-03 22:10:46 +01:00
Michael Niedermayer f3964a59e1 lib*/version.h: Bump Versions before release/5.0 branch
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2022-01-03 22:08:31 +01:00
rcombs b7e1ec7bda lavu/videotoolbox: expose routine to set CVPixelBufferRef metadata 2021-12-22 18:43:17 -06:00
Alan Kelly ffbab99f2c libavutil/cpu: Add AV_CPU_FLAG_SLOW_GATHER.
This flag is set on Haswell and earlier and all AMD cpus.
2021-12-21 17:44:44 -03:00
Zhao Zhili 278068dc60 avutil/display: fix inverted doc
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-12-20 21:29:42 +01:00
Lynne f45cbb775e
lavu: bump minor version and add doc/APIchanges entry for Vulkan changes 2021-12-10 17:04:27 +01:00
Lynne b236ef0a59
lavu/avframe: add a time_base field
This adds a time_base field to AVFrame, as an analogue to the
AVPacket.time_base field.
2021-12-03 22:41:00 +01:00
Timo Rothenpieler b1f1de0844 avutil/hwcontext_cuda: add option to use primary device context 2021-11-22 23:03:21 +01:00
Derek Buitenhuis 54e65aa38a avutil: Add Dolby Vision RPU side data type
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2021-11-17 14:12:33 +00:00
Anton Khirnov db932241ee */version.h: define FF_API macros unconditionally
There is no reason to wrap them in #ifndef guards, they should only be
defined here and nowhere else. The define guards just add the
possibility to accidentally use the same FF_API name in different
libraries.
2021-11-15 16:24:58 +01:00
Lynne 8478d60d5b
doc/APIchanges: update for Vulkan API changes 2021-11-12 05:23:41 +01:00
Manuel Stoeckl 0760d9153c lavu/pix_fmt: add pixel format for x2bgr10
The new format (given in big/little endian forms) matches the
existing X2RGB10 format, except with B and R channels switched.

AV_PIX_FMT_X2BGR10 data often is created by OpenGL programs
whose buffers use the GL_RGB10 internal format.

Signed-off-by: Manuel Stoeckl <code@mstoeckl.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-09-26 16:26:10 +02:00
Andreas Rheinhardt 8d5de914d3 avutil/mem: Deprecate av_mallocz_array()
It does the same as av_calloc(), so one of them should be removed.
Given that av_calloc() has the shorter name, it is retained.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-20 01:04:09 +02:00
James Almer ccfdef79b1 avutil/buffer: constify some function parameters
Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2021-09-17 13:28:09 -03:00
Artem Galin 4f78711f9c libavutil/hwcontext_d3d11va: adding more texture information to the D3D11 hwcontext API
Microsoft VideoProcessor requires texture with D3DUSAGE_RENDERTARGET flag as output.
There is no way to allocate array of textures with D3D11_BIND_RENDER_TARGET flag
and .ArraySize > 2 by ID3D11Device_CreateTexture2D due to the Microsoft limitation.
Adding AVD3D11FrameDescriptors array to store array of single textures
instead of texture with multiple slices resolves this.

Signed-off-by: Artem Galin <artem.galin@intel.com>
2021-09-08 17:48:02 -03:00
Andreas Rheinhardt 8c53b14599 avutil/opt: Document actual behaviour of av_opt_copy a bit more
In particular, document that av_opt_copy() always disentangles
allocated options even on error; this guarantee is needed to e.g.
properly free duplicated thread contexts in libavcodec on error.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-08-17 19:11:57 +02:00
Lynne d5de9965ef
imgutils: expose av_image_copy_plane_uc_from()
The reason why the generic av_image_copy_uc_from() doesn't really
fit in the case for Vulkan is because some planes may be copied via
other methods (such as mapping GPU memory), and if they don't satisfy
the strict alignment requirements, a gpu image->gpu buffer->cpu ram
copy is performed.

We need this for hwcontext_vulkan, and I think this will also be
useful to API users like libplacebo who would rather not write
a custom SIMD memcpy.
2021-08-14 00:27:43 +02:00
Andreas Rheinhardt 2dd8acbe80 avutil/common, macros: Move several macros from common.h to macros.h
common.h currently contains several things: Math macros, UTF-8 macros,
other fundamental macros; furthermore it also contains miscellaneous
math functions and it (directly and indirectly) includes lots of other
headers.

This commit moves the "other fundamental macros" to macros.h which is
a more fitting place.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-07-29 22:02:05 +02:00
James Almer e3b5ff17c2 avutil/film_grain_params: add support for H.274 Film Grain Characteristics
Used by codecs like H.264, HEVC, and VVC.

Signed-off-by: James Almer <jamrial@gmail.com>
2021-07-23 11:06:31 -03:00
Thilo Borgmann c1bf56a526 lavu/cpu: Use av_cpu_ prefix 2021-07-20 10:31:41 +02:00
Aman Karmani 504c60660d avutil/hwcontext_videotoolbox: implement hwupload to convert AVFrame to CVPixelBuffer
Teach AV_HWDEVICE_TYPE_VIDEOTOOLBOX to be able to create AVFrames of type
AV_PIX_FMT_VIDEOTOOLBOX. This can be used to hwupload a regular AVFrame
into its CVPixelBuffer equivalent.

    ffmpeg -init_hw_device videotoolbox -f lavfi -i color=black:640x480 -vf hwupload -c:v h264_videotoolbox -f null -y /dev/null

Signed-off-by: Aman Karmani <aman@tmm1.net>
2021-07-18 12:01:16 -07:00
Anton Khirnov 85ba17f36d Bump major versions of all libraries.
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-04-27 11:48:05 -03:00
James Almer 0bf3a7361d avutil: remove deprecated AVClass.child_class_next
Signed-off-by: James Almer <jamrial@gmail.com>
2021-04-27 11:48:04 -03:00
Andreas Rheinhardt d40bb518b5 avutil/cpu: Remove deprecated functions
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2021-04-27 10:43:13 -03:00
Andreas Rheinhardt ef6a9e5e31 avutil/buffer: Switch AVBuffer API to size_t
Announced in 14040a1d91.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2021-04-27 10:43:13 -03:00
Andreas Rheinhardt 985c0dac67 avutil/pixdesc: Remove deprecated AV_PIX_FMT_FLAG_PSEUDOPAL
Deprecated in d6fc031caf.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2021-04-27 10:43:13 -03:00
Andreas Rheinhardt 1eb3110115 avutil/frame: Remove deprecated getters and setters
Deprecated in 7df37dd319.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2021-04-27 10:43:13 -03:00
Andreas Rheinhardt a240097ecd avutil: Switch crypto APIs to size_t
Announced in e435beb1ea.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2021-04-27 10:43:13 -03:00
Andreas Rheinhardt 6e30b35b85 avutil/frame: Remove deprecated AVFrame.pkt_pts field
Deprecated in 32c8359093.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2021-04-27 10:43:13 -03:00
Andreas Rheinhardt 3b56fa85e8 avutil/frame: Remove deprecated AVFrame.error
Deprecated in 1aa24df74c.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2021-04-27 10:43:12 -03:00
Andreas Rheinhardt 0181162bb5 avutil/pixdesc: Remove deprecated off-by-one fields from pix fmt descs
Deprecated in 2268db2cd0.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2021-04-27 10:43:12 -03:00
Andreas Rheinhardt b8accd1175 avutil/frame: Remove AVFrame QP table API
Originally deprecated in 1296b1f6c0631ab79464e22d48a6a1548450b943;
scheduled again for removal in a991526832.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2021-04-27 10:43:12 -03:00
Andreas Rheinhardt ad524cb9ee avutil/pixfmt: Remove deprecated VAAPI pixel formats
Deprecated in 9f8e57efe4.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2021-04-27 10:43:12 -03:00
Lynne 18af1ea8d1
lavu: bump minor and add APIchanges entry for the lavu/tx changes 2021-04-24 17:17:28 +02:00
Andreas Rheinhardt 7368e5537d avutil/cpu: Schedule deprecated functions for removal
av_set_cpu_flags_mask() has been deprecated in the commit which merged
it: 6df42f98746be06c883ce683563e07c9a2af983f; av_parse_cpu_flags() has
been deprecated in 4b529edff8.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-04-19 14:34:19 +02:00
Guo, Yejun f1bf465aa0 lavu: add side data AV_FRAME_DATA_DETECTION_BBOXES for object detection/classification 2021-04-17 17:27:02 +08:00
Andreas Rheinhardt a77beea6c8 avutil/frame: Deprecate av_get_colorspace_name()
Contrary to av_color_space_name() it doesn't even support newer
colorspaces.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-03-24 08:00:57 +01:00
Michael Niedermayer c361fa9e21 Bump minor versions after release branch
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-03-20 01:02:11 +01:00
Michael Niedermayer c67d2a2875 Bump Versions before release/4.4 branch
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-03-20 01:01:12 +01:00
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
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
Stefano Sabatini 0f6bf94eb7 avutil/{avstring,bprint}: add XML escaping from ffprobe to avutil
Base escaping only escapes values required for base character data
according to part 2.4 of XML, and if additional flags are added
single and double quotes can additionally be escaped in order
to handle single and double quoted attributes.

Co-authored-by: Jan Ekström <jan.ekstrom@24i.com>
Signed-off-by: Jan Ekström <jan.ekstrom@24i.com>
2021-03-05 19:45:00 +02: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
Michael Niedermayer 1bda9bb68a libavutil/common: Add FFABS64U()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-02-10 12:28:29 +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
Lynne 06a8596825
lavu: support arbitrary-point FFTs and all even (i)MDCT transforms
This patch adds support for arbitrary-point FFTs and all even MDCT
transforms.
Odd MDCTs are not supported yet as they're based on the DCT-II and DCT-III
and they're very niche.

With this we can now write tests.
2021-01-13 17:34:13 +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