Commit Graph

2063 Commits

Author SHA1 Message Date
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
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
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
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
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
Vittorio Giovara a816432337 pixdesc: Add new SMPTE 431, 432, and 2085 color properties
Appeared in H.264 2016/02.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2016-06-21 09:29:04 -04:00
Neil Birkbeck 5d560d38de pixfmt: Add ARIB STD-B76 color transfer characteristic
Adding hybrid log-gamma (https://en.wikipedia.org/wiki/Hybrid_Log-Gamma)
based on the standardization in ARIB STD-B67:
http://www.arib.or.jp/english/html/overview/doc/2-STD-B67v1_0.pdf

The choice of enum value of 18 is consistent with HEVC:
http://phenix.it-sudparis.eu/jct/doc_end_user/current_document.php?id=10481

And also with latest proposal for color format in mkv:
https://mailarchive.ietf.org/arch/search/?email_list=cellar&gbt=1&q=Colour+Format+proposal

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2016-06-21 09:02:46 -04:00
Vittorio Giovara bcc07e2576 pixdesc: Use C99 array to list color properties names 2016-06-13 11:51:18 -04:00
Diego Biurrun 535a742c26 build: Change structure of the linker version script templates
Split version files into one line per symbol/directive to allow compatibility
with the Solaris linker without preprocessing and eliminate $ from version file
templates to simplify the postprocessing shell command.
2016-05-29 16:43:11 +02:00
Diego Biurrun 1e9c5bf4c1 asm: FF_-prefix internal macros used in inline assembly
These warnings conflict with system macros on Solaris, producing
truckloads of warnings about macro redefinition.
2016-05-28 19:18:26 +02:00
Anton Khirnov b8bf9194af hwcontext_vaapi: implement device creation 2016-05-26 15:40:34 +02:00
Anton Khirnov 8e70385a8e hwcontext_dxva2: implement device creation 2016-05-26 15:40:33 +02:00
Anton Khirnov 2e219b491b hwcontext_cuda: implement device creation 2016-05-26 15:40:33 +02:00
Anton Khirnov 38392b2af8 hwcontext_vdpau: implement device creation 2016-05-26 15:40:33 +02:00
Anton Khirnov 1c9e8616c5 hwcontext: add a function for opening devices 2016-05-26 15:40:32 +02:00
Diego Biurrun ded4a6543d xtea-test: Use struct allocation functions from the API 2016-05-19 09:55:55 +02:00
Diego Biurrun 8131bd4c22 blowfish-test: Use struct allocation functions from the API 2016-05-19 09:55:55 +02:00
Diego Biurrun a86ef80494 blowfish-test: Return different values for different errors 2016-05-19 09:55:55 +02:00
Vittorio Giovara 0c4468dc18 stereo3d: Add API to get name from value or value from name
Use it in av_dump_format() instead of a huge switch case.
2016-05-17 12:25:27 -04:00
Anton Khirnov c46db38cde hwcontext: add a dxva2 implementation 2016-05-17 09:11:25 +02:00
Anton Mitrofanov 2fb1d17a5a x86inc: Enable AVX emulation in additional cases
Allows emulation to work when dst is equal to src2 as long as the
instruction is commutative, e.g. `addps m0, m1, m0`.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2016-05-16 10:31:24 +02:00
Anton Mitrofanov 300fb0df84 x86inc: Improve handling of %ifid with multi-token parameters
The yasm/nasm preprocessor only checks the first token, which means that
parameters such as `dword [rax]` are treated as identifiers, which is
generally not what we want.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2016-05-16 10:31:20 +02:00
Anton Mitrofanov 8d02579fae x86inc: Fix AVX emulation of some instructions
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2016-05-16 10:31:17 +02:00
Henrik Gramner ba3eb745cc x86inc: Fix AVX emulation of scalar float instructions
Those instructions are not commutative since they only change the first
element in the vector and leave the rest unmodified.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2016-05-16 10:31:13 +02:00
Diego Biurrun a6a750c7ef tests: Move all test programs to a subdirectory 2016-05-13 14:55:56 +02:00
Diego Biurrun 257f00ec1a Split global .gitignore file into per-directory files 2016-05-13 14:55:56 +02:00
Jan Ekström 1f77e634bb colorspace: Add support for BT709
BT.709 coefficients were gathered from the first two parts of BT.709
to BT.2020 conversion guide in ARIB STD-B62 (Pt. 1, Chapter 6.2.2).
They were additionally confirmed by manually calculating values.
2016-05-10 11:30:25 +02:00
Vittorio Giovara 41ed7ab45f cosmetics: Fix spelling mistakes
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2016-05-04 18:16:21 +02:00
Diego Biurrun f2422b5875 testprogs: Mark some tables as static const 2016-04-29 16:21:23 +02:00
Thomas Guillem 785bfb1d7b pixfmt: fix wrong comment
The h264/hevc Annex E colour primaries table says that AVCOL_SPC_SMPTE170M is
similar than AVCOL_SPC_SMPTE240M. These two values are not similar than
AVCOL_SPC_BT470BG.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2016-04-19 13:38:29 +02:00
Anton Khirnov a0f469da74 hwcontext: initialize sw_format in av_hwframe_ctx_alloc() 2016-04-15 10:15:54 +02:00
Martin Storsjö 798845ce7e testprogs: Add missing libm.h includes
This fixes building on MSVC 2010 and 2012 after d12b5b2f13.

Signed-off-by: Martin Storsjö <martin@martin.st>
2016-04-11 14:48:24 +03:00
Diego Biurrun d12b5b2f13 build: Split test programs off into separate files
This avoids spurious library rebuilds when only the test program
code is changed and simplifies the build system.
2016-04-07 16:14:42 +02:00
Diego Biurrun 01621202aa build: miscellaneous cosmetics
Restore alphabetical order in lists, break overly long lines, do some
prettyprinting, add some explanatory section comments, group parts
together that belong together logically.
2016-04-07 15:26:08 +02:00
Diego Biurrun 3b08d9d932 testprogs: K&R formatting cosmetics 2016-03-24 21:45:07 +01:00
Diego Biurrun 439929859a testprogs: Clean up #includes 2016-03-24 19:17:23 +01:00
Michael Niedermayer 564b4591bb opt: Add av_opt_copy()
This includes documentation and other modifications by
Lukasz Marek and Martin Storsjö.

Signed-off-by: Martin Storsjö <martin@martin.st>
2016-03-24 10:34:15 +02:00
Lukasz Marek 8833f1508b opt: Add const to av_opt_next
Also add const to pointers in static functions within opt.c where
possible/necessary.

Signed-off-by: Martin Storsjö <martin@martin.st>
2016-03-24 10:34:09 +02:00
Diego Biurrun 0d2fcdb1c5 opt-test: Merge struct declaration and initialization 2016-03-23 10:14:43 +01:00
Diego Biurrun d3044cf37f opt-test: Move some variable declarations to avoid block braces 2016-03-23 10:14:31 +01:00