Commit Graph

2116 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
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
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
Mark Thompson
09a145b3c8 hwcontext_vdpau: Remove duplicate definition of GET_CALLBACK 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
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
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
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
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