Граф коммитов

44 Коммитов

Автор SHA1 Сообщение Дата
Jim Bankoski 18d323606d Fix test to call clear system state in convolve_test.
Assembly tests should clear system state, as we have no
expectation of proper system state in between test runs..

Change-Id: I0f591996c1f17ef2a5a8572a6b445f757223a144
2014-12-12 06:18:56 -08:00
James Yu 01fc6f51e0 VP9 common for ARMv8 by using NEON intrinsics 07
Add vp9_convolve8_neon.c
- vp9_convolve8_horiz_neon
- vp9_convolve8_vert_neon

Change-Id: I0bdd99ff72d275223fe211ac7243c25a5a60cf87
Signed-off-by: James Yu <james.yu@linaro.org>
2014-12-09 20:03:07 -08:00
James Yu 893534a996 VP9 common for ARMv8 by using NEON intrinsics 04
Add vp9_convolve8_avg_neon.c
- vp9_convolve8_avg_horiz_neon
- vp9_convolve8_avg_vert_neon

Change-Id: I617971e37b02186fec5aca181f4f9622050ea2df
Signed-off-by: James Yu <james.yu@linaro.org>
2014-12-09 20:03:07 -08:00
James Yu d12757f5c6 VP9 common for ARMv8 by using NEON intrinsics 03
Add vp9_copy_neon.c
- vp9_convolve_copy_neon

Change-Id: I291fc5423d06240876411bbceab03eae5ef585be
Signed-off-by: James Yu <james.yu@linaro.org>
2014-12-09 20:02:46 -08:00
Scott LaVarnway 617382a2e3 VP9 common for ARMv8 by using NEON intrinsics 02
Add vp9_avg_neon.c
- vp9_convolve_avg_neon

Change-Id: Id2c9d5bcfa37cff1a16417aba1656ff07bdf10fd
Signed-off-by: James Yu <james.yu@linaro.org>
2014-12-09 19:00:21 -08:00
Johann 1c3594c334 Add convolve_copy and convolve_avg to the test
Change-Id: Ic9438031282e63e627550f7e4cdeda36e43e647b
2014-12-09 12:56:38 -08:00
Deb Mukherjee 27dce0f324 Test name changes to use SSE/SSE2 exactly
Change-Id: I3b5a478d198868c2796366f0ac59d0e2036308b8
2014-11-07 13:44:19 -08:00
Deb Mukherjee 1929c9b391 Rename highbitdepth functions to use highbd prefix
Uses highbd_ prefix convention consistently.

Change-Id: I58f7f799a7ff8e32701bcd71c955bcf1cdd4581e
2014-10-09 14:40:40 -07:00
Deb Mukherjee d50716face Incorporate WRAPLOW macro into non-highbitdepth tx
Incorporates the WRAPLOW macro into the non-highbitdepth transforms
to aid hardware verification between a software C model and an
intended hardware implementation though the use of the configure
options: --enable-experimental --enable-emulate-hardware.
Note that to avoid further discrepancies between the sse/sse2
implementations of the transforms and the C implementation, when the
emulate hardware option is invoked, we also disable sse/sse2/etc.

Also incudes some minor cleanups/renaming etc.

Change-Id: Ib864d8493313927d429cce402982f1c8e45b3287
2014-10-03 11:38:05 -07:00
hkuang db71c1bd55 Fix compile warning.
warning: comparison between signed and unsigned integer expressions.

Change-Id: Ib6ee7500fe910983f290fc321ad89c0ab9989455
2014-09-19 22:48:38 -07:00
Deb Mukherjee 0d3c3d3ce7 Adds high bitdepth convolve, interpred & scaling
Change-Id: Ie51c352a6b250547207cbc1ebba833a01ed053e3
2014-09-18 07:26:17 -07:00
Deb Mukherjee 10783d4f3a Adds high bitdepth transform functions and tests
Adds various high bitdepth transform functions and tests.
Much of the changes are related to using typedefs tran_low_t
and tran_high_t for the final transform cofficients and intermediate
stages of the transform computation respectively rather than fixed
types int16_t/int. When vp9_highbitdepth configure flag is off,
these map tp int16_t/int32_t, but when the flag is on, they map
to int32_t/int64_t to make space for needed extra precision.

Change-Id: I3c56de79e15b904d6f655b62ffae170729befdd8
2014-09-11 19:56:33 -07:00
Johann 8645a53039 Allow specifying opt dependencies
If optimizations use more than one cpu feature, allow
specifying them so that '--disable-X' still works

https://code.google.com/p/webm/issues/detail?id=854

Change-Id: I3108ea37b397371a2be84dd5f2380b304db23f18
2014-09-11 13:43:48 -07:00
levytamar82 839911fb6d Fix bug 804
A bug in Microsoft compiler was found in the function
vp9_filter_block1d16_v8_avx2 and a workaround applied.
the bug occur when there was 4 consecutive maddubs + min + adds
intrinsic instructions.

Change-Id: I83499faeb70971e650e5663fd2490360ddb1a51b
2014-08-07 15:09:24 -07:00
James Zern dfc4e8f012 convolve_test: drop '_t' from local typenames
_t is reserved by posix

+ switch to camelcase
  http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml#Type_Names

Change-Id: I2a22ffc36e9f88781bc7db0d5a28a7ed924bab1a
2014-07-18 20:38:08 -07:00
James Zern 29e1b1a4b0 tests: add API_REGISTER_STATE_CHECK
used to wrap API functions to ensure full environment consistency as
opposed to the renamed ASM_REGISTER_STATE_CHECK which is used with
assembly functions.
currently checks the FPU tag word in x86/x86_64 gcc builds to ensure
emms has been called.

Change-Id: Ie241772dbf903d33d516a1add4c8c6783f2e1490
2014-07-10 12:40:31 -07:00
James Zern 5704578f5f convolve: disable avx2 variants
tests failing under Win32/Win64

Change-Id: I5d49d11911bcda3a832b14efe5500d22597bedcf
2014-06-09 18:42:03 -07:00
Yunqing Wang 4f0943b996 Turn on unit tests for AVX2 convolve functions
This patch turned on unit tests for AVX2 convolve functions.

Change-Id: I51b8bfdaa290fb22862c68af61abf2394d00d47c
2014-05-27 10:36:56 -07:00
Yaowu Xu 077144d206 Use extreme values for input in convovle tests
The intepolation filter functions can be better tested withe extreme
values, especially given the optimization functions are prone to
overflow signed 16 bit intermediate value when operation order is
wrong.

Change-Id: I712142b0bc1e5969c692c0486a57ffa37c9742b5
2014-05-23 13:32:54 -07:00
Dmitry Kovalev 021eaabdb8 Hiding vp9_sub_pel_filters_{8, 8s, 8lp} filters in *.c file.
Change-Id: Id401da740b0a0141caaef9e1bcccd981e5cef4a4
2014-05-14 16:21:41 -07:00
Johann ce23931a3f Only build neon assembly for armv7 targets
Allow selectively building just the intrinsics for armv8

Change-Id: I2f29b2e4508b8b8e5649c2906b3159ad1d4ec477
2014-05-12 08:52:02 -07:00
Dmitry Kovalev 3d4ed278e6 Reusing vp9_get_interp_kernel() function in unit tests.
Change-Id: Ic24a371817c9dd5c4035a6fe01111bd9ab63f552
2014-04-21 14:15:35 -07:00
James Zern 002ad40897 test/: remove unnecessary extern "C"s
Change-Id: I826655a708010149de231ca31a2e3ba4f1842c0c
2014-01-23 19:42:59 -08:00
Joshua Litt 51490e5654 Removing PARAMS macro for consistency
Change-Id: I23ed873a6c47b15491a2ffbcdd4f0fdeef1207a0
2013-11-19 09:28:18 -08:00
Yunqing Wang 3fb728c749 SSE2 8-tap sub-pixel filter optimization
To ensure fast encoding/decoding on devices without ssse3 support,
SSE2 optimization of sub-pixel filters was done. Test using 1080p
clip showed the decoder speeds were ~70fps with ssse3 filters, ~60fps
with sse2 filters, and ~15fps with c filters.

Change-Id: Ie2088f87d83a889fba80a613e4d0e287aadd785c
2013-10-10 14:12:47 -07:00
Parag Salasakar 40edab5e39 mips dsp-ase r2 vp9 decoder convolve module optimizations
Change-Id: I401536778e3c68ba2b3ae3955c689d005e1f1d59
2013-10-02 16:58:37 -07:00
Tero Rintaluoma e326cecf18 Fix intermediate height in convolve_c
- Intermediate height was not correct i.e. when block size is 4 and
  y_step_q4 is 6. In this case intermediate height was
  (4*6) >> 4 = 1 and vertical interpolation needs two source pixels
  plus 7 extra pixels for taps.
- Also if the current output block is 16x16 and we are using 4x upscaling
  we need only 12 rows after horizontal filtering instead of 16.

  Patch Set 2: Intermediate_height updated after CL 66723
               "Fix bug in convolution functions (filter selection)"

Change-Id: I5a1a1bc2ac9d5edb3a6e0818de618bf318fdd589
2013-08-30 10:31:21 +03:00
Adrian Grange 3f10831308 Fix bug in convolution functions (filter selection)
(In response to Issue 604:
 https://code.google.com/p/webm/issues/detail?id=604)

There were bugs in the convolution code for two cases:

1. Where the filter table was assumed to be aligned to a
   256 byte boundary. The offset of the pixel in the
   source buffer was computed incorrectly.

2. Where no such alignment assumption was made. An
   incorrect address for the filter table base was used.

To fix both problems, I now assume that the filter table is
256-byte aligned and modify the pixel offset calculation to
match.

A later patch should remove the restriction that the filter
table is aligned to a 256-byte boundary.

There was also a bug in the ConvolveTest unit test
(convolve_test.cc).

(Bug & initial fix suggestion submitted by Tero Rintaluoma
and Sami Pietilä).

Change-Id: I71985551e62846e55e40de9e7e3959d4805baa82
2013-08-23 11:16:08 -07:00
Jim Bankoski c3809f3de5 Begin to restrict x86inc.asm usage
Chromium does not support 32bit builds for Mac which use x86inc.asm.
Make the files which include it work if 64bit or not PIC enabled
starting with vp9_copy_sse2.asm

Consolidate these targets in vp9_rtcd_defs.sh

Change-Id: If18f0b957a611efd085a3ee7d245cf1eb91e8248
2013-08-05 12:07:30 -07:00
Johann 59dc4e9cdd vp9_convolve8_neon placeholder
Call the individually optimized horizontal and vertical functions. This
implementation abuses the temp buffer.

This will be replaced with a custom optimized function.

Over 2x speedup.

Change-Id: I5b908d2a73d264e9810d6022bbff73207a3055dd
2013-07-17 08:39:27 -07:00
Johann a15bebfc0a vp9_convolve8_[horiz|vert]_avg
Super basic conversion from the other implementations. Any changes to
one should be trivial to copy over keep in sync.

Change-Id: I1720b4128e0aba4b2779e3761f6494f8a09d3ea8
2013-07-12 16:21:33 -07:00
Johann 158c80cbb0 convolve8 optimizations for neon
Independent horizontal and vertical implementations.

Requires that blocks be built from 4x4 and [xy]_step_q4 == 16

6-10% improvement. CIF improved the least.

Change-Id: I137f5ceae4440adc0960bf88e4453e55a618bcda
2013-07-11 11:08:19 -07:00
Ronald S. Bultje decead7336 Replace copy_memNxM functions with a generic copy/avg function.
Change-Id: I3ce849452ed4f08527de9565a9914d5ee36170aa
2013-07-10 18:27:24 -07:00
James Zern e7b599f683 convolve_test: align filter arrays
fixes issue #583

Change-Id: I4b855a5b5b168c8961410cef6ab5e6d86f14d301
2013-06-17 23:14:15 -07:00
Deb Mukherjee 995ce523eb Cosmetic cleanups of filters
No bitstream change.

Removes unused filters and the code for the case of 2 switchable filters;
also changes the 8tap-smooth filter coefficients for integer shifts to be
interpolating to be consistent with the way it is implemented currently.

Change-Id: I96c542fd8c06f4e0df507a645976f58e6de92aae
2013-06-10 12:06:36 -07:00
James Zern 8fb48afd54 convolve_test: cosmetics
fix indent, whitespace, casts

Change-Id: Ifea8618a90f9da263a8955dd242bb3aa7fc59ae5
2013-05-02 19:30:47 -07:00
James Zern b0e5775ebc convolve_test: remove unnecessary memset
input_ is filled with random values just afterward.
the size was wrong anyway as input_ is allocated with memalign so
sizeof(input_)==sizeof(uint8_t*)

Change-Id: I014b832ac60960cd22b6f369dbc9fd648d4055b5
2013-05-02 12:32:13 -07:00
John Koleszar a9ebbcc338 convolve: support larger blocks, fix asm saturation bug
Updates the common convoloution code to support blocks larger than
16x16, and rectangular blocks. This uncovered a bug in the SSSE3
filtering routines due to the order of application of saturation.
This commit fixes that bug, adjusts the unit test to bias its
random values towards the extremes, and adds a test to ensure that
all filters conform to the expected pairwise addition structure.

Change-Id: I81f69668b1de0de5a8ed43f0643845641525c8f0
2013-04-18 13:57:59 -07:00
John Koleszar 04c2407874 convolve test: validate 1D filters are 1D
Since the 8-tap lowpass filter is non-interpolating, the results are
different between applying it at whole-pel values and not. This
means that 1D-only versions are requried to be implemented, as
opposed to being an optimization of the 2D case. Calling the 2D
filter instead of the horizontal-only filter is not equivalent
in this case. Update the test to pass invalid filters to the
unused stage of the 1D-only calls, to verify they're unused.

Change-Id: Idc1c490f059adadd4cc80dbe770c1ccefe628b0a
2013-02-27 11:19:11 -08:00
John Koleszar 557a1b209e Run all filters through convolve test
Updates the convolve test to verify that all filters match the
reference implementation. This verifies commit 30f866f, which
fixed some problems with the SSE3 version of the filters for
the vp9_sub_pel_filters_8s and vp9_sub_pel_filters_8lp banks
due to overflow and order of operations.

Change-Id: I6b5fe1a41bc20062e2e64633b1355ae58c9c592c
2013-02-27 11:15:20 -08:00
John Koleszar 6fd7dd1a70 Use 256-byte aligned filter tables
This avoids duplicating all the filters twice. Includes fixups to the
convolve routines and associated tests to make this work.

Change-Id: I922f86021594e55072ddb63b42b2313605db6e00
2013-02-27 08:22:39 -08:00
John Koleszar 6a4f708c25 Refactor inter recon functions to support scaling
Ensure that all inter prediction goes through a common code path
that takes scaling into account. Removes a bunch of duplicate
1st/2nd predictor code. Also introduces a 16x8 mode for 8x8
MVs, similar to the 8x4 trick we were doing before. This has an
unexpected effect with EIGHTTAP_SMOOTH, so it's disabled in that
case for now.

Change-Id: Ia053e823a8bc616a988a0af30452e1e75a739cba
2013-02-26 10:03:29 -08:00
John Koleszar 29d47ac80e Restore SSSE3 subpixel filters in new convolve framework
This commit adds the 8 tap SSSE3 subpixel filters back into the code
underneath the convolve API. The C code is still called for 4x4
blocks, as well as compound prediction modes. This restores the
encode performance to be within about 8% of the baseline.

Change-Id: Ife0d81477075ae33c05b53c65003951efdc8b09c
2013-02-08 12:18:14 -08:00
John Koleszar 5ca6a3667f Add 8-tap generic convolver
This commit introduces a new convolution function which will be used to
replace the existing subpixel interpolation functions. It is much the
same as the existing functions, but allows for changing the filter
kernel on a per-pixel basis, and doesn't bake in knowledge of the
filter to be applied or the size of the resulting block into the
function name.

Replacing the existing subpel filters will come in a later commit.

Change-Id: Ic9a5615f2f456cb77f96741856fc650d6d78bb91
2013-02-05 14:19:28 -08:00