Commit Graph

345 Commits

Author SHA1 Message Date
Vitor Sessak 6b6ee58249 x86inc: Flag shufps as an floating-point instruction for the AVX emulation code.
Without this, code like "shufps m0, m1, m2, 0xaa" would not work in CPUs
not supporting SSE2.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-11-27 13:10:33 -08:00
Reimar Döffinger e8ab4bac0c Fix compilation with YASM.
YASM does not support %ifempty even though it is in the official
NASM documentation and supported since NASM 2.02.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2011-11-20 15:03:32 +01:00
Reimar Döffinger 03f1caec61 HACK: fix compilation with NASM.
This issue is actually already fixed in NASM, however it will be a
bit before it arrives everywhere.
This should work as a temporary work-around.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2011-11-20 12:35:10 +01:00
Vitor Sessak 22e25c002e mpegaudiodec: add SSE-optimized imdct36()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-07 22:35:55 +01:00
Michael Niedermayer 13b7781ec8 Merge remote-tracking branch 'qatar/master'
* qatar/master: (23 commits)
  x86inc: use sse versions of common macros instead of sse2 when applicable
  doc/APIchanges: add missing dates and hashes
  lavf: don't return from void av_update_cur_dts()
  Changelog: add more entries.
  Changelog: update ffmpeg/avconv incompatibility list.
  avconv: remove some redundant temporary variables.
  avconv: fix broken indentation
  avconv: move copy_initial_nonkeyframes to the options context.
  avconv: use file:stream instead of file.stream in log messages.
  doc/avconv: elaborate on basic functionality.
  doc/avconv: -sample_fmts, not -help sample_fmts prints the sample formats
  openssl: Only use CRYPTO_set_id_callback on OpenSSL < 1.0.0
  Call avformat_network_init/deinit in the programs
  Remove leftover includes of strings.h
  avutil: Don't allow using strcasecmp/strncasecmp
  Replace all usage of strcasecmp/strncasecmp
  avstring: Add locale independent implementations of strcasecmp/strncasecmp
  avstring: Add locale independent implementations of toupper/tolower
  cosmetics: insert some spaces in explicit enum value assignments
  move 8SVX audio codecs to the audio codec list part on the next bump
  ...

Conflicts:
	avprobe.c
	doc/APIchanges
	ffplay.c
	ffserver.c
	libavcodec/avcodec.h
	libavdevice/bktr.c
	libavdevice/v4l.c
	libavdevice/v4l2.c
	libavformat/matroskaenc.c
	libavformat/wtv.c
	libavutil/avstring.c
	libavutil/avstring.h
	libavutil/avutil.h
	libswscale/x86/swscale_template.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-07 03:01:43 +01:00
Justin Ruggles f2bd8a0786 x86inc: use sse versions of common macros instead of sse2 when applicable 2011-11-06 19:14:13 -05:00
Loren Merritt 2f7f2e4b41 Update x86inc.asm to latest x264 version, and add AVX symmetry.
We keep INIT_AVX (for backwards compatibility). 3arg AVX ops with
a memory arg can only have it in src2, whereas SSE emulation of
3arg prefers to have it in src1 (i.e. the mov). So, if the op is
symmetric and the wrong one is memory, swap them.
2011-11-05 20:48:14 -07:00
Michael Niedermayer aedc908601 Merge remote-tracking branch 'qatar/master'
* qatar/master: (35 commits)
  flvdec: Do not call parse_keyframes_index with a NULL stream
  libspeexdec: include system headers before local headers
  libspeexdec: return meaningful error codes
  libspeexdec: cosmetics: reindent
  libspeexdec: decode one frame at a time.
  swscale: fix signed shift overflows in ff_yuv2rgb_c_init_tables()
  Move timefilter code from lavf to lavd.
  mov: add support for hdvd and pgapmetadata atoms
  mov: rename function _stik, some indentation cosmetics
  mov: rename function _int8 to remove ambiguity, some indentation cosmetics
  mov: parse the gnre atom
  mp3on4: check for allocation failures in decode_init_mp3on4()
  mp3on4: create a separate flush function for MP3onMP4.
  mp3on4: ensure that the frame channel count does not exceed the codec channel count.
  mp3on4: set channel layout
  mp3on4: fix the output channel order
  mp3on4: allocate temp buffer with av_malloc() instead of on the stack.
  mp3on4: copy MPADSPContext from first context to all contexts.
  fmtconvert: port float_to_int16_interleave() 2-channel x86 inline asm to yasm
  fmtconvert: port int32_to_float_fmul_scalar() x86 inline asm to yasm
  ...

Conflicts:
	libavcodec/arm/h264dsp_init_arm.c
	libavcodec/h264.c
	libavcodec/h264.h
	libavcodec/h264_cabac.c
	libavcodec/h264_cavlc.c
	libavcodec/h264_ps.c
	libavcodec/h264dsp_template.c
	libavcodec/h264idct_template.c
	libavcodec/h264pred.c
	libavcodec/h264pred_template.c
	libavcodec/x86/h264dsp_mmx.c
	libavdevice/Makefile
	libavdevice/jack_audio.c
	libavformat/Makefile
	libavformat/flvdec.c
	libavformat/flvenc.c
	libavutil/pixfmt.h
	libswscale/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-22 01:16:41 +02:00
Justin Ruggles 4e8e262476 fmtconvert: port int32_to_float_fmul_scalar() x86 inline asm to yasm 2011-10-21 10:13:05 -04:00
Michael Niedermayer 7c1aba4f01 Merge remote-tracking branch 'qatar/master'
* 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>
2011-09-27 02:14:37 +02:00
Jason Garrett-Glaser 96a59cf37b x86: XOP/FMA4 CPU detection support 2011-09-26 15:30:31 -07:00
Michael Niedermayer 1889c6724a Merge remote-tracking branch 'qatar/master'
* 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>
2011-09-04 04:11:53 +02:00
Sean McGovern 5938e02185 cpu detection: avoid a signed overflow
1<<31 overflows because 1 is signed, so force it to unsigned.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-09-03 08:31:50 -07:00
Michael Niedermayer edae3dbf1d Merge remote-tracking branch 'qatar/master'
* qatar/master: (23 commits)
  h264: hide reference frame errors unless requested
  swscale: split hScale() function pointer into h[cy]Scale().
  Move clipd macros to x86util.asm.
  avconv: reindent.
  avconv: rescue poor abused start_time global.
  avconv: rescue poor abused recording_time global.
  avconv: merge two loops in output_packet().
  avconv: fix broken indentation.
  avconv: get rid of the arbitrary MAX_FILES limit.
  avconv: get rid of the output_streams_for_file vs. ost_table schizophrenia
  avconv: add a wrapper for output AVFormatContexts and merge output_opts into it
  avconv: make itsscale syntax consistent with other options.
  avconv: factor out adding input streams.
  avconv: Factorize combining auto vsync with format.
  avconv: Factorize video resampling.
  avconv: Don't unnecessarily convert ipts to a double.
  ffmpeg: remove unsed variable nopts
  RV3/4 parser: remove unused variable 'off'
  add XMV demuxer
  rmdec: parse FPS in RealMedia properly
  ...

Conflicts:
	avconv.c
	libavformat/version.h
	libswscale/swscale.c
	tests/ref/fate/lmlm4-demux

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-08-18 10:56:08 +02:00
Ronald S. Bultje 38e06c2969 Move clipd macros to x86util.asm.
This allows sharing them between multiple .asm files.
2011-08-17 20:56:06 -07:00
Michael Niedermayer 0cb233cf46 Merge commit 'b2c087871dafc7d030b2d48457ddff597dfd4925'
* commit 'b2c087871dafc7d030b2d48457ddff597dfd4925':
  Move x86util.asm from libavcodec/ to libavutil/.
  Move x86inc.asm to libavutil/.
  APIchanges: note error_recognition in lavf
  lavf: add support for error_recognition, use it in avidec, and bump minor API version
  avconv: change semantics of -map
  avconv: get rid of new* options.
  cmdutils: allow precisely specifying a stream for AVOptions.
  configure: add missing CFLAGS to fix building on the HURD
  libx264: Include hint for possible values for configuring libx264
  cmdutils: allow ':'-separated modifiers in option names.
  avconv: make -map_metadata work consistently with the other options
  avconv: remove deprecated options.
  avconv: make -map_chapters accept only the input file index.
  Make a copy of ffmpeg under a new name -- avconv.
  ffmpeg: add a warning stating that the program is deprecated.
  Add weighted motion compensation for RV40 B-frames
  RV3/4: calculate B-frame motion weights once per frame
  Move RV3/4-specific DSP functions into their own context
  mjpeg: propagate decode errors from ff_mjpeg_decode_sos and ff_mjpeg_decode_dqt
  h264: notice memory allocation failure

Conflicts:
	.gitignore
	Makefile
	cmdutils.c
	configure
	doc/ffplay.texi
	doc/ffprobe.texi
	doc/ffserver.texi
	libavcodec/libx264.c
	libavformat/avformat.h
	libavformat/avidec.c
	libavformat/version.h
	tests/lavf-regression.sh
	tests/lavfi-regression.sh

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-08-13 02:56:08 +02:00
Ronald S. Bultje b2c087871d Move x86util.asm from libavcodec/ to libavutil/.
This allows using it in swscale also.
2011-08-12 11:43:03 -07:00
Ronald S. Bultje 3a39195b1d Move x86inc.asm to libavutil/.
This allows using it in libswscale/ also.
2011-08-12 11:43:02 -07:00
Michael Niedermayer 7b376b398a Merge remote branch 'qatar/master'
* qatar/master:
  Handle unicode file names on windows
  rtp: Rename the open/close functions to alloc/free
  Lowercase all ff* program names.
  Refer to ff* tools by their lowercase names.
NOT Pulled  Replace more FFmpeg instances by Libav or ffmpeg.
  Replace `` by $() syntax in shell scripts.
  patcheck: Allow overiding grep program(s) through environment variables.
NOT Pulled  Remove stray libavcore and _g binary references.
  vorbis: Rename decoder/encoder files to follow general file naming scheme.
  aacenc: Fix whitespace after last commit.
  cook: Fix small typo in av_log_ask_for_sample message.
  aacenc: Finish 3GPP psymodel analysis for non mid/side cases.
  Remove RDFT dependency from AAC decoder.
  Add some debug log messages to AAC extradata
  Fix mov debug (u)int64_t format strings.
  bswap: use native types for av_bwap16().
  doc: FLV muxing is supported.
  applehttp: Handle AES-128 encrypted streams
  Add a protocol handler for AES CBC decryption with PKCS7 padding
  doc: Mention that DragonFly BSD requires __BSD_VISIBLE set

Conflicts:
	ffplay.c
	ffprobe.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-24 03:41:22 +02:00
Jason Garrett-Glaser 15919ee48f bswap: use native types for av_bwap16().
This prevents a call to bytestream_get_be16() using a movzwl both before
and after the ror instruction, which is obviously inefficient. Arm uses
the same trick also.

Sintel decoding goes from (avg+SD) 9.856 +/- 0.003 to 9.797 +/- 0.003 sec.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-04-22 20:05:48 -04:00
Michael Niedermayer 4fa0e24736 Merge remote-tracking branch 'newdev/master'
* 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>
2011-03-23 02:42:56 +01:00
Justin Ruggles 45ed822550 cosmetics: indentation 2011-03-22 09:11:07 -04:00
Justin Ruggles eba586b0d9 Add a CPU flag for the Atom processor.
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.
2011-03-22 09:11:07 -04:00
Mans Rullgard 2912e87a6c Replace FFmpeg with Libav in licence headers
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-03-19 13:33:20 +00:00
Mans Rullgard f1f792117f x86: use raw opcode for xgetbv instruction
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 ef66953875)
2011-02-22 02:38:41 +01:00
Mans Rullgard cdeba2de82 x86: check for AVX support
This adds configure and runtime checks for AVX support on x86 CPUs.

Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit 87f1355f9b)
2011-02-20 19:05:47 +01:00
Mans Rullgard ef66953875 x86: use raw opcode for xgetbv instruction
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>
2011-02-20 17:31:23 +00:00
Mans Rullgard 87f1355f9b x86: check for AVX support
This adds configure and runtime checks for AVX support on x86 CPUs.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-02-20 13:20:42 +00:00
Justin Ruggles b7195837cd Add check for Athlon64 and similar AMD processors with slow SSE2.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit 74b1f96859)
2011-02-13 00:54:05 +01:00
Justin Ruggles 74b1f96859 Add check for Athlon64 and similar AMD processors with slow SSE2.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-11 16:58:18 -05:00
Janne Grunau 2c3589bfda consolidate .gitignore patters into a single file
Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
2011-01-18 21:32:05 +01:00
Janne Grunau 348b8218f7 convert svn:ignore properties to .gitignore files
Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
2011-01-17 15:50:14 +01:00
Måns Rullgård 65d45cea34 Add missing #include <string.h> in x86/cpu.c
Originally committed as revision 25088 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-09 19:40:59 +00:00
Måns Rullgård 9275438a19 Clean up av_get_cpu_flag()
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
2010-09-09 18:51:45 +00:00
Stefano Sabatini c6c98d0897 Move mm_support() from libavcodec to libavutil, make it a public
function and rename it to av_get_cpu_flags().

Originally committed as revision 25076 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-08 15:07:14 +00:00
Måns Rullgård 8fc0162ac4 Add av_ prefix to bswap macros
Originally committed as revision 24170 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-10 22:12:30 +00:00
Diego Biurrun ba87f0801d Remove explicit filename from Doxygen @file commands.
Passing an explicit filename to this command is only necessary if the
documentation in the @file block refers to a file different from the
one the block resides in.

Originally committed as revision 22921 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-04-20 14:45:34 +00:00
Måns Rullgård 2ed6f39944 Replace many includes of libavutil/common.h with what is actually needed
This reduces the number of false dependencies on header files and
speeds up compilation.

Originally committed as revision 22407 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-09 17:39:19 +00:00
Måns Rullgård 9c9a0840d0 Add lots of missing includes
Originally committed as revision 22337 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-08 18:43:52 +00:00
Måns Rullgård 75fb5c24ed Move FASTDIV macro to intmath.h
Originally committed as revision 21335 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-19 23:25:36 +00:00
Alexander Strange f6d0390657 Add macros for 64- and 128-bit write-combining optimization to intreadwrite.h.
Add x86 implementation using MMX/SSE.

Originally committed as revision 21281 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-18 10:24:33 +00:00
Måns Rullgård 439ccc4e0e Split libavutil/timer.h per architecture
Originally committed as revision 18304 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-04-01 22:56:22 +00:00
Diego Biurrun bad5537e2c Use full internal pathname in doxygen @file directives.
Otherwise doxygen complains about ambiguous filenames when files exist
under the same name in different subdirectories.

Originally committed as revision 16912 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-02-01 02:00:19 +00:00
Aurelien Jacobs b250f9c66d Change semantic of CONFIG_*, HAVE_* and ARCH_*.
They are now always defined to either 0 or 1.

Originally committed as revision 16590 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-01-13 23:44:16 +00:00
Måns Rullgård 3a90480ac4 split bswap.h into per-arch files
Originally committed as revision 15663 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-10-21 22:29:57 +00:00