Commit Graph

173 Commits

Author SHA1 Message Date
Henrik Gramner 63f0d62310 x86inc: Use SSE instead of SSE2 for copying data
Reduces code size because movaps/movups is one byte
shorter than movdqa/movdqu.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2013-10-07 06:24:33 -04:00
Henrik Gramner ad76e6e7e1 x86inc: Set ELF hidden visibility for global constants
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2013-10-07 06:24:13 -04:00
Loren Merritt 25cb0c1a1e x86inc: activate REP_RET automatically
Now RET checks whether it immediately follows a branch, so the
programmer dosen't have to keep track of that condition. REP_RET
is still needed manually when it's a branch target, but that's
much rarer.

The implementation involves lots of spurious labels, but that's OK
because we strip them.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2013-10-07 06:17:59 -04:00
Ronald S. Bultje c07ac8d467 VP9 MC (ssse3) optimizations.
Decoding time of ped1080p.webm goes from 20.7sec to 11.3sec.
2013-10-02 21:03:15 -04:00
Christophe Gisquet 2e81acc687 x86inc: Fix number of operands for cmp* instructions
cmp{p,s}{s,d} instructions do take an imm8 operand.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2013-04-09 23:55:30 +02:00
Christophe Gisquet 0b467a6e83 x264asm: fix cmp* number of arguments
cmp{p,s}{s,d} instructions do take an imm8 operand.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-05 16:42:12 +02:00
Ronald S. Bultje 0c0828ecc5 x86: Use simple nop codes for <= sse (rather than <= mmx)
The "CentaurHauls family 6 model 9 stepping 8" family of CPUs
(flags: fpu vme de pse tsc msr cx8 sep mtrr pge mov pat mmx fxsr sse
up rng rng_en ace ace_en) SIGILLs on long nop codes.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-02-19 22:33:19 +02:00
Ronald S. Bultje b582af1ed7 Use simple nop codes for <= sse (rather than <= mmx).
The "CPU: CentaurHauls family 6 model 9 stepping 8" family of CPUs
(flags: fpu vme de pse tsc msr cx8 sep mtrr pge mov pat mmx fxsr sse
up rng rng_en ace ace_en) SIGILLs on long nop codes.

Change-Id: I7e7c52a2191006df30a9aadbc40d481a1db89106
2013-02-11 23:38:57 +01:00
Michael Niedermayer b45e0c2573 Merge commit 'd633d12b2cc999cee3ac25bf9a810fe7ff03726d'
* commit 'd633d12b2cc999cee3ac25bf9a810fe7ff03726d':
  x86inc: Add cvisible macro for C functions with public prefix

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-19 13:11:41 +01:00
Michael Niedermayer 1b03e09198 Merge commit 'ef5d41a5534b65f03d02f2e11a503ab8416bfc3b'
* commit 'ef5d41a5534b65f03d02f2e11a503ab8416bfc3b':
  x86inc: Rename "program_name" to "private_prefix"
  configure: Run SHFLAGS through ldflags_filter()

Conflicts:
	configure

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-19 13:01:06 +01:00
Diego Biurrun d633d12b2c x86inc: Add cvisible macro for C functions with public prefix
This allows defining externally visible library symbols.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2013-01-18 22:02:03 +01:00
Diego Biurrun ef5d41a553 x86inc: Rename "program_name" to "private_prefix"
The new name is more descriptive and will allow defining a separate
public prefix for externally visible library symbols.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2013-01-18 20:29:53 +01:00
Michael Niedermayer 7e90053822 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  mpegvideo: increase edge_emu_buffer size for VC1
  lavc: merge latest x86inc.asm fixes with x264

Conflicts:
	libavcodec/mpegvideo.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-20 02:51:35 +01:00
Ronald S. Bultje a34d9ad969 lavc: merge latest x86inc.asm fixes with x264
Unbreak NASM support.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2012-12-19 07:27:33 +01:00
Michael Niedermayer a01fe55077 Merge commit 'c0dc57f1264dad1e121772d03abdb9e14ed8857f'
* commit 'c0dc57f1264dad1e121772d03abdb9e14ed8857f':
  asyncts: merge two conditions
  x86inc: fully concatenate tokens to fix macro expansion for nasm
  h264: initialize frame-mt context copies properly

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-14 15:43:46 +01:00
Janne Grunau 0995ad8db4 x86inc: fully concatenate tokens to fix macro expansion for nasm
Fixes build errors with nasm introduced in 6f40e9f070 for stack
memory alignment. Noticed by BugMaster.
2012-12-13 23:57:09 +01:00
Michael Niedermayer 7897919a88 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  aacdec: Fix an off-by-one overwrite when switching to LTP profile from MAIN.
  x86inc: fix stack alignment on win64
  rtpproto: Remove unused defines

Conflicts:
	libavcodec/aacdec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-13 12:23:48 +01:00
Ronald S. Bultje 140367aff9 x86inc: fix stack alignment on win64
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-12-12 21:30:49 +02:00
Ronald S. Bultje ce58642ed0 x86inc: support stack mem allocation and re-alignment in PROLOGUE.
Use this in VP8/H264-8bit loopfilter functions so they can be used if
there is no aligned stack (e.g. MSVC 32bit or ICC 10.x).

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-12 10:37:52 +01:00
Ronald S. Bultje 6f40e9f070 x86inc: support stack mem allocation and re-alignment in PROLOGUE
Use this in VP8/H264-8bit loopfilter functions so they can be used if
there is no aligned stack (e.g. MSVC 32bit or ICC 10.x).

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2012-12-12 05:23:46 +01:00
Michael Niedermayer 54a71f2e6c Merge commit 'b519298a1578e0c895d53d4b4ed8867b1c031a56'
* commit 'b519298a1578e0c895d53d4b4ed8867b1c031a56':
  pixdesc: fix yuva 10bit bit depth
  avconv: deprecate the -vol option
  x86: af_volume: add SSE2/SSSE3/AVX-optimized s32 volume scaling
  x86: af_volume: add SSE2-optimized s16 volume scaling

Conflicts:
	ffmpeg.c
	tests/ref/lavfi/pixdesc
	tests/ref/lavfi/pixfmts_copy
	tests/ref/lavfi/pixfmts_null
	tests/ref/lavfi/pixfmts_scale
	tests/ref/lavfi/pixfmts_vflip

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-06 15:55:47 +01:00
Justin Ruggles b30a363331 x86: af_volume: add SSE2/SSSE3/AVX-optimized s32 volume scaling 2012-12-05 11:23:37 -05:00
Michael Niedermayer da501ea857 Merge commit '802713c4e7b41bc2deed754d78649945c3442063'
* commit '802713c4e7b41bc2deed754d78649945c3442063':
  mss2: prevent potential uninitialized reads
  mss2: reindent after last commit
  mss2: fix handling of unmasked implicit WMV9 rectangles
  configure: add lavu dependency to lavr/lavfi .pc files
  x86inc: Set program_name outside of x86inc.asm

Conflicts:
	configure

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-12 10:57:06 +01:00
Diego Biurrun f0d124f005 x86inc: Set program_name outside of x86inc.asm
This reduces the local difference to the x264 upstream version.
2012-11-11 11:06:19 +01:00
Michael Niedermayer 1dad486714 Merge commit '9ce02e14f01de50fcc6f7f459544b140be66d615'
* commit '9ce02e14f01de50fcc6f7f459544b140be66d615':
  x86: ac3dsp: port to cpuflags
  x86util: Add cpuflags_mmxext alias for cpuflags_mmx2
  x86inc: Only define program_name if the macro is unset

Conflicts:
	libavcodec/x86/ac3dsp.asm

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-03 13:38:38 +01:00
Diego Biurrun 012f73e271 x86inc: Only define program_name if the macro is unset
This allows overriding the value from outside of the file.
2012-11-02 14:38:00 +01:00
Ronald S. Bultje 08b028c18d Remove INIT_AVX from x86inc.asm. 2012-10-29 14:51:14 -07:00
Michael Niedermayer 17106a7c90 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  audio_frame_queue: Clean up ff_af_queue_log_state debug function
  dwt: Remove unused code.
  cavs: convert cavsdata.h to a .c file
  cavs: Move inline functions only used in one file out of the header
  cavs: Move data tables used in only one place to that file
  fate: Add a single symbol Ut Video decoder test
  vf_hqdn3d: x86 asm
  vf_hqdn3d: support 16bit colordepth
  avconv: prefer user-forced input framerate when choosing output framerate

Conflicts:
	ffmpeg.c
	libavcodec/audio_frame_queue.c
	libavcodec/dwt.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-08-26 22:40:02 +02:00
Loren Merritt 7a1944b907 vf_hqdn3d: x86 asm
13% faster on penryn, 16% on sandybridge, 15% on bulldozer
Not simd; a compiler should have generated this, but gcc didn't.
2012-08-26 10:49:14 +00:00
Michael Niedermayer c794acc44e x86inc.asm: remove redundant ifdef __YASM_VER__
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-08-08 01:14:18 +02:00
Michael Niedermayer 2fc7c818cb Merge remote-tracking branch 'qatar/master'
* qatar/master:
  x86: fix build with nasm 2.08
  x86: use nop cpu directives only if supported
  x86: fix rNmp macros with nasm
  build: add trailing / to yasm/nasm -I flags
  x86: use 32-bit source registers with movd instruction
  x86: add colons after labels

Conflicts:
	Makefile
	libavutil/x86/x86inc.asm

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-08-07 23:04:55 +02:00
Mans Rullgard edd8226795 x86: fix build with nasm 2.08
It appears that something goes wrong in old nasm versions when the
%+ operator is used in the last argument of a macro invocation and
this argument is tested with %ifdef within the macro.  This patch
rearranges the macro arguments such that the %+ operator is never
used in the last argument.
2012-08-07 15:24:34 +01:00
Mans Rullgard 180d43bc67 x86: use nop cpu directives only if supported
nasm does not support 'CPU foonop' directives.  This adds a configure
test for the directive and uses it only if supported.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-08-07 15:22:20 +01:00
Mans Rullgard 7238265052 x86: fix rNmp macros with nasm
For some reason, nasm requires this.  No harm done to yasm.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-08-07 15:21:58 +01:00
Michael Niedermayer a7acab6cda Merge remote-tracking branch 'qatar/master'
* qatar/master:
  vc1dec: Remove separate scaling function for interlaced field MVs
  vc1dec: Invoke edge_emulation regardless of MV precision
  x86: Use consistent 3dnowext function and macro name suffixes
  g723_1: scale output as supposed for the case with postfilter disabled
  g723_1: increase excitation storage by 4
  g723_1: fix upper bound parameter from inverse maximum autocorrelation
  g723_1: make scale_vector() behave like the reference
  g723_1: fix off-by-one error in normalize_bits()
  g723_1: save/restore excitation with offset to store LPC history
  wmapro: prevent division by zero when sample rate is unspecified
  x86: proresdsp: improve SIGNEXTEND macro comments
  x86: h264dsp: K&R formatting cosmetics
  LICENSE: Document all GPL files

Conflicts:
	libavcodec/g723_1.c
	libavcodec/wmaprodec.c
	libavcodec/x86/h264dsp_mmx.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-08-03 23:13:06 +02:00
Diego Biurrun ca844b7be9 x86: Use consistent 3dnowext function and macro name suffixes
Currently there is a wild mix of 3dn2/3dnow2/3dnowext.  Switching to
"3dnowext", which is a more common name of the CPU flag, as reported
e.g. by the Linux kernel, unifies this.
2012-08-03 14:00:47 +02:00
Michael Niedermayer 706bd8ea19 Merge remote-tracking branch 'qatar/master'
* qatar/master: (35 commits)
  h264_idct_10bit: port x86 assembly to cpuflags.
  x86inc: clip num_args to 7 on x86-32.
  x86inc: sync to latest version from x264.
  fft: rename "z" to "zc" to prevent name collision.
  wv: return meaningful error codes.
  wv: return AVERROR_EOF on EOF, not EIO.
  mp3dec: forward errors for av_get_packet().
  mp3dec: remove a pointless local variable.
  mp3dec: remove commented out cruft.
  lavfi: bump minor to mark stabilizing the ABI.
  FATE: add tests for yadif.
  FATE: add a test for delogo video filter.
  FATE: add a test for amix audio filter.
  audiogen: allow specifying random seed as a commandline parameter.
  vc1dec: Override invalid macroblock quantizer
  vc1: avoid reading beyond the last line in vc1_draw_sprites()
  vc1dec: check that coded slice positions and interlacing match.
  vc1dec: Do not ignore ff_vc1_parse_frame_header_adv return value
  configure: Move parts that should not be user-selectable to CONFIG_EXTRA
  lavf: remove commented out cruft in avformat_find_stream_info()
  ...

Conflicts:
	Makefile
	configure
	libavcodec/vc1dec.c
	libavcodec/x86/h264_deblock.asm
	libavcodec/x86/h264_deblock_10bit.asm
	libavcodec/x86/h264dsp_mmx.c
	libavfilter/version.h
	libavformat/mp3dec.c
	libavformat/utils.c
	libavformat/wv.c
	libavutil/x86/x86inc.asm

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-07-29 02:16:26 +02:00
Loren Merritt f8d8fe255d x86inc: clip num_args to 7 on x86-32.
This allows us to unconditionally set the cglobal num_args
parameter to a bigger value, thus making writing yasm code
even easier than before.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-07-28 08:29:45 -07:00
Ronald S. Bultje 96c9cc1094 x86inc: sync to latest version from x264. 2012-07-28 08:29:44 -07:00
Michael Niedermayer c6963a220d Merge remote-tracking branch 'qatar/master'
* qatar/master:
  proresdsp: port x86 assembly to cpuflags.
  lavr: x86: improve non-SSE4 version of S16_TO_S32_SX macro
  lavfi: better channel layout negotiation
  alac: check for truncated packets
  alac: reverse lpc coeff order, simplify filter
  lavr: add x86-optimized mixing functions
  x86: add support for fmaddps fma4 instruction with abstraction to avx/sse
  tscc2: fix typo in array index
  build: use COMPILE template for HOSTOBJS
  build: do full flag handling for all compiler-type tools
  eval: fix printing of NaN in eval fate test.
  build: Rename aandct component to more descriptive aandcttables
  mpegaudio: bury inline asm under HAVE_INLINE_ASM.
  x86inc: automatically insert vzeroupper for YMM functions.
  rtmp: Check the buffer length of ping packets
  rtmp: Allow having more unknown data at the end of a chunk size packet without failing
  rtmp: Prevent reading outside of an allocate buffer when receiving server bandwidth packets

Conflicts:
	Makefile
	configure
	libavcodec/x86/proresdsp.asm
	libavutil/eval.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-07-27 23:42:19 +02:00
Justin Ruggles 79687079a9 x86: add support for fmaddps fma4 instruction with abstraction to avx/sse 2012-07-27 11:25:48 -04:00
Ronald S. Bultje 30b45d9c38 x86inc: automatically insert vzeroupper for YMM functions. 2012-07-26 13:43:16 -07:00
Clément Bœsch 7073174551 x86inc: put basicnop under ifdef to prevent compile failure.
This should fix the NASM box.

Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
2012-07-07 22:48:43 +02:00
Michael Niedermayer dc12f7d4ec x86inc: try to put amdnop under ifdef to prevent compile failure
based on similar amdnop usage in ffmpeg

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-07-07 20:16:56 +02:00
Michael Niedermayer 24823a761c Merge remote-tracking branch 'qatar/master'
* qatar/master:
  qdm2: remove broken and disabled dump_context() debug function
  x86: h264_intrapred: use newly introduced SPLAT* and PSHUFLW macros
  x86inc: add SPLATB_LOAD, SPLATB_REG, PSHUFLW macros
  x86inc: modify ALIGN to not generate long nops on i586
  x86: h264_intrapred: port to cpuflag macros
  avplay: update input filter pointer when the filtergraph is reset.
  avconv: fix parsing of -force_key_frames option.
  h264: use templates to avoid excessive inlining
  xtea: Make the count parameter match the documentation
  blowfish: Make the count parameter match the documentation
  mpegvideo: Don't use ff_mspel_motion() for vc1
  xtea: invert branch and loop precedence
  blowfish: invert branch and loop precedence
  flvdec: optionally trust the metadata
  avconv: Set audio filter time base to the sample rate
  vp8: Add ifdef guards around the sse2 loopfilter in the sse2slow branch too

Conflicts:
	ffmpeg.c
	ffplay.c
	libavcodec/h264.c
	libavcodec/mpegvideo_common.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-07-05 21:55:31 +02:00
Loren Merritt 2cd1f5cadc x86inc: modify ALIGN to not generate long nops on i586
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-07-05 17:37:11 +02:00
Reimar Döffinger 9b1f776d75 Fix compilation with NASM.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2012-04-20 21:16:12 +02:00
Michael Niedermayer 2a976debc1 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  dv: Initialize encoder tables during encoder init.
  dv: Replace some magic numbers by the appropriate #define.
  FATE: pass the decoded output format and audio source file to enc_dec_pcm
  FATE: specify the input format when decoding in enc_dec_pcm()
  x86inc: support AVX abstraction for 2-operand instructions
  configure: detect PGI compiler and set suitable flags
  avconv: check for an incompatible changing channel layout
  avio: make AVIOContext.av_class pointer to const
  nutdec: add malloc check and fix const to non-const conversion warnings

Conflicts:
	ffmpeg.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-19 21:23:52 +02:00
Nico Weber a4a88fd42c Remove .rodata alignment kludge for Mach-O if a recent enough yasm is used.
Yasm was fixed in its r2161 and yasm 0.8.0 (Apr 2010) contained this fix.
Nasm was fixed in 2.06 (Jun 2009):
https://groups.google.com/group/alt.lang.asm/browse_thread/thread/fcc85bbc3745d893

I tested with yasm  0.7.99 and yasm 1.2.0.7, where this works fine.

I also tested with nasm. The nasm shipping with Xcode is too old to understand
ffmpeg's assembly, before and after the patch. Nasm 2.10 fails to compile
fft_mmx.asm on trunk with

  libavcodec/x86/fft_mmx.asm:88: panic: section ".text" has already been specified with alignment 32, conflicts with new alignment of 16

but builds fine if I change the two alignment "16"s in x86inc.asm to "32". With this patch,
nasm 2.10 fails with

  libavcodec/x86/fft_mmx.asm:39: panic: section ".rodata" has already been specified with alignment 32, conflicts with new alignment of 16

instead, but again builds fine with s/16/32/.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-19 17:14:47 +02:00
Loren Merritt 705f3d4759 x86inc: support AVX abstraction for 2-operand instructions
Add cvtdq2ps and cvtps2dq to the AVX instruction list.

Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-04-18 21:14:32 -04:00
Michael Niedermayer ca19862d38 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  libxvid: remove disabled code
  qdm2: make a table static const
  qdm2: simplify bitstream reader setup for some subpacket types
  qdm2: use get_bits_left()
  build: Consistently handle conditional compilation for all optimization OBJS.
  avpacket, bfi, bgmc, rawenc: K&R prettyprinting cosmetics
  msrle: convert MS RLE decoding function to bytestream2.
  x86inc improvements for 64-bit

Conflicts:
	common.mak
	libavcodec/avpacket.c
	libavcodec/bfi.c
	libavcodec/msrledec.c
	libavcodec/qdm2.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-13 00:39:19 +02:00
Henrik Gramner 729f90e268 x86inc improvements for 64-bit
Add support for all x86-64 registers
Prefer caller-saved register over callee-saved on WIN64
Support up to 15 function arguments

Also (by Ronald S. Bultje)
Fix up our asm to work with new x86inc.asm.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-04-11 15:47:00 -04:00
Michael Niedermayer 4257ce112c Merge remote-tracking branch 'qatar/master'
* qatar/master:
  dxa: remove useless code
  lavf: don't select an attached picture as default stream for seeking.
  avconv: remove pointless checks.
  avconv: check for get_filtered_frame() failure.
  avconv: remove a pointless check.
  swscale: convert hscale() to use named arguments.
  x86inc: add *mp named argument support to DEFINE_ARGS.
  swscale: convert hscale to cpuflags().

Conflicts:
	ffmpeg.c
	libswscale/x86/scale.asm

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-16 01:36:49 +01:00
Ronald S. Bultje 98b9da2ac7 x86inc: add *mp named argument support to DEFINE_ARGS. 2012-03-14 20:09:53 -07:00
Michael Niedermayer 2af8f2cea6 Merge remote-tracking branch 'qatar/master'
* qatar/master: (27 commits)
  cmdutils: use new avcodec_is_decoder/encoder() functions.
  lavc: make codec_is_decoder/encoder() public.
  lavc: deprecate AVCodecContext.sub_id.
  libcdio: add a forgotten AVClass to the private context.
  swscale: remove "cpu flags" from -sws_flags description.
  proresenc: give user a possibility to alter some encoding parameters
  vorbisenc: add output buffer overwrite protection
  libopencore-amrnbenc: fix end-of-stream handling
  ra144enc: fix end-of-stream handling
  nellymoserenc: zero any leftover packet bytes
  nellymoserenc: use proper MDCT overlap delay
  qpeg: Use bytestream2 functions to prevent buffer overreads.
  swscale: make %rep unconditional.
  vp8: convert simple loopfilter x86 assembly to use named arguments.
  vp8: convert idct x86 assembly to use named arguments.
  vp8: convert mc x86 assembly to use named arguments.
  vp8: convert loopfilter x86 assembly to use cpuflags().
  vp8: convert idct/mc x86 assembly to use cpuflags().
  swscale: remove now unnecessary hack.
  x86inc: don't "bake" stack_offset in named arguments.
  ...

Conflicts:
	cmdutils.c
	doc/APIchanges
	libavcodec/mpeg12.c
	libavcodec/options.c
	libavcodec/qpeg.c
	libavcodec/utils.c
	libavcodec/version.h
	libavdevice/libcdio.c
	tests/lavf-regression.sh

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-05 00:15:55 +01:00
Loren Merritt 0f53d0cf4b x86inc: don't "bake" stack_offset in named arguments.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-03-03 20:39:59 -08:00
Michael Niedermayer f2b20b7a8b Merge remote-tracking branch 'qatar/master'
* qatar/master:
  pixdesc: mark pseudopaletted formats with a special flag.
  avconv: switch to avcodec_encode_video2().
  libx264: implement encode2().
  libx264: split extradata writing out of encode_nals().
  lavc: add avcodec_encode_video2() that encodes from an AVFrame -> AVPacket
  cmdutils: update copyright year to 2012.
  swscale: sign-extend integer function argument to qword on x86-64.
  x86inc: support yasm -f win64 flag also.
  h264: manually save/restore XMM registers for functions using INIT_MMX.
  x86inc: allow manual use of WIN64_SPILL_XMM.
  aacdec: Use correct speaker order for 7.1.
  aacdec: Remove incorrect comment.
  aacdec: Simplify output configuration.
  Remove Sun medialib glue code.
  dsputil: set STRIDE_ALIGN to 16 for x86 also.
  pngdsp: swap argument inversion.

Conflicts:
	cmdutils.c
	configure
	doc/APIchanges
	ffmpeg.c
	libavcodec/aacdec.c
	libavcodec/dsputil.h
	libavcodec/libx264.c
	libavcodec/mlib/dsputil_mlib.c
	libavcodec/utils.c
	libavfilter/vf_scale.c
	libavutil/avutil.h
	libswscale/mlib/yuv2rgb_mlib.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-02-09 01:27:12 +01:00
Haruhiko Yamagata 166f399377 x86inc: support yasm -f win64 flag also.
This sets __OUTPUT_FORMAT__ to win64 instead of win32, even though both
(through -m amd64) produce 64-bit binary code.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-02-08 10:31:14 -08:00
Henrik Gramner 9cf7385309 x86inc: allow manual use of WIN64_SPILL_XMM.
Functions using INIT_MMX may still access XMM registers through direct
means (xmm0-15). Therefore, they still need to be marked for clobber
so they can be properly saved/restored.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-02-08 10:31:14 -08:00
Michael Niedermayer e37f161e66 Merge remote-tracking branch 'qatar/master'
* qatar/master: (71 commits)
  movenc: Allow writing to a non-seekable output if using empty moov
  movenc: Support adding isml (smooth streaming live) metadata
  libavcodec: Don't crash in avcodec_encode_audio if time_base isn't set
  sunrast: Document the different Sun Raster file format types.
  sunrast: Add a check for experimental type.
  libspeexenc: use AVSampleFormat instead of deprecated/removed SampleFormat
  lavf: remove disabled FF_API_SET_PTS_INFO cruft
  lavf: remove disabled FF_API_OLD_INTERRUPT_CB cruft
  lavf: remove disabled FF_API_REORDER_PRIVATE cruft
  lavf: remove disabled FF_API_SEEK_PUBLIC cruft
  lavf: remove disabled FF_API_STREAM_COPY cruft
  lavf: remove disabled FF_API_PRELOAD cruft
  lavf: remove disabled FF_API_NEW_STREAM cruft
  lavf: remove disabled FF_API_RTSP_URL_OPTIONS cruft
  lavf: remove disabled FF_API_MUXRATE cruft
  lavf: remove disabled FF_API_FILESIZE cruft
  lavf: remove disabled FF_API_TIMESTAMP cruft
  lavf: remove disabled FF_API_LOOP_OUTPUT cruft
  lavf: remove disabled FF_API_LOOP_INPUT cruft
  lavf: remove disabled FF_API_AVSTREAM_QUALITY cruft
  ...

Conflicts:
	doc/APIchanges
	libavcodec/8bps.c
	libavcodec/avcodec.h
	libavcodec/libx264.c
	libavcodec/mjpegbdec.c
	libavcodec/options.c
	libavcodec/sunrast.c
	libavcodec/utils.c
	libavcodec/version.h
	libavcodec/x86/h264_deblock.asm
	libavdevice/libdc1394.c
	libavdevice/v4l2.c
	libavformat/avformat.h
	libavformat/avio.c
	libavformat/avio.h
	libavformat/aviobuf.c
	libavformat/dv.c
	libavformat/mov.c
	libavformat/utils.c
	libavformat/version.h
	libavformat/wtv.c
	libavutil/Makefile
	libavutil/file.c
	libswscale/x86/input.asm
	libswscale/x86/swscale_mmx.c
	libswscale/x86/swscale_template.c
	tests/ref/lavf/ffm

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-28 07:53:34 +01:00
Ronald S. Bultje 412b248edb x86inc.asm: fix typo.
Assemblers don't understand ! in %if statements.
2012-01-27 16:33:03 +08:00
Ronald S. Bultje 3b15a6d742 config.asm: change %ifdef directives to %if directives.
This allows combining multiple conditionals in a single statement.
2012-01-27 10:19:57 +08:00
Michael Niedermayer f4a01d7788 x86inc: remove duplicate movlhps
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-10 23:12:18 +01:00
Michael Niedermayer dd3ca3ea15 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  fate: Add tests for more AAC features.
  aacps: Add missing newline in error message.
  fate: Add tests for vc1/wmapro in ism.
  aacdec: Add a fate test for 5.1 channel SBR.
  aacdec: Turn off PS for multichannel files that use PCE based configs.
  cabac: remove put_cabac_u/ueg from cabac-test.
  swscale: RGB4444 and BGR444 input
  FATE: add test for xWMA demuxer.
  FATE: add test for SMJPEG demuxer and associated IMA ADPCM audio decoder.
  mpegaudiodec: optimized iMDCT transform
  mpegaudiodec: change imdct window arrangment for better pointer alignment
  mpegaudiodec: move imdct and windowing function to mpegaudiodsp
  mpegaudiodec: interleave iMDCT buffer to simplify future SIMD implementations
  swscale: convert yuy2/uyvy/nv12/nv21ToY/UV from inline asm to yasm.
  FATE: test to exercise WTV demuxer.
  mjpegdec: K&R formatting cosmetics
  swscale: K&R formatting cosmetics for code examples
  swscale: K&R reformatting cosmetics for header files
  FATE test: cvid-grayscale; ensures that the grayscale Cinepak variant is exercised.

Conflicts:
	libavcodec/cabac.c
	libavcodec/mjpegdec.c
	libavcodec/mpegaudiodec.c
	libavcodec/mpegaudiodsp.c
	libavcodec/mpegaudiodsp.h
	libavcodec/mpegaudiodsp_template.c
	libavcodec/x86/Makefile
	libavcodec/x86/imdct36_sse.asm
	libavcodec/x86/mpegaudiodec_mmx.c
	libswscale/swscale-test.c
	libswscale/swscale.c
	libswscale/swscale_internal.h
	libswscale/x86/swscale_template.c
	tests/fate/demux.mak
	tests/fate/microsoft.mak
	tests/fate/video.mak
	tests/fate/wma.mak
	tests/ref/lavfi/pixfmts_scale

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-10 03:50:41 +01:00
Vitor Sessak 39df0c434c mpegaudiodec: optimized iMDCT transform
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-01-08 17:40:55 -08:00
Vitor Sessak ca55606a51 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: Michael Niedermayer <michaelni@gmx.at>
2011-11-28 00:24:21 +01:00
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
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
Ronald S. Bultje 3a39195b1d Move x86inc.asm to libavutil/.
This allows using it in libswscale/ also.
2011-08-12 11:43:02 -07:00