Commit Graph

70 Commits

Author SHA1 Message Date
Michael Niedermayer 1b168e3bcf avutil/cpu: fix cpu-test to work with ffmpegs cpuflags syntax
Found-by: jamrial
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-06 00:36:19 +02:00
Michael Niedermayer 7fd7aa6b2b Merge commit 'caf5ef852bf71984d3322bbeaf48cfb04ac8255f'
* commit 'caf5ef852bf71984d3322bbeaf48cfb04ac8255f':
  cpu-test: test av_cpu_count

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-04 04:05:36 +02:00
Michael Niedermayer 01fc6533aa Merge commit '07d8fa58121be8fe315bd51ab760547fe209a745'
* commit '07d8fa58121be8fe315bd51ab760547fe209a745':
  fate: add informative cpu test

Conflicts:
	tests/fate/libavutil.mak

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-04 03:51:17 +02:00
Janne Grunau caf5ef852b cpu-test: test av_cpu_count
Add CPU count and number threads as informative values for fate.
2014-08-04 00:17:21 +02:00
Janne Grunau 07d8fa5812 fate: add informative cpu test
libavutil/cpu-test prints raw and effective cpu flags to STDERR. Detected
cpu flags can be useful for debugging fate errors.

No comparison of the result against a expected result since that would
require fate config specific references.
2014-08-04 00:17:21 +02:00
Michael Niedermayer 0ffba9feb6 avutil/cpu: Use HAVE_UNISTD_H instead of HAVE_SYSCONF for #include <unistd.h>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-08 02:50:52 +02:00
Michael Niedermayer 6310eb8010 avutil/cpu: force mmx on selection of higher x86 SIMD features
Fixes various runtime failures with manually set flags that represent no
existing CPU

Fixes Ticket3653

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-20 06:10:59 +02:00
Michael Niedermayer 4c57c6a765 Merge commit '8675bcb0addb1c7fb0b04682d1f3f95d5b8dae14'
* commit '8675bcb0addb1c7fb0b04682d1f3f95d5b8dae14':
  aarch64: add armv8 CPU flag

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-07 02:15:18 +02:00
Janne Grunau 8675bcb0ad aarch64: add armv8 CPU flag 2014-04-06 21:18:49 +02:00
James Almer d59fcdaff3 x86: add detection for Bit Manipulation Instruction sets
Based on x264 code

Signed-off-by: James Almer <jamrial@gmail.com>
2014-02-23 15:29:36 +01:00
James Almer 1b932eb150 x86: add detection for FMA3 instruction set
Based on x264 code

Signed-off-by: James Almer <jamrial@gmail.com>
2014-02-23 15:29:36 +01:00
James Almer 0bc3de19ff x86: add detection for Bit Manipulation Instruction sets
Based on x264 code

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-22 17:26:00 +01:00
James Almer a2af8eddab x86: add detection for FMA3 instruction set
Based on x264 code

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-22 17:25:52 +01:00
James Almer a4e4948ffe x86/cpu: add missing avx2 AVOption in av_parse_cpu_flags()
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-06 22:45:57 +01:00
Michael Niedermayer d5560f1fec Merge commit 'b7b17ed66e199afc7246e642bf3b35c3f8eca217'
* commit 'b7b17ed66e199afc7246e642bf3b35c3f8eca217':
  aarch64: add cpuflags support for NEON and VFP

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-15 14:42:49 +01:00
Janne Grunau b7b17ed66e aarch64: add cpuflags support for NEON and VFP
NEON and VFP are currently mandatory for all ARMv8 profiles. Both are
handled as extensions as far as cpuflags are concerned. This is
consistent with handling x86_64 which always has SSE2, but still
handles it as an extension.
2014-01-15 12:05:09 +01:00
Michael Niedermayer ccdfa3e271 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  Add missing #includes for *INT64_MAX and *INT64_C

Conflicts:
	ffmpeg.c
	ffmpeg_filter.c
	ffplay.c
	libavformat/assdec.c
	libavformat/avidec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-11-24 05:21:19 +01:00
Diego Biurrun 8f8bc92365 Add missing #includes for *INT64_MAX and *INT64_C 2013-11-23 21:55:52 +01:00
Michael Niedermayer a665704402 Merge commit '4d6ee0725553a43ba88d6f8327ebcf8f1c5ae8d4'
* commit '4d6ee0725553a43ba88d6f8327ebcf8f1c5ae8d4':
  libavutil: x86: Add AVX2 capable CPU detection.

Conflicts:
	libavutil/cpu.c
	libavutil/cpu.h
	libavutil/x86/cpu.c

See: 865b70bc5d
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-26 02:36:36 +02:00
Kieran Kunhya 865b70bc5d Add AVX2 capable CPU detection. Patch based on x264's AVX2 detection
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-26 02:34:22 +02:00
Kieran Kunhya 4d6ee07255 libavutil: x86: Add AVX2 capable CPU detection.
Patch based on x264's AVX2 detection

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2013-10-25 19:36:55 +01:00
Michael Niedermayer 0506f3fa38 avutil/cpu: remove duplicate include
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-21 15:36:33 +02:00
Michael Niedermayer c83d794936 Merge commit 'b78b10c4b78b696927f2801cf2d9f193b4eff28b'
* commit 'b78b10c4b78b696927f2801cf2d9f193b4eff28b':
  avutil: Move internal CPU detection function declarations to private header

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-29 14:05:15 +02:00
Diego Biurrun b78b10c4b7 avutil: Move internal CPU detection function declarations to private header 2013-08-28 23:54:14 +02:00
Michael Niedermayer 45a73d2b47 Merge commit 'c011ceef78eae66039efc66d9551a7146e08838a'
* commit 'c011ceef78eae66039efc66d9551a7146e08838a':
  swscale: ppc: Remove commented-out define cruft
  nsvdec: Remove commented-out debug cruft
  cpu: Restructure code to avoid pointless ret variable indirection

Conflicts:
	libavutil/cpu.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-03 11:53:05 +02:00
Diego Biurrun f0ce1d9909 cpu: Restructure code to avoid pointless ret variable indirection
libavutil/cpu.c:133:9: warning: unused variable ‘ret’ [-Wunused-variable]
2013-06-02 18:05:08 +02:00
Michael Niedermayer 4cf7b87551 av_cpu_count: factorize "detected %d logical cores" message
Also print the message just once

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-26 03:19:55 +02:00
Michael Niedermayer fe99b1d50e Merge remote-tracking branch 'qatar/master'
* qatar/master:
  cpu: Include common.h for av_popcount64

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-24 17:19:21 +02:00
Michael Niedermayer fe40a9f98f Merge commit '2a6eaeaa85d17b27ee0dd449183ec197c35c9675'
* commit '2a6eaeaa85d17b27ee0dd449183ec197c35c9675':
  Move get_logical_cpus() from lavc/pthread to lavu/cpu.

Conflicts:
	doc/APIchanges
	libavcodec/pthread.c
	libavutil/cpu.c
	libavutil/cpu.h
	libavutil/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-24 13:24:28 +02:00
Martin Storsjö 597208fde1 cpu: Include common.h for av_popcount64
This fixes build failures on windows since 2a6eaeaa8.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-05-24 13:34:19 +03:00
Anton Khirnov 2a6eaeaa85 Move get_logical_cpus() from lavc/pthread to lavu/cpu.
It will be useful in lavfi, and could conceivably be useful to the user
applications as well.
2013-05-24 09:28:00 +02:00
Michael Niedermayer 99efd59626 Merge commit 'cb45553f577f8e0ebfe05d3287e1b6fa5859b967'
* commit 'cb45553f577f8e0ebfe05d3287e1b6fa5859b967':
  Remove pointless #undefs of previously forbidden functions.
  fate: Add dependencies for bmp, cdxl, dfa, mp3

Conflicts:
	doc/examples/muxing.c
	libavfilter/filtfmts.c
	libavutil/des.c
	libavutil/eval.c
	libavutil/log.c
	libavutil/parseutils.c
	tests/fate/mp3.mak

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-05 13:34:45 +01:00
Anton Khirnov cb45553f57 Remove pointless #undefs of previously forbidden functions. 2012-12-04 21:40:22 +01:00
Michael Niedermayer 7b723ed4c0 cpu: add a few cpu names as aliases for their cpu flags
Help to complete this list is welcome!

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-17 02:09:56 +01:00
Michael Niedermayer 65e57975b9 cpu: add cmov ro the table, which appears to have been forgotten
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-17 02:09:56 +01:00
Michael Niedermayer 99de3df3d3 Merge commit 'd58dd4b5b5d31cfd4092e38a5f2c894eee2ab078'
* commit 'd58dd4b5b5d31cfd4092e38a5f2c894eee2ab078':
  avopt: Store defaults for AV_OPT_TYPE_FLAGS in the i64 union member

Conflicts:
	libavcodec/libvpxenc.c
	libavcodec/options_table.h
	libavfilter/vf_drawtext.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-05 14:09:09 +02:00
Michael Niedermayer d5f65e9d40 Merge commit '124134e42455763b28cc346fed1d07017a76e84e'
* commit '124134e42455763b28cc346fed1d07017a76e84e':
  avopt: Store defaults for AV_OPT_TYPE_CONST in the i64 union member

Conflicts:
	libavcodec/aacenc.c
	libavcodec/libopenjpegenc.c
	libavcodec/options_table.h
	libavdevice/bktr.c
	libavdevice/v4l2.c
	libavdevice/x11grab.c
	libavfilter/af_amix.c
	libavfilter/vf_drawtext.c
	libavformat/movenc.c
	libavformat/options_table.h
	libavutil/opt.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-05 13:58:11 +02:00
Martin Storsjö d58dd4b5b5 avopt: Store defaults for AV_OPT_TYPE_FLAGS in the i64 union member
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-09-04 23:13:38 +03:00
Martin Storsjö 124134e424 avopt: Store defaults for AV_OPT_TYPE_CONST in the i64 union member
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-09-04 23:13:32 +03:00
Michael Niedermayer 540bd5a95f av_parse_cpu_caps: add "mmxext" as alias for mmx2
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-08-16 22:04:46 +02:00
Michael Niedermayer e776ee8f29 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  lavr: fix handling of custom mix matrices
  fate: force pix_fmt in lagarith-rgb32 test
  fate: add tests for lagarith lossless video codec.
  ARMv6: vp8: fix stack allocation with Apple's assembler
  ARM: vp56: allow inline asm to build with clang
  fft: 3dnow: fix register name typo in DECL_IMDCT macro
  x86: dct32: port to cpuflags
  x86: build: replace mmx2 by mmxext
  Revert "wmapro: prevent division by zero when sample rate is unspecified"
  wmapro: prevent division by zero when sample rate is unspecified
  lagarith: fix color plane inversion for YUY2 output.
  lagarith: pad RGB buffer by 1 byte.
  dsputil: make add_hfyu_left_prediction_sse4() support unaligned src.

Conflicts:
	doc/APIchanges
	libavcodec/lagarith.c
	libavfilter/x86/gradfun.c
	libavutil/cpu.h
	libavutil/version.h
	libswscale/utils.c
	libswscale/version.h
	libswscale/x86/yuv2rgb.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-08-04 23:51:43 +02:00
Diego Biurrun 239fdf1b4a x86: build: replace mmx2 by mmxext
Refactoring mmx2/mmxext YASM code with cpuflags will force renames.
So switching to a consistent naming scheme beforehand is sensible.
The name "mmxext" is more official and widespread and also the name
of the CPU flag, as reported e.g. by the Linux kernel.
2012-08-03 22:51:05 +02:00
Michael Niedermayer 1c60088885 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  x86: Only use optimizations with cmov if the CPU supports the instruction
  x86: Add CPU flag for the i686 cmov instruction
  x86: remove unused inline asm macros from dsputil_mmx.h
  x86: move some inline asm macros to the only places they are used
  lavfi: Add the af_channelmap audio channel mapping filter.
  lavfi: add join audio filter.
  lavfi: allow audio filters to request a given number of samples.
  lavfi: support automatically inserting the fifo filter when needed.
  lavfi/audio: eliminate ff_default_filter_samples().

Conflicts:
	Changelog
	libavcodec/x86/h264dsp_mmx.c
	libavfilter/Makefile
	libavfilter/allfilters.c
	libavfilter/avfilter.h
	libavfilter/avfiltergraph.c
	libavfilter/version.h
	libavutil/x86/cpu.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-24 02:09:53 +02:00
Diego Biurrun 65345a5a30 x86: Add CPU flag for the i686 cmov instruction 2012-06-23 16:21:50 +02:00
Michael Niedermayer eadac34c80 cmdutils/avutil: Move cpu caps parse code into av_parse_cpu_caps()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-30 18:31:06 +02:00
Michael Niedermayer e890b68962 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  dsputil: fix invalid array indexing
  configure: add libavresample to rpath
  build: icc: silence some warnings
  fft-test: add option to set cpuflag mask
  cpu: recognise only cpu flag names pertinent to the architecture
  avutil: add av_parse_cpu_flags() function
  vp8: armv6: fix non-armv6t2 build
  vp8: armv6 optimisations
  vp8: arm: separate ARMv6 functions from NEON
  ARM: add some compatibility macros
  mov: support eac3 audio
  avf: fix faulty check in has_duration

Conflicts:
	configure
	doc/APIchanges
	ffmpeg.c
	libavcodec/arm/Makefile
	libavcodec/arm/asm.S
	libavcodec/arm/vp8dsp_armv6.S
	libavcodec/arm/vp8dsp_init_arm.c
	libavutil/avutil.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-26 22:24:58 +02:00
Mans Rullgard 6eca84bad8 cpu: recognise only cpu flag names pertinent to the architecture
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-04-25 23:19:40 +01:00
Mans Rullgard 3527a73933 avutil: add av_parse_cpu_flags() function
This moves the cpu flag parsing code from avconv to avutil so
it can be accessed elsewhere.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-04-25 23:19:40 +01:00
Michael Niedermayer 92ef4be4ab Merge remote-tracking branch 'qatar/master'
* qatar/master:
  ARM: allow runtime masking of CPU features
  dsputil: remove unused functions
  mov: Treat keyframe indexes as 1-origin if starting at non-zero.
  mov: Take stps entries into consideration also about key_off.
  Remove lowres video decoding

Conflicts:
	ffmpeg.c
	ffplay.c
	libavcodec/arm/vp8dsp_init_arm.c
	libavcodec/libopenjpegdec.c
	libavcodec/mjpegdec.c
	libavcodec/mpegvideo.c
	libavcodec/utils.c
	libavformat/mov.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-22 22:26:42 +02:00
Mans Rullgard d526c5338d ARM: allow runtime masking of CPU features
This allows masking CPU features with the -cpuflags avconv option
which is useful for testing different optimisations without rebuilding.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-04-22 12:30:45 +01:00