summaryrefslogtreecommitdiffstats
path: root/libavutil
Commit message (Collapse)AuthorAgeFilesLines
* avutil/imgutils: Clarify doxy for av_image_check_size2()Michael Niedermayer2016-12-161-1/+2
| | | | | Reviewed-by: Andreas Cadhalpun <andreas.cadhalpun@googlemail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* Add missing #includes for standalone spherical-information-related headersDiego Biurrun2016-12-141-0/+3
| | | | | (cherry picked from commit f912fd767e55bbb5a1554bd99bacab007659609c) Signed-off-by: James Almer <jamrial@gmail.com>
* avutil: fix data race in av_get_cpu_flags()Wan-Teh Chang2016-12-132-7/+7
| | | | | | | | | | | | | | | | | | | | Make the one-time initialization in av_get_cpu_flags() thread-safe. The static variable |cpu_flags| in libavutil/cpu.c is 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. 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> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avutil/tests/imgutils: Remove unused variableMichael Niedermayer2016-12-131-1/+0
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* opt: reject denominator zero as out of rangeAndreas Cadhalpun2016-12-131-1/+1
| | | | | Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* avutil/tests: run the cpu_init.c test conditionally on HAVE_THREADSWan-Teh Chang2016-12-102-8/+1
| | | | | | | Suggested by Diego Biurrun and James Almer. Signed-off-by: Wan-Teh Chang <wtc@google.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avutil/cpu_init: remove unnecessary arguments to the main() functionWan-Teh Chang2016-12-101-1/+1
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avutil: Add av_image_check_size2()Michael Niedermayer2016-12-103-6/+39
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* fate: add av_image_check_size() testMichael Niedermayer2016-12-102-0/+38
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* lavu: Add AVSphericalMapping type and frame side dataVittorio Giovara2016-12-076-3/+188
| | | | | | | | 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>
* avutil/hwcontext_cuda: check for missing pixel formatTimo Rothenpieler2016-11-301-0/+3
|
* softfloat: decrease MIN_EXP to cover full float rangeAndreas Cadhalpun2016-11-251-1/+1
| | | | | | | | floats are not necessarily normalized, so a normalized softfloat needs MIN_EXP lowered by 23 to cover that range. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* avutil/tests: add cpu_init to .gitignore and tests/fateWan-Teh Chang2016-11-241-0/+1
| | | | | | | This is a follow-up to commit d84a21207ea83055dc9b6dc1cd6a379f2ea756e7, which added the libavutil/tests/cpu_init.c. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* cuda: check for cuda.h when enabledJames Almer2016-11-241-1/+2
| | | | | | | Fixes make checkheaders on systems without the Cuda Toolkit, which was broken after the dynlink changes. Signed-off-by: James Almer <jamrial@gmail.com>
* avutil/tests: Add cpu_init.c to check whether the one-time initialization in ↵Wan-Teh Chang2016-11-232-0/+73
| | | | | | | | av_get_cpu_flags() has data races. Co-author: Dmitry Vyukov of Google Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avutil/cpu: remove the |checked| static variableWan-Teh Chang2016-11-231-19/+21
| | | | | | | | | | | Remove the |checked| variable because the invalid value of -1 for |flags| can be used to indicate the same condition. Also rename |flags| to |cpu_flags| because there are a local variable and a function parameter named |flags| in the same file. Co-author: Dmitry Vyukov of Google Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avutil/opt: Add AV_OPT_TYPE_UINT64Michael Niedermayer2016-11-232-0/+30
| | | | | | | Requested-by: wm4 ([FFmpeg-devel] [PATCH] avutil/opt: Support max > INT64_MAX in write_number() with AV_OPT_TYPE_INT64) Requested-by: ronald ([FFmpeg-devel] [PATCH] avutil/opt: Support max > INT64_MAX in write_number() with AV_OPT_TYPE_INT64) Reviewed-by: Andreas Cadhalpun <andreas.cadhalpun@googlemail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* libavutil/hwcontext_cuda: Support P010 and P016 formatsPhilip Langdale2016-11-222-2/+15
| | | | | CUVID is now capable of returning 10bit and 12bit decoded content in P010/P016. Let's support transfering those formats.
* avutil: add P016 pixel formatPhilip Langdale2016-11-223-2/+30
| | | | | | | | | P016 is the 16-bit variant of NV12 (planar luma, packed chroma), using two bytes per component. It may, and in fact is most likely to, be used in situations where there are less than 16 bits of data. It is the responsibility of the writer to zero out any unused LSBs.
* avutil/hwcontext_cuda: use dynamically loaded CUDATimo Rothenpieler2016-11-224-25/+118
|
* avutil/opt: Fix setting int64 to its maximumMichael Niedermayer2016-11-201-3/+7
| | | | | | Found-by: Andreas Reviewed-by: Andreas Cadhalpun <andreas.cadhalpun@googlemail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avutil/frame: fix indention after last commitMichael Niedermayer2016-11-161-7/+7
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avutil/frame: Copy size=0 side data in ff_init_buffer_info()Michael Niedermayer2016-11-161-0/+2
| | | | | | | | Fixes null pointer dereference Fixes: 189/FOO Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* aarch64: Add an offset parameter to the movrel macroMartin Storsjö2016-11-151-4/+10
| | | | | | | | | | | | With apple tools, the linker fails with errors like these, if the offset is negative: ld: in section __TEXT,__text reloc 8: symbol index out of range for architecture arm64 This is cherry-picked from libav commit c44a8a3eabcd6acd2ba79f32ec8a432e6ebe552c. Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* arm: Clear the gp register alias at the end of functionsMartin Storsjö2016-11-151-0/+3
| | | | | | | | | | | | | | We reset .Lpic_gp to zero at the start of each function, which means that the logic within movrelx for clearing gp when necessary will be missed. This fixes using movrelx in different functions with a different helper register. This is cherry-picked from libav commit 824e8c284054f323f854892d1b4739239ed1fdc7. Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* softfloat: handle -INT_MAX correctlyAndreas Cadhalpun2016-11-141-1/+1
| | | | | | | This is similar to commit 9ac61e73d0843ec4b83f4e3d47eded73234e406e. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* Merge commit 'd20c118975220a0256027d1c2410bade94b8534d'Hendrik Leppkes2016-11-141-0/+1
|\ | | | | | | | | | | | | * commit 'd20c118975220a0256027d1c2410bade94b8534d': hwcontext_qsv: add support for p010 Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * hwcontext_qsv: add support for p010Anton Khirnov2016-07-031-0/+1
| |
| * hwcontext_vaapi: Add driver quirks to the hwdeviceMark Thompson2016-07-023-1/+62
| | | | | | | | | | | | | | | | | | | | | | The driver being used is detected inside av_hwdevice_ctx_init() and the quirks field then set from a table of known device. If this behaviour is unwanted, the user can also set the quirks field manually. Also adds the Intel i965 driver quirk (it does not destroy parameter buffers used in a call to vaRenderPicture()) and detects that driver to set it.
* | Merge commit '2ef87815fec059504370ae3050cc243a53553915'Hendrik Leppkes2016-11-141-24/+14
|\ \ | |/ | | | | | | | | | | * commit '2ef87815fec059504370ae3050cc243a53553915': hwcontext_dxva2: add support for p010 Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * hwcontext_dxva2: add support for p010Anton Khirnov2016-07-021-12/+15
| |
| * pixfmt: add P010 pixel formatHendrik Leppkes2016-07-023-1/+29
| | | | | | | | | | | | | | P010 is the 10-bit variant of NV12 (planar luma, packed chroma), using two bytes per component to store 10-bit data plus 6-bit zeroes in the LSBs. Signed-off-by: Anton Khirnov <anton@khirnov.net>
* | lavu/pixfmt: Add GRAY10Carl Eugen Hoyos2016-11-143-1/+25
| | | | | | | | Based on 7471352f by Luca Barbato.
* | Merge commit 'f62bb216ac4cfbbff16108c6bac35a0282532972'Hendrik Leppkes2016-11-131-0/+12
|\ \ | |/ | | | | | | | | | | * commit 'f62bb216ac4cfbbff16108c6bac35a0282532972': hwcontext_vaapi: allow transfers to/from any size of sw frame Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * hwcontext_vaapi: allow transfers to/from any size of sw frameMark Thompson2016-06-281-0/+12
| | | | | | | | | | | | | | | | The hw frame used as reference has an attached size but it need not match the actual size of the surface, so enforcing that the sw frame used in copying matches its size exactly is not useful. Signed-off-by: Anton Khirnov <anton@khirnov.net>
* | Merge commit 'fdfe01365d579189d9a55b3741dba2ac46eb1df8'Hendrik Leppkes2016-11-131-2/+6
|\ \ | |/ | | | | | | | | | | * commit 'fdfe01365d579189d9a55b3741dba2ac46eb1df8': hwcontext: allocate the destination frame for the pool size Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * hwcontext: allocate the destination frame for the pool sizeAnton Khirnov2016-06-281-2/+6
| | | | | | | | | | | | The source frame may be cropped, so that its dimensions are smaller than the pool dimensions. The transfer_data API requires the allocated size of the destination frame to be the same as the pool size.
* | Merge commit '5fcae3b3f93fd02b3d1e009b9d9b17410fca9498'Hendrik Leppkes2016-11-131-0/+8
|\ \ | |/ | | | | | | | | | | * commit '5fcae3b3f93fd02b3d1e009b9d9b17410fca9498': hwcontext: clarify the behaviour of transfer_data() for cropped frames Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * hwcontext: clarify the behaviour of transfer_data() for cropped framesAnton Khirnov2016-06-281-0/+8
| |
* | hwcontext_vaapi: add a quirk for the missing MemoryType attributeAnton Khirnov2016-11-133-2/+14
| | | | | | | | | | | | | | | | The Intel binary iHD driver does not support the VASurfaceAttribMemoryType, so surface allocation will fail when using it. (cherry picked from commit 2124711b950b03c582a119c75f52a87acc32d6ec)
* | hwcontext_vaapi: Try the first render node as the default DRM deviceMark Thompson2016-11-131-5/+8
| | | | | | | | | | | | | | | | | | | | | | | | If no string argument is supplied when av_hwdevice_ctx_create() is called to create a VAAPI device, we currently only try the default X11 display (that is, $DISPLAY) to find a device, and will therefore fail in the absence of an X server to connect to. Change the logic to also look for a device via the first DRM render node (that is, "/dev/dri/renderD128"), which is probably the right thing to use in most simple configurations which only have one DRM device. (cherry picked from commit 121f34d5f0c8d7d376829a467590fbbe4c228f4f)
* | hwcontext_vaapi: Add driver quirks to the hwdeviceMark Thompson2016-11-133-1/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | The driver being used is detected inside av_hwdevice_ctx_init() and the quirks field then set from a table of known device. If this behaviour is unwanted, the user can also set the quirks field manually. Also adds the Intel i965 driver quirk (it does not destroy parameter buffers used in a call to vaRenderPicture()) and detects that driver to set it. (cherry picked from commit 4926fa9a4aa03f3b751f52e900b9efb87fea0591)
* | Merge commit '444a36269f853844369af0a9836507e5a2780323'Hendrik Leppkes2016-11-131-1/+1
|\ \ | |/ | | | | | | | | | | * commit '444a36269f853844369af0a9836507e5a2780323': pixdesc: Fix AVCOL_TRC_BT2020_12 name Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * pixdesc: Fix AVCOL_TRC_BT2020_12 nameVittorio Giovara2016-06-271-1/+1
| |
* | Merge commit 'f172e22d6aed0bff36e975bafb0183b6779f9444'Hendrik Leppkes2016-11-133-7/+10
|\ \ | |/ | | | | | | | | | | * commit 'f172e22d6aed0bff36e975bafb0183b6779f9444': pixdesc: Add aliases to SMPTE color properties Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * pixdesc: Add aliases to SMPTE color propertiesVittorio Giovara2016-06-273-7/+10
| | | | | | | | | | Drop ST from names and symbols, it does not add anything distinctive or descriptive.
* | pixfmt: Add GRAY12Luca Barbato2016-11-103-1/+26
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avutil/softfloat_ieee754: make all functions inlineJames Almer2016-11-051-7/+7
| | | | | | | | | | | | | | Removes "defined but not used" warnings Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: James Almer <jamrial@gmail.com>
* | avutil/hwcontext_dxva.c: Use new safe dlopen code.Matt Oliver2016-11-051-7/+8
| | | | | | | | Signed-off-by: Matt Oliver <protogonoi@gmail.com>
* | Bump minor versions after 3.2 branchpoint to seperate releaseMichael Niedermayer2016-10-261-1/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
OpenPOWER on IntegriCloud