Commit Graph

4366 Commits

Author SHA1 Message Date
Thomas Turner 1bfb4587a2 avutil/tests/audio_fifo.c: Memory leak and tab space fixes
Prevents memory leak when read_samples_from_audio_fifo() is
called more than once by deallocating before reallocating
more memory.

Fixes space indentation for contents in ERROR().

Signed-off-by: Thomas Turner <thomastdt@googlemail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-12-31 17:20:06 +01:00
Thomas Turner 11b7cad3dc avutil/tests/audio_fifo.c: use av_malloc() family of functions
Signed-off-by: Thomas Turner <thomastdt@googlemail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-12-31 17:20:01 +01:00
Thomas Turner d7a3c7427f avutil/tests/audio_fifo.c: Corrected test error messages
Signed-off-by: Thomas Turner <thomastdt@googlemail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-12-28 16:04:59 +01:00
Michael Niedermayer c4152fc42e avutil/random_seed: Reduce the time needed on systems with very low precission clock()
This should fix issues on BSD
CLOCKS_PER_SEC is 128 on BSD while SUSv2 requires it to be a million

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-12-24 14:46:25 +01:00
James Almer 94eb600f35 tests/audio_fifo: fix buffer allocation for non planar formats
Signed-off-by: James Almer <jamrial@gmail.com>
2016-12-23 21:47:03 -03:00
Michael Niedermayer c193132ce5 avutil/tests/random_seed: eliminate goto
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-12-23 21:47:26 +01:00
Thomas Turner 8dcb28cf6d avutil/tests: Improved code coverage for random_seed
Signed-off-by: Thomas Turner <thomastdt@googlemail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-12-23 02:57:20 +01:00
James Almer 0abcebe3d6 tests/avstring: free the pointer after calls to av_d2str()
Fixes memleaks.

Signed-off-by: James Almer <jamrial@gmail.com>
2016-12-22 12:11:13 -03:00
Michael Niedermayer da73d95bad avutil/random_seed: Improve get_generic_seed() with higher precission clock()
Tested-by: Thomas Turner <thomastdt@googlemail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-12-22 12:40:48 +01:00
Michael Niedermayer 54931fd0fb avutil/random_seed: Use uint64 instead of uint8 for struct to avoid potential alignment issues
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-12-21 03:37:54 +01:00
Thomas Turner 9f76ad2a46 avutil: Added selftest for libavutil/audio_fifo.c
Signed-off-by: Thomas Turner <thomastdt@googlemail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-12-21 03:37:54 +01:00
Thomas Turner e303e3d4b9 avutil: Improved test coverage for avstring.c
Signed-off-by: Thomas Turner <thomastdt@googlemail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-12-20 18:21:24 +01:00
Michael Niedermayer d4c1cc2b87 avutil/imgutils: Clarify doxy for av_image_check_size2()
Reviewed-by: Andreas Cadhalpun <andreas.cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-12-16 02:07:32 +01:00
Diego Biurrun 2d7aadf3d9 Add missing #includes for standalone spherical-information-related headers
(cherry picked from commit f912fd767e)
Signed-off-by: James Almer <jamrial@gmail.com>
2016-12-14 13:33:30 -03:00
Wan-Teh Chang fed50c4304 avutil: fix data race in av_get_cpu_flags()
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>
2016-12-13 00:07:20 +01:00
Michael Niedermayer 4cf3def805 avutil/tests/imgutils: Remove unused variable
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-12-13 00:06:53 +01:00
Andreas Cadhalpun 3ab8436ff6 opt: reject denominator zero as out of range
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-12-13 00:00:31 +01:00
Wan-Teh Chang 3703f13333 avutil/tests: run the cpu_init.c test conditionally on HAVE_THREADS
Suggested by Diego Biurrun and James Almer.

Signed-off-by: Wan-Teh Chang <wtc@google.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2016-12-10 18:47:10 -03:00
Wan-Teh Chang 8986885801 avutil/cpu_init: remove unnecessary arguments to the main() function
Signed-off-by: James Almer <jamrial@gmail.com>
2016-12-10 18:47:00 -03:00
Michael Niedermayer f542b152aa avutil: Add av_image_check_size2()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-12-10 22:24:10 +01:00
Michael Niedermayer 1b39a30247 fate: add av_image_check_size() test
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-12-10 22:24:10 +01:00
Vittorio Giovara 8f58ecc344 lavu: Add AVSphericalMapping type and frame side data
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>
2016-12-07 14:39:04 -05:00
Timo Rothenpieler 52773a2c68 avutil/hwcontext_cuda: check for missing pixel format 2016-11-30 12:36:23 +01:00
Andreas Cadhalpun 2d6f46d801 softfloat: decrease MIN_EXP to cover full float range
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>
2016-11-25 01:23:48 +01:00
Wan-Teh Chang 048b46b4e2 avutil/tests: add cpu_init to .gitignore and tests/fate
This is a follow-up to commit d84a21207e,
which added the libavutil/tests/cpu_init.c.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-11-24 21:10:37 +01:00
James Almer d1de725bee cuda: check for cuda.h when enabled
Fixes make checkheaders on systems without the Cuda Toolkit, which
was broken after the dynlink changes.

Signed-off-by: James Almer <jamrial@gmail.com>
2016-11-24 13:50:43 -03:00
Wan-Teh Chang d84a21207e avutil/tests: Add cpu_init.c to check whether the one-time initialization in av_get_cpu_flags() has data races.
Co-author: Dmitry Vyukov of Google

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-11-23 22:35:25 +01:00
Wan-Teh Chang 29fb49194b avutil/cpu: remove the |checked| static variable
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>
2016-11-23 22:35:25 +01:00
Michael Niedermayer 2f935baa7d avutil/opt: Add AV_OPT_TYPE_UINT64
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>
2016-11-23 02:01:05 +01:00
Philip Langdale 8d6c358ea8 libavutil/hwcontext_cuda: Support P010 and P016 formats
CUVID is now capable of returning 10bit and 12bit decoded content
in P010/P016. Let's support transfering those formats.
2016-11-22 10:09:14 -08:00
Philip Langdale 237421f149 avutil: add P016 pixel format
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.
2016-11-22 10:07:43 -08:00
Timo Rothenpieler e6464a44ed avutil/hwcontext_cuda: use dynamically loaded CUDA 2016-11-22 10:34:27 +01:00
Michael Niedermayer 748ce9d702 avutil/opt: Fix setting int64 to its maximum
Found-by: Andreas
Reviewed-by: Andreas Cadhalpun <andreas.cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-11-20 22:39:52 +01:00
Michael Niedermayer 721c90f0f9 avutil/frame: fix indention after last commit
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-11-16 21:25:45 +01:00
Michael Niedermayer 2acee08a4a avutil/frame: Copy size=0 side data in ff_init_buffer_info()
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>
2016-11-16 21:25:45 +01:00
Martin Storsjö 7fe898dbb9 aarch64: Add an offset parameter to the movrel macro
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
c44a8a3eab.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2016-11-15 15:10:03 -05:00
Martin Storsjö 86c5a23ee5 arm: Clear the gp register alias at the end of functions
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
824e8c2840.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2016-11-15 15:10:03 -05:00
Andreas Cadhalpun 0edd569466 softfloat: handle -INT_MAX correctly
This is similar to commit 9ac61e73d0.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-11-14 22:57:07 +01:00
Hendrik Leppkes e122a725fb Merge commit 'd20c118975220a0256027d1c2410bade94b8534d'
* commit 'd20c118975220a0256027d1c2410bade94b8534d':
  hwcontext_qsv: add support for p010

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2016-11-14 15:18:49 +01:00
Hendrik Leppkes 3dfe97a841 Merge commit '2ef87815fec059504370ae3050cc243a53553915'
* commit '2ef87815fec059504370ae3050cc243a53553915':
  hwcontext_dxva2: add support for p010

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2016-11-14 15:15:19 +01:00
Carl Eugen Hoyos 3f1b5ca22e lavu/pixfmt: Add GRAY10
Based on 7471352f by Luca Barbato.
2016-11-14 10:16:41 +01:00
Hendrik Leppkes 3aa7b0a273 Merge commit 'f62bb216ac4cfbbff16108c6bac35a0282532972'
* commit 'f62bb216ac4cfbbff16108c6bac35a0282532972':
  hwcontext_vaapi: allow transfers to/from any size of sw frame

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2016-11-13 22:36:18 +01:00
Hendrik Leppkes 7071924cf2 Merge commit 'fdfe01365d579189d9a55b3741dba2ac46eb1df8'
* commit 'fdfe01365d579189d9a55b3741dba2ac46eb1df8':
  hwcontext: allocate the destination frame for the pool size

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2016-11-13 22:35:49 +01:00
Hendrik Leppkes 72c38dd66e Merge commit '5fcae3b3f93fd02b3d1e009b9d9b17410fca9498'
* commit '5fcae3b3f93fd02b3d1e009b9d9b17410fca9498':
  hwcontext: clarify the behaviour of transfer_data() for cropped frames

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2016-11-13 22:35:04 +01:00
Anton Khirnov 775a8477b7 hwcontext_vaapi: add a quirk for the missing MemoryType attribute
The Intel binary iHD driver does not support the
VASurfaceAttribMemoryType, so surface allocation will fail when using
it.

(cherry picked from commit 2124711b95)
2016-11-13 20:39:49 +00:00
Mark Thompson 8d47d84075 hwcontext_vaapi: Try the first render node as the default DRM device
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 121f34d5f0)
2016-11-13 20:39:49 +00:00
Mark Thompson a8d51bb424 hwcontext_vaapi: Add driver quirks to the hwdevice
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 4926fa9a4a)
2016-11-13 20:39:48 +00:00
Hendrik Leppkes 411ecb0be6 Merge commit '444a36269f853844369af0a9836507e5a2780323'
* commit '444a36269f853844369af0a9836507e5a2780323':
  pixdesc: Fix AVCOL_TRC_BT2020_12 name

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2016-11-13 18:38:16 +01:00
Hendrik Leppkes 2d7cf6f72b Merge commit 'f172e22d6aed0bff36e975bafb0183b6779f9444'
* commit 'f172e22d6aed0bff36e975bafb0183b6779f9444':
  pixdesc: Add aliases to SMPTE color properties

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2016-11-13 18:35:28 +01:00
Luca Barbato 638b216d4f pixfmt: Add GRAY12
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-11-10 00:42:48 +01:00
James Almer 9ea69f4808 avutil/softfloat_ieee754: make all functions inline
Removes "defined but not used" warnings

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
2016-11-05 17:53:26 -03:00
Matt Oliver 85db1f97eb avutil/hwcontext_dxva.c: Use new safe dlopen code.
Signed-off-by: Matt Oliver <protogonoi@gmail.com>
2016-11-05 18:08:43 +11:00
Michael Niedermayer 1609935b6c Bump minor versions after 3.2 branchpoint to seperate release
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-10-26 20:52:42 +02:00
Michael Niedermayer 3f3025205f Bump minor versions for 3.2
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-10-26 20:52:42 +02:00
Michael Behrisch c5ac86256b lavu: remove comma at final enumeration items to fix pedantic warnings 2016-10-26 19:36:09 +02:00
Michael Niedermayer 051517648b avutil/x86/emms: Document the emms_c() vs alloc/free relation.
Reviewed-by: Andreas Cadhalpun <andreas.cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-10-23 13:02:37 +02:00
Zhou Xiaoyong b9cd922660 avutil/mips: loongson add mmi utils header file
1.mmiutils.h defined MMI_ load/store macros for loongson2e/2f/3a
2.mmiutils.h defined some mmi assembly macors

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-10-23 03:23:09 +02:00
Michael Niedermayer f5495c970c avutil/avassert: Add av_assertX_fpu()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-10-22 13:50:09 +02:00
Andreas Cadhalpun c8a6eb58d7 doc: fix spelling errors
Thanks to Mathieu Malaterre <malat@debian.org> for reporting the
Que/Queue typo. (https://bugs.debian.org/839542)

Reviewed-by: Lou Logan <lou@lrcd.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-10-21 23:58:47 +02:00
Thomas Turner 09d39177dc avutil: Improved selftest coverage for libavutil/fifo.c
Tested functions: av_fifo_generic_peek(), av_fifo_grow()

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-10-14 23:14:33 +02:00
Michael Niedermayer d790e48830 avutil/audio_fifo: Use av_fifo_freep() and remove redundant if()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-10-14 17:08:51 +02:00
Michael Niedermayer 1bda0ee530 avutil/hwcontext_vdpau: Fix warning: "GET_CALLBACK" redefined
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-10-10 02:41:24 +02:00
Hendrik Leppkes e8487d71be Merge commit 'fe498ef5144d3712b887f44a0c5e654add99ead7'
* commit 'fe498ef5144d3712b887f44a0c5e654add99ead7':
  hwcontext_vaapi: Return all formats for constraints without config

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2016-10-07 13:19:53 +02:00
Hendrik Leppkes 3f9137c57d Merge commit '32c8359093d1ff4f45ed19518b449b3ac3769d27'
* commit '32c8359093d1ff4f45ed19518b449b3ac3769d27':
  lavc: export the timestamps when decoding in AVFrame.pts

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2016-10-07 13:03:36 +02:00
Timothy Gu 54220ce731 pixfmt: Use enum assignment for aliases
This way, Doxygen is happier as aliases are now grouped together, and
it never handled #define's in an enum well in the first place.

Y400A already exists as an enum assignment.
2016-10-05 17:17:50 -07:00
Timothy Gu bdcd586c0d pixdesc: Order function prototypes semantically 2016-10-05 17:17:50 -07:00
Shivraj Patil c1cc13cd2a avutil/mips/generic_macros_msa: rename macro variable which causes segfault for mips r6
Signed-off-by: Shivraj Patil <shivraj.patil@imgtec.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-10-05 23:44:03 +02:00
Timo Rothenpieler a0d7ce1406 avutil/hwcontext_cuda: align allocated frames 2016-10-03 15:49:22 +02:00
Timo Rothenpieler 97e7f03d35 avutil/hwcontext_cuda: use proper synchronization flag 2016-09-29 22:58:34 +02:00
James Almer 13dd5edb88 avutil/hwcontext: use CONFIG_QSV instead of CONFIG_LIBMFX for qsv
See "[FFmpeg-devel] [PATCH] hwcontext: add a QSV implementation"

Suggested-by: nablet developer <sdk@nablet.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2016-09-28 15:13:10 -03:00
James Almer eba0414768 Merge commit '59e7361cc791e5103be1712dc59a2055f118d0da'
* commit '59e7361cc791e5103be1712dc59a2055f118d0da':
  hwcontext: add a QSV implementation

Conflicts:
    doc/APIchanges
    libavutil/version.h

Merged-by: James Almer <jamrial@gmail.com>
2016-09-28 13:30:27 -03:00
James Almer 6e76c9c450 Merge commit 'a8164323374e86ce5f93759230868c98356833a2'
* commit 'a8164323374e86ce5f93759230868c98356833a2':
  pixdesc: Add new SMPTE 431, 432, and 2085 color properties

Conflicts:
    libavcodec/options_table.h
    libavcodec/version.h
    libavutil/pixdesc.c
    libavutil/pixfmt.h
    libavutil/version.h

Merged-by: James Almer <jamrial@gmail.com>
2016-09-28 13:12:18 -03:00
Sasi Inguva 3cb400c11a avutil/frame: Add a flag to discard frame after decode.
Signed-off-by: Sasi Inguva <isasi@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-09-19 19:51:13 +02:00
Mark Thompson a2c912c3b6 lavu/timestamp: Avoid C++-unfriendly code in user header
Including this header in a C++11 program (inside extern "C") will
throw an error because it looks like a user-defined literal.  Add a
space between the two tokens to avoid the problem.
2016-09-01 20:01:28 +01:00
Michael Niedermayer ac028794ad avutil/version: Improve lib versioning scheme for release branches with the next major release
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-08-29 22:32:08 +02:00
Michael Niedermayer adbf1c9054 avutil/version: Mention similarities and differences to semver
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-08-29 22:27:52 +02:00
Michael Niedermayer 21f70940ae avutil/mem: remove av_realloc / av_malloc incompatibility warning
memalign() is not guranteed to be compatible with free() or realloc()
and for platforms in this category we have --enable-memalign-hack
(which should be enabled automatically if such system is detected)
Trying to somehow half support systems that can free() memalign memory
but not reallocate it seems not worth the amount of work needed to
keep 2 then incompatible allocation systems and ensure their
seperation. That is unless this would affect a major platform
on which we want to avoid the memalign hack code

The warnings also cause wasted time and effort as people try
to maintain a separation that does not exist currently.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-08-23 13:50:19 +02:00
Umair Khan fb1f67a70b avutil: Softfloat implementation for IEEE 754 floating point
Signed-off-by: Umair Khan <omerjerk@gmail.com>
2016-08-22 15:28:19 +02:00
Timothy Gu 1ae4b1e09d mem: Extend and edit Doxygen 2016-08-21 13:22:15 -07:00
Paul B Mahol 9876d8fc6d swresample: add int64 sample format 2016-08-18 15:30:05 +02:00
Marton Balint b72a7b96f8 avformat: factorize iso 8601 timestamp writer to a dictionary avutil function
Signed-off-by: Marton Balint <cus@passwd.hu>
2016-08-17 23:45:41 +02:00
Anton Khirnov ec021d4844 buffer: fix av_buffer_pool_init2() documentation
A non-existent av_buffer_pool_can_uninit() function is mentioned instead
of av_buffer_pool_uninit(). Also, this function is to be called by the
caller, not the pool itself.
2016-08-11 10:29:23 +02:00
Anton Khirnov 24a362569b buffer: fix av_buffer_realloc() when the data is offset wrt buffer start
In such a case behave as if the buffer was not reallocatable -- allocate a
new one and copy the data (preserving just the part described by the
reference passed to av_buffer_realloc).

CC: libav-stable@libav.org
Reported-By: wm4 <nfxjfg@googlemail.com>
2016-08-03 11:07:15 +02:00
James Almer 63ac8e2d93 lavu: add LOCAL_ALIGNED_32
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2016-08-03 10:56:52 +02:00
Timothy Gu 58c7bf789f doxygen: Standardize root-level modules 2016-08-02 22:15:25 -07:00
Timothy Gu a4d7a6d1dd mathematics: Extend and edit Doxygen 2016-08-02 21:53:34 -07:00
Timothy Gu 952c4cf7d0 rational: Extend Doxygen 2016-08-02 21:52:40 -07:00
Timothy Gu f29ffbc87d avutil/hash: Add more detailed Doxygen documentation 2016-08-02 21:49:52 -07:00
Timothy Gu ec234ccea4 mem: Order function prototypes semantically 2016-08-02 15:17:31 -07:00
Martin Storsjö fc94a1acc2 Revert "libavutil: Use an intermediate variable in AV_COPY*U"
This reverts commit 014773b66b.

Since 230b1c070, the bytewise AV_W*() macros only expand their
argument once, i.e. doing exactly the same change as was done
in the AV_COPY*U macros, so this change is no longer necessary.

Signed-off-by: Martin Storsjö <martin@martin.st>
2016-08-02 21:18:18 +03:00
Timothy Gu 1fcf243216 mathematics: Make function prototypes identical to definitions
Doxygen gets confused by this.
2016-08-02 09:01:09 -07:00
Carl Eugen Hoyos 5aede05120 lavu/hwcontext_vaapi: Fix compilation if VA_FOURCC_ABGR is not defined.
Fixes ticket #5484.
2016-08-02 17:07:41 +02:00
Timothy Gu 39211cb9aa murmur3: Add Doxygen documentation
The interface has been stable for some time now.
2016-08-02 07:50:44 -07:00
Timothy Gu 0a7a4e33f3 avutil: Add detailed Doxygen description to a few hashes 2016-08-02 07:48:21 -07:00
Timothy Gu 19d7098c9e avutil: Group hash functions separately in Doxygen 2016-08-02 07:48:08 -07:00
Martin Storsjö f79d847400 intreadwrite: Use the __unaligned keyword on MSVC for ARM and x86_64
AV_WN64 is meant for unaligned data, but the existing av_alias* unions
(without a definition for the av_alias attribute - we don't have one
for MSVC) indicate to the compiler that they would have sufficient
alignment for normal access, i.e. the compiler is free to assume
8 byte alignment.

On ARM, this makes sure that AV_WN64 (or two consecutive AV_WN32) is
done with two str instructions instead of one strd.

Signed-off-by: Martin Storsjö <martin@martin.st>
2016-08-02 11:33:23 +03:00
Martin Storsjö 230b1c070b intreadwrite: Add intermediate variables in the byteswise AV_W*() macros
This avoids issues with expanding the argument multiple times,
and makes sure that it is of the right type for the following shifts.

Even if the caller of a macro could be expected not to pass parameters
that have side effects if expanded multiple times, these fallback
codepaths are rarely, if ever, tested, so it is expected that such
issues can arise.

Thefore, for safety, make sure the fallback codepaths only expand
the arguments once.

Signed-off-by: Martin Storsjö <martin@martin.st>
2016-08-02 11:32:35 +03:00
Martin Storsjö 014773b66b libavutil: Use an intermediate variable in AV_COPY*U
If AV_RN and AV_WN are macros with multiple individual reads and
writes, the previous version of the AV_COPYU macro would fail if
the reads and writes overlap.

This should not be any less efficient in any case, given a
sensibly optimizing compiler.

Signed-off-by: Martin Storsjö <martin@martin.st>
2016-07-31 22:50:55 +03:00
Timothy Gu 04da20e58f dynarray: Change AV_ to FF_ for AV_DYNARRAY_ADD
The header is not installed and the macro isn't used outside libavutil,
so it is obviously privat to libavutil. Make the name reflect that.
2016-07-31 10:19:03 -07:00
Timothy Gu 22df70e9ed doxygen: Add a note on libavutil's modular nature 2016-07-29 19:01:40 -07:00