1
mirror of https://git.videolan.org/git/ffmpeg.git synced 2024-09-15 03:23:32 +02:00
Commit Graph

1858 Commits

Author SHA1 Message Date
Pierre Edouard Lepere
1a880b2fb8 hevc: SSE2 and SSSE3 loop filters
Additional contributions by James Almer <jamrial@gmail.com>,
Carl Eugen Hoyos <cehoyos@ag.or.at>, Fiona Glaser <fiona@x264.com> and
Anton Khirnov <anton@khirnov.net>

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-07-26 15:01:01 +00:00
Christophe Gisquet
036f11bdb5 x86: hevc_mc: replace simple leas by adds
lea is detrimental for those simple cases. No impact overall to
the change though.

Before:
15017 decicycles in q, 1016152 runs, 32424 skips
15382 decicycles in q_bi, 1013673 runs, 34903 skips
3713 decicycles in e, 2074534 runs, 22618 skips
3901 decicycles in e_bi, 2065509 runs, 31643 skips
7852 decicycles in q_uni, 520165 runs, 4123 skips
2398 decicycles in e_uni, 1043339 runs, 5237 skips

After:
14898 decicycles in q, 1016295 runs, 32281 skips
15119 decicycles in q_bi, 1015392 runs, 33184 skips
3682 decicycles in e, 2073224 runs, 23928 skips
3720 decicycles in e_bi, 2065043 runs, 32109 skips
7643 decicycles in q_uni, 520280 runs, 4008 skips
2363 decicycles in e_uni, 1043780 runs, 4796 skips

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-26 05:41:04 +02:00
Mickaël Raulet
bd0f2d316f x86/hevc: add 12bits support for MC
cherry picked from commit 3fcb7a4595a6f40100a22110a5805e3b7510c0fd

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-26 01:55:20 +02:00
Mickaël Raulet
7df98d8c4d x86/hevc: remove unused constant in deblocking filter
cherry picked from commit a3f7282eaa6f1ab0524fb966c6eade50c3025f99

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-26 01:20:40 +02:00
Mickaël Raulet
7bdcf5c934 x86/hevc: add 12bits support for deblocking filter
cherry picked from commit 97d46afe320c7d61d7b9525e5f5588355cde4bb0

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-26 01:19:42 +02: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
Christophe Gisquet
670b7f203a x86: hevcdsp: align
Reviewed-by: Mickaël Raulet <mraulet@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-23 22:18:08 +02:00
Carl Eugen Hoyos
c75fdee747 avcodec/x86/hevc_deblock: Fix compilation with nasm. 2014-07-23 10:32:27 +02:00
Michael Niedermayer
ca6b33b8bd avcodec/x86/hevcdsp_init: Fix "warning: assignment from incompatible pointer type" 2014-07-22 16:36:12 +02:00
Anton Khirnov
d7e162d46b hevcdsp: remove an unneeded variable in the loop filter
beta0 and beta1 will always be the same within a CU

Signed-off-by: Mickaël Raulet <mraulet@insa-rennes.fr>

cherry picked from commit 4a23d824741a289c7d2d2f2871d1e2621b63fa1b
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-22 16:27:26 +02:00
Anton Khirnov
ae2f048fd7 avcodec/x86/hevc_deblock: cosmetics
cherry picked from commit f7843356253459e6010320292dbbc1e888a5249b
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-22 16:18:05 +02:00
Anton Khirnov
b435043abb hevc: cleanups in SSE2 and SSSE3 loop filters, use fewer instructions
cherry picked from commit f7843356253459e6010320292dbbc1e888a5249b
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-22 16:17:29 +02:00
Anton Khirnov
e8581b17a8 avcodec/x86/hevc_deblock: use test instead of cmp 0
cherry picked from commit f7843356253459e6010320292dbbc1e888a5249b
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-22 16:16:05 +02:00
Anton Khirnov
dc69247de4 avcodec/x86/hevc_deblock: use of paddw instead of psllw
cherry picked from commit f7843356253459e6010320292dbbc1e888a5249b
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-22 16:14:53 +02:00
Anton Khirnov
500a0394d5 avcodec/x86/hevc_deblock: add %ifs to avoid "do nothing instructions"
cherry picked from commit f7843356253459e6010320292dbbc1e888a5249b
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-22 16:13:28 +02:00
Anton Khirnov
7a4cf67117 hevc: cleaning up SSE2 and SSSE3 deblocking filters
Signed-off-by: Mickaël Raulet <mraulet@insa-rennes.fr>

cherry picked from commit b432041d7d1eca38831590f13b4e5baffff8186f
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-22 16:00:48 +02:00
Michael Niedermayer
d986c414de Merge commit '81b9bf319226fe03436c80aaa8a2c91767cab7ce'
* commit '81b9bf319226fe03436c80aaa8a2c91767cab7ce':
  dct-test: Move arch-specific bits into arch-specific subdirectories

Conflicts:
	libavcodec/dct-test.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-21 13:33:51 +02:00
Diego Biurrun
81b9bf3192 dct-test: Move arch-specific bits into arch-specific subdirectories 2014-07-21 01:10:11 -07:00
Michael Niedermayer
776647360d Merge commit '5dcc201505f71b1e73e9eef12ce89d4eed252ad0'
* commit '5dcc201505f71b1e73e9eef12ce89d4eed252ad0':
  simple_idct: Move x86-specific declarations to a header in the x86 directory

Conflicts:
	libavcodec/x86/simple_idct.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-19 13:56:29 +02:00
Michael Niedermayer
6da96a9fc9 Merge commit '85cabb8d002f2cd100ced5cc17d87bfc9460d314'
* commit '85cabb8d002f2cd100ced5cc17d87bfc9460d314':
  fdct: Move x86-specific declarations to a header in the x86 directory

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-19 13:45:59 +02:00
Diego Biurrun
5dcc201505 simple_idct: Move x86-specific declarations to a header in the x86 directory 2014-07-19 02:33:36 -07:00
Diego Biurrun
85cabb8d00 fdct: Move x86-specific declarations to a header in the x86 directory 2014-07-19 02:25:59 -07:00
Michael Niedermayer
097bf834ba Merge commit '9e0b29911f1f167381a7dbdfca68bf417b8c767b'
* commit '9e0b29911f1f167381a7dbdfca68bf417b8c767b':
  x86: dnxhdenc: Eliminate some unnecessary ifdefs

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-18 22:33:24 +02:00
Michael Niedermayer
521f569734 Merge commit '8b0dd4942aac320d1ca3c40fa7ea1be342c71273'
* commit '8b0dd4942aac320d1ca3c40fa7ea1be342c71273':
  idctdsp: prettyprinting cosmetics

Conflicts:
	libavcodec/idctdsp.c
	libavcodec/ppc/idctdsp.c
	libavcodec/x86/idctdsp_init.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-18 22:16:04 +02: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
9e0b29911f x86: dnxhdenc: Eliminate some unnecessary ifdefs 2014-07-18 09:58:17 -07:00
Diego Biurrun
8b0dd4942a idctdsp: prettyprinting cosmetics 2014-07-18 07:51:03 -07: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
3a2d1465c8 Merge commit '2d60444331fca1910510038dd3817bea885c2367'
* commit '2d60444331fca1910510038dd3817bea885c2367':
  dsputil: Split motion estimation compare bits off into their own context

Conflicts:
	configure
	libavcodec/Makefile
	libavcodec/arm/Makefile
	libavcodec/dvenc.c
	libavcodec/error_resilience.c
	libavcodec/h264.h
	libavcodec/h264_slice.c
	libavcodec/me_cmp.c
	libavcodec/me_cmp.h
	libavcodec/motion_est.c
	libavcodec/motion_est_template.c
	libavcodec/mpeg4videoenc.c
	libavcodec/mpegvideo.c
	libavcodec/mpegvideo_enc.c
	libavcodec/x86/Makefile
	libavcodec/x86/me_cmp_init.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-17 23:27:40 +02:00
Michael Niedermayer
d6676a1605 Merge commit 'c23ce454b3e33634a188d6facfd2b7182af5af93'
* commit 'c23ce454b3e33634a188d6facfd2b7182af5af93':
  x86: dsputil: Coalesce all init files

Conflicts:
	libavcodec/x86/dsputil_init.c
	libavcodec/x86/dsputil_x86.h
	libavcodec/x86/motion_est.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-17 22:07:52 +02:00
Diego Biurrun
2d60444331 dsputil: Split motion estimation compare bits off into their own context 2014-07-17 09:07:10 -07:00
Diego Biurrun
c23ce454b3 x86: dsputil: Coalesce all init files
This makes the init files match the structure of the dsputil split.
2014-07-17 03:32:56 -07:00
Michael Niedermayer
cc3e7a4c3d Merge commit 'acf91215c74a91eb3b86af01dcb1d3c78d0e2310'
* commit 'acf91215c74a91eb3b86af01dcb1d3c78d0e2310':
  x86: dsputil: Avoid pointless CONFIG_ENCODERS indirection

Conflicts:
	libavcodec/x86/dsputil_init.c
	libavcodec/x86/dsputilenc_mmx.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-13 21:51:20 +02:00
Diego Biurrun
acf91215c7 x86: dsputil: Avoid pointless CONFIG_ENCODERS indirection
The remaining dsputil bits are encoding-specific anyway.
2014-07-13 07:01:05 -07:00
James Almer
276bef5340 x86/hevc_deblock: add ff_hevc_[hv]_loop_filter_luma_{8, 10}_sse2
Signed-off-by: James Almer <jamrial@gmail.com>
Reviewed-by: Kieran Kunhya <kierank@obe.tv>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-13 13:48:31 +02:00
James Almer
123649dd19 x86/dsputilenc: remove some empty if statements
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-12 15:04:58 +02:00
Michael Niedermayer
b8cdf04726 Merge commit '1173320249745eab01c901a39054fc0fced33c87'
* commit '1173320249745eab01c901a39054fc0fced33c87':
  dsputil: Drop unused bit_depth parameter from all init functions

Conflicts:
	libavcodec/dsputil.c
	libavcodec/dsputil.h
	libavcodec/ppc/dsputil_ppc.c
	libavcodec/x86/dsputilenc_mmx.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-11 20:29:40 +02:00
Diego Biurrun
1173320249 dsputil: Drop unused bit_depth parameter from all init functions 2014-07-11 06:38:26 -07:00
Michael Niedermayer
2d5e9451de Merge commit 'f46bb608d9d76c543e4929dc8cffe36b84bd789e'
* commit 'f46bb608d9d76c543e4929dc8cffe36b84bd789e':
  dsputil: Split off pixel block routines into their own context

Conflicts:
	configure
	libavcodec/dsputil.c
	libavcodec/mpegvideo_enc.c
	libavcodec/pixblockdsp_template.c
	libavcodec/x86/dsputilenc.asm
	libavcodec/x86/dsputilenc_mmx.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-10 01:22:14 +02:00
Diego Biurrun
f46bb608d9 dsputil: Split off pixel block routines into their own context 2014-07-09 08:05:26 -07:00
Michael Niedermayer
14e2406de7 Merge commit 'a9aee08d900f686e966c64afec5d88a7d9d130a3'
* commit 'a9aee08d900f686e966c64afec5d88a7d9d130a3':
  dsputil: Split off FDCT bits into their own context

Conflicts:
	configure
	libavcodec/Makefile
	libavcodec/asvenc.c
	libavcodec/dnxhdenc.c
	libavcodec/dsputil.c
	libavcodec/mpegvideo.h
	libavcodec/mpegvideo_enc.c
	libavcodec/x86/Makefile
	libavcodec/x86/dsputilenc_mmx.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-08 03:19:06 +02:00
Diego Biurrun
a9aee08d90 dsputil: Split off FDCT bits into their own context 2014-07-07 12:28:45 -07:00
Michael Niedermayer
3790801f9c Merge commit '3c650efb81aaa3b395ba4606ee68a47ee4efb57b'
* commit '3c650efb81aaa3b395ba4606ee68a47ee4efb57b':
  dsputil: Move draw_edges() to mpegvideoencdsp

Conflicts:
	libavcodec/mpegvideo_enc.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-07 16:17:27 +02:00
Michael Niedermayer
020865f557 Merge commit 'c166148409fe8f0dbccef2fe684286a40ba1e37d'
* commit 'c166148409fe8f0dbccef2fe684286a40ba1e37d':
  dsputil: Move pix_sum, pix_norm1, shrink function pointers to mpegvideoenc

Conflicts:
	libavcodec/dsputil.c
	libavcodec/mpegvideo_enc.c
	libavcodec/x86/dsputilenc.asm
	libavcodec/x86/dsputilenc_mmx.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-07 15:36:58 +02:00
Michael Niedermayer
462c6cdb8e Merge commit '8d686ca59db14900ad5c12b547fb8a7afc8b0b94'
* commit '8d686ca59db14900ad5c12b547fb8a7afc8b0b94':
  dsputil: Split off *_8x8basis to a separate context

Conflicts:
	libavcodec/dsputil.c
	libavcodec/mpegvideo_enc.c
	libavcodec/x86/dsputilenc_mmx.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-07 15:08:55 +02:00
Diego Biurrun
3c650efb81 dsputil: Move draw_edges() to mpegvideoencdsp 2014-07-06 14:48:50 -07:00
Diego Biurrun
c166148409 dsputil: Move pix_sum, pix_norm1, shrink function pointers to mpegvideoenc 2014-07-06 14:26:53 -07:00
Diego Biurrun
8d686ca59d dsputil: Split off *_8x8basis to a separate context 2014-07-06 13:09:24 -07:00
James Almer
195f7bd23d x86/svq1enc: use unaligned mov on SSE2
Might fix fate failures on some systems

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-06 20:27:57 +02:00
James Almer
dad31083ae x86/svq1enc: port ssd_int8_vs_int16 to yasm
Also add an SSE2 version

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-05 21:43:40 +02:00
Michael Niedermayer
19b79c1429 Merge commit 'b0de1c766329dd8c9960ad1722e2f653160abc1b'
* commit 'b0de1c766329dd8c9960ad1722e2f653160abc1b':
  x86: build: Only compile FDCT code if MMX is enabled

Conflicts:
	libavcodec/x86/Makefile

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-05 20:12:31 +02:00
Michael Niedermayer
5036c8b17b Merge commit '12f129e545e5a5844b6ad7f3eb6a438015cad8bc'
* commit '12f129e545e5a5844b6ad7f3eb6a438015cad8bc':
  x86: Unconditionally compile blockdsp and svq1enc init files

Conflicts:
	libavcodec/x86/Makefile

blockdsp_mmx is renamed to blockdsp_init as we already have a blockdsp file
and _init is how all other such files are called

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-05 19:50:05 +02:00
Michael Niedermayer
6bef3e55bd Merge commit '009331303a6462d07cbe94aef9c446f1a1695519'
* commit '009331303a6462d07cbe94aef9c446f1a1695519':
  x86: huffyuvdsp: Move inline assembly to init file

Conflicts:
	libavcodec/x86/Makefile
	libavcodec/x86/huffyuvdsp.h
	libavcodec/x86/huffyuvdsp_init.c
	libavcodec/x86/huffyuvdsp_mmx.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-05 19:11:26 +02:00
Diego Biurrun
b0de1c7663 x86: build: Only compile FDCT code if MMX is enabled
All other files containing purely inline assembly are treated the same way.
2014-07-05 04:18:34 -07:00
Diego Biurrun
12f129e545 x86: Unconditionally compile blockdsp and svq1enc init files
This avoids a link failure with MMX disabled as the init functions
are referenced unconditionally.
2014-07-05 04:18:34 -07:00
Diego Biurrun
009331303a x86: huffyuvdsp: Move inline assembly to init file
This avoids a link failure with MMX disabled as now code and
initialization are compiled under the same condition.
2014-07-05 04:18:34 -07:00
Michael Niedermayer
5c65aed7fd Merge commit '391ecc961ced2bde7aecb3053ac35191f838fae8'
* commit '391ecc961ced2bde7aecb3053ac35191f838fae8':
  x86: mpegvideoenc: Change SIMD optimization name suffixes to lowercase

Conflicts:
	libavcodec/x86/mpegvideoenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-04 01:17:39 +02:00
Diego Biurrun
391ecc961c x86: mpegvideoenc: Change SIMD optimization name suffixes to lowercase 2014-07-03 13:41:41 -07:00
James Almer
a441a2437b x86: rename dsputil.asm to idctdsp.asm
Its only function is no longer part of dsputil.

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-02 01:08:04 +02:00
Michael Niedermayer
8d0c7031a8 Merge commit '79793f833784121d574454af4871866576c0749d'
* commit '79793f833784121d574454af4871866576c0749d':
  Update Fiona's name in copyright statements.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-01 15:43:40 +02: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
79793f8337 Update Fiona's name in copyright statements. 2014-07-01 03:26:51 -07:00
Diego Biurrun
e3fcb14347 dsputil: Split off IDCT bits into their own context 2014-06-30 07:58:46 -07:00
Michael Niedermayer
5bca5f87d1 Revert "x86/videodsp: add emulated_edge_mc_mmxext"
The commit causes minor out of array reads and was mainly intended for
future optimizations which turned out not to be meassurably faster.
Itself it was just 1 cpu cycle faster

Approved-by: jamrial

This reverts commit 057d2704e7.
2014-06-28 05:39:07 +02:00
Michael Niedermayer
09a7a4704e Merge commit 'd2869aea0494d3a20d53d5034cd41dbb488eb133'
* commit 'd2869aea0494d3a20d53d5034cd41dbb488eb133':
  dsputil: Move MMX/SSE2-optimized IDCT bits to the x86 subdirectory

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-27 03:05:33 +02:00
Diego Biurrun
d2869aea04 dsputil: Move MMX/SSE2-optimized IDCT bits to the x86 subdirectory 2014-06-26 16:15:07 -07:00
James Almer
057d2704e7 x86/videodsp: add emulated_edge_mc_mmxext
This also changes hfix8_mmx and above to use mmx regs instead of
gprs, and makes emulated_edge_mc_sse and emulated_edge_mc_sse2 use
mmxext hfix and hvar functions instead of mmx where possible.

This is mostly in preparation for an ssse3 version.

Signed-off-by: James Almer <jamrial@gmail.com>

code is about 1 cpu cycle faster approximately

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-26 17:58:57 +02:00
Michael Niedermayer
11ba0c8207 Merge commit '5ab03e41e553452118113d0c224fa32b325e45e5'
* commit '5ab03e41e553452118113d0c224fa32b325e45e5':
  x86: h264dsp: Fix link failure with optimizations disabled

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-26 02:58:59 +02:00
Diego Biurrun
5ab03e41e5 x86: h264dsp: Fix link failure with optimizations disabled
With optimzations disabled compilers have trouble doing dead code
elimination on 'if (foo && 0)' expressions, while 'if (0 && foo)'
still works, so use the latter to avoid problems.

Bug-Id: 707
2014-06-25 15:24:51 -07:00
Michael Niedermayer
1ace0ca60f avcodec/x86/hevc_idct: fix function name in comment
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-25 18:22:25 +02:00
plepere
9ba6b17add avcodec/x86/hevc_idct: fix number of sse registers
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-25 14:59:23 +02:00
plepere
942e22c651 avcodec/x86/hevc: add avx2 dc idct
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-25 14:49:44 +02:00
Michael Niedermayer
eab2509f8c avcodec/x86/h264_qpel_10bit: locally define pb_0
somehow old llvm-gcc manages to ignore the alignment from ff_pb_0 causing a crash on freebsd

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-24 02:13:43 +02:00
James Almer
476bd3c7e4 x86/dsputil: move put_signed_pixels_clamped out of bswapdsp.asm
It's still a dsputil function

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-23 22:11:18 +02:00
Michael Niedermayer
d7463c6813 Merge commit 'fab9df63a3156ffe1f9490aafaea41e03ef60ddf'
* commit 'fab9df63a3156ffe1f9490aafaea41e03ef60ddf':
  dsputil: Split off global motion compensation bits into a separate context

Conflicts:
	libavcodec/dsputil.c
	libavcodec/dsputil.h
	libavcodec/ppc/dsputil_altivec.h
	libavcodec/x86/dsputil_init.c
	libavcodec/x86/dsputil_mmx.c
	libavcodec/x86/dsputil_x86.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-23 21:10:10 +02:00
Diego Biurrun
fab9df63a3 dsputil: Split off global motion compensation bits into a separate context 2014-06-23 09:58:17 -07:00
Michael Niedermayer
35bb74900b Merge commit 'c67b449bebbe0b35c73b203683e77a0a649bc765'
* commit 'c67b449bebbe0b35c73b203683e77a0a649bc765':
  dsputil: Split bswap*_buf() off into a separate context

Conflicts:
	configure
	libavcodec/4xm.c
	libavcodec/ac3dec.c
	libavcodec/ac3dec.h
	libavcodec/apedec.c
	libavcodec/eamad.c
	libavcodec/flacenc.c
	libavcodec/fraps.c
	libavcodec/huffyuv.c
	libavcodec/huffyuvdec.c
	libavcodec/motionpixels.c
	libavcodec/truemotion2.c
	libavcodec/x86/Makefile
	libavcodec/x86/dsputil_init.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-23 13:31:26 +02:00
Diego Biurrun
c67b449beb dsputil: Split bswap*_buf() off into a separate context 2014-06-22 18:22:31 -07:00
James Almer
c172683bf4 x86/dsputil: remove redundant global motion compensation code
The SSE version has been no different than the mmx one since commit a41bf09d

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-23 02:15:06 +02:00
James Almer
6ec3dc97fc x86/audiodsp: move asm code out of dsputil
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-22 19:53:09 +02:00
Michael Niedermayer
99497b4683 Merge commit '9a9e2f1c8aa4539a261625145e5c1f46a8106ac2'
* commit '9a9e2f1c8aa4539a261625145e5c1f46a8106ac2':
  dsputil: Split audio operations off into a separate context

Conflicts:
	configure
	libavcodec/takdec.c
	libavcodec/x86/Makefile
	libavcodec/x86/dsputil.asm
	libavcodec/x86/dsputil_init.c
	libavcodec/x86/dsputil_mmx.c
	libavcodec/x86/dsputil_x86.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-22 17:58:28 +02:00
Diego Biurrun
9a9e2f1c8a dsputil: Split audio operations off into a separate context 2014-06-22 06:20:15 -07:00
Michael Niedermayer
33f83a2157 avcodec/x86/rv40dsp_init: fix () in macros
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-20 21:36:43 +02:00
James Almer
a5ce608fc7 x86/blockdsp: restore author attribution
See commits
649c00c96d
5fecfb7d58
73b02e2460

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-19 18:31:44 +02:00
Michael Niedermayer
08c5859f17 avcodec: add simpleauto idct
This will pick the "best" simple idct compatible idct

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-19 14:28:01 +02:00
James Almer
454c019cb5 x86/hevc_idct: fix movd parameter size in DC_ADD_INIT
Fixes compilation with NASM x86_64

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-19 13:18:13 +02:00
James Almer
fe782233aa x86/blockdsp: move asm code out of dsputil
Also replace INLINE_<opt> with EXTERNAL_<opt> that were wrongly
changed by commit 2b05db4f81

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-19 13:09:03 +02:00
Michael Niedermayer
042a82ca37 avcodec/x86/lossless_videodsp: Fix size of values read for left/left_top
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-19 05:53:41 +02:00
Michael Niedermayer
2b05db4f81 Merge commit 'e74433a8e6fc00c8dbde293c97a3e45384c2c1d9'
* commit 'e74433a8e6fc00c8dbde293c97a3e45384c2c1d9':
  dsputil: Split clear_block*/fill_block* off into a separate context

Conflicts:
	configure
	libavcodec/asvdec.c
	libavcodec/dnxhddec.c
	libavcodec/dnxhdenc.c
	libavcodec/dsputil.h
	libavcodec/eamad.c
	libavcodec/intrax8.c
	libavcodec/mjpegdec.c
	libavcodec/ppc/dsputil_ppc.c
	libavcodec/vc1dec.c
	libavcodec/x86/dsputil_init.c
	libavcodec/x86/dsputil_mmx.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-19 04:54:38 +02:00
Diego Biurrun
e74433a8e6 dsputil: Split clear_block*/fill_block* off into a separate context 2014-06-18 14:07:23 -07:00
plepere
92cccb7bcd avcodec/hevc: new idct + asm
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-17 13:23:36 +02:00
Christophe Gisquet
9107612818 x86util: add and use RSHIFT/LSHIFT macros
Those macros take a byte number as shift argument, as this argument
differs between MMX and SSE2 instructions.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-15 13:19:27 +02:00
Ronald S. Bultje
385a3420d1 vp9/x86: fix overwrite in ipred_vl_4x4_ssse3.
Fixes track ticket 3717.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-12 04:11:20 +02:00
Christophe Gisquet
508e7a5c16 x86: huffyuv: fix {add,diff}_int16
They used an extra, undeclared register. Fixes a crash in
fate-vsynth3-ffvhuff444p16

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-12 00:26:19 +02:00
Michael Niedermayer
1a2ff62859 Merge commit '570d4b21863b6254d6bbca9c528bede471bb4478'
* commit '570d4b21863b6254d6bbca9c528bede471bb4478':
  x86: h264: Don't keep data in the redzone across function calls on 64 bit unix

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-10 18:35:49 +02:00
Martin Storsjö
570d4b2186 x86: h264: Don't keep data in the redzone across function calls on 64 bit unix
We know that the called function (ff_chroma_inter_body_mmxext)
doesn't touch the redzone, and thus will be kept intact - thus,
this doesn't fix any bug per se.

However, valgrind's memcheck tool intentionally assumes that the
redzone is clobbered on every function call and function return
(see a long comment in valgrind/memcheck/mc_main.c). This avoids
false positives in that tool, at the cost of an extra stack pointer
adjustment.

The other alternative would be a valgrind suppression for this issue,
but that's an extra burden for everybody that wants to run libavcodec
within valgrind.

Signed-off-by: Martin Storsjö <martin@martin.st>
2014-06-10 16:31:48 +03:00
Michael Niedermayer
06f576c4ab avcodec/x86/dct_init: fix build failure with clang && disable-optimizations
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-09 19:32:41 +02:00
James Almer
6d408495b5 x86/dct32: don't build ff_dct32_float_sse on x86_64
There's an SSE2 version already, and technically the SSE version
on x86_64 was wrong (using pshufd and pshuflw, SSE2 instructions).

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-09 00:51:43 +02:00
James Almer
fc8db12a73 x86/vp9: inital AVX2 intra_pred
tos3k-vp9-b10000.webm on a Core i5-4200U @1.6GHz

1219 decicycles in ff_vp9_ipred_dc_32x32_ssse3, 131070 runs, 2 skips
439 decicycles in ff_vp9_ipred_dc_32x32_avx2, 131070 runs, 2 skips

3570 decicycles in ff_vp9_ipred_dc_top_32x32_ssse3, 4096 runs, 0 skips
2494 decicycles in ff_vp9_ipred_dc_top_32x32_avx2, 4096 runs, 0 skips

1419 decicycles in ff_vp9_ipred_dc_left_32x32_ssse3, 16384 runs, 0 skips
717 decicycles in ff_vp9_ipred_dc_left_32x32_avx2, 16384 runs, 0 skips

2737 decicycles in ff_vp9_ipred_tm_32x32_avx, 1024 runs, 0 skips
2088 decicycles in ff_vp9_ipred_tm_32x32_avx2, 1024 runs, 0 skips

3090 decicycles in ff_vp9_ipred_v_32x32_avx, 512 runs, 0 skips
2226 decicycles in ff_vp9_ipred_v_32x32_avx2, 512 runs, 0 skips

1565 decicycles in ff_vp9_ipred_h_32x32_avx, 1024 runs, 0 skips
922 decicycles in ff_vp9_ipred_h_32x32_avx2, 1024 runs, 0 skips

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-08 02:37:20 +02:00
James Almer
ec98f80af4 x86/dsputil: move some mmx init code inside dsputil_init_mmx()
This reduces differences with the fork

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-06 05:26:04 +02:00
Christophe Gisquet
ccff45a0d3 apedsp: move to llauddsp
APE is not the sole codec using scalarproduct_and_madd_int16.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-05 20:31:59 +02:00
Michael Niedermayer
d5c9d055ea avcodec/x86/dsputilenc_mmx: fix build without yasm
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-04 05:39:03 +02:00
James Almer
625ffa1457 x86/motion_est: sad_{x, y}2_mmxext functions are bitexact
Only the xy2 functions aren't.

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-04 00:48:35 +02:00
Timothy Gu
108dec3055 x86: dsputilenc: convert hf_noise*_mmx to yasm
Signed-off-by: Timothy Gu <timothygu99@gmail.com>
Several bugfixes by: Christophe Gisquet <christophe.gisquet@gmail.com>
See: [FFmpeg-devel] [WIP] [PATCH 4/4] x86: dsputilenc: convert hf_noise*_mmx to yasm
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-03 23:59:43 +02:00
Christophe Gisquet
dcd2a6ca36 x86: hevc_mc: remove unneeded shift
The immediate value may be 0.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-01 23:34:33 +02:00
Christophe Gisquet
09fc28aed1 x86: hevcdsp_init: fix macro usage
The macro was not using the parameter but unconditionally using sse4.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-01 23:20:07 +02:00
James Almer
e1bd40fe6b x86/motion_est: enable sad16_sse2 on k10 CPUs
The check is meant for k8 CPUs. sad16_sse2 is ~20% faster than sad16_mmxext on k10.

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-01 02:10:32 +02:00
James Almer
f128342df2 build: fix compilation of svq1enc_mmx.c with --disable-mmx
It's needed for ff_svq1enc_init_x86() even if simd functions are disabled.

Alternatively, svq1enc_init.c could be made and the relevant code moved there.

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-31 00:38:24 +02:00
James Almer
4ac41a52e2 x86/huffyuvdsp: fix some prototypes
Remove duplicate prototypes and fix int -> intptr_t in another

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-31 00:29:00 +02:00
Christophe Gisquet
d136fe6fd7 x86: huffyuvdsp: fewer functions for x86_64
When there are 2 functions that are <= SSE2, only one is needed for x86_64.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-30 21:39:06 +02:00
Timothy Gu
154cee9292 x86: dsputilenc: convert ff_sse{8, 16}_mmx() to yasm
Signed-off-by: Timothy Gu <timothygu99@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-30 16:57:52 +02:00
Timothy Gu
0b6292b7b8 x86: dsputilenc: move all the function prototypes together
Signed-off-by: Timothy Gu <timothygu99@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-30 16:18:10 +02:00
Christophe Gisquet
f743fa9c7f x86: huffyuvdsp: add_hfyu_left_pred_bgr32
C   MMX   SSE2
Cycles: 3092  1053  578

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-30 15:20:36 +02:00
Michael Niedermayer
7be79c76d3 avcodec/huffyuvdsp: Change w to intptr in add_hfyu_median_pred() and add_hfyu_left_pred()
This avoids potential issues with the high 32bits being random in x86-64 asm

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-30 15:12:58 +02:00
Christophe Gisquet
884078d2df x86: huffyuvdsp: add SSE2 median prediction
From 5010c to 4566 on lagarith YUY2.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-30 14:57:57 +02:00
Michael Niedermayer
8c891d90ca avcodec/x86/qpeldsp_init: Restore author attribution
See: 368f50359e
See: 44eb495128, and many others
See:
similarity index 83%
copy from libavcodec/x86/dsputil_init.c
copy to libavcodec/x86/qpeldsp_init.c
index ebbf97f..8f296a1 100644
--- a/libavcodec/x86/dsputil_init.c
+++ b/libavcodec/x86/qpeldsp_init.c
@@ -1,6 +1,5 @@
 /*
- * Copyright (c) 2000, 2001 Fabrice Bellard
- * Copyright (c) 2002-2004 Michael Niedermayer <michaelni@gmx.at>
+ * quarterpel DSP functions
  *
  * This file is part of FFmpeg.
  *

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-30 04:05:29 +02:00
Michael Niedermayer
98a6806fdd Merge commit '368f50359eb328b0b9d67451f56fda20b3255f9a'
* commit '368f50359eb328b0b9d67451f56fda20b3255f9a':
  dsputil: Split off quarterpel bits into their own context

Conflicts:
	configure
	libavcodec/dsputil.c
	libavcodec/h263dec.c
	libavcodec/mpegvideo.c
	libavcodec/mpegvideo_enc.c
	libavcodec/vc1dec.c
	libavcodec/vc1dsp.c
	libavcodec/x86/dsputil_init.c
	libavcodec/x86/qpeldsp.asm

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-30 02:43:34 +02:00
Michael Niedermayer
40f3a87c10 Merge commit '054013a0fc6f2b52c60cee3e051be8cc7f82cef3'
* commit '054013a0fc6f2b52c60cee3e051be8cc7f82cef3':
  dsputil: Move APE-specific bits into apedsp

Conflicts:
	libavcodec/arm/int_neon.S
	libavcodec/x86/dsputil.asm

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-30 00:59:15 +02:00
Michael Niedermayer
c814a6c778 avcodec/x86/svq1enc_mmx: Add author attribution
See: 5900637219
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-30 00:30:05 +02:00
Michael Niedermayer
ea0931fb96 Merge commit '65d5d5865845f057cc6530a8d0f34db952d9009c'
* commit '65d5d5865845f057cc6530a8d0f34db952d9009c':
  dsputil: Move SVQ1 encoding specific bits into svq1enc

Conflicts:
	libavcodec/x86/Makefile

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-30 00:01:45 +02:00
James Almer
02a3e327f1 x86/dsputilenc: add missing guards to ff_pix_sum16_xop
XOP support was added in Yasm 1.0.0 and Nasm 2.06, and we still
support older versions.

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-29 22:31:28 +02:00
Christophe Gisquet
99a319c4e7 x86: huffyuvdsp: port add_bytes to yasm
C   MMX  SSE2
Cycles: 2972  587  302

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-29 21:56:00 +02:00
Christophe Gisquet
2267003981 x86: hpeldsp: better factorization
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-29 21:47:40 +02:00
Michael Niedermayer
7b4c46050e rename add_hfyu_left_prediction_int16 to add_hfyu_left_pred_int16
This makes the naming more consistent with the 8bit variant

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-29 19:50:44 +02:00
Michael Niedermayer
550ae6c02f rename add_hfyu_median_prediction_int16 to add_hfyu_median_pred_int16
This makes the naming more consistent with the 8bit variant

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-29 19:49:29 +02:00
Michael Niedermayer
40a4ab8ba4 rename sub_hfyu_median_prediction_int16 to sub_hfyu_median_pred_int16
This makes the naming more consistent with the 8bit variant

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-29 19:48:23 +02:00
James Almer
05de4d3011 x86/dsputilenc: implement XOP version of pix_sum16
SSE2: 137 cycles
XOP:   87 cycles
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-29 18:40:23 +02:00
Diego Biurrun
368f50359e dsputil: Split off quarterpel bits into their own context 2014-05-29 06:48:31 -07:00
Diego Biurrun
054013a0fc dsputil: Move APE-specific bits into apedsp 2014-05-29 06:41:15 -07:00
Diego Biurrun
65d5d58658 dsputil: Move SVQ1 encoding specific bits into svq1enc 2014-05-29 06:41:15 -07:00
Michael Niedermayer
b50559fc0b libavcodec/x86/dsputilenc: drop and 0xffff that should have becomei redundant
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-29 00:16:52 +02:00
James Almer
561bfc85eb x86/dsputilenc: implement SSE2 versions of pix_{sum16, norm1}
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-28 23:29:34 +02:00
Christophe Gisquet
0810608e23 x86: hevc_mc: better register allocation
The xmm reg count was incorrect, and manual loading of the gprs
furthermore allows to noticeable reduce the number needed.

The modified functions are used in weighted prediction, so only a
few samples like WP_* exhibit a change. For this one and Win64
(some widths removed because of too few occurrences):

WP_A_Toshiba_3.bit, ff_hevc_put_hevc_uni_w
         16    32
before: 2194  3872
after:  2119  3767

WP_B_Toshiba_3.bit, ff_hevc_put_hevc_bi_w
         16    32    64
before: 2819  4960  9396
after:  2617  4788  9150

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-28 17:39:34 +02:00
Michael Niedermayer
48a6916308 Merge commit '512f3ffe9b4bb86767c2b1176554407c75fe1a5c'
* commit '512f3ffe9b4bb86767c2b1176554407c75fe1a5c':
  dsputil: Split off HuffYUV encoding bits into their own context

Conflicts:
	configure
	libavcodec/dsputil.c
	libavcodec/dsputil.h
	libavcodec/huffyuv.h
	libavcodec/huffyuvenc.c
	libavcodec/pngenc.c
	libavcodec/x86/dsputilenc_mmx.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-28 00:03:59 +02:00
Michael Niedermayer
e2abc0d5ca Merge commit '0d439fbede03854eac8a978cccf21a3425a3c82d'
* commit '0d439fbede03854eac8a978cccf21a3425a3c82d':
  dsputil: Split off HuffYUV decoding bits into their own context

Conflicts:
	configure
	libavcodec/dsputil.c
	libavcodec/dsputil.h
	libavcodec/huffyuv.h
	libavcodec/huffyuvdec.c
	libavcodec/lagarith.c
	libavcodec/vble.c
	libavcodec/x86/Makefile
	libavcodec/x86/dsputil.asm
	libavcodec/x86/dsputil_init.c
	libavcodec/x86/dsputil_mmx.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-27 23:16:06 +02:00
Diego Biurrun
512f3ffe9b dsputil: Split off HuffYUV encoding bits into their own context
Also shorten HuffYUV context member names to avoid clutter.
2014-05-27 08:54:53 -07:00
Diego Biurrun
0d439fbede dsputil: Split off HuffYUV decoding bits into their own context
Also shorten HuffYUV context member names to avoid clutter.
2014-05-27 08:52:34 -07:00
James Almer
5863207086 x86/dsputilenc: use HADDD in ff_sse16_sse2
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-27 15:12:50 +02:00
James Almer
e64e079ece x86/dsputilenc: implement SSE2 version of diff_pixels
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-27 05:55:11 +02:00
Michael Niedermayer
a0c5cd3475 avcodec/x86/dsputilenc: set the count of SSE registers correctly for get_pixels
Found-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-27 05:52:25 +02: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
Michael Niedermayer
a3950a90f6 Revert "x86: dsputilenc: convert ff_sse{8, 16}_mmx() to yasm"
This reverts commit ad733089b0.

breaks with --disable-yasm
revert requested by: Christophe Gisquet <christophe.gisquet@gmail.com>
2014-05-25 19:42:18 +02:00
Timothy Gu
ad733089b0 x86: dsputilenc: convert ff_sse{8, 16}_mmx() to yasm
Signed-off-by: Timothy Gu <timothygu99@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-25 16:30:08 +02:00
James Almer
d94e255dd1 x86/dsputilenc: make the SUM_ABS_DCTELEM macro more readable
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-25 02:03:54 +02:00
James Almer
61eea421b2 x86/dsputilenc: port sum_abs_dctelem functions to yasm
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-24 21:46:25 +02:00
Christophe Gisquet
81aa0f4604 x86: hpeldsp: implement SSSE3 version of _xy2
Loading pb_1 rather than pw_8192 was benchmarked to be more efficient.
Loading of the 2 yields no advantage. Loading of one saves ~11 cycles.

decicycles count:
put8:  3223(mmx)    -> 2387
avg8:  2863(mmxext) -> 2125
put16: 4356(sse2)   -> 3553
avg16: 4481(sse2)   -> 3513

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-24 15:15:56 +02:00
Christophe Gisquet
9722a6a3f3 x86: hpeldsp: implement SSE2 put_pixels16_xy2
This is obviously equivalent to the avg version, without the avg.

3223(mmx) -> 2006(sse2)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-24 03:45:17 +02:00
Christophe Gisquet
f0aca50e0b x86: hpeldsp: implement SSE2 versions
Those are mostly used in codecs older than H.264, eg MPEG-2.

put16 versions:
      mmx  mmx2  sse2
x2:  1888  1185   552
y2:  1778  1092   510

avg16 xy2: 3509(mmx2) -> 2169(sse2)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-24 03:29:48 +02:00
James Almer
7538ad2248 x86/hevc_deblock: improve chroma functions register allocation
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-24 01:16:26 +02:00