Commit Graph

495 Commits

Author SHA1 Message Date
Michael Niedermayer
f11905763c Merge remote-tracking branch 'qatar/master'
* qatar/master:
  ppc: reduce overreads when loading 8 pixels in altivec dsp functions

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-14 22:00:12 +01:00
Janne Grunau
98fdfa9970 ppc: reduce overreads when loading 8 pixels in altivec dsp functions
Altivec can only load naturally aligned vectors. To handle possibly
unaligned data a second vector is loaded from an offset of the original
location and the data is recovered through a vector permutation.
Overreads are minimal if the offset for second load points to the last
element of data. This is 7 for loading eight 8-bit pixels and overreads
are reduced from 16 bytes to 8 bytes if the pixels are 64-bit aligned.
For unaligned pixels the overread is reduced from 23 bytes to 15 bytes
in the worst case.
2014-02-14 18:34:04 +01:00
Ronald S. Bultje
2f6eec65ac vp8: fix PPC assembly to work if src_stride != dst_stride
Signed-off-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2014-02-09 18:50:53 +01:00
Michael Niedermayer
30056fd0be Merge commit 'a03a642d5ceb5f2f7c6ebbf56ff365dfbcdb65eb'
* commit 'a03a642d5ceb5f2f7c6ebbf56ff365dfbcdb65eb':
  h264: do not use 422 functions for monochrome

See: 07abf13da4
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-06 16:51:23 +01:00
Anton Khirnov
a03a642d5c h264: do not use 422 functions for monochrome
Fixes invalid memory access.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org
2014-01-06 08:25:36 +01:00
Michael Niedermayer
867e7bb4f1 fix order of operations in comments
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-23 14:32:04 +02:00
Ronald S. Bultje
34b429d5ba vp8: fix PPC assembly and bilinear C code to work if src_stride != dst_stride.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-23 15:23:53 +02:00
Michael Niedermayer
09c94b57ca Merge commit 'a6b650118543e1580e872896d8976042b7c32d01'
* commit 'a6b650118543e1580e872896d8976042b7c32d01':
  ppc: cosmetics: Consistently format CPU flag detection invocations

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-30 11:48:54 +02:00
Michael Niedermayer
4399e72723 Merge commit '6af2c351b3ae61e4478950ffddd0dfcad06188b8'
* commit '6af2c351b3ae61e4478950ffddd0dfcad06188b8':
  ppc: Add missing AltiVec cpuflag detection invocations

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-29 15:04:59 +02:00
Michael Niedermayer
3e75f98667 Merge commit 'de81b6ae4f38273ff27020f494cc46539110d34b'
* commit 'de81b6ae4f38273ff27020f494cc46539110d34b':
  ppc: fdct: Remove vim editor settings comment

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-29 15:00:02 +02:00
Michael Niedermayer
29daad5b98 Merge commit 'f61bece684d9685b07895508e6c1c733b5564ccf'
* commit 'f61bece684d9685b07895508e6c1c733b5564ccf':
  ppc: Add and use convenience macro to check for AltiVec availability

Conflicts:
	libavcodec/ppc/dsputil_ppc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-29 14:24:07 +02:00
Diego Biurrun
a6b6501185 ppc: cosmetics: Consistently format CPU flag detection invocations 2013-08-29 11:31:32 +02:00
Diego Biurrun
6af2c351b3 ppc: Add missing AltiVec cpuflag detection invocations 2013-08-29 00:24:46 +02:00
Diego Biurrun
de81b6ae4f ppc: fdct: Remove vim editor settings comment 2013-08-28 23:59:24 +02:00
Diego Biurrun
f61bece684 ppc: Add and use convenience macro to check for AltiVec availability 2013-08-28 23:54:15 +02:00
Michael Niedermayer
d7ed473d5c Merge remote-tracking branch 'qatar/master'
* qatar/master:
  altivec: perform an explicit unaligned load

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-16 14:21:40 +02:00
Kostya Shishkov
f399e406af altivec: perform an explicit unaligned load
Implicit vector loads on POWER7 hardware can use the VSX
instruction set instead of classic Altivec/VMX. Let's force
a VMX load in this case.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-08-16 10:08:47 +03: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
Christophe Gisquet
b6293e2798 fmtconvert: Explicitly use int32_t instead of int
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-07-17 11:02:47 +03:00
Michael Niedermayer
b7c6d1ed90 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  arm: Only output eabi attributes if building for ELF
  fix scalarproduct_and_madd_int16_altivec() for orders > 16

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-27 08:55:24 +02:00
Kostya Shishkov
0418cbf081 fix scalarproduct_and_madd_int16_altivec() for orders > 16
the second and third sources were incremented only by half of the needed size
2013-05-26 16:10:47 +02:00
Christophe Gisquet
f49564c607 fmtconvert: int32_t input to int32_to_float_fmul_scalar
It was previously declared as int.
Does not change fate results for x86.

Conflicts:

	libavcodec/ppc/fmtconvert_altivec.c

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-18 18:01:16 +02:00
Michael Niedermayer
0beff42823 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  id3v2: K&R formatting cosmetics
  ppc: Only compile AltiVec FFT assembly when AltiVec is enabled

Conflicts:
	libavformat/id3v2.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-02 12:49:23 +02:00
Diego Biurrun
a650c906cb ppc: Only compile AltiVec FFT assembly when AltiVec is enabled 2013-05-02 10:25:30 +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
Michael Niedermayer
cae8f469fe Merge commit '38282149b6ce8f4b8361e3b84542ba9aa8a1f32f'
* commit '38282149b6ce8f4b8361e3b84542ba9aa8a1f32f':
  ppc: More consistent arch initialization

Conflicts:
	libavcodec/fft.h
	libavcodec/mpegaudiodsp.c
	libavcodec/mpegaudiodsp.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-01 18:08:13 +02:00
Michael Niedermayer
ebd99ff112 Merge commit '42b9150b0d4f0a130c1d93dc991fd5412743a8cf'
* commit '42b9150b0d4f0a130c1d93dc991fd5412743a8cf':
  fft: Remove pointless #ifdefs around function declarations
  ppc: Move AltiVec utility headers out of AltiVec ifdefs

Conflicts:
	libavcodec/fft.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-01 18:02:36 +02:00
Michael Niedermayer
3ad5d8694c Merge commit '6b110d3a739c31602b59887ad65c67025df3f49d'
* commit '6b110d3a739c31602b59887ad65c67025df3f49d':
  ppc: More consistent names for H.264 optimizations files
  mpegaudiosp: More consistent names for ppc/x86 optimization files

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-01 17:53:33 +02:00
Diego Biurrun
7f75f2f2bd ppc: Drop unnecessary ff_ name prefixes from static functions 2013-04-30 16:10:06 +02:00
Diego Biurrun
38282149b6 ppc: More consistent arch initialization 2013-04-30 12:19:45 +02:00
Diego Biurrun
a053dbfcfb ppc: Move AltiVec utility headers out of AltiVec ifdefs
Now that the headers themselves have ifdef protection this is no
longer necessary and more consistent with normal include handling.
2013-04-30 12:19:44 +02:00
Diego Biurrun
6b110d3a73 ppc: More consistent names for H.264 optimizations files 2013-04-30 12:19:43 +02:00
Diego Biurrun
643e433bf7 mpegaudiosp: More consistent names for ppc/x86 optimization files 2013-04-30 12:19:43 +02:00
Michael Niedermayer
2d23493020 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  ppc: hpeldsp: Include attributes.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-21 09:54:02 +02:00
Martin Storsjö
6d0fbebf94 ppc: hpeldsp: Include attributes.h
This fixes building in configurations where altivec is disabled.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-04-20 16:43:01 +03:00
Michael Niedermayer
055e5c8e01 Merge commit '47e5a98174eb9c07ad17be71df129719d60ec8b7'
* commit '47e5a98174eb9c07ad17be71df129719d60ec8b7':
  ppc: hpeldsp: Move half-pel assembly from dsputil to hpeldsp

Conflicts:
	libavcodec/hpeldsp.h
	libavcodec/ppc/hpeldsp_altivec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-20 13:52:58 +02:00
Ronald S. Bultje
47e5a98174 ppc: hpeldsp: Move half-pel assembly from dsputil to hpeldsp
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-04-19 23:18:59 +03:00
Ronald S. Bultje
015821229f vp3: Use full transpose for all IDCTs
This way, the special IDCT permutations are no longer needed. This
is similar to how H264 does it, and removes the dsputil dependency
imposed by the scantable code.

Also remove the unused type == 0 cases from the plain C version
of the idct.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-04-15 12:32:05 +03:00
Ronald S. Bultje
62844c3fd6 h264: Integrate clear_blocks calls with IDCT
The non-intra-pcm branch in hl_decode_mb (simple, 8bpp) goes from 700
to 672 cycles, and the complete loop of decode_mb_cabac and hl_decode_mb
(in the decode_slice loop) goes from 1759 to 1733 cycles on the clip
tested (cathedral), i.e. almost 30 cycles per mb faster.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-04-10 11:03:06 +03:00
Hendrik Leppkes
9ae6ba2883 dsputil: remove deprecated dsp_mask usage
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-13 15:59:35 +01: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
Ronald S. Bultje
89f16ded9b Move ppc half-pel assembly from dsputil to hpeldsp. 2013-03-13 04:02:30 +01:00
Ronald S. Bultje
d85c9b036e vp3/x86: use full transpose for all IDCTs.
This way, the special IDCT permutations are no longer needed. Bfin code
is disabled until someone updates it. This is similar to how H264 does
it, and removes the dsputil dependency imposed by the scantable code.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-12 22:54:10 +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
Ronald S. Bultje
1acd7d594c h264: integrate clear_blocks calls with IDCT.
The non-intra-pcm branch in hl_decode_mb (simple, 8bpp) goes from 700
to 672 cycles, and the complete loop of decode_mb_cabac and hl_decode_mb
(in the decode_slice loop) goes from 1759 to 1733 cycles on the clip
tested (cathedral), i.e. almost 30 cycles per mb faster.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-02-19 16:25:50 +01:00
Michael Niedermayer
6b2e65078c Merge commit '218aefce4472dc02ee3f12830a9a894bf7916da9'
* commit '218aefce4472dc02ee3f12830a9a894bf7916da9':
  dsputil: Move LOCAL_ALIGNED macros to libavutil

Conflicts:
	libavcodec/dvdec.c
	libavcodec/imc.c
	libavcodec/mpegvideo_motion.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-02-09 14:33:57 +01:00
Diego Biurrun
218aefce44 dsputil: Move LOCAL_ALIGNED macros to libavutil 2013-02-08 23:13:37 +01:00