Commit Graph

3011 Commits

Author SHA1 Message Date
Yaowu Xu
cfe9758c4e Remove duplicate definitions
This fixes the build errors with msvc.

Change-Id: Ie2716e4c15a1bacfb00a8d41ec3283d718af88fc
2016-01-20 08:56:41 -08:00
Yunqing Wang
ff0107f60d Amend and improve VP8 multithreading implementation
There are flaws in current implementation of VP8 multithreading encoder
and decoder as reported in the following issue:
https://code.google.com/p/chromium/issues/detail?id=158922

Although the data race warnings are harmless, and wouldn't cause real
problems while encoding and decoding videos, it is better to fix the
warnings so that VP8 code could pass the TSan test.

To synchronize the thread-shared data access and maintain the speed
(i.e. decoding speed), use multiple mutexes based on mb_rows to reduce
the number of synchronizations needed, make the reads and writes of
the shared data protected, and reduce the number of mb_col writes by
nsync times.

The decoder speed tests showed < 3% speed loss while using 2 ~ 4
threads.

Change-Id: Ie296defffcd86a693188b668270d811964227882
2016-01-08 11:59:49 -08:00
James Zern
44fe73ec37 Merge "vp8: fix loop filter level clamping" 2015-12-09 01:38:09 +00:00
James Zern
2e693eb80e vp8: fix loop filter level clamping
the loop filter level is transmitted as 6-bits + sign so needs to be clamped in
the delta + absolute case.

BUG=https://bugzilla.mozilla.org/show_bug.cgi?id=1224363

Change-Id: Icbdca4fdbf043466429bd5c9d59dbe913bf153bc
2015-12-03 16:18:48 -08:00
James Zern
ff3674a15e vp8: fix quantizer clamping
the quantizer is transmitted as 7-bits + sign so needs to be clamped in
the delta + absolute case.

BUG=https://bugzilla.mozilla.org/show_bug.cgi?id=1224361

Change-Id: I9115f5d1d5cf7e0a1d149d79486d9d17de9b9639
2015-12-03 16:16:28 -08:00
Ronald S. Bultje
92c4d8149a Merge "vp10: add extended-intra prediction edges experiment." 2015-10-20 15:57:05 +00:00
James Zern
a046f56491 vp8cx: remove deprecated reference/entropy controls
VP8E_UPD_ENTROPY, VP8E_UPD_REFERENCE and VP8E_USE_REFERENCE have been
deprecated since the initial public release

Change-Id: Ied16b441eec13434d85f1ab115d49ccaf5f2f7b0
2015-10-16 17:02:36 -07:00
Ronald S. Bultje
c7dc1d78bf vp10: add extended-intra prediction edges experiment.
This experiment allows using full above/right edges for all transform
sizes whenever available (for d45/d63), and adds bottom/left edges for
d207.

See issue 1043.

Change-Id: I5cf7f345e783e8539bb6b6d2c9972fb1d6d0a78b
2015-10-16 19:30:39 -04:00
Ronald S. Bultje
b1d85bf60f vp8: align left pixel array by 16 bytes.
The x86 simd expects this. Identical alignment can be found in vp9
and vp10 also. Fixes crashes on 32bit x86 systems.

Change-Id: I229c88d8f696acbef5337c8fa9503528df4e1c40
2015-10-01 10:11:54 -04:00
Ronald S. Bultje
c26a9ecaa2 vp8: change build_intra4x4_predictors() to use vpx_dsp.
I've added a few new functions (d45e, d63e, he, ve) to cover the
filtered h/v 4x4 predictors that are vp8-specific, the "correct"
d45 with the correctly filtered bottom-right pixel (as opposed to
the unfiltered version in vp9), and the "broken" d63 with weirdly
filtered bottom-right pixels (which is correctly filtered in vp9).

There may be a minor performance impact on all systems because we
have to do an extra copy of the Above pixel array to incorporate
the topleft pixel in the same array (thus fitting the vpx_dsp API).
In addition, armv6 will have a more serious performance impact b/c
I removed the armv6/vp8-specific assembly. I'm not sure anyone
cares...

Change-Id: I7f9e5ebee11d8e21aca2cd517a69eefc181b2e86
2015-09-30 18:45:49 -04:00
Ronald S. Bultje
7cdcfee82c vp8: change build_intra_predictors_mbuv_s to use vpx_dsp.
Change-Id: I936c2430c3c5b1e0ab5dec0a20110525e925b5e4
2015-09-30 18:45:46 -04:00
Ronald S. Bultje
54d48955f6 vp8: change build_intra_predictors_mby_s to use vpx_dsp.
Change-Id: I2000820e0c04de2c975d370a0cf7145330289bb2
2015-09-30 18:45:40 -04:00
Marco Paniconi
7d28d12ef3 Merge "VP8: Update rate correction factor for drop_overshoot feature." 2015-09-28 19:53:10 +00:00
Marco
bd3088fd56 VP8: Update rate correction factor for drop_overshoot feature.
Update rate correction factor when we drop the frame due to overshoot.
Only affects when the drop_overshoot feature is on: screen_content_mode = 2.

Change-Id: I67e24de979b4c74744151d2ceb3cd75fec2a1e7a
2015-09-28 12:11:33 -07:00
Ronald S. Bultje
812945a8f1 vp9/10: improve support for render_width/height.
In the decoder, map this to the output variable vpx_image_t.r_w/h.
This is intended as an improved version of VP9D_GET_DISPLAY_SIZE,
which doesn't work with parallel frame decoding. In the encoder,
map this to a codec control func (VP9E_SET_RENDER_SIZE) that takes
a w/h pair argument in a int[2] (identical to VP9D_GET_DISPLAY_SIZE).

Also add render_size to the encoder_param_get_to_decoder unit test.

See issue 1030.

Change-Id: I12124c13602d832bf4c44090db08c1009c94c7e8
2015-09-25 22:18:22 -04:00
Marco
ece841f03f VP8: Adjust rate correction factor for drop due to overshoot.
Change-Id: Id70ca2e18a46247720eb631ae13a8430bd8b0954
2015-09-24 16:40:29 -07:00
Marco
3140e90175 vp8: Small adjustment to cyclic_refresh max_mbs_perframe.
For 3 temporal layers, reduce somewhat the
cyclic_refresh_mode_max_mbs_perframe parameter, from 20% to ~14%.
Small increase in PSNR/SSIM metrics.

Change-Id: Ia216fa5474048f1ef7fe3db88cd60dfef2a1bf8a
2015-09-09 15:34:58 -07:00
Debargha Mukherjee
1c8567ff09 Remove some trailing whitespaces
Change-Id: Icf06d35ca347713253d1eba341a894b51efa81a9
2015-09-08 01:31:04 -07:00
Johann
c7f58bcc70 Only build multithreaded functions on mt builds.
Change-Id: I2e0cc72a0543bfea1d2d3499b9906519d5cb3f15
2015-09-01 17:05:05 -07:00
Johann
c5f11912ae Include vpx_dsp_common.h when using VPXMIN/MAX
Change-Id: I2e387a06484a06301f3cd6600c4ba2f4335b61ee
2015-08-31 14:36:35 -07:00
Marco Paniconi
4dcbf0a809 Merge "vp8: modifcatiion to skin map computation." 2015-08-28 21:49:56 +00:00
James Zern
820302a394 vp8: use VPX(MIN|MAX) from vpx_dsp_common.h
remove MIN/MAX defines in vp8/common/common.h

Change-Id: I41520f34af175e05b263ebd12198f4de29a967db
2015-08-27 15:31:24 -07:00
Johann Koenig
5c245a46d8 Merge changes I53b5bdc5,Ib81168a7,Ie0113945
* changes:
  Only build ssse3 filter functions on 64 bit
  Clean up unused function warnings in vp8 encoder
  Clean up unused function warnings in vp8 onyx_if.c
2015-08-27 20:58:53 +00:00
Johann Koenig
0ae1c83277 Merge "Clean up unused function warnings in vp8 common" 2015-08-27 20:57:23 +00:00
James Zern
205532f3a7 Merge changes I56fad85c,I7401a70a
* changes:
  vp8e_encode: check validate_config return
  vp9_update_layer_...config: delete dead assignment
2015-08-27 03:02:57 +00:00
Johann Koenig
c50f6739f8 Merge "Clean up unused function warnings in vp8 decoder" 2015-08-26 18:36:10 +00:00
Johann
06ba5254ee Clean up unused function warnings in vp8 encoder
Mark rdopt.h and treewriter.h functions with INLINE.

Change-Id: Ib81168a709d09dfba7de16c596133310e04c6656
2015-08-26 10:32:12 -07:00
Johann
821f02947e Clean up unused function warnings in vp8 onyx_if.c
Remove really unused segmentation_test_function

Hide decide_key_frame and recode_loop_test under non-realtime check.

Change-Id: Ie0113945ffbd096dbb89a553548f526b2a0ee0c6
2015-08-26 10:29:42 -07:00
Johann
5c055cc4cf Clean up unused function warnings in vp8 common
Mark functions in findnearmv.h, invtrans.h and setupintrarecon.h
with INLINE.

Hide function in postproc.h behind the same #if as it's callers.

Change-Id: Ic1e014a943d2aca280f137019218b9d4f1443d61
2015-08-26 10:15:24 -07:00
Johann
51b654e8f0 Remove vp8_priv_sz
This is a leftover of the XMA code which was removed a long time ago.

Found while looking for unused functions.

Change-Id: I07a3d542ae55440af59380dcdcf9a6c11cdfcb75
2015-08-26 17:10:41 +00:00
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