Commit Graph

62 Commits

Author SHA1 Message Date
Wan-Teh Chang ea1ca17be2 avcodec/x86/cavsdsp: Delete #include "libavcodec/x86/idctdsp.h".
This file already has #include "idctdsp.h", which is resolved to the
idctdsp.h header in the directory where this file resides by compilers.
Two other files in this directory, libavcodec/x86/idctdsp_init.c and
libavcodec/x86/xvididct_init.c, also rely on #include "idctdsp.h"
working this way.

Signed-off-by: Wan-Teh Chang <wtc@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-07-21 02:08:33 +02:00
Ronald S. Bultje 2f0591cfa3 cavs: add a sse2 idct implementation.
This makes using the function pointer ff_add_pixels_clamped() unnecessary,
since we always know what the best implementation is at compile-time.
2017-04-06 10:03:28 -04:00
Ronald S. Bultje c9d98c5649 cavs: convert idct from inline asm to yasm. 2017-04-06 10:03:27 -04:00
James Almer aec42ebc27 Merge commit 'f81be06cf614919d71ded29b8f595bef40123ad8'
* commit 'f81be06cf614919d71ded29b8f595bef40123ad8':
  cavs: Change type of stride parameters to ptrdiff_t

Merged-by: James Almer <jamrial@gmail.com>
2017-03-19 15:23:52 -03:00
Michael Niedermayer 835d9f299c avcodec/x86/cavsdsp: Put MMX code under mmx check
Without this the FPU state becomes trashed and causes mysterious
fate failures with cpuflags=0

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-03-06 16:47:17 +01:00
Diego Biurrun f81be06cf6 cavs: Change type of stride parameters to ptrdiff_t
ptrdiff_t is the correct type for array strides and similar.
2016-08-26 11:48:15 +02:00
Ganesh Ajjanagadde 07cd8d5676 avcodec/x86/cavsdsp: silence -Wunused-variable on --disable-mmx
This silences -Wunused-variable when compiled with --disable-mmx, e.g
http://fate.ffmpeg.org/log.cgi?time=20150919094617&log=compile&slot=x86_64-archlinux-gcc-disable-mmx.
The alternative of header guards will make it far too ugly.

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-09-24 04:27:50 +02:00
Michael Niedermayer b666e81c13 Merge commit 'e4610300de6869bd6b3b00e76cfeabb6d7653dcd'
* commit 'e4610300de6869bd6b3b00e76cfeabb6d7653dcd':
  x86: cavs: Remove an unneeded scratch buffer

Conflicts:
	libavcodec/x86/cavsdsp.c

See: d79f7bf0d6
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-28 22:12:41 +02:00
Michael Niedermayer e4610300de x86: cavs: Remove an unneeded scratch buffer
Simplifies the code and makes it build on certain compilers
running out of registers on x86.

CC: libav-stable@libav.org
Reported-By: mudler
2015-05-28 18:40:40 +02:00
Michael Niedermayer d79f7bf0d6 avcodec/x86/cavsdsp: remove incorrect LOCAL_ALIGN tmp
This is faster and simpler as well

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-16 14:51:51 +01:00
Christophe Gisquet 238db7cc56 x86: lavc: use LOCAL_ALIGNED instead of DECLARE_ALIGNED
The later may yield incorrect code for on-stack variables.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-14 20:06:47 +01:00
James Almer 4b892e469b x86/cavsdsp: fix buffer alignment in cavs_idct8_add_mmx()
It may be used by ff_add_pixels_clamped_sse2().
Should fix fate-cavs failures on some systems.

Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: James Almer <jamrial@gmail.com>
2014-09-25 16:00:16 -03:00
James Almer ad26e83f9c avcodec/x86: use function pointers for {put,add}_pixels_clamped
Same behavior as in simple_idct.
This way the best optimized versions available will be used instead.

Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: James Almer <jamrial@gmail.com>
2014-09-24 18:52:32 -03:00
Michael Niedermayer 2904d052b7 Merge commit '7fb993d338d88f2f62e0a358b6c9f3eb9a3a08ac'
* commit '7fb993d338d88f2f62e0a358b6c9f3eb9a3a08ac':
  qpeldsp: Mark source pointer in qpel_mc_func function pointer const

Conflicts:
	libavcodec/h264qpel_template.c
	libavcodec/x86/cavsdsp.c
	libavcodec/x86/rv40dsp_init.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-25 13:05:08 +02:00
Diego Biurrun 7fb993d338 qpeldsp: Mark source pointer in qpel_mc_func function pointer const 2014-07-25 02:52:54 -07:00
Michael Niedermayer 42d326353c Merge commit 'b4987f72197e0c62cf2633bf835a9c32d2a445ae'
* commit 'b4987f72197e0c62cf2633bf835a9c32d2a445ae':
  idct: Convert IDCT permutation #defines to an enum

Conflicts:
	libavcodec/idctdsp.c
	libavcodec/x86/cavsdsp.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-18 22:01:17 +02:00
Diego Biurrun b4987f7219 idct: Convert IDCT permutation #defines to an enum
Also rename the enum values to be consistent with other DCT permutations.
2014-07-18 07:51:03 -07:00
Michael Niedermayer 581b5f0b9b Merge commit 'e3fcb14347466095839c2a3c47ebecff02da891e'
* commit 'e3fcb14347466095839c2a3c47ebecff02da891e':
  dsputil: Split off IDCT bits into their own context

Conflicts:
	configure
	libavcodec/aic.c
	libavcodec/arm/Makefile
	libavcodec/arm/dsputil_init_arm.c
	libavcodec/arm/dsputil_init_armv6.c
	libavcodec/asvdec.c
	libavcodec/dnxhdenc.c
	libavcodec/dsputil.c
	libavcodec/dvdec.c
	libavcodec/dxva2_mpeg2.c
	libavcodec/intrax8.c
	libavcodec/mdec.c
	libavcodec/mjpegdec.c
	libavcodec/mjpegenc_common.h
	libavcodec/mpegvideo.c
	libavcodec/ppc/dsputil_altivec.h
	libavcodec/ppc/dsputil_ppc.c
	libavcodec/ppc/idctdsp.c
	libavcodec/x86/Makefile
	libavcodec/x86/dsputil_init.c
	libavcodec/x86/dsputil_mmx.c
	libavcodec/x86/dsputil_x86.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-01 15:22:11 +02:00
Diego Biurrun e3fcb14347 dsputil: Split off IDCT bits into their own context 2014-06-30 07:58:46 -07:00
Christophe Gisquet 86ae0da60c x86: hpeldsp: propagate changes across codecs
Some codecs still use mmx versions, so have them use the versions
with newer instruction sets.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-26 15:37:04 +02:00
Christophe Gisquet d1a32c3f49 x86: kill fpel_mmx.c
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-21 03:25:08 +02:00
Matt Oliver 3c3e02b8d1 x86/cavdsp: prevent named constraints appearing twice. 2014-05-03 17:47:55 +02:00
Carl Eugen Hoyos 72c93abaad Use MANGLE in cavsdsp.c to save two registers using gcc.
Fixes compilation with !HAVE_6REGS.
2014-04-19 09:54:26 +02:00
Michael Niedermayer 9333bba6ed Merge commit '6655c933a887a2d20707fff657b614aa1d86a25b'
* commit '6655c933a887a2d20707fff657b614aa1d86a25b':
  x86: dsputil: Move fpel declarations to a separate header

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-22 23:08:22 +01:00
Diego Biurrun 6655c933a8 x86: dsputil: Move fpel declarations to a separate header 2014-03-22 06:17:29 -07:00
Matt Oliver 8236747511 Automatically change MANGLE() into named inline asm operands when direct symbol reference in inline asm are not supported.
This is part of the patch-set for intel C inline asm on windows support

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-18 23:39:30 +01:00
Michael Niedermayer 5b4d57455d Merge remote-tracking branch 'qatar/master'
* qatar/master:
  x86: Initialize mmxext after amd3dnow optimizations

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-05 11:55:41 +01:00
Diego Biurrun 3d7c84747d x86: Initialize mmxext after amd3dnow optimizations
The mmxext optimizations should be at least equally fast if available and
amd3dnow optimizations are being deprecated. Thus the former should
override the latter, not the other way around.
2013-12-04 18:52:48 +01:00
Michael Niedermayer 8be0e2bd43 Merge commit '6369ba3c9cc74becfaad2a8882dff3dd3e7ae3c0'
* commit '6369ba3c9cc74becfaad2a8882dff3dd3e7ae3c0':
  x86: avcodec: Use convenience macros to check for CPU flags

Conflicts:
	libavcodec/x86/dsputil_init.c
	libavcodec/x86/hpeldsp_init.c
	libavcodec/x86/motion_est.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-30 12:08:28 +02:00
Diego Biurrun 6369ba3c9c x86: avcodec: Use convenience macros to check for CPU flags 2013-08-29 13:07:37 +02:00
Michael Niedermayer 9d01bf7d66 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  Consistently use "cpu_flags" as variable/parameter name for CPU flags

Conflicts:
	libavcodec/x86/dsputil_init.c
	libavcodec/x86/h264dsp_init.c
	libavcodec/x86/hpeldsp_init.c
	libavcodec/x86/motion_est.c
	libavcodec/x86/mpegvideo.c
	libavcodec/x86/proresdsp_init.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-18 09:53:47 +02:00
Diego Biurrun 3ac7fa81b2 Consistently use "cpu_flags" as variable/parameter name for CPU flags 2013-07-18 00:31:35 +02:00
Michael Niedermayer a887372109 Merge commit '1399931d07f0f37ef4526eb8d39d33c64e09618a'
* commit '1399931d07f0f37ef4526eb8d39d33c64e09618a':
  x86: dsputil: Rename dsputil_mmx.h --> dsputil_x86.h

Conflicts:
	libavcodec/x86/dsputil_mmx.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-14 12:12:20 +02:00
Diego Biurrun 1399931d07 x86: dsputil: Rename dsputil_mmx.h --> dsputil_x86.h
The header is not (anymore) MMX-specific.
2013-05-12 22:28:07 +02:00
Michael Niedermayer bda5487d92 Merge commit '3d40c1ee742db5f13ebcf53c2d1fa4bf4f39bcd2'
* commit '3d40c1ee742db5f13ebcf53c2d1fa4bf4f39bcd2':
  x86: dsputil: Move TRANSPOSE4 macro to the only place it is used

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-09 11:43:00 +02:00
Michael Niedermayer 164899c6e8 Merge commit '71469f3b636fbe06b6aca5933f9fdebddd8d5f57'
* commit '71469f3b636fbe06b6aca5933f9fdebddd8d5f57':
  x86: dsputil: Move constant declarations into separate header

Conflicts:
	libavcodec/x86/dsputil_mmx.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-09 11:36:29 +02:00
Diego Biurrun 3d40c1ee74 x86: dsputil: Move TRANSPOSE4 macro to the only place it is used 2013-05-08 18:18:23 +02:00
Diego Biurrun 71469f3b63 x86: dsputil: Move constant declarations into separate header 2013-05-08 18:18:23 +02:00
Michael Niedermayer 05599308e9 Merge commit 'bf7c3c6b157f7938578f964b62cffd5e504940be'
* commit 'bf7c3c6b157f7938578f964b62cffd5e504940be':
  x86: dsputil: Move cavs and vc1-specific functions where they belong

Conflicts:
	libavcodec/x86/dsputil_mmx.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-03 10:50:27 +02:00
Diego Biurrun bf7c3c6b15 x86: dsputil: Move cavs and vc1-specific functions where they belong 2013-05-02 11:45:37 +02:00
Michael Niedermayer dbcf7e9ef7 Merge commit '7f75f2f2bd692857c1c1ca7f414eb30ece3de93d'
* commit '7f75f2f2bd692857c1c1ca7f414eb30ece3de93d':
  ppc: Drop unnecessary ff_ name prefixes from static functions
  x86: Drop unnecessary ff_ name prefixes from static functions
  arm: Drop unnecessary ff_ name prefixes from static functions

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-01 18:21:35 +02:00
Diego Biurrun f2e9d44a57 x86: Drop unnecessary ff_ name prefixes from static functions 2013-04-30 16:02:03 +02:00
Michael Niedermayer 430d69c942 Merge commit 'b4ad7c54c878dead7dfa4838b912a530c1debe85'
* commit 'b4ad7c54c878dead7dfa4838b912a530c1debe85':
  x86: cavs: Refactor duplicate dspfunc macro

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-22 18:37:44 +02:00
Michael Niedermayer f84e373797 Merge commit '78fa0bd0f7067868943c0899907e313414492426'
* commit '78fa0bd0f7067868943c0899907e313414492426':
  x86: cavs: Put mmx-specific code into its own init function

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-22 18:29:05 +02:00
Diego Biurrun b4ad7c54c8 x86: cavs: Refactor duplicate dspfunc macro 2013-04-22 12:05:09 +02:00
Diego Biurrun 78fa0bd0f7 x86: cavs: Put mmx-specific code into its own init function
Before, this code was labeled as mmxext and enabled both for the
3dnow and the mmxext case.
2013-04-22 10:42:50 +02:00
Michael Niedermayer db4e4f766c Merge commit 'a8b6015823e628047a45916404c00044c5e80415'
* commit 'a8b6015823e628047a45916404c00044c5e80415':
  dsputil: convert remaining functions to use ptrdiff_t strides

Conflicts:
	libavcodec/dsputil.h
	libavcodec/dsputil_template.c
	libavcodec/h264qpel_template.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-13 14:18:53 +01:00
Luca Barbato a8b6015823 dsputil: convert remaining functions to use ptrdiff_t strides
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-03-12 18:26:42 +01:00
Michael Niedermayer a984efd104 Merge commit 'c242bbd8b6939507a1a6fb64101b0553d92d303f'
* commit 'c242bbd8b6939507a1a6fb64101b0553d92d303f':
  Remove unnecessary dsputil.h #includes

Conflicts:
	libavcodec/ffv1.c
	libavcodec/h261dec.c
	libavcodec/h261enc.c
	libavcodec/h264pred.c
	libavcodec/lpc.h
	libavcodec/mjpegdec.c
	libavcodec/rectangle.h
	libavcodec/x86/idct_sse2_xvid.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-02-26 13:05:10 +01:00
Diego Biurrun c242bbd8b6 Remove unnecessary dsputil.h #includes 2013-02-26 00:51:34 +01:00