Commit Graph

3281 Commits

Author SHA1 Message Date
Johann
690971898b Clean up unused function warnings in vp8 decoder
Mark functions in dboolhuff.h and treereader.h with INLINE.

Change-Id: Ifc1008de0713c8d43f4fec83a8c2b836622be365
2015-08-26 17:10:30 +00:00
James Zern
c0523090be vp8e_encode: check validate_config return
Change-Id: I56fad85cae4537f9d68febf9b9264c3e1cf82ce1
2015-08-25 18:45:05 -07:00
Johann
467c66e842 Mark Scale2Ratio INLINE
WebRTC builds with -Wunused-function do not like all the uses of onyx.h

Change-Id: Ic57cb143b48df9c9895f94b5f8f395c260fa7025
2015-08-25 14:56:18 -07:00
Yaowu Xu
a1ec3eb326 Limit new motion vector size
This commit adds clamp of new vectors similar to the logic in RD loop.
Such clamp is not necessary from the perspective of VP8 bitstream, but
is added to improve ChromeCast mirroring's robustness.

Change-Id: I42f6adbc60ffce283b994869364230858632d6fa
2015-08-25 10:00:34 -07:00
Marco
ee380cc5c4 vp8: modifcatiion to skin map computation.
For each block in pickinter: use average of four middle
pixels (instead of single pixel) to set skin map.
This can help a little in reducing false skin detection in
some cases.

Change-Id: Ic247af75e9c2948b08ab977a39e061adacd8ec97
2015-08-24 15:35:03 -07:00
Johann Koenig
5942839d2d Merge "Rename vp8 loopfilter_filters_dspr2.c" 2015-08-18 23:09:03 +00:00
Johann
e7aa2d9b21 Rename vp8 loopfilter_filters_dspr2.c
Change-Id: I914b456558edbdee5eefdfba731bc70d3d5f5d53
2015-08-18 15:10:37 -07:00
Johann
4e5e5fc52b Rename vp8 loopfilter[_neon.c]
Avoid conflict with vpx_dsp version

Change-Id: I041b1532a9276400a5547de8dfed1de43ad4e83d
2015-08-18 11:47:00 -07:00
Johann
79a00d71bd Rename vp8 quantize.c
Move it to vp8_quantize.c and make sure to
use the full path for all vp8 includes of quantize.h

Change-Id: I284651ff681707385f4924ea7db1541905c1624a
2015-08-18 11:44:32 -07:00
Alex Converse
d816fa7bfd Replace VP8 SSIM with VP9 derived vpx_dsp SSIM.
Change-Id: Ic61f30af12d1b01c1d5adc4e08bc20e20ad38027
2015-08-07 11:20:05 -07:00
Ghislain MARY
3067c34c5a Support build with Visual Studio 14.
Change-Id: Id0d7c19857e29b66c652c8cc1ab56b64e4fc0fa3
2015-08-05 14:45:16 -07:00
Johann Koenig
ac29aa135c Merge "Rename vp8 loopfilter_mmx.asm" 2015-08-04 15:55:48 +00:00
Johann
749c393c8d Rename vp8 loopfilter_mmx.asm
Chromium puts all the yasm output in the same directory. Looking at ways
to improve this but in the meantime get rid of collisions.

Change-Id: I923c5231d14e895ab96521eb89807ede868a0753
2015-08-03 14:27:03 -07:00
Parag Salasakar
d35f992599 mips msa vp8 denoising filter optimization
average improvement ~2x-3x

Change-Id: I6c17012c731fa4d56e0343f8de0df47b2dde289b
2015-08-01 08:05:25 +05:30
Parag Salasakar
8fbc641540 mips msa vp8 temporal filter optimization
average improvement ~2x-3x

Change-Id: I05593bed583234dc7809aaec6cab82773a29505d
2015-07-31 12:03:19 +05:30
Parag Salasakar
0e3f494b21 mips msa vp8 block subtract optimization
average improvement ~2x-3x

Change-Id: I30abf4c92cddcc9e87b7a40d4106076e1ec701c2
2015-07-31 09:29:10 +05:30
Parag Salasakar
56aa0da405 mips msa vp8 quantize optimization
average improvement ~2x-3x

Change-Id: I6fc37191bf9cb5a67e1af9787d0d27659c17bdba
2015-07-30 12:56:57 -07:00
Parag Salasakar
0c2a14f9e2 mips msa vp8 fdct optimization
average improvement ~2x-4x

Change-Id: Id0bc600440f7ef53348f585ebadb1ac6869e9a00
2015-07-30 08:14:42 +05:30
Parag Salasakar
7c6ae373ac Merge "mips msa vp8 post proc optimization" 2015-07-30 02:34:06 +00:00
Yaowu Xu
f23241087a Add const to a variable declaration
Change-Id: Idf572c22a87098665f5179dc3212a06d9a85a342
2015-07-29 16:27:34 -07:00
Yaowu Xu
47c55acdad Fix a typo
Change-Id: Ief8eea8fe6bef139d1e94f8d6dfac5a44efe785d
2015-07-29 16:23:14 -07:00
Parag Salasakar
a5d9416fd7 mips msa vp8 post proc optimization
average improvement ~2x-4x

Change-Id: I93abc15389649c169bb8b69127c0b95407d34692
2015-07-29 09:40:26 +05:30
Parag Salasakar
5deb983744 mips msa vp8 filter by weight optimization
average improvement ~3x-5x

Change-Id: Ia808ae56b118e0e1b293901447aa5a0f597b405b
2015-07-28 08:16:34 +05:30
Parag Salasakar
af6733aec6 mips msa vp8 recon intra optimization
average improvement ~3x-5x

Change-Id: I73306863e9bf172d5adc06b8dd54e43985d1e063
2015-07-25 12:32:26 +05:30
Parag Salasakar
fb73ceae85 mips msa vp8 bilinear filter optimization
average improvement ~3x-4x

Change-Id: I8c0b3d5c86c9eb4f802b87c971864d2cfceeb7cc
2015-07-24 09:21:35 +05:30
Parag Salasakar
509fb0bc9d mips msa vp8 copy mem optimization
average improvement ~2x-4x

Change-Id: I3af3ecced96c5b8e0cb811256e5089e28fe013a2
2015-07-23 10:29:40 +05:30
Parag Salasakar
55c0df5ef1 mips msa vp8 sixtap filter optimization
average improvement ~3x-5x

Change-Id: I5fd88cb088814be443d04be384b9fca99b22adef
2015-07-13 09:23:52 +05:30
Parag Salasakar
e4fb53ea6e Merge "mips msa vp8 loop filter optimization" 2015-07-13 01:16:45 +00:00
Parag Salasakar
0ea2684c2c mips msa vp8 loop filter optimization
average improvement ~2x-4x

Change-Id: I20c4f900ef95d99b18f9cf4db592cd352c2212eb
2015-07-08 12:41:00 +05:30
Johann
0f96939ceb Use 'unsigned long' for _BitScanReverse parameter
New clang warnings in chromium reveal an incompatible pointer being
passed.

Change-Id: I0d893993726ecf899f467c16175bfb8c76329731
https://code.google.com/p/chromium/issues/detail?id=504696
2015-07-07 17:45:06 -07:00
Johann
6a82f0d7fb Move sub pixel variance to vpx_dsp
Change-Id: I66bf6720c396c89aa2d1fd26d5d52bf5d5e3dff1
2015-07-07 15:51:04 -07:00
Jingning Han
9d251f9510 Merge "Unify subtract function used in VP8/9" 2015-07-07 20:42:19 +00:00
Parag Salasakar
45b7e160d8 Merge "mips msa vp8 idct optimization" 2015-07-07 18:14:20 +00:00
Jingning Han
0ede9f52b7 Unify subtract function used in VP8/9
This commit replaces the vp8_ prefixed subtract function with the
common vpx_subtract_block function. It removes redundant SIMD
optimization codes and unit tests.

Change-Id: I42e086c32c93c6125e452dcaa6ed04337fe028d9
2015-07-07 09:57:44 -07:00
Parag Salasakar
3d938d71b0 mips msa vp8 idct optimization
average improvement ~2x-5x

Change-Id: I19e82f78772993bcd67fcf975fe180232172f86d
2015-07-07 12:41:54 +05:30
Jingning Han
432cd4bfb7 Move subtract functions from vp9 to vpx_dsp
Factor out the subtraction operator as common function.

Change-Id: I526e703477c6a290e0e3e3c8898f8bb1ca82779b
2015-07-06 12:22:47 -07:00
James Zern
dcf5b7cfdd loopfiltersimpleverticaledge_neon: quiet uninit var warnings
take 2. localize the function parameter to actually remove the warning

Change-Id: I23c02061b5e21b0b75bd33c26062d1e531df7b92
2015-06-30 23:23:59 -07:00
James Zern
69c153c4e6 loopfiltersimpleverticaledge_neon: quiet uninit var warnings
the vector used in vld*_lane_* should be initialized before use

Change-Id: Idce95354737915f6fb4e6b5e8980a050e953036d
2015-06-25 20:39:21 -07:00
James Zern
f4d746a3c1 idct_dequant_0_2x_neon: quiet uninit var warnings
the vector used in vld*_lane_* should be initialized before use

Change-Id: I6b791088479fec3bc021ca75cc2af5adcc39d954
2015-06-25 20:29:35 -07:00
James Zern
4bd87a9b9e vp8_subpixelvariance_neon: right size coeff table
only uint8 is required; each use only loads one value as a uint8
quiets a few type conversion warnings

Change-Id: I03dc0dc0eb01ac23a6e8673daa2b77c6c57bf1b0
2015-06-23 23:48:12 -07:00
Johann
907b33cdc4 Move vp8 variance files
There is a naming conflict in the chromium build system.

The rest of the variance functions will move to vpx_dsp soon.

Change-Id: Iff78da2aafb0d7380eda73e38d7dac72110a1e47
2015-06-18 16:42:28 -07:00
James Zern
47fe535422 disable vp8_sub_pixel_variance8x8_neon
fails unit tests:
[  FAILED  ] NEON/VP8SubpelVarianceTest.ExtremeRef/0, where GetParam() = (3, 3, 0x14e36d, 0)
[  FAILED  ] NEON/VP8SubpelVarianceTest.Ref/0, where GetParam() = (3, 3, 0x14e36d, 0)

the tests were recently enabled in:
eb88b17 Make vp9 subpixel match vp8

the functions likely haven't changed since being converted from assembly

Change-Id: I6141717b111b8f735f436c160d74270af53ef722
2015-06-05 20:18:51 -07:00
Johann
516c087c51 Remove unused sub pixel mse
Change-Id: I7a5e4e2632c3fa69d2a85a68fa9b418631caf09c
2015-06-03 08:00:51 -07:00
Johann
86d0cb8325 Disable neon bilinear 4x4
Clang adds alignment hints when casting up the loads/stores. Although
this should be safe for most paths, it's causing some crashes. Either
the source of the misalignment needs to be determined and adjusted or
the intrinsics need to be rewritten to avoid using the cast to load the
data.

BUG=817,892

Change-Id: Ia3aa824d6a4cd97e14325ff49dc730b6f85ec7e8
2015-06-02 00:02:55 +00:00
Johnny Klonaris
d02aa04422 Adds subsecond frame rates to webm
Numerator was being range checked against the
denominator - preventing any frame rate slower
than 1 fps.

I've tested this on a Mac using using ffmpeg and
results are comparable to mp4 and ogg files generated
at the same time.

Not yet tested on Windows.

Johnny Klonaris
google@jawknee.com

Change-Id: Idb358dbc2e7dc000037880ede4a1b0df248a42c8
2015-06-01 10:13:58 -07:00
Johann
dee70d355f Merge "Move variance functions to vpx_dsp" 2015-05-26 23:02:11 +00:00
Johann
c3bdffb0a5 Move variance functions to vpx_dsp
subpel functions will be moved in another patch.

Change-Id: Idb2e049bad0b9b32ac42cc7731cd6903de2826ce
2015-05-26 12:01:52 -07:00
Marco
7ca17435d5 Fix to visual studio build error.
Change-Id: Ide080141ebc064584574c861fb324fe64cc572cc
2015-05-21 14:08:32 -07:00
Marco
6f41e29064 vp8_drop_encodedframe_overshoot: fix to return setting.
Make sure force_maxqp is set to 0 for return 0.

Change-Id: Ie7c57842637226e932a390e7080e5ebb99996da3
2015-05-20 12:26:08 -07:00
Marco
976f7f42c1 VP8: For high overshoot, force drop frame and max-out QP.
This allows rate control to react to content of current frame being encoded.
Enabling this feature via the setting: screen_content_mode = 2.

Change-Id: Ib2c6670551d96f4907495d5b7b76bb8c49e673db
2015-05-19 08:19:21 -07:00
James Zern
60b9f685cb vp8/rdopt.h+onyx_int.h: add some missing prototypes
silences missing prototype warnings

Change-Id: Icd477e37b502205d0a60e7389e51b1ba17d8888e
2015-05-14 22:41:26 -07:00
James Zern
62ad8baa40 vp8: add some missing includes
silences missing prototype warnings

Change-Id: Ib62e4743532b871e63bc99732875fff20501b8ac
2015-05-14 22:41:25 -07:00
James Zern
632177fa7f vp8: make some functions static
silences missing prototype warnings

Change-Id: I9f24a3214c832c982ca0dc5a032316eba48472ff
2015-05-14 22:41:25 -07:00
James Zern
f80bbc0efb vp8/common/variance*: add vp8_rtcd include
silences missing prototype warnings

Change-Id: I5ca198b56a5ff0cf5b93c89957526f243c04e9c8
2015-05-14 22:41:25 -07:00
James Zern
6eb1016301 vp8_copy32xn: sync function signature
+ include vp8_rtcd.h in copy_c.c
silences missing prototype warnings

Change-Id: Iecc279c695b08a26b231dedb41e3b84c551703f3
2015-05-14 22:41:13 -07:00
Johann
11a4a3c065 Merge "Remove only remaining uses of 'fast_unaligned'" 2015-05-07 23:32:18 +00:00
Johann
802e1d84cc Remove only remaining uses of 'fast_unaligned'
Use memcpy instead of casting.

Change-Id: Ieca725cc628883985bde23c7d742af8781c5dbb5
2015-05-07 14:39:37 -07:00
James Zern
fd3658b0e4 replace DECLARE_ALIGNED_ARRAY w/DECLARE_ALIGNED
this macro was used inconsistently and only differs in behavior from
DECLARE_ALIGNED when an alignment attribute is unavailable. this macro
is used with calls to assembly, while generic c-code doesn't rely on it,
so in a c-only build without an alignment attribute the code will
function as expected.

Change-Id: Ie9d06d4028c0de17c63b3a27e6c1b0491cc4ea79
2015-05-07 11:55:08 -07:00
Johann
d5d9289800 Move shared SAD code to vpx_dsp
Create a new component, vpx_dsp, for code that can be shared
between codecs. Move the SAD code into the component.

This reduces the size of vpxenc/dec by 36k on x86_64 builds.

Change-Id: I73f837ddaecac6b350bf757af0cfe19c4ab9327a
2015-05-06 16:58:20 -07:00
James Zern
f58011ada5 vpx_mem: remove vpx_memset
vestigial. replace instances with memset() which they already were being
defined to.

Change-Id: Ie030cfaaa3e890dd92cf1a995fcb1927ba175201
2015-04-28 20:00:59 -07:00
James Zern
f274c2199b vpx_mem: remove vpx_memcpy
vestigial. replace instances with memcpy() which they already were being
defined to.

Change-Id: Icfd1b0bc5d95b70efab91b9ae777ace1e81d2d7c
2015-04-28 19:59:41 -07:00
James Zern
fbd3b89488 vpx_mem: remove vpx_memmove
vestigial. replace instances with memmove() which they already were
being defined to.

Change-Id: If396d3f9e3cf79c0ee5d7429615ef3d6b2a34afa
2015-04-28 19:59:40 -07:00
Johann
14ef4aeafb Reorganize *_rtcd() calling conventions
Change-Id: Ib1e17d8aae9b713b87f560ab5e49952ee2bfdcc2
2015-04-15 11:12:05 -04:00
James Zern
5afa7d1f87 vp8_regular_quantize_b_sse2: remove dead init
Change-Id: Ide5eefadbb3cab38743a69f744a003abb37a6506
2015-04-03 16:44:16 -07:00
James Zern
30205e14b7 vp8cx_pick_filter_level*: remove dead inits
Change-Id: I28026b86d03264b9f4e2fc8ac1d3c74aa3954208
2015-04-03 16:44:15 -07:00
James Zern
acb219be25 vp8_decode_frame: remove dead increment
Change-Id: Ie9a6fac02796d24e6f4a15416d0b4c19010547df
2015-04-03 16:44:15 -07:00
James Zern
0c5a140a02 rdopt: remove dead stores
Change-Id: Ia8a20c6751cc6d63c60bb00b99c78faca1e61051
2015-04-03 16:44:14 -07:00
James Zern
04c53d2393 find_next_key_frame: remove dead init & store
Change-Id: I8c7f5b9718ef14e4397a263aa9f52a9edcf7d1cd
2015-04-03 16:43:48 -07:00
James Zern
970acffa8f multiframe_quality_enhance_block: remove dead stores
Change-Id: I33ca9cddfdd54c3d8a23c1cb978986a537a20bf2
2015-04-03 16:15:51 -07:00
James Zern
7b4f727959 vp8_print_modes_and_motion_vectors: remove dead stores
Change-Id: I438cbf4970fa2220fb73b0b41a29e654836d4e3b
2015-04-03 16:08:37 -07:00
Johann
bc98e93b53 Remove PPC build support
There are no functional optimizations for AltiVec/PPC

Change-Id: I6877a7a9739017fe36fc769be22679c65ea99976
2015-04-02 09:13:59 -07:00
Johann
46ce6954cc Remove duplicate code from merge
Change-Id: I5e2a1270001b7e29f3f198d57ea40e1efccef367
2015-03-26 14:56:24 -07:00
James Zern
fef91c9040 vp[89]_cx_iface.c: remove obsolete ABI checks
Change-Id: I49a7017e8adc18ff03d748cb328814a8a3e1bcf6
2015-03-20 14:50:14 -07:00
Yunqing Wang
d6a2e29028 vp8: fix a bug in the internal PSNR calculation
While CONFIG_INTERNAL_STATS=1, PSNR is calculated while encoding.
The aligned width/height were used mistakenly in the calculation.
This patch fixed it, and used the orignal image width/height.

Change-Id: Iad5334f8693af761b71ebb78f2587db8a3404ecf
2015-03-19 12:56:25 -07:00
Johann
08acc349b3 Remove last remnants of obj_int_extract
Change-Id: Icc7da6027763b5ed7cbfe70ffe271103ead59fe1
2015-03-18 11:06:53 -07:00
Adrian Grange
f29961dbd7 Add missing initializer to VP8 codec interface
Change-Id: Ia164ba03fb732e9c9e520e4aa2d75b7eadff6165
2015-02-12 09:53:52 -08:00
Johann
eabb793f3b Use correct buffer size in vp8 subpixel variance
In vp8_sub_pixel_variance8x8_neon the temp2 buffer is only initialized
to kHeight8 * kWidth8. However, in the case that xoffset != 0 and
yoffset == 0, var_filter_block2d_bil_w8 is called with output_width
kHeight8PlusOne.

Thanks to cmugurel for diagnosing and yulius for the patch.

Change-Id: Ib71ffd96ffad963c92b8b7ca23f303942785b8e0
https://code.google.com/p/webrtc/issues/detail?id=4190
2015-02-03 09:11:05 -08:00
Johann
04168d41cb Explicitly include vp8_rtcd.h
When referencing RTCD functions make sure the relevant
header file is included.

Change-Id: Ia0d7112d4aff9b4d8fa94648f0702371b7484031
https://code.google.com/p/webm/issues/detail?id=937
2015-01-29 09:59:16 -08:00
Alex Converse
581731a95f vp8enc: Prevent out of bounds memory access.
Prevent out of bounds access when attempting to increase frame size

Change-Id: I710c40c692802a72963c9680c2125da17f9060a9
2015-01-27 16:44:31 -08:00
Marco
2c6d9c574f vp8: Fix to crash in pick_inter.
Added unittest that triggers the crash without this fix.

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

Change-Id: If5208ceb210c821891675fdf3d9951ab83d52ae6
2015-01-12 11:53:26 -08:00
Yaowu Xu
4fcf726a0e Return error on wrong sync code
Not initialize codec stream info

This fixes vp8 fuzzing issue reported at build #56

Change-Id: I307ac839b4f4bda3a02a551019c0d688dba19c86
2015-01-05 17:19:32 -08:00
Jim Bankoski
f4eab151c5 Revert "remove vp8 unused uvstride parm in simple loop filter"
This reverts commit 392a2c43c7

Failing nexus build tests:
http://build.chromium.org/p/client.libvpx/builders/Nexus%207%20Builder/builds/224

Change-Id: I95ae2c894b70cef9c757334fcab7fdeca9003e9c
2014-12-21 21:35:07 -08:00
Jim Bankoski
2c5dc477bf Merge "remove vp8 unused uvstride parm in simple loop filter" 2014-12-21 16:49:45 -08:00
Johann
80b344dec5 Silence -Werror=unused-parameter
Cast away remaining issues so that new ones don't get lost in the noise.

Change-Id: Iacd6999b0686ce80f9835730d68db6382690fa92
2014-12-16 12:47:08 -08:00
hkuang
9353607ac8 Fix a bug that break the vp8 fragment decoder.
(issue #882).

Change-Id: I2ca7f96d390c4eaec0473c50cb01b903d0bd3ee6
2014-12-12 16:44:14 -08:00
Marco
af898b56bb Various updates to vp8.
Change-Id: Icc7a816491897107764e4c936288e9000e6319b8
2014-12-03 16:01:28 -08:00
Johann
08ad7e4db5 Correctly initialize "ones" value in neon quantize
By using 0xff for a short it was not setting the high bits. When
comparing the output with vtst to find non-zero elements it was skipping
vaules which had no low bits set such as -512 / 0xFE00.

Using -8191 as the first element of coeff will generate this condition.

BUG=883

Change-Id: Ia1e10fb809d1e7866f28c56769fe703e6231a657
2014-11-20 18:34:45 -08:00
Johann
6eec73a747 Remove asm offset dependencies
The obj_int_extract code is no longer worth maintaining. It creates
significant issues when adapting for different build systems and no
longer offers as significant of a performance benefit due to
improvements in intrinsics.

Source files will remain until the various third-party builds are updated.

The neon fast quantizer has been moved to intrinsics. The armv6 version
has been removed because so few remaining targets require it.

Compilers and processors have improved significantly since the
pack_tokens code was written. The assembly is no longer faster than the
C code.

pack_tokens were the only optimizations for the armv5te targets so the targets
will be removed after the test infrastructure has been updated.

BUG=710

Change-Id: Ic785b167cd9f95eeff31c7c76b7b736c07fb30eb
2014-11-06 16:00:01 -08:00
Johann
c4b3625393 Merge "Remove pair quantization" 2014-11-04 16:29:19 -08:00
Johann
412eaaf090 Merge "vp8 quantization -> intrinsics" 2014-11-04 16:28:46 -08:00
Johann
b4957234af Avoid divide-by-zero in vp8 initialization
Check that the numerator is not zero. If it is, guess 30fps.

Fixes a clang IOC error in the quantize test. It's very unlikely for
this to occur in the wild because the setup in the quantize test is very
nonstandard.

Change-Id: Icdab7b81d4e168d3423e14db20787f960052e0c3
2014-11-04 12:52:10 -08:00
Johann
2134eb2f05 Remove pair quantization
The intrinsics version of the pair quant is slower than running it
individually.

Change-Id: I7b4ea8599d4aab04be0a5a0c59b8b29a7fc283f4
2014-10-31 13:42:55 -07:00
Johann
7ae75c3d52 vp8 quantization -> intrinsics
Use intrinsics for neon quantization. Slight loss (<5%) of performance
compared to the assembly. Roughly 10x faster on arm64 because that was
running C code before.

Change-Id: I7cf5242d8f29b7eab5bca6a1c20c89c9fc9ca66d
2014-10-31 13:42:13 -07:00
Marco
fe2fd37bb2 vp8: Updates to noise level estimate.
-Use full bandwidth (when temporal layers is on) for checking switching.
-Normalize metric wrt num_blocks.
-Rounding fix to update of average noise level metric.
-Make default internal denoiser mode == kDenoiserOnYUV (in denoiser set_parameters()).
-Adjust some thresholds.

Change-Id: Ib827512b25a7bf1f66c76d3045f3a68ce56b1cd2
2014-10-24 09:36:18 -07:00
JackyChen
897500b9ba Merge "vp9_denoiser_sse2.c: improve code style." 2014-10-22 13:52:03 -07:00
JackyChen
5cba6516aa vp9_denoiser_sse2.c: improve code style.
denoiser_sse2.c: fix typos in comment.

Change-Id: Ic0fb102331b0e533c058da3cab1fbc30de9a0070
2014-10-22 10:55:54 -07:00
Marco
d166be653e vp8: Update to computation of noise level.
Avoid unneeded computation of mse in process_denoise.

Change-Id: I3a538178f2d138750d0c38ea4dd05dbbc2b7df41
2014-10-22 10:38:24 -07:00
Marco
6f77bff6aa Updates to aggressive denoising mode.
Fix to the noise level and bitrate threshold settings per resolution.

Change-Id: I25524b7f78afa1aeb76edef7be13c17bc8976508
2014-10-17 15:57:25 -07:00
Deb Mukherjee
a349ee3bf5 Resolves some lint errors
And also fixes some style consistency issues.

Change-Id: I3dc6d44e17d2d6075dc9b02c4255a7395046c5e0
2014-10-13 16:05:44 -07:00
Marco
3b789d3693 vp8: Suppress denoising with respect to old reference frames.
If the GOLDEN or ALTREF frame was last updated > x frames in the past,
don't use them for denoising (only consider LAST). Using an old reference
frame for denoising, e.g., if it is a long-term reference or the last key frame,
can cause some visible artifacts, in particular in the aggressive denoising mode.

Change-Id: I239c9fbb092c36cba7e95328f1fa67a58d6a7ed9
2014-10-08 12:54:39 -07:00
Johann
587ff646f6 Fix build failure with Android NDK
The version of gcc4.6 included with the Android NDK through r10b
fails to compile this function. Replace it with C code.

BUG=860

Change-Id: Ifcc0476664071aec46a171cdd5ad17305930986a
2014-09-25 12:15:21 -07:00
Johann
d174f2769e Merge "Clarify GCC version check" 2014-09-25 12:12:56 -07:00
Johann
f6be2f3c87 Clarify GCC version check
The version check was incorrectly matching some versions of clang
which reported as gcc 4.2

Change-Id: I686d3576e71883fe1463206b56ab5e2aa9bb68a8
2014-09-25 11:53:45 -07:00
Yaowu Xu
e616504107 Fix IOCs
A left shift of negative value causes IOC runtime warnings, this
commit converts two such left shifts to multiply to avoid IOCs.

Change-Id: I8811428768d7135e6e16af4b3094d0341589a995
2014-09-25 08:58:57 -07:00
Marco
06fce6b640 vp8: Update to the adaptive denoising mode.
Allow for option to apply spatial blur for temporal
denoising, under the aggressive denoising mode.

Change-Id: I41c5fdc0b6cf32d8f8d1d4236b25fa5aa406e89e
2014-09-19 09:06:16 -07:00
Johann
6d44dad4aa Merge "vp8: common: postproc: fix signed overflow of statement of (X +c) >= X when '-Werror=strict-overflow' is set." 2014-09-17 10:18:23 -07:00
Scott LaVarnway
1220b49c89 arm: Fix building vp8_mse16x16_neon.c with MSVC
Use the right return values - vadd_s64 returns int64x1_t, not
a normal int64_t.

Change-Id: Ife17213087c1dfb5faaa647f804d2fd140f3a0eb
2014-09-16 12:36:00 -07:00
Johann
8caba8565a Merge "vp8/vp9: neon: msvc: move the 'ifdef _MSC_VER' bit to vpx_ports/mem.h. fix compiling warning." 2014-09-15 15:53:12 -07:00
Scott LaVarnway
fe2cc873dc VP8 encoder for ARMv8 by using NEON intrinsics 1
Add vp8_mse16x16_neon.c
- vp8_mse16x16_neon
- vp8_get4x4sse_cs_neon

Change-Id: I108952f60a9ae50613f0ce3903c2c81df19d99d0
Signed-off-by: James Yu <james.yu@linaro.org>
2014-09-15 12:04:09 -07:00
Jia Jia
0ae866bd19 vp8/vp9: neon: msvc: move the 'ifdef _MSC_VER' bit to vpx_ports/mem.h.
fix compiling warning.

Change-Id: If8706a9046436f704c597e4275a6810c76ba7daa
2014-09-14 01:43:54 +08:00
Jia Jia
f265dde305 vp8: common: postproc: fix signed overflow of statement of (X +c) >= X when '-Werror=strict-overflow' is set.
Change-Id: I2f78417cc100973c732426f7b6bd10d7304a1a5f
2014-09-14 01:04:05 +08:00
Johann
4bfdc331ad Merge "Remove unused vp8_strict_quantize" 2014-09-12 16:17:18 -07:00
Johann
ad4edc0b4e Merge "Remove unused vp8 quantize functions" 2014-09-12 16:16:52 -07:00
Johann
f1f7bcd289 Remove unused vp8_strict_quantize
Change-Id: I4c35ed2de8b54751b69f4801454a1ccc35b500b0
2014-09-12 15:02:03 -07:00
JackyChen
47380c3350 Fix the bug which made VP8 denoiser not bit-exact between C code and SSE code.
This issue is found when the denoising mode is set to kDenoiserOnYUVAggressive.
Updated the C code to make it the same with SSE version.

I also changed several lines in VP9 denoiser for the code style.

Change-Id: I640d48cf946fe8c6a400e6e252107501d1e226d3
2014-09-10 16:18:43 -07:00
Marco
619951af97 Merge "vp8: Updates for adaptive denoiser mode." 2014-09-09 10:19:27 -07:00
Marco
0c7a9925d6 vp8: Updates for adaptive denoiser mode.
Add qp/bitrate condition, update some settings.

Change-Id: I1af0f102823a886393be063ad9d17d7564753cc7
2014-09-09 09:19:01 -07:00
Johann
23bed46ddd Move vp8_variance_halfpixvar16x16_*_neon definitions
These functions moved from 'neon_asm' to 'neon' in
9293d267d2

Change-Id: I9cb5626c3eec96876a73fb18f2bfc982a5858edb
2014-09-09 08:21:36 -07:00
Jia Jia
395f2e874b vp8 encoder: remove vp8_yv12_copy_partial_frame_neon
Use generic C implementation instead of neon-specific code

Change-Id: Ib322b4ece9cdbd4de76a9eed3d2e9fd1d8542406
2014-09-08 08:59:24 -07:00
Jia Jia
c97f5e8b86 vp8 common: change 'HAVE_NEON_ASM' to 'HAVE_NEON' for compiling functions of NEON intrinsics.
Change-Id: I975e5eac16f8b623ff589f0ec072cdaff2183b04
2014-09-05 12:24:05 +00:00
James Zern
35fadf1d25 bilinearpredict_neon: fix type conversion warnings
make bifilter4_coeff[][] uint8_t, no values exceed this range and
they're loaded with vdup_n_u8().

Change-Id: I921983e9edd828d29820e40ac30a7801dbe0fb4f
2014-09-04 20:50:42 -07:00
Dmitry Kovalev
91998e638e Removing sz member from vpx_codec_priv.
Change-Id: I811526a9ee9f237604f72abe7fc677e39e0f457f
2014-09-04 14:47:42 -07:00
James Zern
f61e00c79d Merge "arm: Fix building vp8_subpixelvariance_neon.c with MSVC" 2014-09-04 11:00:53 -07:00
Scott LaVarnway
ec94967ffe Revert "Revert "VP8 for ARMv8 by using NEON intrinsics 10""
This reverts commit 677fb5123e

Compiles with 4.6.

Change-Id: I7f87048911b6bc28a61741d95501fa45ee97b819
2014-09-04 08:51:20 -07:00
Jia Jia
a51704d9c7 vp8 common: change 'HAVE_NEON_ASM' to 'HAVE_NEON' for compiling idct_blk_neon.c.
Change-Id: Ib89107fb824b5fe58afef6841104d5a27b2e0f2d
2014-09-04 08:40:26 -07:00
Martin Storsjo
0002da32e6 arm: Fix building vp8_subpixelvariance_neon.c with MSVC
Use the right return values - vget_low_s64 returns int64x1_t, not
a normal int64_t.

Also make __builtin_prefetch a no-op on MSVC for this file.

Change-Id: I4d2fce01d0ba106b98d3d53b137803119c2c2c08
2014-09-04 09:49:30 +03:00
Dmitry Kovalev
3820f568da Merge "Consistent allocation of vpx_codec_alg_priv_t." 2014-09-03 19:41:28 -07:00
Marco
01d9023de0 Merge "Make process_denoise_mode_change function cond-compiled." 2014-09-03 13:58:16 -07:00
Scott LaVarnway
dcbfacbb98 Neon version of vp8_build_intra_predictors_mby_s() and
vp8_build_intra_predictors_mbuv_s().

This patch replaces the assembly version with an intrinsic
version.

On a Nexus 7, vpxenc (in realtime mode, speed -12)
reported a performance improvement of ~2.6%.

Change-Id: I9ef65bad929450c0215253fdae1c16c8b4a8f26f
2014-09-03 13:41:27 -07:00
Scott LaVarnway
9293d267d2 VP8 for ARMv8 by using NEON intrinsics 17
Add vp8_subpixelvariance_neon.c
- vp8_sub_pixel_variance16x16_neon_func
- vp8_variance_halfpixvar16x16_h_neon
- vp8_variance_halfpixvar16x16_v_neon
- vp8_variance_halfpixvar16x16_hv_neon
- vp8_sub_pixel_variance8x8_neon

Change-Id: I3e5d85b2eafc26be0eef6a777789b80e4579257b
Signed-off-by: James Yu <james.yu@linaro.org>
2014-09-03 13:33:44 -07:00
Johann
5b788c0cbe Merge "Revert "Revert "VP8 for ARMv8 by using NEON intrinsics 06" This reverts commit 81ad047ee5. Revert "VP8 for ARMv8 by using NEON intrinsics 15" This reverts commit 727af7cebe3698b8493ba6c1360b0a6606c310fb."" 2014-09-03 13:27:11 -07:00
Marco
842454d2aa Make process_denoise_mode_change function cond-compiled.
This function is called only when temporal denoising is enabled.

Change-Id: I25a036e3d628edd34410d6e6fe1f9e68a90a8e56
2014-09-03 11:39:34 -07:00
Dmitry Kovalev
b08fab8808 Consistent allocation of vpx_codec_alg_priv_t.
Change-Id: I5a03496de035fbcf31e4527cd25fcae4627a57a0
2014-09-03 11:01:21 -07:00
Deb Mukherjee
a4ef1a0819 Merge "Adds config opt for highbitdepth + misc. vpx" 2014-09-02 15:41:27 -07:00
Deb Mukherjee
5acfafb18e Adds config opt for highbitdepth + misc. vpx
Adds config parameter vp9_highbitdepth, to support highbitdepth profiles.
Also includes most vpx level high bit-depth functions. However
encode/decode in the highbitdepth profiles will not work until
the rest of the code is in place.

Change-Id: I34c53b253c38873611057a6cbc89a1361b8985a6
2014-09-02 14:37:10 -07:00
Marco
6b649a0db9 Merge "Updates to adaptive/aggressive denoiser mode." 2014-09-02 10:58:41 -07:00
Marco
54575d654c Updates to adaptive/aggressive denoiser mode.
Parameter changes and modification to zero_last bias.

Change-Id: I50a408d47fde049c562bbe95075194cb0f17c31b
2014-09-02 09:47:55 -07:00
Johann
4d10506d84 Merge "Revert "Revert "VP8 for ARMv8 by using NEON intrinsics 08""" 2014-09-02 09:28:14 -07:00
Scott LaVarnway
652ef29d09 Revert "Revert "VP8 for ARMv8 by using NEON intrinsics 08""
This reverts commit 928ff03889

Compiles with 4.6 now.

Change-Id: Ib455da1098bb0e0623248be07579882a425fcbd1
2014-08-29 13:29:36 -07:00
Dmitry Kovalev
73edeb03ea Removing alg_priv from vpx_codec_priv struct.
In order to understand memory layout consider the declaration of the
following structs. The first one is a part of our API:

struct vpx_codec_ctx {
  // ...
  struct vpx_codec_priv *priv;
};

The second one is defined in vpx_codec_internal.h:

struct vpx_codec_priv {
  // ...
};

The following struct is defined 4 times for encoder/decoder VP8/VP9:

struct vpx_codec_alg_priv {
  struct vpx_codec_priv base;
  // ... 
};

Private data allocation for the given ctx:

struct vpx_codec_ctx *ctx = <get>
struct vpx_codec_alg_priv *alg_priv = <allocate>
ctx->priv = (struct vpx_codec_priv *)alg_priv;

The cast works because vpx_codec_alg_priv has a
vpx_codec_priv instance as a first member 'base'.

Change-Id: I10d1afc8c9a7dfda50baade8c7b0296678bdb0d0
2014-08-28 13:51:37 -07:00
Marco
f010b7727a vp8 fix: deallocate denoiser->yv12_last_source
Change-Id: I7f3bc292b1b411e10586f0975143ae996ea78d1d
2014-08-26 10:15:35 -07:00
Dmitry Kovalev
7982b27353 Merge "Removing extraconfig_map from vp8_cx_iface.c." 2014-08-22 17:20:42 -07:00
Dmitry Kovalev
f9fb3b8e0e Replacing 'struct vpx_fixed_buf' with 'vpx_fixed_buf_t’.
Change-Id: Ibbbc5b39429d4b753f0a966b9d84d1d7bf823650
2014-08-22 11:56:31 -07:00
Dmitry Kovalev
48274c64a4 Removing extraconfig_map from vp8_cx_iface.c.
We have just one default set of extra config values, g_usage is
never used with VP8.

Change-Id: If05e2e87bf33c8db10c9d226dbc59381bae475eb
2014-08-21 11:21:18 -07:00
Dmitry Kovalev
eafa7126a0 Merge "Replacing NOT_IMPLMENTED with NULL." 2014-08-21 11:10:00 -07:00
Johann
da63d29921 Merge "VP8 encoder for ARMv8 by using NEON intrinsics 6" 2014-08-21 10:39:02 -07:00
Dmitry Kovalev
cd6d9846b0 Replacing NOT_IMPLMENTED with NULL.
We don’t need to introduce new macro for the null value.

Change-Id: I59dbae25feeebb4e8359095801aecc8bb17d7764
2014-08-20 17:16:28 -07:00
Dmitry Kovalev
f2e652396f Removing iface pointer from vpx_codec_priv.
The iface pointer is already in vpx_codec_ctx struct.

Change-Id: I9fffe27c613a7c94476f185a1e5a53ff6d99f1c6
2014-08-20 12:31:19 -07:00
Johann
a19035e8bb Merge "VP8 encoder for ARMv8 by using NEON intrinsics 3" 2014-08-20 11:54:32 -07:00
Johann
6642efaa17 Merge "VP8 encoder for ARMv8 by using NEON intrinsics 2" 2014-08-20 11:54:23 -07:00
Marco
4eb8a850e0 Merge "Fixes to adaptive denoiser mode." 2014-08-20 11:39:44 -07:00
Marco
d2274ed354 Bugfix for vp8 aggressive denoiser mode.
Change-Id: I6c1ccd88df7c39377d5f98f8533c0cabd53cf86f
2014-08-20 10:38:59 -07:00
Marco
aa88e32017 Fixes to adaptive denoiser mode.
Scale min_consec_zero_last wrt to #temporal layers,
and use full framerate as factor in noise metric.

Change-Id: Id0842b90164ce468d1236173c51965e7620c0e12
2014-08-20 10:34:58 -07:00
Johann
911e96a4eb Revert "Revert "VP8 for ARMv8 by using NEON intrinsics 06" This reverts commit 81ad047ee5. Revert "VP8 for ARMv8 by using NEON intrinsics 15" This reverts commit 727af7cebe3698b8493ba6c1360b0a6606c310fb."
This reverts commit 920f803f2e

Change-Id: I410d9036214a1b18427cca70b4bc6d8239740737
2014-08-20 09:41:50 -07:00
James Yu
eed005b076 VP8 encoder for ARMv8 by using NEON intrinsics 6
Add shortfdct_neon.c
- vp8_short_fdct4x4_neon
- vp8_short_fdct8x4_neon

Change-Id: I90152c803b484f5fab839473d632c50af0524e68
Signed-off-by: James Yu <james.yu@linaro.org>
2014-08-20 09:25:29 -07:00
James Yu
6d6fdd9c3d VP8 encoder for ARMv8 by using NEON intrinsics 3
Add subtract_neon.c
- vp8_subtract_b_neon
- vp8_subtract_mby_neon
- vp8_subtract_mbuv_neon

Change-Id: If9a17a093478552e3e3276eeaa3f098b9021d08c
Signed-off-by: James Yu <james.yu@linaro.org>
2014-08-20 09:20:55 -07:00
Scott LaVarnway
8013aaa10b VP8 encoder for ARMv8 by using NEON intrinsics 2
Add vp8_shortwalsh4x4_neon.c
- vp8_short_walsh4x4_neon

Change-Id: Ica5f584be608c9e636f62db14f563757e94be09b
Signed-off-by: James Yu <james.yu@linaro.org>
2014-08-20 09:19:23 -07:00
Marco
8609048a77 vp8: Add check on noise_sensitivity/denoiser on.
Change-Id: Ic53b2fb69e6eee600ea222e4d06424a1bbca496c
2014-08-16 06:14:21 -07:00
Johann
69dc876b4e Set uv_crop_height/width in all the places
When configuring the buffer make sure to set all the (now) required
fields. Use the canonical variables and match the style from vpx_scale.

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

Change-Id: I71b43d4a03756b8b2d6d60fdf8d7bf41b8041787
2014-08-15 14:55:21 -07:00
Marco Paniconi
715bab6e55 Merge "Add an adaptive denoising mode." 2014-08-15 08:51:08 -07:00
Marco Paniconi
8db245b6a1 Add an adaptive denoising mode.
On key frame, will always start with normal denoising mode,
but based on a computed noise metric (normalized mse on source diff)
may switch to aggressive mode (and back down again).

Change-Id: I20330b2dcf3056287be37223302b2cab5fc103eb
2014-08-14 17:29:51 -07:00
Marco
21a0dade42 vp8: Modify to use closest reference in zero_mv bias.
Modify zero_mv bias condition to include check that "closest" reference is last_frame.
This is needed for temporal layers, where the last_frame is not always the closest reference.
Also, constain zeromv_count to be for last_frame reference.

Change-Id: I7af54a809ebf01ef43b9933c9d4095b6cb189390
2014-08-14 15:55:20 -07:00
Johann
c2c03f2b58 Remove unused vp8 quantize functions
Exact fast quantize and inexact regular quantize are unused.

Change-Id: I5a81f5059c896c919f70038af7de04d63823d26d
2014-08-13 12:45:03 -07:00
James Zern
80b6c9c56f Merge "VP8D_GET_FRAME_CORRUPTED: check frame pointer" 2014-08-12 21:11:36 -07:00
James Zern
7d9da93a97 VP8D_GET_FRAME_CORRUPTED: check frame pointer
if the decode of the first frame fails, frame_to_show may not be set.
fixes a crash in vpxdec with corrupt data.

Change-Id: I5ab9476d005778a13fd42a39d05876bb6c90a93c
2014-08-12 17:41:47 -07:00
James Zern
1d9e2b5003 Merge "remove unused fields from BOOL_CODER / vp9_writer" 2014-08-11 23:08:45 -07:00
Minghai Shang
136a022d71 [spatial svc]Remove CONFIG_SPATIAL_SVC for ss_enable_auto_alt_ref in vpx_codec_enc_cfg to fix heap-overflow issue in asan config
Change-Id: Icdf08501db5f416285f751d316941dfacd2c69ba
2014-08-11 13:43:25 -07:00
Marco Paniconi
354a2e612d vp8: Code cleanup for control of denoiser mode.
Change-Id: Icb9918dd38d15061d62852e6a2d905e8ceb2c1ac
2014-08-08 16:15:28 -07:00
Dmitry Kovalev
9a4cd41793 Merge "Removing legacy XMA features from libvpx." 2014-08-08 14:58:23 -07:00
Marco Paniconi
84ba62d353 vp8: for spatial resize, reallocate denoiser in vp8_allocate_comp.
Change-Id: I1827efe2126501a4a5637ee3ae85233d7526bc0e
2014-08-07 13:55:32 -07:00
Hangyu Kuang
a95758c881 Merge "Make the api behavior conform to api spec." 2014-08-06 17:44:53 -07:00
Marco Paniconi
8450b41d4b vp8 bugfix: Reallocate denoiser when spatially resizing.
This is needed to update the width/height and stride parameters
for the reference buffers that the denoiser uses.

Change-Id: Id51b3bdcb56bbbc8187865544ccd3d872a0d51fe
2014-08-06 14:57:52 -07:00
Hangyu Kuang
7050074756 Make the api behavior conform to api spec.
When no more data is available, vpx_codec_decode should
be called with NULL as data and 0 as data_sz.

vpx_codec_get_frame iterates over a list of the frames
available for display. The iterator storage should be initialized
to NULL to start the iteration. Iteration is complete when this
function returns NULL.

Also change the unit test to conform to the api spec.

Change-Id: I4b258b309f5df3d37d10c82f01492c0394181c2a
2014-08-06 11:16:14 -07:00
James Zern
8c3886df78 remove unused fields from BOOL_CODER / vp9_writer
measure_cost, bit_counter, value

Change-Id: I8f93444ddddbee4ece7db6076a922ad96786044c
2014-08-05 21:58:03 -07:00
Dmitry Kovalev
a42b5c2ffc Removing legacy XMA features from libvpx.
Change-Id: I60ffee7cf78e748792fa6d109322ec32f92e40a9
2014-08-05 16:34:09 -07:00
James Zern
bd72aa712b Merge "Changes interface to avoid uninitialized warnings in vp9_cx_iface.c." 2014-07-31 11:53:56 -07:00
Jim Bankoski
8a774e14ff Changes interface to avoid uninitialized warnings in vp9_cx_iface.c.
Change-Id: I1092239e21c1cde188ee2dcb765f4c6fc8c5cdec
2014-07-31 06:27:57 -07:00
Marco Paniconi
fbaa4b84af Fix to Visual Studio build error.
signed/unsigned mismatch from commit: 918011.

Change-Id: I6b9bb3618f8e72ea4cc0e6ba8fb9b13676985ed0
2014-07-30 09:14:56 -07:00
Marco Paniconi
91801176fe vp8: Add an aggressive denoising mode.
Change-Id: Ie4686e1b15af6bcc8d59d585bbeb996f38224522
2014-07-29 11:16:45 -07:00
Marco Paniconi
64db43d6a7 vp8: reduce refresh_max_mbs_perframe with fewer layers.
Change-Id: Ib39cc0218a1f232c0cde8e99ca3319c17274bd48
2014-07-24 15:47:19 -07:00
Marco Paniconi
7788c62286 Fix clang compiler warning in denoising_neon.
Issue: https://code.google.com/p/webm/issues/detail?id=829

Change-Id: I580308f8aa4af194b5d8990a9692ebd18db68ee8
2014-07-23 09:59:27 -07:00
Marco Paniconi
a9b30b381b Merge "vp8: Set default denoiser_decision to copy for UV channel." 2014-07-22 15:25:06 -07:00
Minghai Shang
f2f69dd3b3 Merge "[spatial svc]Use #if instead of #ifdef on macro CONFIG_SPATIAL_SVC" 2014-07-22 12:43:40 -07:00
Marco Paniconi
aa2ba46a61 Merge "vp8 denoiser fix: Update denoised altref on key frame." 2014-07-22 11:15:08 -07:00
Marco Paniconi
daed770d99 vp8: Set default denoiser_decision to copy for UV channel.
Since the UV decision to denoise is based on Y, we need to set
the default/initial denoiser decision_u/v to COPY_BLOCK,
to make sure if no uv_denoiser is applied we still update
(uv)running_avg with source.

Change-Id: I5af1c2afbd40c498cd3de208bea88c837099b24d
2014-07-22 11:12:50 -07:00
Minghai Shang
24c9d6ad43 [spatial svc]Use #if instead of #ifdef on macro CONFIG_SPATIAL_SVC
Change-Id: Ifc94377a0d05d66e3d21b007893a985b66db6082
2014-07-22 11:11:55 -07:00
Marco Paniconi
f909e43abc vp8 denoiser fix: Update denoised altref on key frame.
On a key frame, the denoised-running_avg for all references
frames should be updated with the source.
The altref denoised-running_avg was not being updated on key frame,
this fixes that.

Change-Id: Ie02cd0ba5383e013af59240e6df7e185d11703f6
2014-07-22 10:14:03 -07:00
Yunqing Wang
765485cab2 Add -DNDEBUG when config option debug is disabled
For gcc, when libvpx config option debug is disabled, added the
flag -DNDEBUG to disable the assertions in libvpx for some speedup.

Change-Id: Ifcb7b9e8ef5cbe5d07a24407b53b9a2923f596ee
2014-07-21 09:20:03 -07:00
Johann
018fd12cf6 Disable vp8_sixtap_predict4x4_neon
Crashing on iOS encodes
BUG=817

Change-Id: I2c50f8d359563d15a8b8002b6091184c0f9818af
2014-07-18 14:08:52 -07:00
James Zern
7d7779738f Merge changes I58a5af33,Ied9b0392
* changes:
  vp8_bilinear_predict4x4_neon: init src vectors
  vp8_sixtap_predict4x4_neon: init src vectors
2014-07-15 18:02:11 -07:00
Marco Paniconi
669e388e78 Merge "vp8: Allow for on/off control of UV temporal denoiser." 2014-07-15 11:05:54 -07:00
Marco Paniconi
21042c7154 vp8: Allow for on/off control of UV temporal denoiser.
Use noise_sensitivity level for enabling UV denoiser.

Change-Id: Ib208786a6fdf654981bcd96a3cf44e8e678025c1
2014-07-15 09:51:03 -07:00
Pengchong Jin
f349b071c6 Rewrite functions related to first pass block stats
Change-Id: I28679f88e2911b06eef5cbc83ecb62b8c69e4c53
2014-07-14 17:45:27 -07:00
Minghai Shang
5179edc0ae Merge "[spatial svc]Implement alt reference frames" 2014-07-14 13:03:11 -07:00
Deb Mukherjee
449e5f2aba Misc. bit-depth related changes
Sets the bit-depth field as default 8 in the image structure in vp8.
Generalizes yuv read in preparation for support for reading 422/444
for 8-bit and 10/12-bit.

Change-Id: I560c13c348b122fd028e408431156376b895058c
2014-07-14 11:48:04 -07:00
Minghai Shang
e899859c48 [spatial svc]Implement alt reference frames
All changes are for spatial svc only.
1. Enable encoding hidden frames in each layer and use alt reference idex to reference the hidden frame in each layer
2. Use golden reference idx for spatial reference
3. For those layers that don't have hidden frames (caused by lack of frame buffers), reference a hidden frame in lower layers
4. Add "auto-alt-refs" in svc options
Change-Id: Idf27d1fd2fb5f3ffd9e86d2119235e3dad36c178
2014-07-14 11:24:17 -07:00
James Zern
74ed33cf6e vp8_bilinear_predict4x4_neon: init src vectors
quiets uninitialized warnings on the first load.

Change-Id: I58a5af337087d96b4eaea8991a0f85c4ba58aebe
2014-07-11 00:05:25 -07:00
James Zern
5e30127c7a vp8_sixtap_predict4x4_neon: init src vectors
quiets uninitialized warnings on the first load.

Change-Id: Ied9b03928537a9ed2cd414b9e8a0be00191b0f32
2014-07-10 23:48:47 -07:00
James Zern
61c3338516 call vp[89]_clear_system_state after longjmp
restore the environment post encode/decode failure

Change-Id: I3c72e2260a616432eaf1f9545d4fb4d8e45cc7b0
2014-07-10 12:36:28 -07:00
Johann
8c03fff40b Move abs() to where it is effective
vp8/encoder/x86/denoising_sse2.c:35:10: error: taking the absolute value
of unsigned type 'unsigned int' has no effect [-Werror,-Wabsolute-value]

Change-Id: I749ba8e6f55dbd9b822bfd4260a8397554f5e524
2014-07-08 14:06:33 -07:00
Scott LaVarnway
8341fa8cb4 Merge "Neon version of vp8_denoiser_filter_uv()" 2014-07-07 09:41:07 -07:00
James Zern
b7a51cd894 vp8/bitstream.h: quiet warnings in EDSP builds
fixes:
vp8\encoder\bitstream.h: same type qualifier used more than once

Change-Id: I62b99342131fdaedb1f7cc8d2dcd13ab34637cd7
2014-06-30 23:29:34 -07:00
Marco Paniconi
970c1253ce vp8 denoiser fix: free memory of denoiser->denoiser_state.
Change-Id: I86451ddfa90d871e46e5b4c97794dbef65293c6c
2014-06-29 17:04:43 -07:00
Scott LaVarnway
a4b7ae7e82 Neon version of vp8_denoiser_filter_uv()
The encoder performance improved by 5% (vs "C")
for the test clip used.

Change-Id: I866b35eb2a06092edce7b37fc409562d0dacd7e7
2014-06-27 11:03:58 -07:00
Marco Paniconi
21f8d6a1c9 vp8: bugfix in postproc vp8_de_noise.
Set the proper number of mb_rows/cols.
Also remove warnings (unused variable) when configured with temporal-denoising disabled.

Change-Id: I8abd2372394ee55295feb87a66efd294ea6989d0
2014-06-27 09:25:14 -07:00
Scott LaVarnway
1a30f70145 denoising_sse2.c visual studio warnings/errors fix
Fixed reported vs warnings/errors.

Change-Id: Ia4c44d64a69dbd9e1738c6ebb48be29582b7e1d3
2014-06-27 05:00:26 -07:00
Marco Paniconi
91ccad2179 Merge "vp8: Add temporal denoising for UV-channel." 2014-06-26 13:03:50 -07:00
Scott LaVarnway
94ae0430d2 vp8: Add temporal denoising for UV-channel.
C version and sse2 version, and off by default.
For the test clip used, the sse2 performance improved by ~5.6%

Change-Id: Ic2d815968849db51b9d62085d7a490d0e01574f6
2014-06-26 11:45:42 -07:00
Johann
fec6886f2c Remove labels from quantize
Use break instead of goto for early exit. Unbreaks Visual Studio
builds.

Change-Id: I96dee43a3c82145d4abe0d6a99af6e6e1a3991b5
2014-06-19 10:24:58 -07:00
Johann
0d3ed089f1 sse4 regular quantize
Change-Id: Ibd95df0adf9cc9143006ee9032b4cb2ebfd5dd1b
2014-06-18 14:26:16 -07:00
Marco Paniconi
d924640663 vp8 denoising: add bias factor to zero_mv sse.
Change-Id: I95818754424e89f0d56c6d9c0c5709e6f84fa46a
2014-06-16 15:22:15 -07:00
Marco Paniconi
c153903660 Merge "Allow for deblocking temporal-denoised signal." 2014-06-13 14:51:59 -07:00
Marco Paniconi
d08b2ba172 Allow for deblocking temporal-denoised signal.
Allow for an option to selectively apply the deblocking loop filter to the denoised
raw block, based on the denoised state (no-filter, filter with zero motion, or filter with non-zero motion)
of the current block and its upper and left denoised block.
This helps to reduce some blocking artifacts from the motion-compensated denoising.

Change-Id: I0ac4e70076df69a98c5391979e739a2681e24ae6
2014-06-13 14:34:05 -07:00
Johann
79afb5eb41 Use lrand48 on Android
When building x86 assembly use lrand48 instead of the
undocumented inlined _rand function.

Android now supports rand()
https://android-review.googlesource.com/97731
but only for new versions. Original workaround:
https://gerrit.chromium.org/gerrit/15744

Change-Id: I130566837d5bfc9e54187ebe9807350d1a7dab2a
2014-06-12 19:57:25 -07:00
Tim Kopp
c49fda2615 Merge "Added OUTPUT_YUV_DENOISED CFLAG to VP8 encoder" 2014-06-12 15:10:53 -07:00
Scott LaVarnway
357495c2df Merge "Neon match to vp8 temporal denoiser fix" 2014-06-05 15:47:35 -07:00
Tim Kopp
05e8c61903 Added OUTPUT_YUV_DENOISED CFLAG to VP8 encoder
When this compiler flag is enabled, the encoder will write a denoised,
uncompressed, version of the input to denoised.yuv.

Change-Id: Ie0247f76b23219d95fe97dd70f23e097d742c249
2014-06-05 11:18:32 -07:00
Tim Kopp
dd1443e6c9 Made MACROBLOCK.increase_denoising cond-compiled
Change-Id: I59ef7c49f72d2d40bbe5b56af11bdf5f9ae2f1b8
2014-06-04 13:45:23 -07:00
Tim Kopp
0ba6e29515 s/INT_MAX/UINT_MAX/ where appropriate
Change-Id: I0156d85671305326525c4644510e240021eca461
2014-06-04 13:34:46 -07:00
Tim Kopp
f204a9a482 Fixed OUTPUT_YUV_SRC behavior for VP8
By enabling the OUTPUT_YUV_SRC compiler flag, the encoder will write the raw
input to bd.yuv.

The functionality was mostly implemented, but in its previous state did not
compile.

Change-Id: Ia331ad0f4c6e6f9f51e8d42cd33ba8cc146b3dbf
2014-05-30 09:39:07 -07:00
Scott LaVarnway
4d9b9fa508 Neon match to vp8 temporal denoiser fix
Now match the "C" version of "Fix to reduce block
artifacts from vp8 temporal denoiser."
(see change id Id9b56e59e33f3c22e79d2f89f763bdde246fdf3f)

Change-Id: I99e569bb6af4ae3532621127e12bf917a48ba08e
2014-05-28 13:32:52 -07:00
Marco Paniconi
688c5ac2a8 Merge "vp8 denoiser: fix to zero_mv mode selection." 2014-05-28 12:32:44 -07:00
Marco Paniconi
609e91f9b7 vp8 denoiser: fix to zero_mv mode selection.
In the current logic, if the sse for zero motion is smaller
than the sse for new_mv (i.e., best_sse), we may still end up
using the non-zero mv for denoising (if the magnitude of new_mv is above threshold).
This can happen for very noisy content, and can lead to artifacts.

This change ensures that we always use zero_mv (over new_mv) for
denoisng if sse_zero_mv <= best_sse.

Change-Id: I8ef9294d837b077013b77a46c9a71d17c648b48a
2014-05-28 11:23:52 -07:00
Dmitry Kovalev
0becfe42bb Merge "Removing ctrl_id parameter from vpx_codec_control_fn_t." 2014-05-27 17:35:38 -07:00
Dmitry Kovalev
8a8b662eaa Removing ctrl_id parameter from vpx_codec_control_fn_t.
Change-Id: I2b61c8c17ded1074dea92b4f6ad9be84d128b52a
2014-05-27 16:45:58 -07:00
Jim Bankoski
392a2c43c7 remove vp8 unused uvstride parm in simple loop filter
Change-Id: I35fac6c0db327ef81852f326a93878b57cb2def4
2014-05-27 16:36:17 -07:00
Marco Paniconi
567746d3f0 Merge "Fix to reduce block artifacts from vp8 temporal denoiser." 2014-05-27 15:32:16 -07:00
Dmitry Kovalev
ed784fd169 Merge "Removing vp8/common/pragmas.h." 2014-05-27 10:50:31 -07:00
Scott LaVarnway
e767cdeda3 Merge "neon matches "C" when using increase_denoising" 2014-05-27 09:01:48 -07:00
Scott LaVarnway
03de5a38e2 neon matches "C" when using increase_denoising
If increase_denoising is set,
vp8_denoiser_filter_neon() produced incorrect results.

Change-Id: I645f78e48b8f6657fa8a4b69d2c4d3488a0581dc
2014-05-26 08:06:25 -07:00
Dmitry Kovalev
1f0b2f95af Removing vp8/common/pragmas.h.
Change-Id: I80630a7350e884ebc4fef73fb5b52ec25f908523
2014-05-23 13:03:15 -07:00
Deb Mukherjee
caba78ef49 Fixes a bug for uninitialized frame buffers
Fixes a bug introduced in
https://gerrit.chromium.org/gerrit/#/c/69779/13, where
uninitialized frame buffers due to corrupt and short
buffer sizes, may cause a crash.

This patch fixes the currently failing
video/processing/static_image/vp8_convert_test

Change-Id: I1b09e21482f292c11a2bfb4e570aef1d643410a7
2014-05-23 01:26:01 -07:00
Marco Paniconi
4e81ab82d5 Fix to reduce block artifacts from vp8 temporal denoiser.
If the denoiser filter causes too big a change in the absolute pixel difference
(between source and denoised signal), the block is not denoised, which can cause
visual block artifacts. This change applies a second adjustment to the temporal filter
to effectively allow for a (weaker) denoising for such blocks (which can keep
the absolute differnence within the tolerance range in most cases).
This helps to reduce some of the block artifacts from the denoising.
The additional cost of re-applying the filter to this set of blocks is low,
as the percentage of blocks per frame (with too big a change in absolute pixel difference)
is typically small, 2-5%.

Change-Id: Id9b56e59e33f3c22e79d2f89f763bdde246fdf3f
2014-05-21 16:07:16 -07:00
Deb Mukherjee
e272273443 Renames x86_64 specific asm files
Renames all x86_64 specific assembly files to consistently
end in _x86_64.asm. This will be useful for build systems to
handle these files differently.
All new 64-bit specific assembly files should use the new
naming convention.

Change-Id: I36c89584967c82ffc4088b1b5044ac15d2bb7536
2014-05-21 13:55:56 -07:00
Jim Bankoski
bb2041d8de Fix valgrind read out of bounds error.
MMX variance code in vp8 was reading out of bounds..

TODO(JBB):  The best fix would involve removing duplicate library
functions between vp8 and vp9...

Change-Id: I5722853a6a58d3b55257ff385fa54c773bf98ded
2014-05-19 12:46:22 -07:00
Johann
ed83c2a94c Merge "vp8: Add increase_denoising parameter to denoiser." 2014-05-16 18:32:39 -07:00
Johann
7302a9b158 Merge "Correct HAVE_NEON_ASM define" 2014-05-16 16:48:49 -07:00
Marco Paniconi
6da66e1114 vp8: Add increase_denoising parameter to denoiser.
Change-Id: I96ed73e109c4f89dd06f3583cf7ecf9277401fae
2014-05-16 15:06:59 -07:00
Johann
f625b2ac93 Correct HAVE_NEON_ASM define
These optimizations are currently disabled.

Change-Id: I19c58c9cb82d017638b86196641b9e001dfa798b
2014-05-16 08:20:13 -07:00
Johann
c511d79c08 Merge "Remove intermediate step in vp8_dequantize_b" 2014-05-16 07:33:52 -07:00
Johann
1bec51d666 Merge "Build armv7a-only code" 2014-05-15 12:26:24 -07:00
Jim Bankoski
ec82d2dfec Merge "Revert "Remove Wextra warnings from vp9_sad.c"" 2014-05-15 11:54:23 -07:00
Jim Bankoski
a16794dd31 Revert "Remove Wextra warnings from vp9_sad.c"
This reverts commit 7ab9a9587b

Nightly test http://build.webmproject.org/jenkins/view/libvpx-nightly-tests/job/libvpx%20unit%20tests%20(valgrind-2)/arch=x86_64-linux-gcc,filter=-*VP8*:*Large.*/276/console

Failed 

This patch did not address all the assembly issues 
some of the vp8 assembly counts on 5 arguments being passed in to this function:   

one example : vp8_sad8x16_wmt

Please address or split this into vp9 and vp8 patches.

Change-Id: I78afcc171649894f887bb8ee3c66de24aaddc7ca
2014-05-15 08:31:20 -07:00
Johann
2f6f955a17 Remove intermediate step in vp8_dequantize_b
With the intrinsics it is no longer necessary to have a stub/helper
function.

Change-Id: I3695961c3c94f1bb750d3b7b29716e509ebba482
2014-05-14 12:24:18 -07:00
Johann
4dcc6d9707 Build armv7a-only code
Allow disabling the more generic NEON code.
Use filtered option to disable rtcd code.

Change-Id: Icb4500c1a2bac16eed3c5e3ec0c35e92e6bbbb9f
2014-05-14 12:23:33 -07:00
Johann
c6b8fce22a Merge "Revert "VP8 for ARMv8 by using NEON intrinsics 06" This reverts commit 81ad047ee5. Revert "VP8 for ARMv8 by using NEON intrinsics 15" This reverts commit 727af7cebe3698b8493ba6c1360b0a6606c310fb." 2014-05-14 11:30:25 -07:00
Marco Paniconi
f017b0d21c Merge "Revert "Revert "Remove struct params from vp8_denoiser_filter""" 2014-05-14 11:00:56 -07:00
Marco Paniconi
96d1946e87 Revert "Revert "Remove struct params from vp8_denoiser_filter""
This reverts commit 06e6d56fa1

Change-Id: If95598385b693945d6b144d03b6da8f6a57dac98
2014-05-14 10:55:53 -07:00
Deb Mukherjee
9687c057f8 Merge "Remove Wextra warnings from vp9_sad.c" 2014-05-14 10:01:50 -07:00
Deb Mukherjee
7ab9a9587b Remove Wextra warnings from vp9_sad.c
As a side-effect, the max_sad check is removed from the
C-implementation of VP8, for consistency with VP9, and to
ensure that the SAD tests common to VP8/VP9 pass.
That will make the VP8 C implementation of sad a little slower
but given that is rarely used in practice, the impact will be
minimal.

Change-Id: I7f43089fdea047fbf1862e40c21e4715c30f07ca
2014-05-14 03:17:31 -07:00
Dmitry Kovalev
b35b426e58 Merge "Fixing constant value used to calculate frame pts and duration." 2014-05-13 15:10:45 -07:00
Johann
920f803f2e Revert "VP8 for ARMv8 by using NEON intrinsics 06"
This reverts commit 81ad047ee5.
Revert "VP8 for ARMv8 by using NEON intrinsics 15"
This reverts commit 727af7cebe.

This exposes a bug in gcc 4.9 regarding register allocation. Will reland
when 4.9 is fixed.

Change-Id: I2d8a04e4edde93719280e41550f4c0765608ec4d
2014-05-13 13:21:17 -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
Johann
e1f2113af7 Use __asm__ __volatile__ with gcc
Some version of clang refuse 'asm volatile'

Change-Id: I79d909ac8ae3c04b608f20c6f10fa79b7f9fc8e0
2014-05-08 11:16:07 -07:00
Frank Galligan
ae1bbf7f81 Merge "Revert "Remove struct params from vp8_denoiser_filter"" 2014-05-07 16:21:46 -07:00
Frank Galligan
06e6d56fa1 Revert "Remove struct params from vp8_denoiser_filter"
This reverts commit e516a42527

Change-Id: I7c78712acc737ad5f580181cdab3aa76b23f3ca5
2014-05-07 16:19:20 -07:00
Johann
4bffb75ba3 Merge "Revert "VP8 for ARMv8 by using NEON intrinsics 10"" 2014-05-07 06:47:48 -07:00
Johann
3a695015ad Merge "arm: Use a correct neon vector type for 64 bit integers" 2014-05-07 06:34:25 -07:00
Martin Storsjo
d5d82a5e1a arm: Add a no-op define of __builtin_prefetch for MSVC
Both GCC and RVCT/ARMCC support __builtin_prefetch, but MSVC
doesn't.

Change-Id: I44e1eecead61bc88d8fdfd3fef03d76d4f5afe08
2014-05-07 10:43:24 +03:00
Martin Storsjo
82a83c4fe0 arm: Use a correct neon vector type for 64 bit integers
This fixes building with MSVC.

Change-Id: I763ba8855c8083d82c8b477d3a297e310e93a335
2014-05-07 10:22:40 +03:00
Johann
677fb5123e Revert "VP8 for ARMv8 by using NEON intrinsics 10"
This reverts commit c500fc22c1

There is an issue with gcc 4.6 in the Android NDK:
loopfiltersimpleverticaledge_neon.c: In function 'vp8_loop_filter_bvs_neon':
loopfiltersimpleverticaledge_neon.c:176:1: error: insn does not satisfy its constraints:

Change-Id: I95b6509d12f075890308914cc691b813d2e5cd9f
2014-05-06 14:28:00 -07:00
Johann
928ff03889 Revert "VP8 for ARMv8 by using NEON intrinsics 08"
This reverts commit a5d79f43b9

There is an issue with gcc 4.6 in the Android NDK:
loopfilter_neon.c: In function 'vp8_loop_filter_vertical_edge_y_neon':
loopfilter_neon.c:394:1: error: insn does not satisfy its constraints:

Change-Id: I2b8c6ee3fa595c152ac3a5c08dd79bd9770c7b52
2014-05-06 13:20:24 -07:00
Adrian Grange
6b4efa493a Merge changes Ibfa447fe,I771809ba
* changes:
  Fix generic-gnu target build
  Fix rounding in ARNR calculation
2014-05-05 15:41:10 -07:00
Johann
34843e9784 Merge "VP8 for ARMv8 by using NEON intrinsics 16" 2014-05-05 13:09:43 -07:00
Johann
ad42b09f2f Merge "VP8 for ARMv8 by using NEON intrinsics 15" 2014-05-05 13:09:12 -07:00
Adrian Grange
93a8a1eb8c Fix generic-gnu target build
Added macro to conditionally compile some of the
post-processing functions only when CONFIG_POSTPROC
is defined.

This was causing the build for the generic-gnu target
to fail.

Change-Id: Ibfa447feceb7a0528135025f105be48f97e9965c
2014-05-05 11:00:43 -07:00
Adrian Grange
928b34e895 Fix rounding in ARNR calculation
The rounding of the ARNR filter output prior to
normalization by the filter strength was incorrect
when strength = 0.

In this case 1 << (strength - 1) would not create the
required rounding of 0, rather it would outrange. This
patch fixes this issue.

Change-Id: I771809ba34d6052b17d34c870ea11ff67b418dab
2014-05-05 11:00:43 -07:00
Johann
1b7291d52c Merge "VP8 for ARMv8 by using NEON intrinsics 14" 2014-05-05 07:08:08 -07:00
Johann
a7355f3bbb Merge changes Iaf7d6b0a,Iece0bf56
* changes:
  Use INLINE and include vpx_config.h instead of plain 'inline'
  Use vreinterpret instead of casting neon vector types
2014-05-05 05:36:54 -07:00
Scott LaVarnway
b259f52d4b Merge "Remove struct params from vp8_denoiser_filter" 2014-05-05 05:31:24 -07:00
Martin Storsjo
7afed9a1b6 Use INLINE and include vpx_config.h instead of plain 'inline'
This fixes compilation with MSVC.

Change-Id: Iaf7d6b0a0134968a6addf315fde6d852f298db8c
2014-05-04 22:42:13 +03:00
Martin Storsjo
dfb8fc917a Use vreinterpret instead of casting neon vector types
MSVC doesn't support casting neon vector types but requires using
vreinterpret.

Change-Id: Iece0bf5632567efd7f37f527abea38afeab4926d
2014-05-04 22:40:57 +03:00
James Yu
4ea9cf3e2d VP8 for ARMv8 by using NEON intrinsics 16
Add variance_neon.c
- vp8_variance16x16_neon
- vp8_variance16x8_neon
- vp8_variance8x16_neon
- vp8_variance8x8_neon

Change-Id: Idfb9c96134a1c6a696a98ce68b4f7ed593a00660
Signed-off-by: James Yu <james.yu@linaro.org>
2014-05-03 19:07:40 -07:00
James Yu
727af7cebe VP8 for ARMv8 by using NEON intrinsics 15
Add idct_dequant_0_2x_neon.c
- idct_dequant_0_2x_neon

Change-Id: I8e129172ef1b2517cf72ff267788921f1a792586
Signed-off-by: James Yu <james.yu@linaro.org>
2014-05-03 19:07:33 -07:00
James Yu
08e38f06db VP8 for ARMv8 by using NEON intrinsics 14
Add sixtappredict_neon.c
- vp8_sixtap_predict16x16_neon
- vp8_sixtap_predict8x8_neon
- vp8_sixtap_predict8x4_neon
- vp8_sixtap_predict4x4_neon

Change-Id: I3b02fce48ae2e6c6099041ba5ddd7b090f1463b9
Signed-off-by: James Yu <james.yu@linaro.org>
2014-05-03 19:07:12 -07:00
James Yu
18e9caad47 VP8 for ARMv8 by using NEON intrinsics 13
Add shortidct4x4llm_neon.c
- vp8_short_idct4x4llm_neon

Change-Id: I5a734bbffca8dacf8633c2b0ff07b98aa2f438ba
Signed-off-by: James Yu <james.yu@linaro.org>
2014-05-03 19:07:05 -07:00
Johann
140262d39f Merge "VP8 for ARMv8 by using NEON intrinsics 12" 2014-05-03 19:06:55 -07:00
Johann
0b12a40296 Merge "VP8 for ARMv8 by using NEON intrinsics 11" 2014-05-03 19:05:26 -07:00
Johann
8c7e798c9b Merge "VP8 for ARMv8 by using NEON intrinsics 10" 2014-05-03 19:04:57 -07:00
Johann
c1ba686064 Merge "VP8 for ARMv8 by using NEON intrinsics 09" 2014-05-03 19:04:18 -07:00
James Yu
feaf766bd0 VP8 for ARMv8 by using NEON intrinsics 12
Add sad_neon.c
- vp8_sad16x16_neon
- vp8_sad16x8_neon
- vp8_sad8x8_neon
- vp8_sad8x16_neon
- vp8_sad4x4_neon

Change-Id: I08eaae49ec03fb91b394354660a5df0367cea311
Signed-off-by: James Yu <james.yu@linaro.org>
2014-05-03 04:54:39 -07:00
James Yu
4a8336fa9d VP8 for ARMv8 by using NEON intrinsics 11
Add mbloopfilter_neon.c
- vp8_mbloop_filter_horizontal_edge_y_neon
- vp8_mbloop_filter_horizontal_edge_uv_neon
- vp8_mbloop_filter_vertical_edge_y_neon
- vp8_mbloop_filter_vertical_edge_uv_neon

Change-Id: Ia9084e0892d4d49412d9cf2b165a0f719f2382d7
Signed-off-by: James Yu <james.yu@linaro.org>
2014-05-03 04:54:33 -07:00
Johann
1d65b3be2a Merge "Remove asm_offsets dependency in quantize_b_ssse3" 2014-05-03 04:21:16 -07:00
James Yu
c500fc22c1 VP8 for ARMv8 by using NEON intrinsics 10
Add loopfiltersimpleverticaledge_neon.c
- vp8_loop_filter_bvs_neon
- vp8_loop_filter_mbvs_neon

Change-Id: I7cf0a161ad4ae37c881b94cc0122f895d3baae79
Signed-off-by: James Yu <james.yu@linaro.org>
2014-05-03 04:11:00 -07:00
James Yu
55c95f2d2c VP8 for ARMv8 by using NEON intrinsics 09
Add loopfiltersimplehorizontaledge_neon.c
- vp8_loop_filter_bhs_neon
- vp8_loop_filter_mbhs_neon

Change-Id: I77f9721b20585da8bf3869a3850ff0ae4b4bfeea
Signed-off-by: James Yu <james.yu@linaro.org>
2014-05-03 04:10:45 -07:00
Johann
cf2262c44c Merge "VP8 for ARMv8 by using NEON intrinsics 08" 2014-05-03 04:10:18 -07:00
Johann
fe437bc8f8 Merge "VP8 for ARMv8 by using NEON intrinsics 07" 2014-05-03 04:08:54 -07:00
Scott LaVarnway
e516a42527 Remove struct params from vp8_denoiser_filter
This eliminates the asm_offsets dependency for future
all-assembly versions of this function.

Change-Id: I3227073ecfcb8ee6e593934fab941e9081abdda0
2014-05-02 10:31:52 -07:00
Scott LaVarnway
dea687f733 Merge "Improved intrinsic version of vp8_denoiser_filter_neon" 2014-05-02 09:59:59 -07:00
James Yu
a5d79f43b9 VP8 for ARMv8 by using NEON intrinsics 08
Add loopfilter_neon.c
- vp8_loop_filter_horizontal_edge_y_neon
- vp8_loop_filter_horizontal_edge_uv_neon
- vp8_loop_filter_vertical_edge_y_neon
- vp8_loop_filter_vertical_edge_uv_neon

Change-Id: I50b57dedabd42d2a3c183c1738cc5346f0e71ed8
Signed-off-by: James Yu <james.yu@linaro.org>
2014-05-02 09:32:11 -07:00
James Yu
930557be10 VP8 for ARMv8 by using NEON intrinsics 07
Add iwalsh_neon.c
- vp8_short_inv_walsh4x4_neon

Change-Id: I8beda6ce11ad8ce9e80cc0a38d40161938359162
Signed-off-by: James Yu <james.yu@linaro.org>
2014-05-02 09:24:54 -07:00
Johann
570d43c020 Remove asm_offsets dependency in quantize_b_ssse3
Replace it with some intrinsic code and inline assembly.

Change-Id: I81b4df146db3d01039059be7dae31083e2943b97
2014-05-02 08:00:16 -07:00
James Yu
81ad047ee5 VP8 for ARMv8 by using NEON intrinsics 06
Add idct_dequant_full_2x_neon.c
- idct_dequant_full_2x_neon

==== Summary of apply VP8 decode patch series ====
Benchmark on Samsung Chromebook, Cortex-A15, 1.7GHz, Dual core
Toolchain: linaro-1.13.1-4.8-2014.01
Compile argument: CROSS=arm-linux-gnueabihf- ../libvpx/configure
                     --target=armv7-linux-gcc --prefix=$HOME/out
                     --enable-shared --cpu=cortex-a7
Test argument: vpxdec --summary --noblit ./tears_of_steel_1080p.webm

NEON assembly   46.68 (fps)
Apply patch 06  46.65, -0.03
Apply patch 07  46.86, +0.21
Apply patch 08  46.58, -0.28
Apply patch 09  46.57, -0.01
Apply patch 10  46.51, -0.06
Apply patch 11  46.13, -0.38
Apply patch 12  45.42, -0.71
Apply patch 13  46.06, +0.64
Apply patch 14  45.19, -0.87
Apply patch 15  45.93, +0.74
Apply patch 16  45.48, -0.45
Apply patch 17  45.84, +0.36
Apply patch 18  45.91, +0.07  <= With all NEON intrinsics patches
                 Total -0.77 fps, 1.65% performance regression

Change-Id: I77bfc9eaccfb97b8d401e949ceff8795e26ca6b7
Signed-off-by: James Yu <james.yu@linaro.org>
2014-05-02 11:57:47 +08:00
Scott LaVarnway
ff209de82b Improved intrinsic version of vp8_denoiser_filter_neon
Used horizonal add instructions instead of adding
byte lanes.  The encoder performance improved by
~4% for the test clip used.

Change-Id: Iaddd10403fcffb5b3f53b1f591ab2fe0ff002c08
2014-04-30 06:58:16 -07:00
Yunqing Wang
096eaba728 Remove VP8 save_reg_neon function
This patch did a cleanup following the commit "Save NEON registers
in VP8 NEON functions". The pushing/poping of callee-saved NEON
registers was moved into individual NEON functions. Therefore,
we don't need to save those registers at the beginning of codec.
The related code was removed.

Change-Id: I5648166514fc9beffb780aa138495597731f49ea
2014-04-29 16:13:24 -07:00
Yunqing Wang
33df6d1fc1 Save NEON registers in VP8 NEON functions
The recent compiler can generate optimized code that uses NEON registers
for various operations besides floating-point operations. Therefore,
only saving callee-saved registers d8 - d15 at the beginning of the
encoder/decoder is not enough anymore. This patch added register saving
code in VP8 NEON functions that use those registers.

Change-Id: Ie9e44f5188cf410990c8aaaac68faceee9dffd31
2014-04-28 14:51:53 -07:00
Dmitry Kovalev
947748ed19 Fixing constant value used to calculate frame pts and duration.
Change-Id: Idbd017d1b42f7fdc7b1ce4e00370f5229800abd7
2014-04-25 17:39:48 -07:00
Joey Parrish
18c08607e0 Add VPXD_SET_DECRYPTOR support to the VP9 decoder.
Change-Id: I88f86c8ff9af34e0b6531028b691921b54c2fc48
2014-04-23 16:11:54 -07:00
Yunqing Wang
1893122e34 Fix dr memory VP8 encode/decode errors
This patch fixed errors reported in Issue 746: "dr memory VP8
encode errors" and Issue 745: "dr memory VP8 decode errors".
The "UNINITIALIZED READ" errors were fixed in x86 assembly
code. The list of files fixed is
vp8_intra_pred_uv_tm_sse2
vp8_intra_pred_uv_tm_ssse3

vp8_intra_pred_uv_ho_mmx2
vp8_intra_pred_uv_ho_ssse3

vp8_intra_pred_y_tm_sse2
vp8_intra_pred_y_tm_ssse3

vp8_intra_pred_y_ho_sse2

Change-Id: Ib6df7bf1d442077fe534edfd90e50ad16fadacdd
2014-04-21 17:04:05 -07:00
Yaowu Xu
99230aeb05 Prevent reading of uninitialized value
This commit added a check of reference frame to make sure that pre
buffer pointers are initialized only when necessary and make them
to 0 if ref frame is intra, hence those buffer should never be used.

Change-Id: Ieb474fcd9feb759f02e2f9c282b7348a8fa31117
2014-04-16 13:00:13 -07:00
Adrian Grange
f7bd1274e3 Enable vpxenc to specify internal coded frame size
Added command line flags "resize-width" & "resize-height"
to allow the user to specify the frame size to encode at.

These two flags are ignored if the "resize-allowed" switch
is not set to 1.

All frames in the clip are then encoded at this size, which
must be smaller than the raw frame size.

Change-Id: I3d64bd9303d5c0bd678461a866a1ea621700d744
2014-04-14 10:54:19 -07:00
Dmitry Kovalev
8503d72e6a Removing legacy XMA code from vp8.
Change-Id: Ib9f7fd3fd56e304e5f587f790c97ac34a3077265
2014-04-10 23:30:17 -07:00
Sergey Ulanov
409f8da265 Fix onyx_if.c to not to redefine M_LOG2_E if it's already defined.
This fixes warning when compiling libvpx for PNaCl. PNaCl's version
of math.h defines M_LOG2_E.

Change-Id: Iba9450441538e9f82447ad2936bea94d21bafdf1
2014-04-10 08:54:30 -07:00
Jan Gerber
9848d67bb3 Remove an unused typedef
Change-Id: Ie0eb9ac4529db00a322511e5241a59b501c289b7
2014-04-04 08:47:52 -07:00
Yunqing Wang
c8773416fb Fix uninitialized read in postprocessing
This patch fixed WebRTC Issue 3020: "Uninit error at
vp8_mbpost_proc_down_xmm". The first 8 values in d were not initialized,
but was accessed. This patch fixed c code as well as mmx and sse2 code.

Change-Id: Iaa5b41a4ed3bea971b15fb826ce34b7ab4e36fb1
2014-03-24 14:54:25 -07:00
James Zern
7ae5954d35 Merge "tokenize: quiet -Warray-bounds warnings" 2014-03-18 15:09:41 -07:00
James Zern
aad7b55b40 Merge "rdopt: quiet -Warray-bounds warnings" 2014-03-18 15:08:54 -07:00
James Zern
90de3b0124 tokenize: quiet -Warray-bounds warnings
eob is limited by GetCoeffs

Change-Id: Ie5c0d024796fe6c9b2db0374892544e421bd5d09
2014-03-15 10:39:23 -07:00
James Zern
268f32db21 rdopt: quiet -Warray-bounds warnings
eob is limited by GetCoeffs

Change-Id: Id48a92e600375a1d4fb956757c93c91ebb5df59a
2014-03-15 10:37:49 -07:00
James Zern
2a19c96362 onyx_if: quiet -Warray-bounds warnings
'number_of_layers' is range checked before assignment from the user
config.

Change-Id: Idefdaceb8736f126fa7c647da2b047dafb56ea52
2014-03-15 10:36:27 -07:00
James Zern
805078a1bf build: convert rtcd.sh to perl
significantly speeds up file generation.

the goal of this change is to convert rtcd.sh to perl as directly as
possible to allow for simple comparison. future changes can make it more
perl-like.

---
Linux
    [CREATE] vpx_scale_rtcd.h
real    0m0.485s ->    0m0.022s
    [CREATE] vp8_rtcd.h
real    0m4.619s ->    0m0.060s
    [CREATE] vp9_rtcd.h
real    0m10.102s ->    0m0.087s

Windows
    [CREATE] vpx_scale_rtcd.h
real    0m8.360s ->    0m0.080s
    [CREATE] vp8_rtcd.h
real    1m8.083s ->    0m0.160s
    [CREATE] vp9_rtcd.h
real    2m6.489s ->    0m0.233s

Change-Id: Idfb71188206c91237d6a3c3a81dfe00d103f11ee
2014-03-03 14:47:11 -08:00
Minghai Shang
3a8deeb8b6 Merge "[svc] Add target bitrate settings for each layers." 2014-02-27 10:51:26 -08:00
Dmitry Kovalev
7d5bffc452 Adding vpx_sse_to_psnr() function.
Removing all copies of identical vp8_mse2psnr/vp9_mse2psnr functions.
Using vpx_sse_to_psnr() instead in all places.

Change-Id: I15beef9834d43d8fc8a8a7a2d1fc5de3d658fed8
2014-02-26 16:21:12 -08:00
Minghai Shang
8c196b27b3 [svc] Add target bitrate settings for each layers.
Change-Id: Ia7677fb436667bc4f76db71f65e4784f433f7826
2014-02-26 13:30:50 -08:00
James Yu
fb5d281bb6 VP8 for ARMv8 by using NEON intrinsics 05
Add dequantizeb_neon.c
- vp8_dequantize_b_loop_neon

vpxdec  --summary --noblit ../videos/tears_of_steel_1080p.webm
Before => After, 13.25 => 13.23 (fps)

Change-Id: Iebe3b0c6ed2359c778b0570763c5681ae25fef0c
Signed-off-by: James Yu <james.yu@linaro.org>
2014-02-26 10:16:00 +08:00
James Yu
28b2f82f97 VP8 for ARMv8 by using NEON intrinsics 04
Add dequant_idct_neon.c
- vp8_dequant_idct_add_neon

vpxdec  --summary --noblit ../videos/tears_of_steel_1080p.webm
Before => After, 13.25 => 13.22 (fps)

Change-Id: Id48f39e1da58dd3d8d37658e94989411997f4f7c
Signed-off-by: James Yu <james.yu@linaro.org>
2014-02-26 09:59:23 +08:00
James Yu
d749ab6221 VP8 for ARMv8 by using NEON intrinsics 03
Add dc_only_idct_add_neon.c
- vp8_dc_only_idct_add_neon

vpxdec  --summary --noblit ../videos/tears_of_steel_1080p.webm
Before => After, 13.25 => 13.24 (fps)

Change-Id: I5e9e277ec3a3ca67e13c8cc4c324a6fbe8a897fc
Signed-off-by: James Yu <james.yu@linaro.org>
2014-02-26 09:28:29 +08:00
James Yu
300a3bfc73 VP8 for ARMv8 by using NEON intrinsics 02
Add copymem_neon.c
- vp8_copy_mem16x16_neon
- vp8_copy_mem8x8_neon
- vp8_copy_mem8x4_neon

vpxdec  --summary --noblit ../videos/tears_of_steel_1080p.webm
Before => After, 13.25 => 13.25 (fps)

Change-Id: Ib956b5a20522ff57dc8a580bf0aef7b252bddba6
Signed-off-by: James Yu <james.yu@linaro.org>
2014-02-23 22:56:53 +08:00
Adrian Grange
b7be30eb36 Cleanup some comments.
Change-Id: I568861ba1d43620865ad9a98a97eef37a51fd856
2014-02-14 15:05:30 -08:00
Yaowu Xu
ecf392a155 Merge "minor spelling cleanup in comments" 2014-02-14 14:29:35 -08:00
Frank Galligan
a4f30a5023 Add VP9 decoder support for external frame buffers
Added support for external frame buffers to libvpx's VP9 decoder.
If the external frame buffer functions are set then libvpx will
call the get function whenever it needs a new frame buffer to
decode a frame into. And it will call the release function
whenever there are no more references to that buffer.

Change-Id: Id2934d005f606af6e052fb6db0d5b7c02f567522
2014-02-13 13:14:19 -08:00
Andrew Russell
549c31f8ae minor spelling cleanup in comments
Change-Id: Ia91c6c406273345b08505097ffe1af3896980f06
2014-02-12 16:32:51 -08:00
Tom Finegan
9ff89d9446 vp8/encoder: Silence MSVC warnings in firstpass.c.
Added some casts to int to silence MSVC warnings.

Change-Id: I72481ec2abd12110cf87a3d0da7a1cbe9ef2f47c
2014-02-06 17:02:02 -08:00
Adrian Grange
2554d5731a Remove delete_first_pass_file.
Change-Id: If46d93fb1c26e4629af1f492bfad7a82b4c4f778
2014-02-05 11:31:44 -08:00
Adrian Grange
ee5cf3794e Remove duplicated code
Change-Id: I1b7c8165162e835e22cf164cce989c0cebd7ca95
2014-02-04 10:01:04 -08:00
Frank Galligan
c6d537155c Merge "Revert external frame buffer code." 2014-01-24 11:31:23 -08:00
Frank Galligan
b1c72b633e Revert external frame buffer code.
A future CL will add external frame buffers
differently.

Squash commit of four revert commits:
Revert "Increase required number of external frame buffers"

This reverts commit 9e41d569d7.

Revert "Add external constants."

This reverts commit bbf53047b0.

Revert "Add frame buffer lru cache."

This reverts commit fbada948fa.

Conflicts:
	vpxdec.c

Change-Id: I76fe42419923a6ea6c75d9997cbbf941d73d3005

Revert "Add support to pass in external frame buffers."

This reverts commit 10f891696b.

Conflicts:
	test/external_frame_buffer_test.cc
	vp9/common/vp9_alloccommon.c
	vp9/common/vp9_reconinter.c
	vp9/decoder/vp9_decodeframe.c
	vp9/encoder/vp9_onyx_if.c
	vp9/vp9_dx_iface.c
	vpx/vpx_decoder.h
	vpx/vpx_external_frame_buffer.h
	vpx_scale/generic/yv12config.c
	vpxdec.c

Change-Id: I7434cf590f1c852b38569980e4247fad0d939c2e
2014-01-24 10:10:20 -08:00
James Zern
513fae3ee6 vp8/encoder: add extern "C" to headers
Change-Id: I252f5f8a5d5ada65da08699774a7bb1eb2bd5b2e
2014-01-23 16:21:24 -08:00
James Zern
14ae5fd8f3 vp8/decoder: add extern "C" to headers
Change-Id: I7865db2d15ffa8cfa4de88714e48734c5ff9bb86
2014-01-23 16:21:24 -08:00
James Zern
aceba82c41 vp8/common: add extern "C" to headers
Change-Id: I13b434b1e6621e31962b08831c3587c039368c83
2014-01-23 16:21:24 -08:00
Martin Storsjo
e5647d6826 arm: Use vreinterpret instead of a plain cast for converting between neon vector types
This fixes building with MSVC for arm.

Change-Id: Iffae0408e0c68760e87e96b9e17d9df8e8cadb1a
2014-01-22 11:28:37 +02:00
Deb Mukherjee
67fb3bf639 Change the vp8 END_USAGE typedef
Makes the END_USAGE typedef compatible with the vpxenc input

Change-Id: If784586fdb90a1e6f7badcb522ea9e93d4ddc030
2014-01-17 15:39:49 -08:00
Johann
dadf350551 Apply neon flags to intrinsic files
Filter out files ending in _neon.c and append .neon so the Android build
system knows to apply -mfpu=neon

Change-Id: Ib67277e5920bfcaeda7c4aa16cd1001b11d59305
2014-01-10 12:16:59 -08:00
Marco Paniconi
193fa5c8ba Keep buffer clipped to maximum in change_config.
Under a configuration change, where the bitrate suddenly decreases,
the buffer level may be larger than maximum allowed (for that first frame to be encoded after change_config).
This change keeps it clipped to its maximum level.

Change-Id: I4d0b5b3d1fd8148600dd39e02bd630c9464baba5
2014-01-09 14:33:40 -08:00
James Yu
79395e16cf VP8 for ARMv8 by using NEON intrinsics 01
Add bilinearpredict_neon_intrinsics.c
- vp8_bilinear_predict4x4_neon
- vp8_bilinear_predict8x4_neon
- vp8_bilinear_predict8x8_neon
- vp8_bilinear_predict16x16_neon

Change-Id: I33dfa502881219841b442dda32b73220e51b716b
Signed-off-by: James Yu <james.yu@linaro.org>
2014-01-09 09:56:22 -08:00
Christian Duvivier
b52db6b7e8 ARM NEON version of denoiser.
Change-Id: I951abd4ad0078f78949f3cb79453ac334fb82a7e
2014-01-02 10:51:05 -08:00
James Zern
bb28520891 vp8/encoder: normalize include guards
Change-Id: I82834550503a43ff7ec8422342dc65136453b287
2013-12-16 19:41:01 -08:00
James Zern
074dc67277 vp8/decoder: normalize include guards
Change-Id: Ifa7934927cc8461cd58ca0b05bf76533abd78cb6
2013-12-16 19:40:58 -08:00
James Zern
e903cacf5b vp8/common: normalize include guards
Change-Id: Ia8789a8f864e0edc0bf94f00f6430846f86911c3
2013-12-16 19:40:54 -08:00
Frank Galligan
d0ee1fd797 Merge "Add support to pass in external frame buffers." 2013-12-15 19:18:25 -08:00
Frank Galligan
10f891696b Add support to pass in external frame buffers.
VP9 decoder can now use frame buffers passed in by the application.

Change-Id: I599527ec85c577f3f5552831d79a693884fafb73
2013-12-15 18:45:46 -08:00
James Zern
dce5b82f12 Merge "vp8: remove 2 unused tables" 2013-12-11 13:16:41 -08:00
Adrian Grange
1f07e804f0 Merge "Fix the printf format string" 2013-12-11 12:50:04 -08:00
Adrian Grange
8af3e6507e Fix the printf format string
There were two problems with the format string in
the conditionally compiled print statement. It referred
to a variable that is no longer available and it used
incorrect format specifiers.

Change-Id: I315e22bea2691bb535a2e33f5ca206fc55287a37
2013-12-11 10:47:59 -08:00
James Zern
3d7cc9d2d1 vp8: remove 2 unused tables
Change-Id: Ib5ba4e0b438107741efa28251848306322fd7f89
2013-12-10 21:13:21 -08:00
Ehsan Akhgari
45bac0c496 Add include guards to setupintrarecon.h and vpx_once.h
Change-Id: Ife17fc6369ce32f36d5c7f8a2ef5a3b7724d81b9
2013-12-09 10:59:28 -08:00
Yaowu Xu
33e5e35fdb Fix a spelling mistake in filename
Change-Id: Ic06124ed95a50935b1c6509907dcac87c7707bcc
2013-12-03 17:19:41 -08:00
Yaowu Xu
a0f77f6acb Fix VP8 border replication for very small image
Also added a test vector for this issue.

Change-Id: I8a8654f9d33b27afd53c295f1ea44d198550d067
2013-12-03 17:06:17 -08:00
Marco Paniconi
d486427cf1 Undo the vp8 change in "Reduce loop filter in..."
Patch in https://gerrit.chromium.org/gerrit/#/c/41176/
was merged into repository by mistake.

Change-Id: I235c71af26bb2d72698c8aac2301e5a7e9c5f960
2013-11-19 17:16:00 -08:00
Jim Bankoski
69541e1dec Merge "Reduce loop filter in cyclic refresh." 2013-11-19 14:42:32 -08:00