summaryrefslogtreecommitdiff
path: root/libavutil/x86/cpu.c
Commit message (Collapse)AuthorAge
* Merge commit 'af7d13ee4a4bf8d708f9b0598abb8f6e22b76de1'Michael Niedermayer2012-11-28
|\ | | | | | | | | | | | | | | | | * commit 'af7d13ee4a4bf8d708f9b0598abb8f6e22b76de1': asink_nullsink: plug a memory leak. x86: h264_idct: port to cpuflags x86: cpu: Drop unused HAVE_RWEFLAGS condition Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * x86: cpu: Drop unused HAVE_RWEFLAGS conditionDiego Biurrun2012-11-28
| | | | | | | | The test for rweflags was dropped in a previous commit.
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-10-05
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: h264: don't touch H264Context->ref_count[] during MB decoding x86: get_cpu_flags: add necessary ifdefs around function body x86: Drop CPU detection intrinsics x86: Add YASM implementations of cpuid and xgetbv from x264 Conflicts: configure libavcodec/h264_cabac.c libavcodec/h264_cavlc.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * x86: get_cpu_flags: add necessary ifdefs around function bodyDiego Biurrun2012-10-04
| | | | | | | | | | | | | | ff_get_cpu_flags_x86() requires cpuid(), which is conditionally defined elsewhere in the file. Surrounding the function body with ifdefs allows building even when cpuid is not defined. An empty cpuflags mask is returned in this case.
| * x86: Drop CPU detection intrinsicsDiego Biurrun2012-10-04
| | | | | | | | | | | | Now that there is CPU detection in YASM, there will always be one of inline or external assembly enabled, which obviates the need to fall back on CPU detection through compiler intrinsics.
| * x86: Add YASM implementations of cpuid and xgetbv from x264Diego Biurrun2012-10-04
| | | | | | | | | | This allows detecting CPU features with builds that have neither gcc inline assembly nor the right compiler intrinsics enabled.
* | Merge commit '65d12900432ac880d764edbbd36818431484a76e'Michael Niedermayer2012-10-05
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '65d12900432ac880d764edbbd36818431484a76e': configure: add --enable-lto option x86: cpu: Break out test for cpuid capabilities into separate function x86: ff_get_cpu_flags_x86(): Avoid a pointless variable indirection build: Factor out mpegaudio dependencies to CONFIG_MPEGAUDIO segment: Add comments about calls that only are relevant for some muxers segment: Add an option for omitting the first header and final trailer Conflicts: configure libavcodec/Makefile libavformat/segment.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * x86: cpu: Break out test for cpuid capabilities into separate functionDiego Biurrun2012-10-04
| |
| * x86: ff_get_cpu_flags_x86(): Avoid a pointless variable indirectionDiego Biurrun2012-10-04
| |
* | Merge commit 'ec36aa69448f20a78d8c4588265022e0b2272ab5'Michael Niedermayer2012-08-31
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'ec36aa69448f20a78d8c4588265022e0b2272ab5': x86: Fix linking with some or all of yasm, mmx, optimizations disabled configure: Add more fine-grained SSE CPU capabilities flags avfilter: x86: Use more precise compile template names x86: cosmetics: Comment some #endifs for better readability g723_1: add comfort noise generation utvideoenc: Switch to dsputils' median prediction utvideoenc: Avoid writing into the input picture avtools: remove the distinction between func_arg and func2_arg. avconv: make the -passlogfile option per-stream. avconv: make the -pass option per-stream. cmdutils: make -codecs print lossy/lossless flags. lavc: add lossy/lossless codec properties. Conflicts: Changelog cmdutils.c configure doc/APIchanges ffmpeg.h ffmpeg_opt.c ffprobe.c libavcodec/codec_desc.c libavcodec/g723_1.c libavcodec/utvideoenc.c libavcodec/version.h libavcodec/x86/mpegaudiodec.c libavcodec/x86/rv40dsp_init.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * x86: cosmetics: Comment some #endifs for better readabilityDiego Biurrun2012-08-30
| |
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-08-09
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: mpegvideo: reduce excessive inlining of mpeg_motion() mpegvideo: convert mpegvideo_common.h to a .c file build: factor out mpegvideo.o dependencies to CONFIG_MPEGVIDEO Move MASK_ABS macro to libavcodec/mathops.h x86: move MANGLE() and related macros to libavutil/x86/asm.h x86: rename libavutil/x86_cpu.h to libavutil/x86/asm.h aacdec: Don't fall back to the old output configuration when no old configuration is present. rtmp: Add message tracking rtsp: Support mpegts in raw udp packets rtsp: Support receiving plain data over UDP without any RTP encapsulation rtpdec: Remove an unused include rtpenc: Remove an av_abort() that depends on user-supplied data vsrc_movie: discourage its use with avconv. avconv: allow no input files. avconv: prevent invalid reads in transcode_init() avconv: rename OutputStream.is_past_recording_time to finished. Conflicts: configure doc/filters.texi ffmpeg.c ffmpeg.h libavcodec/Makefile libavcodec/aacdec.c libavcodec/mpegvideo.c libavformat/version.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * x86: rename libavutil/x86_cpu.h to libavutil/x86/asm.hMans Rullgard2012-08-09
| | | | | | | | | | | | | | This puts x86-specific things in the x86/ subdirectory where they belong. Signed-off-by: Mans Rullgard <mans@mansr.com>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-08-04
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
| * x86: build: replace mmx2 by mmxextDiego Biurrun2012-08-03
| | | | | | | | | | | | | | 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.
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-07-10
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: mss1: fix decoding masked regions in interframes mxfdec: fix off by one error. mxfdec: only parse next partition pack if parsing forward mxfdec: let pkt->pts = mxf->current_edit_unit if intra-only mxfdec: fix frame height vs field height confusion mxfdec: Add intra_only flag to MXFTrack mxfdec: fix Avid AirSpeed files being misinterpreted as OP1a mxfdec: truncate packets that extend past the next edit unit mxfdec: set pixel format for cdci picture formats mxfdec: detect uncomp pictures using essence container ul mxfdec: set track edit rate num/den in expected order x86/cpu: implement get/set_eflags using intrinsics x86/cpu: implement support for cpuid through intrinsics x86/cpu: implement support for xgetbv through intrinsics lavu: use intrinsics for emms on systems lacking inline asm support mem: Don't abort on av_malloc(0) in debug mode Conflicts: configure libavformat/mxf.h libavformat/mxfdec.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * x86/cpu: implement get/set_eflags using intrinsicsRonald S. Bultje2012-07-10
| | | | | | | | | | Signed-off-by: Diego Biurrun <diego@biurrun.de> Signed-off-by: Martin Storsjö <martin@martin.st>
| * x86/cpu: implement support for cpuid through intrinsicsRonald S. Bultje2012-07-10
| | | | | | | | Signed-off-by: Martin Storsjö <martin@martin.st>
| * x86/cpu: implement support for xgetbv through intrinsicsRonald S. Bultje2012-07-10
| | | | | | | | Signed-off-by: Martin Storsjö <martin@martin.st>
| * x86: cpu: clean up check for cpuid instruction supportMans Rullgard2012-07-01
| | | | | | | | | | | | | | This adds macros for accessing the EFLAGS register and uses these instead of coding the entire check in inline asm. Signed-off-by: Mans Rullgard <mans@mansr.com>
* | x86: cpu: clean up check for cpuid instruction supportMans Rullgard2012-07-10
| | | | | | | | | | | | | | This adds macros for accessing the EFLAGS register and uses these instead of coding the entire check in inline asm. Signed-off-by: Mans Rullgard <mans@mansr.com>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-06-26
|\| | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: log: Include io.h on windows lavr: x86: merge some branches x86: cpu: whitespace (mostly) cosmetics x86: fft: win64: fix stack alignment for memcpy() call Conflicts: libavutil/log.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * x86: cpu: whitespace (mostly) cosmeticsMans Rullgard2012-06-25
| | | | | | | | | | | | | | | | | | This adds whitespace around operators, aligns line continuation backslashes, and breaks long lines. Also fixes an ifdef halfway through a statement. The one line of duplication this saved is not worth the ugliness. Signed-off-by: Mans Rullgard <mans@mansr.com>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-06-24
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
| * x86: Add CPU flag for the i686 cmov instructionDiego Biurrun2012-06-23
| |
* | Detect and check for CMOV.Reimar Döffinger2012-02-12
| | | | | | | | | | | | | | | | | | Some MMX-only CPUs do not have support for CMOV. All SSE/MMX2 CPUs should be fine, thus no check was added to those functions. See also https://sourceforge.net/tracker/?func=detail&aid=3358347&group_id=205275&atid=992986 Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-12-09
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: cljr: K&R cosmetics cljr: return a more sensible value when encountering invalid headers cljr: drop unnecessary emms_c() calls without MMX code cljr: remove useless casts cljr: group encode/decode parts under single ifdefs cljr: remove stray semicolon cljr: add missing return statement in decode_end() doc: add pulseaudio to the input list avconv: remove unsubstantiated comment shorten: avoid abort() on unknown audio types cljr: add encoder build: merge lists of HTML documentation targets tests/examples: Mark some variables only used within their files as static. tests/tools/examples: Replace direct exit() calls by return. x86 cpuid: set vendor union members separately cljr: release picture at end of decoding rv40: NEON optimised rv40 qpel motion compensation Conflicts: doc/examples/muxing.c libavcodec/cljr.c libavcodec/version.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * x86 cpuid: set vendor union members separatelySean McGovern2011-12-08
| | | | | | | | | | | | | | | | | | Solaris Studio (suncc) has difficulty with filling in members of a union. Instead, let's retrieve and store the cpuid() results separately. This is still a compiler bug, however this fix does not cause a regression on other platforms. Signed-off-by: Janne Grunau <janne-libav@jannau.net>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-09-27
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: (21 commits) fate: allow testing with libavfilter disabled x86: XOP/FMA4 CPU detection support ws_snd: misc cosmetic clean-ups ws_snd: remove the 2-bit ADPCM table and just subtract 2 instead. ws_snd: use memcpy() and memset() instead of loops ws_snd: use samples pointer for loop termination instead of a separate iterator variable. ws_snd: make sure number of channels is 1 ws_snd: add some checks to prevent buffer overread or overwrite. ws_snd: decode to AV_SAMPLE_FMT_U8 instead of S16. flacdec: fix buffer size checking in get_metadata_size() rtp: Simplify ff_rtp_get_payload_type rtpenc: Add a payload type private option rtp: Correct ff_rtp_get_payload_type documentation avconv: replace all fprintf() by av_log(). avconv: change av_log verbosity from ERROR to FATAL for fatal errors. cmdutils: replace fprintf() by av_log() avtools: parse loglevel before all the other options. oggdec: add support for Xiph's CELT codec sol: return error if av_get_packet() fails. cosmetics: reindent and pretty-print ... Conflicts: avconv.c cmdutils.c libavcodec/avcodec.h libavcodec/version.h libavformat/oggparsecelt.c libavformat/utils.c libavutil/avutil.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * x86: XOP/FMA4 CPU detection supportJason Garrett-Glaser2011-09-26
| |
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-09-04
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: AVOptions: fix av_set_string3() doxy to match reality. cmdutils: get rid of dummy contexts for examining AVOptions. lavf,lavc,sws: add {avcodec,avformat,sws}_get_class() functions. AVOptions: add AV_OPT_SEARCH_FAKE_OBJ flag for av_opt_find(). cpu detection: avoid a signed overflow Conflicts: avconv.c cmdutils.c doc/APIchanges ffmpeg.c libavcodec/options.c libavcodec/version.h libavformat/version.h libavutil/avutil.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * cpu detection: avoid a signed overflowSean McGovern2011-09-03
| | | | | | | | | | | | 1<<31 overflows because 1 is signed, so force it to unsigned. Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* | Merge remote-tracking branch 'newdev/master'Michael Niedermayer2011-03-23
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * newdev/master: (33 commits) Fix an infinite loop when RoQ encoded generated a frame with a size greater than the maximum valid size. Add kbdwin.o to AC3 decoder Detect byte-swapped AC-3 and support decoding it directly. cosmetics: indentation Always copy input data for AC3 decoder. ac3enc: make sym_quant() branch-free cosmetics: indentation Add a CPU flag for the Atom processor. id3v2: skip broken tags with invalid size id3v2: don't explicitly skip padding Make sure kbhit() is in conio.h fate: update wmv8-drm reference vc1: make P-frame deblock filter bit-exact. configure: Add the -D parameter to the dlltool command amr: Set the AVFMT_GENERIC_INDEX flag amr: Set the pkt->pos field properly to the start of the packet amr: Set the codec->bit_rate field based on the last packet rtsp: Specify unicast for TCP interleaved streams, too Set the correct target for mingw64 dlltool applehttp: Change the variable for stream position in seconds into int64_t ... Conflicts: ffmpeg.c ffplay.c libavcodec/ac3dec.c libavformat/avio.h libavformat/id3v2.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * cosmetics: indentationJustin Ruggles2011-03-22
| |
| * Add a CPU flag for the Atom processor.Justin Ruggles2011-03-22
| | | | | | | | | | | | | | The Atom has SSSE3 support, which is useful in many cases, but sometimes the SSSE3 version is slower than the SSE2 equivalent on the Atom, but is generally faster on other processors supporting SSSE3. This flag allows for selectively disabling certain SSSE3 functions on the Atom.
| * Replace FFmpeg with Libav in licence headersMans Rullgard2011-03-19
| | | | | | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
| * x86: use raw opcode for xgetbv instructionMans Rullgard2011-02-20
| | | | | | | | | | | | | | | | | | | | This allows the CPU detection to work with assemblers not supporting the xgetbv mnemonic. These include clang and some BSD versions. All AVX code will be written for yasm, where the main assembler is not involved. Signed-off-by: Mans Rullgard <mans@mansr.com>
| * x86: check for AVX supportMans Rullgard2011-02-20
| | | | | | | | | | | | This adds configure and runtime checks for AVX support on x86 CPUs. Signed-off-by: Mans Rullgard <mans@mansr.com>
| * Add check for Athlon64 and similar AMD processors with slow SSE2.Justin Ruggles2011-02-11
| | | | | | | | Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* | x86: use raw opcode for xgetbv instructionMans Rullgard2011-02-22
| | | | | | | | | | | | | | | | | | | | | | This allows the CPU detection to work with assemblers not supporting the xgetbv mnemonic. These include clang and some BSD versions. All AVX code will be written for yasm, where the main assembler is not involved. Signed-off-by: Mans Rullgard <mans@mansr.com> (cherry picked from commit ef6695387522fc783105ac187c84beaa284e7cff)
* | x86: check for AVX supportMans Rullgard2011-02-20
| | | | | | | | | | | | | | This adds configure and runtime checks for AVX support on x86 CPUs. Signed-off-by: Mans Rullgard <mans@mansr.com> (cherry picked from commit 87f1355f9b4fc11414d0e6a91404203c2745f89f)
* | Add check for Athlon64 and similar AMD processors with slow SSE2.Justin Ruggles2011-02-13
|/ | | | | Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com> (cherry picked from commit 74b1f96859eb967222fcb3eb4c72d949b5165a89)
* Add missing #include <string.h> in x86/cpu.cMåns Rullgård2010-09-09
| | | | Originally committed as revision 25088 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Clean up av_get_cpu_flag()Måns Rullgård2010-09-09
Instead of defining functions in per-arch header files included by the main cpu.c, define them normally and call them from the generic one. Originally committed as revision 25084 to svn://svn.ffmpeg.org/ffmpeg/trunk