Commit Graph

3632 Commits

Author SHA1 Message Date
Michael Niedermayer
e8676c758a Merge commit '72cebae0d981dde144340cf51f3c323f01e215e5'
* commit '72cebae0d981dde144340cf51f3c323f01e215e5':
  ppc: avutil: Use the abriged vector types

Conflicts:
	libavutil/ppc/float_dsp_altivec.c
	libavutil/ppc/util_altivec.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-31 21:38:58 +02:00
Luca Barbato
72cebae0d9 ppc: avutil: Use the abriged vector types 2015-05-31 12:07:10 +02:00
Luca Barbato
254eb5b6fa ppc: avutil: Drop a potentially dangerous workaround
The compiler is free to optimize such expressions in any sort of way.
2015-05-31 12:07:10 +02:00
Nedeljko Babic
e374405d8e libavutil: Cosmetic changes to fixed_dsp file.
Names of functions vector_fmul_window_fixed_c and
vector_fmul_window_fixed_scaled_c are changed by removing "_fixed"
from the name since it is redundant.

Signed-off-by: Nedeljko Babic <nedeljko.babic@imgtec.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-29 19:46:00 +02:00
Michael Niedermayer
e2f3ea1cbb Merge commit 'a64a5773ea5f7337cd1d87cfdf511914d317fe81'
* commit 'a64a5773ea5f7337cd1d87cfdf511914d317fe81':
  pixfmt: remove misleading and broken documentation

Conflicts:
	libavutil/pixfmt.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-28 22:24:12 +02:00
wm4
a64a5773ea pixfmt: remove misleading and broken documentation
This was probably broken some time ago. The breakage is now part of the
ABI. For example, we have:

    AV_PIX_FMT_XYZ12BE
    AV_PIX_FMT_NV16
    AV_PIX_FMT_NV20LE

AV_PIX_FMT_NV20LE is wrong. It has the value 113, but as little-endian
format it should be even. This must have been quite obvious when these
formats were added (because of the AV_PIX_FMT_XYZ12BE entry), but
nobody cared or knew about this.

The future libavutil major bump will also break this additionally,
because disabling FF_API_VDPAU will remove an odd number of entries from
the middle of the enum.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-05-28 18:40:40 +02:00
Shivraj Patil
10b77fbf0d avcodec/mips: Split uni mc optimizations to new file
This patch moves HEVC code of uni mc cases to new file hevc_mc_uni_msa.c.
(There are total 5 sub-modules of HEVC mc functions, if we add all these modules in one single file, its size would be huge (~750k) & difficult to maintain, so splitting it in multiple files)
This patch also adds new HEVC header file libavcodec/mips/hevc_macros_msa.h

Signed-off-by: Shivraj Patil <shivraj.patil@imgtec.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-28 16:51:38 +02:00
Timothy Gu
dd4d709be7 x86inc: Clear __SECT__
Silences warning(s) like:

    libavcodec/x86/fft.asm:93: warning: section flags ignored on
    section redeclaration

The cause of this warning is that because `struc` and `endstruc`
attempts to revert to the previous section state [1].

The section state is stored in the macro __SECT__, defined by
x86inc.asm to be `.note.GNU-stack ...`, through the `SECTION`
directive [2].

Thus, the `.note.GNU-stack` section is defined twice
(once in x86inc.asm, once during `endstruc`), causing the warning.

That is the first part of the commit: using the primitive `[section]` format
for .note.GNU-stack etc., which does not update `__SECT__` [2].

That fixes only half of the problem. Even without any `SECTION` directives,
`__SECT__` is predefined as `.text`, which conflicting with the later
`SECTION_TEXT` (which expands to `.text align=16`).

[1]: http://www.nasm.us/doc/nasmdoc6.html#section-6.4
[2]: http://www.nasm.us/doc/nasmdoc6.html#section-6.3

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-05-28 11:40:15 +02:00
Shivraj Patil
02a4991230 avutil/mips: Restructure of generic macros
This patch includes restructuring of existing macros and addition of more generic macros.

This change was necessary to avoid repeated review comments in remaining patches which we were about to submit.
Also this patch reduces number of code lines due to maximum use of generic macros, allows better code alignment & readability etc.

These modifications in commonly used .libavutil/mips/generic_macros_msa.h. impacts the already accepted code, hence re-submitting it in 2/4,3/4 & 4/4.
Overall, this patch set is just upgrading the code with styling changes and will bring it in sync with MIPS-SIMD optimized latest codebase at our end.

Signed-off-by: Shivraj Patil <shivraj.patil@imgtec.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-28 11:34:52 +02:00
Timothy Gu
204b228a1d x86inc: Clear __SECT__
This commit silences warning(s) like:

    libavcodec/x86/fft.asm:93: warning: section flags ignored on section
    redeclaration

The cause of this warning is that because `struc` and `endstruc` attempts to
revert to the previous section state [1]. The section state is stored in the
macro __SECT__, defined by x86inc.asm to be `.note.GNU-stack ...`, through the
`SECTION` directive [2].  Thus, the `.note.GNU-stack` section is defined twice
(once in x86inc.asm, once during `endstruc`), causing the warning.

That is the first part of the commit: using the primitive `[section]` format
for .note.GNU-stack etc., which does not update `__SECT__` [2].

That fixes only half of the problem. Even without any `SECTION` directives,
`__SECT__` is predefined as `.text`, which conflicting with the later
`SECTION_TEXT` (which expands to `.text align=16`).

[1]: http://www.nasm.us/doc/nasmdoc6.html#section-6.4
[2]: http://www.nasm.us/doc/nasmdoc6.html#section-6.3

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-28 00:08:37 +02:00
James Almer
c312bfac4c x86/cpu: add AV_CPU_FLAG_AVXSLOW flag
Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: James Almer <jamrial@gmail.com>
2015-05-27 03:31:11 -03:00
Michael Niedermayer
1fb9b2a283 avutil: Add av_q2intfloat()
This function allows writing AVRationals as IEEE floats without the need
of platform dependant float operations

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-26 18:31:53 +02:00
Michael Niedermayer
947b74ee7d Merge commit 'd8039ef8d221ea273aa4f1e62e5df21bf618c772'
* commit 'd8039ef8d221ea273aa4f1e62e5df21bf618c772':
  D3D11va: add a Direct3D11 video decoder similar to DXVA2

Conflicts:
	Changelog
	configure
	libavcodec/Makefile
	libavcodec/allcodecs.c
	libavcodec/dxva2_vc1.c
	libavcodec/version.h
	libavutil/pixdesc.c
	libavutil/pixfmt.h
	libavutil/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-25 22:24:34 +02:00
Steve Lhomme
d8039ef8d2 D3D11va: add a Direct3D11 video decoder similar to DXVA2
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-05-25 11:47:08 +02:00
Tim Nicholson
ebb08f3fe4 avutil/pixfmt: Clarify DV example comments for AVChromaLocation
Signed-off-by: Tim Nicholson <tim.nicholson@bbc.co.uk>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-22 12:08:32 +02:00
Michael Niedermayer
818275bbd0 avutil/pixfmt: s/luma sample positions/horizontal luma sample positions/
Better to be explicit before someone thinks this could be the time axis ...

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-21 12:48:16 +02:00
Michael Niedermayer
8a141ad5e8 avutil/pixfmt: make luma sample positions even more explicit in the AVChromaLocation ASCII art
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-21 12:44:23 +02:00
Michael Niedermayer
b95df4c371 avutil/pixfmt: Clarify mpeg example comments for AVChromaLocation
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-21 12:40:29 +02:00
Michael Niedermayer
acccc28713 avutil/pixfmt: clarify chroma location text further, as "first" is ambigous
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-21 12:35:22 +02:00
Michael Niedermayer
a3b0130dee avutil/pixfmt: Clarify that the ASCII art describes the location of the first chroma sample of AVChromaLocation
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-21 12:30:46 +02:00
Michael Niedermayer
710abaf2c5 avutil/pixfmt: Improve ascii art showing the meaning of the AVChromaLocation values
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-19 17:47:28 +02:00
Nedeljko Babic
729466dc68 libavutil/softfloat: Add test case for av_add_sf
Recently normalization (av_normalize_sf) of output was added to av_add_sf.
This normalization is used for better precision for small values and the
purpose of this (quite simple) test case is to test difference between double
and softfloat.

The values used are tailored to maximally highlighte problem with precison when
normalization is not used.

Signed-off-by: Nedeljko Babic <nedeljko.babic@imgtec.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-14 17:00:46 +02:00
Andreas Cadhalpun
51f6455285 imgutils: initialize palette padding bytes in av_image_alloc
av_image_fill_pointers always aligns the palette, but the padding
bytes don't (and can't) get initialized in av_image_copy.

Thus initialize them in av_image_alloc.

This fixes 'Syscall param write(buf) points to uninitialised byte(s)'
valgrind warnings.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-13 03:58:08 +02:00
Michael Niedermayer
ae4eea8be4 avutil/avstring: Use size_t in av_strlcatf()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-11 20:01:15 +02:00
Michael Niedermayer
4c128ea162 avutil/dict: Use size_t for appending strings
the string length is not constrained to INT_MAX

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-10 16:09:07 +02:00
Michael Niedermayer
4950bd4ebe libavutil/mem: use size_t for the length in av_strdup()
the string length is not constrained to INT_MAX

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-10 16:06:50 +02:00
Shivraj Patil
7174df44fe avcodec/mips: MSA (MIPS-SIMD-Arch) optimizations for HEVC uni copy, uni horizontal and uni vertical mc functions
Signed-off-by: Shivraj Patil <shivraj.patil@imgtec.com>
Reviewed-by: Nedeljko Babic <Nedeljko.Babic@imgtec.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-07 16:47:34 +02:00
James Almer
aa70801aaf ripemd: move ripemd{256, 320} into separate functions
This allows the removal of a few branches.

Before:
lavu       RIPEMD-160   size: 1048576  runs:   1024  time:    7.052 +- 0.010

After:
lavu       RIPEMD-160   size: 1048576  runs:   1024  time:    6.865 +- 0.015

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-07 15:40:56 +02:00
Ronald S. Bultje
98f7f0f7e8 lavu: add yuv440p10/12 pixfmts. 2015-05-06 12:04:31 -04:00
Michael Niedermayer
890b874889 avutil/internal: Suppress empty body warning from emms_c()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-06 15:56:32 +02:00
Michael Niedermayer
52835cb8e1 avutil/opt: Avoid division by 0
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-03 16:37:04 +02:00
Michael Niedermayer
536b42e858 avutil/cast5: Make iv array static
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-02 14:37:48 +02:00
Michael Niedermayer
156f64bdf1 avutil/cast5: Mark key_bits as const
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-02 14:37:08 +02:00
Shivraj Patil
02001ada5c avcodec/mips: MSA (MIPS-SIMD-Arch) optimizations for H264 lpf and weight/biweight functions
Reviewed-by: Nedeljko Babic <Nedeljko.Babic@imgtec.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-01 04:19:18 +02:00
James Almer
39fbb27ec3 avutil/softfloat_tables: add missing stdint.h include
Fixes make checkheaders

Signed-off-by: James Almer <jamrial@gmail.com>
2015-04-30 17:38:41 -03:00
Nedeljko Babic
1fae268307 libavutil/softfloat: Add functions.
Functions av_gt_sf, av_sqrt_sf and av_sincos_sf added to softfloat

Signed-off-by: Nedeljko Babic <nedeljko.babic@imgtec.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-30 15:05:12 +02:00
Nedeljko Babic
7bab281475 libavutil/softfloat: Added av_normalize_sf in av_add_sf
This will normalize sums for which mantissa is smaller than the lower boundary
(needed for implementation of fixed point aac decoder).

Signed-off-by: Nedeljko Babic <nedeljko.babic@imgtec.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-30 14:53:09 +02:00
Nedeljko Babic
a1c7fe431c libavutil/softfloat: exponent adjusted for aac fixed point dec
Exponent usage and calculation in softfloat adjusted to the format used in
implementation of fixed point aac decoder.

Signed-off-by: Nedeljko Babic <nedeljko.babic@imgtec.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-30 14:20:28 +02:00
Maneesh Gupta
91305c6026 OpenCL: Fix ABI incompatibility issues
AVOpenCLDeviceNode and AVOpenCLPlatformNode used fixed static buffer for holding the device and platform name.
This patch modifies these structures to use pointers instead. The memory required to hold the names is
now dynamically allocated, the size for which is determined by querying appropriate OpenCL runtime APIs.

Signed-off-by: Maneesh Gupta <maneesh.gupta@amd.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-28 12:28:53 +02:00
Matteo Nastasi (mop)
9c3c7b4579 avutil/log: more complete description of av_log function 2015-04-26 16:34:06 +02:00
Michael Niedermayer
a3110beebd avutil/softfloat: document av_int2sf()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-25 14:51:02 +02:00
Shivraj Patil
97f074f134 avcodec/mips: MSA (MIPS-SIMD-Arch) optimizations for HEVC copy and hv mc functions
Incorporated review comment.
Removed "__" from volatile.

Signed-off-by: Shivraj Patil <shivraj.patil@imgtec.com>
Reviewed-by: Nedeljko Babic <Nedeljko.Babic@imgtec.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-24 17:12:04 +02:00
Clément Bœsch
8e985b7271 avutil/frame: fix everythnig/everything typo 2015-04-24 10:57:03 +02:00
Michael Niedermayer
954b5e340e Merge commit 'eaa2d123f0a643664721593d248ece6bcd85f1e6'
* commit 'eaa2d123f0a643664721593d248ece6bcd85f1e6':
  log: Print a full backtrace along with error messages under Valgrind

Conflicts:
	libavutil/log.c
	libavutil/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-20 23:30:33 +02:00
Vittorio Giovara
eaa2d123f0 log: Print a full backtrace along with error messages under Valgrind
Useful to understand where and in what execution state a certain message
is generated. It is enabled only when optimizations are disabled, since
function names are not printed otherwise.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-04-20 19:20:57 +01:00
Michael Niedermayer
42d6d249b0 avutil/mips/generic_macros_msa: volatile doesnt need __
Reviewed-by: Nedeljko Babic <Nedeljko.Babic@imgtec.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-20 14:39:50 +02:00
Michael Niedermayer
8e8219e0f0 Merge commit 'c253340ae6f74ffd8798bbd476e46d1b33a2d56e'
* commit 'c253340ae6f74ffd8798bbd476e46d1b33a2d56e':
  log: Introduce a more verbose debug level

Conflicts:
	doc/APIchanges
	doc/fftools-common-opts.texi
	libavutil/log.c
	libavutil/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-20 02:48:19 +02:00
James Almer
a1d58e3b38 avutil: remove pointless bmi1 define
Signed-off-by: James Almer <jamrial@gmail.com>
2015-04-19 23:45:35 +01:00
Vittorio Giovara
c253340ae6 log: Introduce a more verbose debug level
And deprecate av_dlog macro.
2015-04-19 12:41:59 +01:00
James Almer
a40cee03a3 avutil: remove pointless bmi1 define
Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: James Almer <jamrial@gmail.com>
2015-04-18 22:15:25 -03:00