Commit Graph

4144 Commits

Author SHA1 Message Date
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
Stefano Sabatini
e8a9b64410 lavu/base64: add AV_BASE64_DECODE_SIZE() macro
This is consistent with the AV_BASE64_SIZE macro and avoids the literal
use of constants in the code.
2016-04-02 12:48:21 +02:00
wm4
f099cb2f8a lavu: improve documentation of some AVFrame functions 2016-04-01 12:52:12 +02:00
Lou Logan
06eef96b69 fix some a/an typos
Signed-off-by: Lou Logan <lou@lrcd.com>
2016-03-28 14:13:17 -08:00
Thilo Borgmann
4ebf0b109c lavu/dict: Add new flag to allow multiple equal keys. 2016-03-25 17:08:11 +01:00
Diego Biurrun
3b08d9d932 testprogs: K&R formatting cosmetics 2016-03-24 21:45:07 +01:00
Michael Niedermayer
54f43984e1 avutil/parseutils: mark args as static const
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-03-24 19:31:02 +01:00
Petru Rares Sincraian
f707042c93 Added more tests to libavutil/parseutils.c
- Added tests for av_find_info_tag().
    - Added test for av_get_known_color_name()

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-03-24 19:29:43 +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
Petru Rares Sincraian
68e5976543 Refactor libavutil/parseutils.c
All tests were in the main method which produces a long main. Now, each test
is in his own method.

I think this produces a more clear code and follows more with the main
priority of FFmpeg "simplicity and small code size"

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-03-24 03:38:12 +01: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
Diego Biurrun
52385410b7 des-test: Move a variable declaration to avoid an ifdef 2016-03-23 09:35:41 +01:00
Diego Biurrun
a84713e70d parseutils-test: Move some variable declarations to avoid block braces 2016-03-23 09:35:41 +01:00
Ganesh Ajjanagadde
db1a642cd2 all: move ff_exp10, ff_exp10f, ff_fast_powf to lavu/ffmath.h
The idea is to use ffmath.h for internal implementations of math functions.
Currently, it is used for variants of libm functions, but is by no means
limited to such things.

Note that this is not exported; use lavu/mathematics for such purposes.

Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: Ganesh Ajjanagadde <gajjanag@gmail.com>
2016-03-22 10:15:31 -07:00
Petru Rares Sincraian
124526ba1a Added a selftest to libavutil/display.c
- Check if av_display_rotation_get() gets the correct degrees
    - Check if av_display_rotation_set() sets the correct matrix
    - Check if av_display_matrix_flip() changes correct the matrix

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-03-22 17:24:55 +01:00
Mark Thompson
551c6775ab lavu: VAAPI hwcontext implementation
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2016-03-19 15:40:22 +01:00
Mark Thompson
d264c720f7 lavu: deprecate AV_PIX_FMT_VAAPI_*, replace with AV_PIX_FMT_VAAPI
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2016-03-19 15:40:22 +01:00
Mark Thompson
b1f01e85a9 lavu: add a way to query hwcontext frame constraints
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2016-03-19 15:38:00 +01:00
Ganesh Ajjanagadde
bccc81dfa0 lavc/aacenc_utils: replace powf(x,y) by expf(logf(x), y)
This is ~2x faster for y not an integer on Haswell+GCC, and should
generally be faster due to the fact that anyway powf essentially does
this under the hood. Made an inline function in lavu/internal.h for this
purpose.

Note that there are some accuracy differences, that should generally be
negligible. In particular, FATE still passes on this platform.

Results in ~ 7% speedup in aac encoding with -march=native, Haswell+GCC.
before:
ffmpeg -i sin.flac -acodec aac -y sin_new.aac  6.05s user 0.06s system 104% cpu 5.821 total

after:
ffmpeg -i sin.flac -acodec aac -y sin_new.aac  5.67s user 0.03s system 105% cpu 5.416 total

This is also faster than an alternative approach that pulls in powf, gets rid of
the crufty NaN checks and other special cases, exploits knowledge about the intervals, etc.
This of course does not exclude smarter approaches; just suggests that
there would need to be significant work on this front of lower utility than
searches for hotspots elsewhere.

Reviewed-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: Ganesh Ajjanagadde <gajjanag@gmail.com>
2016-03-18 07:47:25 -07:00
Marton Balint
c3c7a879ba avutil/dict: add warning to docs about invalidating existing entries when adding a new entry
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Marton Balint <cus@passwd.hu>
2016-03-15 00:55:16 +01:00
Marton Balint
a740263d7e avutil/dict: do not realloc entries when deleting a non-existing item
Deleting a non-existing item should not invalidate existing entries returned
with av_dict_get.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Marton Balint <cus@passwd.hu>
2016-03-15 00:55:16 +01:00
Ganesh Ajjanagadde
0c33ceda91 lavu/lfg-test: add simple sample mean, stddev checks
Also added a TODO to change to a proper normality test in the future.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanag@gmail.com>
2016-03-13 12:41:36 -04:00
Michael Niedermayer
b4f59beeb4 avutil/file: Move av_tempfile() to avutil/file_open ff_tempfile()
document the issue with av_tempfile()

Tested-by: Hendrik Leppkes <h.leppkes@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-03-12 02:08:34 +01:00
Michael Niedermayer
2540d884f3 avutil/random_seed: Add the runtime in cycles of the main loop to the entropy pool
This should theoretically improve the randomness slightly

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-03-10 22:56:37 +01:00
Martin Cracauer
73d1398f0c avutil/channel_layout: AV_CH_LAYOUT_6POINT1_BACK not reachable in parsing
Trying to make heads and tails out of DTS 6.1 I can across this typo.

I also noticed that this wiki page is incorrect or misleading, the
channel order for 6.1 given does not match the source code.  At the
least it should be clarified that the layout given does not apply to
DTS.  https://trac.ffmpeg.org/wiki/AudioChannelManipulation

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-03-10 21:24:25 +01:00
NagaChaitanya Vellanki
285fda0937 Add tests for functions in hash.c
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-03-09 20:05:29 +01:00
Vicente Olivert Riera
ad16eff64b mips: add support for R6
Understanding the mips32r6 and mips64r6 ISAs in the configure script is
not enough. In order to have full support for MIPS R6 in FFmpeg we need
to be able to build it, and for that we need to make sure we don't use
incompatible assembler code which makes the build fail. Ifdefing the
offending code is sufficient to fix the problem.

Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-03-09 20:05:04 +01:00
Anton Khirnov
328e9a15c5 buffer: drop a reference to a non-existing function from the docs
This function only ever existed in the draft versions of the API.
2016-03-07 13:57:10 +01:00
Anton Khirnov
7480d00131 pixfmt: fix the AV_PIX_FMT_VAAPI_VLD doxy 2016-03-07 13:57:02 +01:00
wm4
7a6cf27714 lavu: improve documentation of some AVFrame functions
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2016-03-05 09:03:28 +01:00
Michael Niedermayer
9b0eabdcdf avutil/color_utils: Mark test_data as static const
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-03-03 21:17:45 +01:00
NagaChaitanya Vellanki
df4b5f076e Add test for avpriv_get_trc_function_from_trc function
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-03-03 21:03:04 +01:00
Ganesh Ajjanagadde
7dabc78ce1 lavu/rational: add more info regarding floor(x+0.5) usage
Add some more verbose info regarding why the imprecise and slow floor(x+0.5) hack
is used; helpful for future maintenance.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanag@gmail.com>
2016-02-29 19:26:55 -05:00
Reimar Döffinger
4dd4d53531 Document and validate AVFrame plane pointers.
Check that the required plane pointers and only
those are set up.
Currently does not enforce anything for the palette
pointer of pseudopal formats as I am unsure about the
requirements.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2016-02-28 13:33:14 +01:00
Michael Niedermayer
b70e9b4906 avutil/imgutils: Assert that the 2nd av_image_fill_linesizes() call in av_image_fill_linesizes() still succeeds
Fixes CID1271742

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-02-28 02:02:50 +01:00
Derek Buitenhuis
1a12eb4a73 Merge commit '29c2d06d67724e994980045afa055c6c34611b30'
* commit '29c2d06d67724e994980045afa055c6c34611b30':
  cosmetics: Drop empty comment lines

Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-02-24 17:31:44 +00:00
Derek Buitenhuis
cb0355537d Merge commit 'd847a40888c064cc8c35b546fc5a0ccb69136a7c'
* commit 'd847a40888c064cc8c35b546fc5a0ccb69136a7c':
  hwcontext_cuda/vdpau: add to skipheaders

Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-02-24 17:24:04 +00:00
Derek Buitenhuis
6992276aca Merge commit 'ad884d100259e55cb51a4239cd8a4fd5154c2073'
* commit 'ad884d100259e55cb51a4239cd8a4fd5154c2073':
  hwcontext: add a CUDA implementation

Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-02-24 15:23:16 +00:00
Derek Buitenhuis
63c3e35332 Merge commit '7bc780cd4413f688d3b834037b0f9ddfd6948140'
* commit '7bc780cd4413f688d3b834037b0f9ddfd6948140':
  pixfmt: add a CUDA hwaccelled format

Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-02-24 15:11:06 +00:00
Kieran Kunhya
4170a44bbc Add GBRAP12 pixel format
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-02-24 03:22:31 +01:00
Michael Niedermayer
1ec7a70380 avutil/pixdesc: Make get_color_type() aware of CIE XYZ formats
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-02-22 03:49:43 +01:00
Diego Biurrun
29c2d06d67 cosmetics: Drop empty comment lines 2016-02-18 15:35:30 +01:00
Paul B Mahol
08acab85d3 avfilter: add loop filters
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-02-18 11:55:00 +01:00
Anton Khirnov
d847a40888 hwcontext_cuda/vdpau: add to skipheaders 2016-02-18 08:47:39 +01:00
Michael Niedermayer
c4ac30909e avutil/hwcontext: Remove duplicate ;
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-02-17 21:16:14 +01:00
Derek Buitenhuis
d779d8d771 Merge commit 'a001ce31bc2bcf875a39b5fb22dae49120293b42'
* commit 'a001ce31bc2bcf875a39b5fb22dae49120293b42':
  hwcontext: add a VDPAU implementation

Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-02-17 16:16:34 +00:00
Derek Buitenhuis
1a708780f3 Merge commit '89923e418b494e337683442ab896d754bc07341a'
* commit '89923e418b494e337683442ab896d754bc07341a':
  lavu: add a framework for handling hwaccel frames

Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-02-17 16:12:25 +00:00
Derek Buitenhuis
26abd5149e Merge commit '721a4efc0545548a241080b53ab480e34f366240'
* commit '721a4efc0545548a241080b53ab480e34f366240':
  buffer: add support for pools using caller data in allocation

Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-02-17 16:07:16 +00:00
Derek Buitenhuis
73bd20c4d2 Merge commit '6695f178a5929eab91d3da7e9023999f1774bd0e'
* commit '6695f178a5929eab91d3da7e9023999f1774bd0e':
  pixdesc: Use AV_CEIL_RSHIFT in documentation

Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-02-16 16:55:28 +00:00
Derek Buitenhuis
3f462fcf76 Merge commit '1546a41adae818b340acdd9b5dacd6d0a92b6507'
* commit '1546a41adae818b340acdd9b5dacd6d0a92b6507':
  pixdesc: Drop unneeded deprecation warning guards

Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-02-16 16:54:12 +00:00
James Almer
70d685a77f x86: use the new helper macros where useful
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
2016-02-14 20:00:21 -03:00
James Almer
73a4589d4b x86: add some more helper macros to check for slow cpuflags
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
2016-02-14 20:00:17 -03:00
Anton Khirnov
ad884d1002 hwcontext: add a CUDA implementation 2016-02-14 22:08:33 +01:00
Anton Khirnov
7bc780cd44 pixfmt: add a CUDA hwaccelled format 2016-02-14 22:08:22 +01:00
Anton Khirnov
a001ce31bc hwcontext: add a VDPAU implementation 2016-02-14 22:06:04 +01:00
Anton Khirnov
89923e418b lavu: add a framework for handling hwaccel frames 2016-02-14 21:36:59 +01:00
Michael Niedermayer
0eb4092c1b avutil/imgutils: remove special case for aligning the palette
This was suggested by wm4 and stefano.
After this patch using align=1 the size used by various functions would not
contain padding, while the palette would be aligned at align>1

This patch makes it required to use align>=4 if the palette is to be accessed
as uint32

As a side-effect It fixes storing pal8 in nut with odd with&height

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-02-14 21:30:32 +01:00
Anton Khirnov
721a4efc05 buffer: add support for pools using caller data in allocation
This should allow using more complex allocators than simple malloc
wrappers.
2016-02-14 21:24:39 +01:00
Marton Balint
ae51f9bd6c avutil/parseutils: remove 2112 date from fate test
It is not supported on 32bit.

Signed-off-by: Marton Balint <cus@passwd.hu>
2016-02-14 20:13:15 +01:00
Marton Balint
f834f0cab6 avutil/parseutils: accept everything in av_parse_time that ff_iso8601_to_unix_time accepts
Also parse timezone information previously ignored in ff_iso8601_to_unix_time.

Signed-off-by: Marton Balint <cus@passwd.hu>
2016-02-14 01:46:35 +01:00
Marton Balint
3235241061 avutil/parseutils: use microsecond precision when parsing "now" in av_parse_time()
Use av_gettime() instead of time(0) for querying current time.

Signed-off-by: Marton Balint <cus@passwd.hu>
2016-02-14 01:46:35 +01:00
Timothy Gu
123ff81a45 avutil: Remove x86_cpu.h
It is private (uninstalled) and unused.
2016-02-13 16:30:26 -08:00
Michael Niedermayer
4099e4a77d avutil/frame: Free destination qp_table_buf in frame_copy_props()
Fixes memleak
Fixes: Ticket4899

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-02-13 20:57:26 +01:00
Michael Niedermayer
4c920ce777 avutil/imgutils: only align the palette in av_image_copy_to_buffer() if there is enough space
This allows disabling the alignment by using a compact buffer

Reviewed-by: Stefano Sabatini <stefasab@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-02-13 19:49:34 +01:00
Michael Niedermayer
a9b81bfd1c avutil/avstring: add a "ALL" entry and the possibility to negate matches to av_match_name()
This will extend the whitelist features to allow blacklisting individual protocols and to
explicitly force everything to be enabled.

Reviewed-by: Stefano Sabatini <stefasab@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-02-13 16:40:11 +01:00
Michael Niedermayer
d18df8beb0 avutil/imgutils: do not ignore align parameter for pseudo-pal in av_image_get_buffer_size()
Reviewed-by: Stefano Sabatini <stefasab@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-02-13 16:22:45 +01:00
James Almer
be22bd32fe x86/cpu: set avxslow cpuflag on btver2 CPUs
They are also slow when using 256 bit wide registers

Reviewed-by: Hendrik Leppkes <h.leppkes@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2016-02-07 16:39:21 -03:00
James Almer
b3b0ecee15 x86/emms: empty the mmx state unconditionally on supported targets
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
2016-02-04 01:49:01 -03:00
James Almer
0711c5bfb8 avutil/aes_crt: free AVAESCTR struct properly
Reviewed-by: Andreas Cadhalpun <andreas.cadhalpun@googlemail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2016-02-03 19:33:23 -03:00
Derek Buitenhuis
74f5cb0189 Merge commit 'd336bfcf69fee159e9dba5e5e486ddb1aba61aab'
* commit 'd336bfcf69fee159e9dba5e5e486ddb1aba61aab':
  pixdesc: fix and extend doxy for av_pix_fmt_get_chroma_sub_sample()

Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-02-03 16:59:06 +00:00
Derek Buitenhuis
66e9d2f44e avutil: Add GOP timecode frame side data
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-02-01 18:18:17 +00:00
Timothy Gu
180f9a0958 all: Make header guard names consistent 2016-01-31 15:44:11 -08:00
Neil Birkbeck
c323c98ee3 libavutil/mastering_display_metadata.h: change fields to be rationals as this is how they are typically coded.
(this structure is not referenced anywhere yet)

Signed-off-by: Neil Birkbeck <neil.birkbeck@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-29 19:08:52 +01:00
Timothy Gu
44304ae322 all: Add missing header guards 2016-01-28 19:49:48 -08:00
James Almer
b624f0660b x86: Add ymm_reg struct
Needed to declare 32-byte long constants

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2016-01-28 00:41:19 +01:00
Derek Buitenhuis
21f9468402 avutil: Rename FF_CEIL_COMPAT to AV_CEIL_COMPAT
Libav, for some reason, merged this as a public API function. This will
aid in future merges.

A define is left for backwards compat, just in case some person
used it, since it is in a public header.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-01-27 16:36:46 +00:00
Michael Niedermayer
f3ace85d88 avutil/opt: check for and handle errors in av_opt_set_dict2()
Previously errors could result in random entries to be lost.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-26 17:36:08 +01:00
Hendrik Leppkes
c2869b4640 avutil: 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.
2016-01-26 11:54:01 +01:00
Vittorio Giovara
6695f178a5 pixdesc: Use AV_CEIL_RSHIFT in documentation 2016-01-25 12:02:20 -05:00
Vittorio Giovara
1546a41ada pixdesc: Drop unneeded deprecation warning guards 2016-01-25 12:01:12 -05:00
Geza Lore
cc602061ee x86inc: Add debug symbols indicating sizes of compiled functions
Some debuggers/profilers use this metadata to determine which function a
given instruction is in; without it they get can confused by local labels
(if you haven't stripped those). On the other hand, some tools are still
confused even with this metadata. e.g. this fixes `gdb`, but not `perf`.

Currently only implemented for ELF.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2016-01-23 20:46:28 +01:00
Henrik Gramner
002c47798d x86inc: Avoid creating unnecessary local labels
The REP_RET workaround is only needed on old AMD cpus, and the labels clutter
up the symbol table and confuse debugging/profiling tools, so use EQU to
create SHN_ABS symbols instead of creating local labels. Furthermore, skip
the workaround completely in functions that definitely won't run on such cpus.

Note that EQU is just creating a local label when using nasm instead of yasm.
This is probably a bug, but at least it doesn't break anything.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2016-01-23 20:44:25 +01:00
Henrik Gramner
fd6ecac38e x86inc: Simplify AUTO_REP_RET
cpuflags is never undefined any more, it's set to 0 instead.

Also fix an incorrect comment.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2016-01-23 20:43:39 +01:00
Henrik Gramner
5ca8e195e5 x86inc: Use more consistent indentation
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2016-01-23 20:42:59 +01:00
Henrik Gramner
91ed050f42 x86inc: Preserve arguments when allocating stack space
When allocating stack space with a larger alignment than the known stack
alignment a temporary register is used for storing the stack pointer.
Ensure that this isn't one of the registers used for passing arguments.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2016-01-23 20:41:59 +01:00
Henrik Gramner
715eb7ca24 x86inc: Improve FMA instruction handling
* Correctly handle FMA instructions with memory operands.
 * Print a warning if FMA instructions are used without the correct cpuflag.
 * Simplify the instantiation code.
 * Clarify documentation.

Only the last operand in FMA3 instructions can be a memory operand. When
converting FMA4 instructions to FMA3 instructions we can utilize the fact
that multiply is a commutative operation and reorder operands if necessary
to ensure that a memory operand is used only as the last operand.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2016-01-23 20:30:30 +01:00
Henrik Gramner
f60f06d989 x86inc: Be more verbose in assertion failures
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2016-01-23 20:30:07 +01:00
Henrik Gramner
7adcd4e841 x86inc: Make cpuflag() and notcpuflag() return 0 or 1
Makes it possible to use them in arithmetic expressions.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2016-01-23 20:19:19 +01:00
Anton Khirnov
d336bfcf69 pixdesc: fix and extend doxy for av_pix_fmt_get_chroma_sub_sample()
The parameters in the docs are currently swapped.
2016-01-23 20:16:42 +01:00
Neil Birkbeck
17399f6a9f Add missing conversions from side data enum to name
Add names for recently added enums to av_frame_side_data_name.

Signed-off-by: Neil Birkbeck <neil.birkbeck@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-22 01:58:59 +01:00
Geza Lore
d39c229e54 x86inc: Add debug symbols indicating sizes of compiled functions
Some debuggers/profilers use this metadata to determine which function a
given instruction is in; without it they get can confused by local labels
(if you haven't stripped those). On the other hand, some tools are still
confused even with this metadata. e.g. this fixes `gdb`, but not `perf`.

Currently only implemented for ELF.
2016-01-21 23:19:46 +01:00
Henrik Gramner
d3662777e0 x86inc: Avoid creating unnecessary local labels
The REP_RET workaround is only needed on old AMD cpus, and the labels clutter
up the symbol table and confuse debugging/profiling tools, so use EQU to
create SHN_ABS symbols instead of creating local labels. Furthermore, skip
the workaround completely in functions that definitely won't run on such cpus.

Note that EQU is just creating a local label when using nasm instead of yasm.
This is probably a bug, but at least it doesn't break anything.
2016-01-21 23:19:46 +01:00
Henrik Gramner
87b587d4fe x86inc: Simplify AUTO_REP_RET
cpuflags is never undefined any more, it's set to 0 instead.

Also fix an incorrect comment.
2016-01-21 23:19:46 +01:00
Henrik Gramner
2d60b18cf0 x86inc: Use more consistent indentation 2016-01-21 23:19:46 +01:00
Henrik Gramner
dfe771dc5a x86inc: Preserve arguments when allocating stack space
When allocating stack space with a larger alignment than the known stack
alignment a temporary register is used for storing the stack pointer.
Ensure that this isn't one of the registers used for passing arguments.
2016-01-21 23:19:46 +01:00