summaryrefslogtreecommitdiff
path: root/libavutil/Makefile
Commit message (Collapse)AuthorAgeFilesLines
* avutil/{color_utils, csp}: merge color_utils into csp and expose APILeo Izen2023-02-091-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | libavutil/color_utils contains some avpriv_ symbols that map enum AVTransferCharacteristic values to gamma-curve approximations and to the actual transfer functions to invert them (i.e. -> linear). There's two issues with this: (1) avpriv is evil and should be avoided whenever possible (2) libavutil/csp.h exposes a public API for handling color that already handles primaries and matricies I don't see any reason this API has to be private, so this commit takes the functionality from avutil/color_utils and merges it into avutil/csp with an exposed av_ API rather than the previous avpriv_ API. Every reference to the previous API has been updated to point to the new one. color_utils.h has been deleted as well. This should not break any applications as it only contained avpriv_ symbols in the first place, so nothing in that header could be referenced by other applications. Signed-off-by: Leo Izen <leo.izen@gmail.com> Signed-off-by: Anton Khirnov <anton@khirnov.net>
* avutil: introduce AVAmbientViewingEnvironment side dataJan Ekström2023-01-131-0/+2
| | | | | This enables exposing H.274 Ambient Viewing Environment metadata in the framework.
* configure: always enable gnu_windres if availableTimo Rothenpieler2022-08-131-1/+1
| | | | | Use the appropiate Makefile variable to ensure the resource file is only built into shared libraries instead.
* )hwcontext: add a stub implementation for Vulkan functionsLynne2022-07-051-0/+2
|
* avutil/tests/uuid: add uuid testsPierre-Anthony Lemieux2022-06-121-0/+1
|
* avutil/uuid: add utility library for manipulating UUIDs as specified in RFC 4122Zane van Iperen2022-06-121-0/+2
| | | | | Co-authored-by: Pierre-Anthony Lemieux <pal@palemieux.com> Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
* avutil/csp: create public API for colorspace structsLeo Izen2022-06-011-0/+2
| | | | | | | | | | This commit moves some of the functionality from avfilter/colorspace into avutil/csp and exposes it as a public API so it can be used by libavcodec and/or libavformat. It also converts those structs from double values to AVRational to make regression testing easier and more consistent. Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* lib*/version: Move library version functions into files of their ownAndreas Rheinhardt2022-05-101-0/+1
| | | | | | | This avoids having to rebuild big files every time FFMPEG_VERSION changes (which it does with every commit). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* fate: add a channel_layout API testJames Almer2022-03-151-0/+1
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avutil: support for CUVA Vivid HDR metadataLimin Wang2022-03-011-0/+2
| | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avutil: make lzo always compileJames Almer2022-02-261-3/+2
| | | | | | | | Having optionally installed headers is a bad idea as there's no way to know if they are present or not (unless a define is added to avconfig.h, but that's just ugly). Signed-off-by: James Almer <jamrial@gmail.com>
* avutil: add objc.h to SKIPHEADERSAman Karmani2021-12-191-0/+1
| | | | Signed-off-by: Aman Karmani <aman@tmm1.net>
* vulkan: fix checkheadersLynne2021-11-191-1/+3
|
* avutil/Makefile: Apply CFLAGS for compilationAndreas Rheinhardt2021-08-041-1/+1
| | | | | | | Fixes "make tools/crypto_bench.o". Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* lavu/checkasm: add (private) kperf timing for macOSJ. Dekker2021-07-201-0/+1
| | | | Signed-off-by: J. Dekker <jdek@itanimul.li>
* lavu: add side data AV_FRAME_DATA_DETECTION_BBOXES for object ↵Guo, Yejun2021-04-171-0/+2
| | | | detection/classification
* libavutil: introduce AVFilmGrainParams side dataLynne2020-11-251-0/+2
| | | | | | | | This patch introduces a new frame side data type AVFilmGrainParams for use with video codecs which support it. It can save a lot of memory used for duplicate processed reference frames and reduce copies when applying film grain during presentation.
* libavutil: add API for exporting video frame quantizersJuan De León2020-05-121-1/+4
| | | | | | | | | | | | | | | This is intended to replace the deprecated the AV_FRAME_DATA_QP_TABLE* API and extend it to a wider range of codecs. In the future, it may also be extended to support other encoding parameters such as motion vectors. Additional changes by Anton Khirnov <anton@khirnov.net> with suggestions by Lynne <dev@lynne.ee>. Signed-off-by: Juan De León <juandl@google.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Anton Khirnov <anton@khirnov.net>
* lavutil: add DOVI related headervacingfang2020-04-231-0/+2
| | | | | | add DOVI related struct Signed-off-by: vacingfang <vacingfang@tencent.com>
* hwcontext_opencl: include header file in HEADERSDaniel Playfair Cal2020-03-201-0/+1
| | | | | | | | This matches the inclusion of the other hwcontext_<hwaccel>.h headers. The skipping of the header depending on build flags is already present. Signed-off-by: Daniel Playfair Cal: <daniel.playfair.cal@gmail.com> Signed-off-by: Anton Khirnov <anton@khirnov.net>
* lavu/tx: implement 32 bit fixed point FFT and MDCTLynne2020-02-131-1/+2
| | | | | | | | | | | | | | | | | | | | Required minimal changes to the code so made sense to implement. FFT and MDCT tested, the output of both was properly rounded. Fun fact: the non-power-of-two fixed-point FFT and MDCT are the fastest ever non-power-of-two fixed-point FFT and MDCT written. This can replace the power of two integer MDCTs in aac and ac3 if the MIPS optimizations are ported across. Unfortunately the ac3 encoder uses a 16-bit fixed point forward transform, unlike the encoder which uses a 32bit inverse transform, so some modifications might be required there. The 3-point FFT is somewhat less accurate than it otherwise could be, having minor rounding errors with bigger transforms. However, this could be improved later, and the way its currently written is the way one would write assembly for it. Similar rounding errors can also be found throughout the power of two FFTs as well, though those are more difficult to correct. Despite this, the integer transforms are more than accurate enough.
* lavu: add Vulkan hwcontext codeLynne2020-02-041-0/+3
| | | | | | | | | | This commit adds the necessary code to initialize and use a Vulkan device within the hwcontext libavutil framework. Currently direct mapping to VAAPI and DRM frames is functional, and transfers to CUDA and native frames are supported. Lets hope the future Vulkan video decode extension fits well within this framework.
* lavu/tx: add support for double precision FFT and MDCTLynne2019-08-021-0/+2
| | | | | | | Simply moves and templates the actual transforms to support an additional data type. Unlike the float version, which is equal or better than libfftw3f, double precision output is bit identical with libfftw3.
* libavutil: add an FFT & MDCT implementationLynne2019-05-151-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds a new API to libavutil to allow for arbitrary transformations on various types of data. This is a partly new implementation, with the power of two transforms taken from libavcodec/fft_template, the 5 and 15-point FFT taken from mdct15, while the 3-point FFT was written from scratch. The (i)mdct folding code is taken from mdct15 as well, as the mdct_template code was somewhat old, messy and not easy to separate. A notable feature of this implementation is that it allows for 3xM and 5xM based transforms, where M is a power of two, e.g. 384, 640, 768, 1280, etc. AC-4 uses 3xM transforms while Siren uses 5xM transforms, so the code will allow for decoding of such streams. A non-exaustive list of supported sizes: 4, 8, 12, 16, 20, 24, 32, 40, 48, 60, 64, 80, 96, 120, 128, 160, 192, 240, 256, 320, 384, 480, 512, 640, 768, 960, 1024, 1280, 1536, 1920, 2048, 2560... The API was designed such that it allows for not only 1D transforms but also 2D transforms of certain block sizes. This was partly on accident as the stride argument is required for Opus MDCTs, but can be used in the context of a 2D transform as well. Also, various data types would be implemented eventually as well, such as "double" and "int32_t". Some performance comparisons with libfftw3f (SIMD disabled for both): 120: 22353 decicycles in fftwf_execute, 1024 runs, 0 skips 21836 decicycles in compound_fft_15x8, 1024 runs, 0 skips 128: 22003 decicycles in fftwf_execute, 1024 runs, 0 skips 23132 decicycles in monolithic_fft_ptwo, 1024 runs, 0 skips 384: 75939 decicycles in fftwf_execute, 1024 runs, 0 skips 73973 decicycles in compound_fft_3x128, 1024 runs, 0 skips 640: 104354 decicycles in fftwf_execute, 1024 runs, 0 skips 149518 decicycles in compound_fft_5x128, 1024 runs, 0 skips 768: 109323 decicycles in fftwf_execute, 1024 runs, 0 skips 164096 decicycles in compound_fft_3x256, 1024 runs, 0 skips 960: 186210 decicycles in fftwf_execute, 1024 runs, 0 skips 215256 decicycles in compound_fft_15x64, 1024 runs, 0 skips 1024: 163464 decicycles in fftwf_execute, 1024 runs, 0 skips 199686 decicycles in monolithic_fft_ptwo, 1024 runs, 0 skips With SIMD we should be faster than fftw for 15xM transforms as our fft15 SIMD is around 2x faster than theirs, even if our ptwo SIMD is slightly slower. The goal is to remove the libavcodec/mdct15 code and deprecate the libavcodec/avfft interface once aarch64 and x86 SIMD code has been ported. New code throughout the project should use this API. The implementation passes fate when used in Opus, AAC and Vorbis, and the output is identical with ATRAC9 as well.
* avutil/cuda_check: avoid pointlessly exporting same symbol from two librariesTimo Rothenpieler2019-02-141-1/+1
|
* Add HDR dynamic metadata struct (for SMPTE 2094-40) to libavutilMohammad Izadi2018-12-211-0/+2
| | | | | | | | The dynamic metadata contains data for color volume transform - application 4 of SMPTE 2094-40:2016 standard. The data comes from HEVC in the SEI_TYPE_USER_DATA_REGISTERED_ITU_T_T35. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* lavu: add locale-independent sscanf implementationPaul B Mahol2018-11-161-0/+1
| | | | | | Copied and adopted from musl implementation. * converted all 'long double' to 'double' * removed %m support
* avutil/hwcontext_cuda: Define and use common CHECK_CU()Philip Langdale2018-11-141-2/+3
| | | | | | | | | | | | | | | | | | We have a pattern of wrapping CUDA calls to print errors and normalise return values that is used in a couple of places. To avoid duplication and increase consistency, let's put the wrapper implementation in a shared place and use it everywhere. Affects: * avcodec/cuviddec * avcodec/nvdec * avcodec/nvenc * avfilter/vf_scale_cuda * avfilter/vf_scale_npp * avfilter/vf_thumbnail_cuda * avfilter/vf_transpose_npp * avfilter/vf_yadif_cuda
* libavutil/encryption_info: Add unit tests.Jacob Trimble2018-06-271-0/+1
| | | | | Signed-off-by: Jacob Trimble <modmaker@google.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* hwcontext: Add test for device creation and derivationMark Thompson2018-05-211-0/+1
| | | | | | This uses any devices it can find on the host system - on a system with no hardware device support or in builds with no support included it will do nothing and pass.
* lavu/Makefile: Fix alignment and orderingMark Thompson2018-05-151-3/+3
|
* avcodec/avcodec.h: Add encryption info side data.Jacob Trimble2018-03-241-0/+2
| | | | | | | | This new side-data will contain info on how a packet is encrypted. This allows the app to handle packet decryption. Signed-off-by: Jacob Trimble <modmaker@google.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avutil/integer: move the test to the corresponding subdirectoryJames Almer2018-03-201-0/+1
| | | | | | | And actually enable it. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: James Almer <jamrial@gmail.com>
* It has been replaced by C11 stdatomic.h and is now unused.Anton Khirnov2018-01-051-6/+0
| | | | | (cherry picked from commit 5cc0057f4910c8c72421b812c8f337ef6c43696c) Signed-off-by: James Almer <jamrial@gmail.com>
* lavu/hwcontext: add AV_HWDEVICE_TYPE_MEDIACODECAman Gupta2017-12-161-0/+2
| | | | Signed-off-by: Matthieu Bouron <matthieu.bouron@gmail.com>
* lavu,lavfi,ffmpeg: Remove experimental OpenCL APIMark Thompson2017-11-221-4/+0
| | | | | | | | | | | This was added in early 2013 and abandoned several months later; as far as I can tell, there are no external users. Future OpenCL use will be via hwcontext, which requires neither special OpenCL-only API nor global state in libavutil. All internal users are also deleted - this is just the unsharp filter (replaced by unsharp_opencl, which is more flexible) and the deshake filter (no replacement).
* lavu: OpenCL hwcontext implementationMark Thompson2017-11-221-0/+2
|
* lavu: Add DRM hwcontextMark Thompson2017-09-131-0/+2
|
* avutil: merge slice threading implementation from avcodec and avfilterMuhammad Faiz2017-07-191-0/+1
| | | | | | | | | | | | Rework it to improve performance. Now mutex is not shared by workers, instead each worker has its own mutex and condition variable. This reduces lock contention between workers. Also use atomic variable for counter. The interface also allows execute to run special function on main thread, requested by Ronald. Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
* pixdesc: Add a test for av_find_best_pix_fmt_of_2()Mark Thompson2017-07-181-0/+1
|
* lavu: add new D3D11 pixfmt and hwcontextwm42017-06-271-0/+3
| | | | | | | | | | | | | | | | | | | | | | To be used with the new d3d11 hwaccel decode API. With the new hwaccel API, we don't want surfaces to depend on the decoder (other than the required dimension and format). The old D3D11VA pixfmt uses ID3D11VideoDecoderOutputView pointers, which include the decoder configuration, and thus is incompatible with the new hwaccel API. This patch introduces AV_PIX_FMT_D3D11, which uses ID3D11Texture2D and an index. It's simpler and compatible with the new hwaccel API. The introduced hwcontext supports only the new pixfmt. Frame upload code untested. Significantly based on work by Steve Lhomme <robux4@gmail.com>, but with heavy changes/rewrites. Merges Libav commit fff90422d181744cd75dbf011687ee7095f02875. Signed-off-by: Diego Biurrun <diego@biurrun.de>
* avutil/tests: remove float_dsp testJames Almer2017-06-141-1/+0
| | | | | | It's been ported to checkasm. Signed-off-by: James Almer <jamrial@gmail.com>
* videotoolbox: add hwcontext supportwm42017-05-151-0/+3
| | | | | | | | | | | | | | | | | | This adds tons of code for no other benefit than making VideoToolbox support conform with the new hwaccel API (using hw_device_ctx and hw_frames_ctx). Since VideoToolbox decoding does not actually require the user to allocate frames, the new code does mostly nothing. One benefit is that ffmpeg_videotoolbox.c can be dropped once generic hwaccel support for ffmpeg.c is merged from Libav. Does not consider VDA or VideoToolbox encoding. Fun fact: the frame transfer functions are copied from vaapi, as the mapping makes copying generic boilerplate. Mapping itself is not exported by the VT code, because I don't know how to test.
* Merge commit '92db5083077a8b0f8e1050507671b456fd155125'James Almer2017-05-041-2/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '92db5083077a8b0f8e1050507671b456fd155125': build: Generate pkg-config files from Make and not from configure build: Store library version numbers in .version files Includes cherry-picked commits 8a34f3659371680ca523aecfd9098c28f0f809eb and ee164727dd64c199b87118917e674b17c25e0da3 to fix issues. Changes were also made to retain support for raise_major and build_suffix. Reviewed-by: ubitux Merged-by: James Almer <jamrial@gmail.com>
| * build: Generate pkg-config files from Make and not from configureDiego Biurrun2016-12-221-0/+1
| | | | | | | | | | | | | | | | This moves work from the configure to the Make stage where it can be parallelized and ensures that pkgconfig files are updated when library versions change. Bug-Id: 449
* | Merge commit '11a9320de54759340531177c9f2b1e31e6112cc2'Clément Bœsch2017-05-031-1/+1
|\ \ | |/ | | | | | | | | | | | | | | * commit '11a9320de54759340531177c9f2b1e31e6112cc2': build: Move build-system-related helper files to a separate subdirectory "ffbuild" directory name is used instead of "avbuild". Merged-by: Clément Bœsch <u@pkh.me>
* | Merge commit '2170017a1cd033b6f28e16476921022712a522d8'James Almer2017-04-131-1/+1
|\ \ | |/ | | | | | | | | | | | | | | * commit '2170017a1cd033b6f28e16476921022712a522d8': avutil: fix data race in av_get_cpu_flags() This commit is a noop, see fed50c4304eecb352e29ce789cdb96ea84d6162f Merged-by: James Almer <jamrial@gmail.com>
| * avutil: fix data race in av_get_cpu_flags()Wan-Teh Chang2016-12-081-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make the one-time initialization in av_get_cpu_flags() thread-safe. The static variables |flags|, |cpuflags_mask|, and |checked| in libavutil/cpu.c are read and written using normal load and store operations. These are considered as data races. The fix is to use atomic load and store operations. Remove the |checked| variable because the invalid value of -1 for |flags| can be used to indicate the same condition. Rename |flags| to |cpu_flags| and move it to file scope. The fix can be verified by running the libavutil/tests/cpu_init.c test program under ThreadSanitizer: ./configure --toolchain=clang-tsan make libavutil/tests/cpu_init libavutil/tests/cpu_init There should be no warnings from ThreadSanitizer. Co-author: Dmitry Vyukov of Google, who suggested the data race fix. Signed-off-by: Wan-Teh Chang <wtc@google.com>
| * lavu: Add AVSphericalMapping type and frame side dataVittorio Giovara2016-12-071-0/+2
| | | | | | | | | | | | | | | | While no decoder currently exports spherical information, this type represents a frame property that has to be passed through from container to frames. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
| * lavu: remove the custom atomic APIAnton Khirnov2016-10-021-5/+0
| | | | | | | | It has been replaced by C11 stdatomic.h and is now unused.