Commit Graph

3655 Commits

Author SHA1 Message Date
Michael Niedermayer cdc0087969 avutil/ppc/cpu: Our code assumes vsx implies altivec, thus assert this
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-03 18:23:59 +02:00
Shivraj Patil ce1761db19 avcodec/mips: MSA (MIPS-SIMD-Arch) optimizations for HEVC uniw mc functions
This patch adds MSA (MIPS-SIMD-Arch) optimizations for HEVC uniw mc functions (qpel as well as epel) in new file hevc_mc_uniw_msa.c
Adds new generic macros (needed for this patch) in libavutil/mips/generic_macros_msa.h

Signed-off-by: Shivraj Patil <shivraj.patil@imgtec.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-03 13:46:47 +02:00
Shivraj Patil aede1a1a60 avcodec/mips: MSA (MIPS-SIMD-Arch) optimizations for HEVC bi mc functions
This patch adds MSA (MIPS-SIMD-Arch) optimizations for HEVC bi mc functions (qpel as well as epel) in new file hevc_mc_bi_msa.c
Adds new generic macros (needed for this patch) in libavutil/mips/generic_macros_msa.h
Adds HEVC specific macros (needed for this patch) in libavcodec/mips/hevc_macros_msa.h

Signed-off-by: Shivraj Patil <shivraj.patil@imgtec.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-02 01:54:51 +02:00
Michael Niedermayer 030c20ffcf avutil/float_dsp: Fix ambiguous wording about vector products
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-01 16:22:27 +02:00
Michael Niedermayer 9806cca1eb avutil/ppc/cpu: Remove !ARCH_PPC64 check for mfspr, the code should now support ppc64
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-01 04:31:38 +02:00
James Almer c16e99e3b3 x86: check for AV_CPU_FLAG_AVXSLOW where useful
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-01 00:15:35 +02:00
Michael Niedermayer 16c430e8ef Merge commit 'cae39851201b7781f1262e1c23627b45e6e80bb4'
* commit 'cae39851201b7781f1262e1c23627b45e6e80bb4':
  x86: Add helper macros to check for slow cpuflags

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-31 23:59:48 +02:00
Michael Niedermayer c140227a8b Merge commit 'f7cafb5d02aa3f26c185f6f9851413ad77a73872'
* commit 'f7cafb5d02aa3f26c185f6f9851413ad77a73872':
  x86: add AV_CPU_FLAG_AVXSLOW flag

Conflicts:
	doc/APIchanges
	libavutil/version.h

See: c312bfac4c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-31 23:58:30 +02:00
Michael Niedermayer 1ff47770ca Merge commit 'd0bf20a4f25ac5de021c860a0c8ad05638ee2078'
* commit 'd0bf20a4f25ac5de021c860a0c8ad05638ee2078':
  ppc: vsx: Implement diff_pixels and get_pixels

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-31 23:55:32 +02:00
Michael Niedermayer 1046b6b093 avutil/ppc/float_dsp_init: Disable duplicate functions
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-31 23:42:46 +02:00
Michael Niedermayer da9a6f4a2b Merge commit 'eecd29b3fd7fee221580798346d6582b75c7ade4'
* commit 'eecd29b3fd7fee221580798346d6582b75c7ade4':
  ppc: vsx: Implement float_dsp

Conflicts:
	libavutil/ppc/float_dsp_init.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-31 23:42:36 +02:00
Michael Niedermayer 58a4204873 Merge commit '7d07ee5a9bd170a06d26fd967cf8de5d3b1ce331'
* commit '7d07ee5a9bd170a06d26fd967cf8de5d3b1ce331':
  ppc: cpu: Add support for VSX and POWER8 extensions

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-31 22:47:50 +02:00
Michael Niedermayer 8dcbfb73d5 Merge commit '3058872c293e239e3b51e86fe18cfbe720aadff1'
* commit '3058872c293e239e3b51e86fe18cfbe720aadff1':
  ppc: Clarify and extend the cpuid check

Conflicts:
	libavutil/ppc/cpu.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-31 22:14:39 +02:00
Michael Niedermayer 47cc1a2bf1 avutil/ppc/cpu: Check if unistd.h is available before including it
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-31 22:11:40 +02:00
Michael Niedermayer ff1995437f Merge commit 'baa94563fede8959a638b0fa132dd2124acd93e8'
* commit 'baa94563fede8959a638b0fa132dd2124acd93e8':
  ppc: linux: Check altivec using the auxv

Conflicts:
	libavutil/ppc/cpu.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-31 21:57:07 +02:00
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
James Almer cae3985120 x86: Add helper macros to check for slow cpuflags
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-05-31 12:07:11 +02:00
James Almer f7cafb5d02 x86: add AV_CPU_FLAG_AVXSLOW flag
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-05-31 12:07:11 +02:00
Luca Barbato d0bf20a4f2 ppc: vsx: Implement diff_pixels and get_pixels
Use a macro to abstract the endianness.
2015-05-31 12:07:11 +02:00
Luca Barbato eecd29b3fd ppc: vsx: Implement float_dsp 2015-05-31 12:07:11 +02:00
Luca Barbato 7d07ee5a9b ppc: cpu: Add support for VSX and POWER8 extensions 2015-05-31 12:07:11 +02:00
Luca Barbato da60b99a88 ppc: Restrict some Altivec implementations to Big Endian
In Little Endian the vec_ld/vec_st operations work as
expected only for byte-vectors.
2015-05-31 12:07:11 +02:00
Luca Barbato 3058872c29 ppc: Clarify and extend the cpuid check
Add POWER entries.
2015-05-31 12:07:10 +02:00
Luca Barbato baa94563fe ppc: linux: Check altivec using the auxv
Should prevent trying to use altivec when it is disabled by the kernel.
2015-05-31 12:07:10 +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