Commit Graph

4522 Commits

Author SHA1 Message Date
Thomas Turner b7a6d28e5e avutil/tests: improved code coverage for atomic
Signed-off-by: Thomas Turner <thomastdt@googlemail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-01-01 16:57:55 +01:00
Michael Niedermayer 7525517593 libavutil/random_seed: Ensure that get_generic_seed() spends at least 1/32 sec gathering entropy
This may fix the failures on windows

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-12-31 17:20:06 +01:00
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
Diego Biurrun 92db508307 build: Generate pkg-config files from Make and not from configure
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
2016-12-22 12:30:54 +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
Diego Biurrun 05a603a94e ppc: Merge types_altivec.h into util_altivec.h
There is no point in keeping the two separate.
2016-12-14 14:08:43 +01: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
Wan-Teh Chang 2170017a1c avutil: fix data race in av_get_cpu_flags()
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>
2016-12-08 15:53:58 -05:00
Diego Biurrun f912fd767e Add missing #includes for standalone spherical-information-related headers 2016-12-08 20:12:23 +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
Vittorio Giovara 2fb6acd9c2 lavc: Add spherical packet side data API
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2016-12-07 14:34:34 -05:00
Vittorio Giovara c70add61d1 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:32:17 -05:00
Vittorio Giovara 075acbb6ff lavu: Add a video section to Doxygen documentation
Fill it with AVStereo3D and AVDisplayMatrix documentation.
Apply the necessary changes to make verbatim code look good in doxygen.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2016-12-07 14:26:21 -05:00
Vittorio Giovara 706af9227b lavu: Document the color properties enumeration values origin 2016-12-02 11:36:46 -05:00
Timo Rothenpieler 52773a2c68 avutil/hwcontext_cuda: check for missing pixel format 2016-11-30 12:36:23 +01:00
Mark Thompson d30719e62d hwcontext_vaapi: Don't abort on failing to allocate from a fixed-size pool 2016-11-26 18:03:05 +00: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
Janne Grunau 6a1ea4ec93 arm: warn/error on movrelx usage problematic with PIC on ELF
The warning has false positives but our asm does not trigger it. For
new code false positives can only be avoided by changing the register
allocation.
2016-11-24 21:26:22 +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
Diego Biurrun 81a3c42abe Drop some bogus Doxygen documentation. 2016-11-21 14:29:11 +01:00
Diego Biurrun a1d9de304f Fix some mismatches between function parameter and doxygen parameter names. 2016-11-21 14:29:10 +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
Anton Khirnov e18ba2dfd2 hwcontext_dxva2: make sure the sw frame format is the right one during transfer 2016-11-18 10:31:53 +01:00
Anton Khirnov 5a1d605cea hwcontext_dxva2: split transfer_data() into upload/download functions
Just the presence of a hw frames context is not enough to detect whether
the transfer is an upload or a download, because hw frames mapped to
system memory will have a hw frames context attached.
2016-11-18 10:31:53 +01:00
Anton Khirnov 9d7026574b hwcontext_dxva2: fix handling of the mapping flags
D3DLOCK_READONLY properly corresponds to the absence of the write flag,
not to the presence of the read flag, while D3DLOCK_DISCARD is
equivalent to the overwrite flag.
2016-11-18 10:31:53 +01:00
Anton Khirnov 0d3176e32f hwcontext_dxva2: do not assume the destination format during mapping is always the right one
Handle the cases where it is unsupported or unset.
2016-11-18 10:31:53 +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
Martin Storsjö 824e8c2840 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.

Signed-off-by: Martin Storsjö <martin@martin.st>
2016-11-10 14:01:04 +02:00
Martin Storsjö c44a8a3eab 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

Signed-off-by: Martin Storsjö <martin@martin.st>
2016-11-10 11:06:08 +02:00
Luca Barbato 638b216d4f pixfmt: Add GRAY12
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-11-10 00:42:48 +01:00
Vittorio Giovara 17dac56b8f lavu: Rename ycgco color space appropriately
Planes are ordered as the name suggests now.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2016-11-08 11:22:29 -05:00
Luca Barbato 7471352f19 pixfmt: Add GRAY12 2016-11-07 22:42:00 +01:00
Anton Khirnov e8bbacbf52 hwcontext_qsv: support frame mapping
Signed-off-by: Maxym Dmytrychenko <maxym.dmytrychenko@intel.com>
2016-11-07 12:47:40 +01:00
Anton Khirnov 8ea15afbf2 hwcontext_qsv: transfer data through the child context when VPP fails
Uploading/downloading data through VPP may not work for some formats, in
that case we can still try to call av_hwframe_transfer_data() on the
child context.

Signed-off-by: Maxym Dmytrychenko <maxym.dmytrychenko@intel.com>
2016-11-07 12:47:33 +01:00
Anton Khirnov b91ce48600 hwcontext_qsv: do not fail when download/upload VPP session creation fails
Certain pixel formats (e.g. P8) might not be supported for
download/upload through VPP operations, but can still be used otherwise.

Signed-off-by: Maxym Dmytrychenko <maxym.dmytrychenko@intel.com>
2016-11-07 12:47:26 +01:00
Anton Khirnov b115a35ea6 hwcontext_qsv: add support for the P8 format
When using GPU surfaces with QSV, one needs to supply a frame allocator,
which will be invoked to pass surface pools to libmfx.
For encoding, this allocator gets invoked not only for the pool of input
frames, but also for a separate pool of (apparently) reconstructed frames
and another pool of MFX_FOURCC_P8, which on Windows needs to return
D3DFMT_P8 D3D surfaces. Those are probably used to store the encoded
bitstream on the GPU.

Signed-off-by: Maxym Dmytrychenko <maxym.dmytrychenko@intel.com>
2016-11-07 12:47:20 +01:00
Anton Khirnov 10065d9324 hwcontext_dxva2: add support for the P8 format
This format is used internally by the QSV encoder to store the encoded
bitstream.

Signed-off-by: Maxym Dmytrychenko <maxym.dmytrychenko@intel.com>
2016-11-07 12:47:14 +01:00
Anton Khirnov 9109737654 hwcontext_dxva2: frame mapping support
Signed-off-by: Maxym Dmytrychenko <maxym.dmytrychenko@intel.com>
2016-11-07 12:46:59 +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
Mark Thompson 8ad9f9d675 hwcontext_vaapi: Frame mapping support
Can map to any supported software format (using a GPU copy if it
doesn't actually match the surface format underneath).
2016-11-03 23:49:05 +00:00
Mark Thompson d06aa24ba5 hwcontext: Hardware frame mapping
Adds the new av_hwframe_map() function, which allows mapping between
hardware frames and normal memory, along with internal support for
implementing it.

Also adds av_hwframe_ctx_create_derived(), for creating a hardware
frames context associated with one device using frames mapped from
another by some hardware-specific means.
2016-11-03 23:49:01 +00:00
Diego Biurrun 67351924fa Drop unreachable break and return statements 2016-11-03 20:17:12 +01:00
Diego Biurrun 99434f4df8 float_dsp: Have implementation match function pointer prototype
libavutil/x86/float_dsp_init.c(144) : warning C4028: formal parameter 1 different from declaration
libavutil/x86/float_dsp_init.c(144) : warning C4028: formal parameter 2 different from declaration
2016-11-03 17:43:55 +01:00
Diego Biurrun 0456e68439 audio_fifo: Drop write-only variable 2016-10-27 12:21:46 +02: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
Vittorio Giovara 0d9b9bd37f lavu: Add JEDEC P22 color primaries 2016-10-21 11:46:21 -04:00
Diego Biurrun 7911186ed6 emms: Give apriv_emms_yasm() a more general name 2016-10-18 13:09:09 +02:00
Diego Biurrun 6be7944ee2 x86: Add missing colons after assembly labels
This fixes many warnings of the sort
warning: label alone on a line without a colon might be in error
2016-10-17 16:31:26 +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
Kieran Kunhya 81f1f6c3f6 Add GBRAP12 pixel format support
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2016-10-12 21:33:34 +02:00
Michael Niedermayer 1e93aa69a6 Add GBRP12 pixel format support
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2016-10-12 17:39:30 +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
Vittorio Giovara 310c55f179 pixfmt: Document alternative names for smpte 431 and 432 2016-10-02 15:42:03 -04:00
Mark Thompson eaaaabf6c9 hwcontext_vaapi: Enable P010 support
This is required for 10-bit surfaces.
2016-10-02 20:23:18 +01:00
Anton Khirnov 5cc0057f49 lavu: remove the custom atomic API
It has been replaced by C11 stdatomic.h and is now unused.
2016-10-02 19:35:55 +02:00
Anton Khirnov 27079a426c buffer: convert to stdatomic 2016-10-02 18:58:04 +02:00
Anton Khirnov 2124711b95 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.
2016-10-02 11:41:45 +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
Luca Barbato 0e8d1fc1f0 lavu: Bump version for the 12bit Planar YUV support 2016-09-27 18:48:30 +02:00
Luca Barbato 9bd6ea5695 pixfmt: Add yuv444p12 pixel format 2016-09-27 18:48:30 +02:00
Luca Barbato 0aebbbd024 pixfmt: Add yuv422p12 pixel format 2016-09-27 18:48:30 +02:00
Luca Barbato 85406e7a8d pixfmt: Add yuv420p12 pixel format 2016-09-27 18:48:30 +02:00
Yogender Kumar Gupta 340f12f712 hwcontext_cuda: Add P010 and YUV444P16 pixel format
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2016-09-22 09:47:48 +02: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
Alexandra Hájková 07e1f99a1b x86util: Document SBUTTERFLY macro
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2016-09-19 10:02:43 +02:00
Mark Thompson 09a145b3c8 hwcontext_vdpau: Remove duplicate definition of GET_CALLBACK 2016-09-14 20:48:36 +01:00
Mark Thompson 7081620aca hwcontext_vdpau: Fix missing subscripts
Also remove the redundant casts which were hiding the error here.
2016-09-14 20:48:36 +01:00
Diego Biurrun 4fb311c804 Drop memalign hack
It no longer serves a useful purpose.
2016-09-03 15:11:29 +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
Anton Khirnov f01f7a7846 hwcontext_dxva2: use the special UC copy for downloading frames 2016-08-31 08:22:52 +02:00
Anton Khirnov d7bc52bf45 imgutils: add a function for copying image data from GPU mapped memory
See https://software.intel.com/en-us/articles/copying-accelerated-video-decode-frame-buffers
2016-08-31 08:15:47 +02: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
Diego Biurrun 00a0419c7f mathematics: Kill non-compiling disabled cruft 2016-08-17 12:16:42 +02:00
Mark Thompson 121f34d5f0 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.
2016-08-13 09:46:48 +01: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
Zhao Zhili 65b2feb890 avutil/mem: fix memleak
The original code assumes av_realloc() will free ptr if size is zero.
The assumes is incorrect now.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-07-28 12:09:05 +02:00
James Almer fb91850fe1 avutil/frame: access avframe fields directly in get_frame_defaults()
The accessors are needed only from outside libavutil.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
2016-07-25 17:37:18 -03:00
Kacper Michajłow 69630f4d30 libavutil/opt: Small bugfix in example.
Fix const corectness and zero init the struct. This example code would actually crash when initializing string.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-07-24 00:41:15 +02:00
Martin Storsjö f637046d31 libavutil: Always use some GCC style attributes on clang
Clang normally disguises as GCC (defining __GNUC__), and thus get
all the normal GCC specific attributes.

Clang can also work as a drop-in replacement for MSVC, and in these
cases, it doesn't define __GNUC__, but defines _MSC_VER instead.

Even in these setups, it still supports the GCC style attributes,
thus use them, especially where there isn't any MSVC specific
version, or where the MSVC specific version doesn't work on clang
(for DECLARE_ASM_CONST).

Signed-off-by: Martin Storsjö <martin@martin.st>
2016-07-21 12:52:19 +03:00
Martin Storsjö 6f9e34baea arm: Check for support for the .fpu directive
When targeting COFF (windows), clang doesn't support this
directive (while binutils supports it for all targets).

Signed-off-by: Martin Storsjö <martin@martin.st>
2016-07-21 12:52:10 +03:00
Fiona Glaser 8e9cd81d29 x86: cpu: Detect Conroe CPUs and their slow shuffle unit 2016-07-20 18:43:28 +02:00
Diego Biurrun 7d7355aa92 x86: Add SSSE3_SLOW CPU flag and related convenience macros 2016-07-20 18:43:28 +02:00
Zhao Zhili 450cf400fc avutil/mem: fix wrong comment
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-07-18 22:52:36 +02:00
James Almer fd5e6a095f x86util: Extend SPLATW for avx2
Integration to Libav by Josh de Kock <josh@itanimul.li>.

Signed-off-by: Alexandra Hájková <alexandra@khirnov.net>
2016-07-18 15:27:13 +02:00
Ronald S. Bultje f0a2b6249b vp9: add 16x16 idct avx2 (8-bit).
checkasm --bench, 10k runs, for *_add_${bpc}_${sub_idct}_${opt}, shows
that it's about 1.65x as fast as the AVX version for the full IDCT, and
similar speedups for the sub-IDCTs:

nop: 24.6
vp9_inv_dct_dct_16x16_add_8_1_c: 6444.8
vp9_inv_dct_dct_16x16_add_8_1_sse2: 638.6
vp9_inv_dct_dct_16x16_add_8_1_ssse3: 484.4
vp9_inv_dct_dct_16x16_add_8_1_avx: 661.2
vp9_inv_dct_dct_16x16_add_8_1_avx2: 311.5
vp9_inv_dct_dct_16x16_add_8_2_c: 6665.7
vp9_inv_dct_dct_16x16_add_8_2_sse2: 646.9
vp9_inv_dct_dct_16x16_add_8_2_ssse3: 455.2
vp9_inv_dct_dct_16x16_add_8_2_avx: 521.9
vp9_inv_dct_dct_16x16_add_8_2_avx2: 304.3
vp9_inv_dct_dct_16x16_add_8_4_c: 7022.7
vp9_inv_dct_dct_16x16_add_8_4_sse2: 647.4
vp9_inv_dct_dct_16x16_add_8_4_ssse3: 467.1
vp9_inv_dct_dct_16x16_add_8_4_avx: 446.1
vp9_inv_dct_dct_16x16_add_8_4_avx2: 297.0
vp9_inv_dct_dct_16x16_add_8_8_c: 6800.4
vp9_inv_dct_dct_16x16_add_8_8_sse2: 598.6
vp9_inv_dct_dct_16x16_add_8_8_ssse3: 465.7
vp9_inv_dct_dct_16x16_add_8_8_avx: 440.9
vp9_inv_dct_dct_16x16_add_8_8_avx2: 290.2
vp9_inv_dct_dct_16x16_add_8_16_c: 6626.6
vp9_inv_dct_dct_16x16_add_8_16_sse2: 599.5
vp9_inv_dct_dct_16x16_add_8_16_ssse3: 475.0
vp9_inv_dct_dct_16x16_add_8_16_avx: 469.9
vp9_inv_dct_dct_16x16_add_8_16_avx2: 286.4
2016-07-11 10:14:58 -04:00
Marton Balint 593987810e avutil/parseutils: dont assume standard time when parsing a timestamp
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Marton Balint <cus@passwd.hu>
2016-07-11 01:06:23 +02:00
Clément Bœsch 1cfa350429 Merge commit 'bcc07e2576cb723007bea1238afd019ae2d1b005'
* commit 'bcc07e2576cb723007bea1238afd019ae2d1b005':
  pixdesc: Use C99 array to list color properties names

Merged-by: Clément Bœsch <u@pkh.me>
2016-07-09 14:21:01 +02:00
Matthieu Bouron 0f2654c9a3 lavc: add mediacodec hwaccel support 2016-07-08 17:02:37 +02:00
Anton Khirnov d20c118975 hwcontext_qsv: add support for p010 2016-07-03 09:13:29 +02:00
Mark Thompson 4926fa9a4a 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.
2016-07-02 14:09:54 +01:00
Anton Khirnov 2ef87815fe hwcontext_dxva2: add support for p010 2016-07-02 09:39:24 +02:00
Hendrik Leppkes b7c5f88523 pixfmt: add P010 pixel format
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>
2016-07-02 09:35:23 +02:00
Michael Niedermayer 042fb69deb avutil/frame: Move new field to the end of AVFrame
This fixes part of Ticket5676
This fixes kodi, mpv, chromium and ffplay build against 3.0 and linked to 3.1

This is a similar ABI fix to 1eb43af1a0

Approved-by: BBB
Approved-by: jamrial
Approved-by: BtbN
Approved-by: nevcairiel
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-06-30 17:43:01 +02:00
Mark Thompson f62bb216ac hwcontext_vaapi: allow transfers to/from any size of sw frame
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>
2016-06-28 08:32:11 +02:00
Anton Khirnov fdfe01365d hwcontext: allocate the destination frame for the pool size
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.
2016-06-28 08:31:28 +02:00
Anton Khirnov 5fcae3b3f9 hwcontext: clarify the behaviour of transfer_data() for cropped frames 2016-06-28 08:30:59 +02:00
Vittorio Giovara 444a36269f pixdesc: Fix AVCOL_TRC_BT2020_12 name 2016-06-27 12:27:53 -04:00
Vittorio Giovara f172e22d6a pixdesc: Add aliases to SMPTE color properties
Drop ST from names and symbols, it does not add anything distinctive or
descriptive.
2016-06-27 12:27:13 -04:00
Matthieu Bouron 0acc170aad Merge commit '535a742c2695a9e0c586b50d7fa76e318232ff24'
* commit '535a742c2695a9e0c586b50d7fa76e318232ff24':
  build: Change structure of the linker version script templates

Merged-by: Matthieu Bouron <matthieu.bouron@stupeflix.com>
2016-06-27 17:56:47 +02:00
Matthieu Bouron 9eb3da2f99 asm: FF_-prefix internal macros used in inline assembly
See merge commit '39d6d3618d48625decaff7d9bdbb45b44ef2a805'.
2016-06-27 17:21:18 +02:00
Hendrik Leppkes 06a0e18435 hwcontext_dxva2: Use GetDesktopWindow instead of GetShellWindow
Improves compatibility with some MinGW variants,
see 771537edcf
2016-06-26 15:34:40 +02:00
Hendrik Leppkes ed5d03ff6f Merge commit 'b8bf9194af602cf3a4bcd19a5e278e3d6d69f8fa'
* commit 'b8bf9194af602cf3a4bcd19a5e278e3d6d69f8fa':
  hwcontext_vaapi: implement device creation

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2016-06-26 15:25:38 +02:00
Hendrik Leppkes 162370b473 Merge commit '8e70385a8ed06f96f1e9e35cf7b6788a5c56eded'
* commit '8e70385a8ed06f96f1e9e35cf7b6788a5c56eded':
  hwcontext_dxva2: implement device creation

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2016-06-26 15:25:24 +02:00
Hendrik Leppkes c5a0c16850 Merge commit '2e219b491bcc0845248345fdad31231b081e06d1'
* commit '2e219b491bcc0845248345fdad31231b081e06d1':
  hwcontext_cuda: implement device creation

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2016-06-26 15:25:12 +02:00
Hendrik Leppkes 613ac3bf82 Merge commit '38392b2af815898b8716826c4e29d95c04fb2647'
* commit '38392b2af815898b8716826c4e29d95c04fb2647':
  hwcontext_vdpau: implement device creation

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2016-06-26 15:24:53 +02:00
Hendrik Leppkes 481f320aa3 Merge commit '1c9e8616c535ef496e7ee8a5cbc5e9e972a6977d'
* commit '1c9e8616c535ef496e7ee8a5cbc5e9e972a6977d':
  hwcontext: add a function for opening devices

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2016-06-26 15:23:24 +02:00
Clément Bœsch b77f62e27f Merge commit 'ded4a6543dfb5a2f1d9f7fb8d3ab27a1872c22b3'
* commit 'ded4a6543dfb5a2f1d9f7fb8d3ab27a1872c22b3':
  xtea-test: Use struct allocation functions from the API

Merged-by: Clément Bœsch <clement@stupeflix.com>
2016-06-24 11:16:52 +02:00
Clément Bœsch b6310ab6b5 Merge commit '8131bd4c22ad59b040173f67a5b2edb75863e801'
* commit '8131bd4c22ad59b040173f67a5b2edb75863e801':
  blowfish-test: Use struct allocation functions from the API

Merged-by: Clément Bœsch <clement@stupeflix.com>
2016-06-24 11:14:23 +02:00
Clément Bœsch 1ca383c8d4 Merge commit 'a86ef80494d759807a5ef8dd12838f0690092e37'
* commit 'a86ef80494d759807a5ef8dd12838f0690092e37':
  blowfish-test: Return different values for different errors

Merged-by: Clément Bœsch <clement@stupeflix.com>
2016-06-24 11:10:35 +02:00
Clément Bœsch abb3cc46d5 Merge commit '0c4468dc185fa8b9e7d6add914595c5e928b24fd'
* commit '0c4468dc185fa8b9e7d6add914595c5e928b24fd':
  stereo3d: Add API to get name from value or value from name

Merged-by: Clément Bœsch <clement@stupeflix.com>
2016-06-23 12:38:51 +02:00
Hendrik Leppkes 0c312a4562 hwcontext_dxva2: support P010 10-bit surfaces 2016-06-22 23:28:47 +02:00
Hendrik Leppkes 3689efea3d Merge commit 'c46db38cde8e8fd8ecb1c6602f10ec0e002f29a8'
* commit 'c46db38cde8e8fd8ecb1c6602f10ec0e002f29a8':
  hwcontext: add a dxva2 implementation

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2016-06-22 22:38:49 +02:00
Clément Bœsch 5d48e4eafa Merge commit 'a6a750c7ef240b72ce01e9653343a0ddf247d196'
* commit 'a6a750c7ef240b72ce01e9653343a0ddf247d196':
  tests: Move all test programs to a subdirectory

Merged-by: Clément Bœsch <clement@stupeflix.com>
2016-06-22 13:44:34 +02:00
Clément Bœsch 5558ff3a9f Merge commit '257f00ec1ab06a2a161f535036c6512f3fc8e801'
* commit '257f00ec1ab06a2a161f535036c6512f3fc8e801':
  Split global .gitignore file into per-directory files

Merged-by: Clément Bœsch <clement@stupeflix.com>
2016-06-22 11:28:51 +02:00
Clément Bœsch e4c07dc4b7 Merge commit '1f77e634bb838f71ff21923b5e9fe3104c831c52'
* commit '1f77e634bb838f71ff21923b5e9fe3104c831c52':
  colorspace: Add support for BT709

See 9779b62624

Merged-by: Clément Bœsch <u@pkh.me>
2016-06-21 22:16:16 +02:00
Clément Bœsch 8ef57a0d61 Merge commit '41ed7ab45fc693f7d7fc35664c0233f4c32d69bb'
* commit '41ed7ab45fc693f7d7fc35664c0233f4c32d69bb':
  cosmetics: Fix spelling mistakes

Merged-by: Clément Bœsch <u@pkh.me>
2016-06-21 21:55:34 +02:00
Mark Thompson fe498ef514 hwcontext_vaapi: Return all formats for constraints without config
No longer make a dummy device configuration to query.  Instead, just
return everything we recognise from the whole format list.  Also
change the device setup code to query that list only, rather than
intersecting it with the constraint output.

This makes hwupload more usable on mesa/gallium where the video
processor only declares support for RGB formats, making it unable to
deal with YUV formats before this patch.  It might introduce some
different trickier failures in the internal upload/download code
because the set of allowed formats there has changed, though I didn't
find any obvious regressions with i965.
2016-06-21 20:42:22 +01:00
Anton Khirnov 32c8359093 lavc: export the timestamps when decoding in AVFrame.pts
Currently it's exported as AVFrame.pkt_pts, which is also the only use
for that field. The reason it is done like this is that lavc used to
export various codec-specific "timing" information in AVFrame.pts, which
is not done anymore.

Since it is confusing to the callers to have a separate field which is
used only for decoder timestamps and nothing else, deprecate pkt_pts and
use just AVFrame.pts everywhere.
2016-06-21 19:54:42 +02:00
Anton Khirnov 59e7361cc7 hwcontext: add a QSV implementation 2016-06-21 19:53:37 +02:00