Commit Graph

7241 Commits

Author SHA1 Message Date
hkuang
1c396f3f8e Merge "Fix a thread lost bug in frame parallel decode." 2015-02-05 14:07:35 -08:00
hkuang
65f046e29f Merge "Mute the harmless tsan error in frame parallel decode." 2015-02-05 12:44:04 -08:00
Yaowu Xu
c905c42ad8 Remove unnecessary initialization
loop_filter_level is always reset in loop_filter_frame() later in
encoder.

Change-Id: I608e03d905a6b23e7d5025ca747e4784c665007e
2015-02-04 13:56:16 -08:00
Yaowu Xu
581aee001e Move tx_mode decision logic into select_tx_mode()
Change-Id: I7f8f78c33eb3f33344b029a27bda320f4d68c577
2015-02-04 13:54:49 -08:00
Yaowu Xu
a844a778c7 Merge "Adjust partitioning threshold based rtc speed" 2015-02-04 12:52:03 -08:00
Yaowu Xu
3bc0c6576f Merge "Move calls to avoid unnecessary operations" 2015-02-04 12:51:16 -08:00
hkuang
41e376e494 Mute the harmless tsan error in frame parallel decode.
Change-Id: I52565fd90461221f89134997a0782cb1b681df01
2015-02-04 12:39:35 -08:00
Jingning Han
1221641914 Merge "Unify luma and chroma inter predictors in choose_partitioning" 2015-02-04 12:09:21 -08:00
Jingning Han
fb2bac4001 Merge "Save an extra call for setup_pred_plane function" 2015-02-04 12:09:14 -08:00
Jingning Han
ce819d74dc Merge "Account for chroma component costs in RTC mode decision" 2015-02-04 12:09:01 -08:00
Yaowu Xu
bdfb5f986e Adjust partitioning threshold based rtc speed
On rtc set:
speed 7 quality improves about 0.5%
speed 8 quality improves about 1.0%

Encoding time for speed 7 changes from 67804ms to 65889ms
Encoding time for speed 8 changes from 58659ms to 56808ms

Change-Id: Iabcfb53012fc1b9f3326cdbc167e5758b8c7ad30
2015-02-04 11:28:39 -08:00
hkuang
b104b84058 Fix a thread lost bug in frame parallel decode.
After syncing the frame worker thread, avaiable thread count should
increase by 1 even the worker thread does not have displayable frame
to output.

Change-Id: I9eeb87720fed82dfe38555286833ff88e8a8e746
2015-02-04 11:07:02 -08:00
Jingning Han
1b9082ec6b Unify luma and chroma inter predictors in choose_partitioning
Change-Id: I8bfc80f4fffb0892e93d3326394a52d1ee3c0f37
2015-02-04 10:02:57 -08:00
Jingning Han
4ccfc7d517 Save an extra call for setup_pred_plane function
Reuse the yv12_mb array to fetch the buffer pointers/strides
corresponding to the current reference frame.

Change-Id: I5276b7494158b2cccef15213be2dc189e9036851
2015-02-04 09:47:14 -08:00
Jingning Han
0c6d3a03e1 Account for chroma component costs in RTC mode decision
This commit allows the encoder to account for additional chroma
plane costs in the mode decision process, if the current block
potentially contains significant color change. It improves the
visual quality at very low bit-rates.

The compression performance of dark720p is improved by 12.39% in
speed 6. For jimred at 150 kbps, the PSNR of V component (red)
increased by 0.2 dB, at the expense of about 5% increase in
encoding time. Note that for sequences where the chroma components
are fairly consistent, the encoding time increase is negligible.

On average the rtc set compression performance is improved by
1.172% in PSNR and 1.920% in SSIM.

Change-Id: Ia55b24ef23a25304f7ec9958fbf07fd6e658505c
2015-02-04 09:45:14 -08:00
Yunqing Wang
b3b7645a2f vp9_dthread: remove frame_parallel_decoding_mode requirement
This patch continues the work to remove frame_parallel_decoding_mode
requirement in VP9 multi-threaded tile decoder. In order to do that,
the frame counts associated to each thread need to be accumulated
together after the frame is decoded.

Change-Id: Idba1a756cedfed3c154aef52ed82c8da3bbf9e0c
2015-02-04 09:16:41 -08:00
Johann
3a5d40608e Merge "Remove unnecessary pointer check" 2015-02-03 17:12:56 -08:00
Yaowu Xu
02537ebbe4 Move calls to avoid unnecessary operations
Change-Id: I236f7f75ab9a4511d1b52a6a67299b0e844a103e
2015-02-03 17:01:37 -08:00
Yaowu Xu
cb411108a3 Merge "adjust rtc setting and threshold" 2015-02-03 15:13:52 -08:00
hkuang
70554a21f1 Merge "Remove duplicate code." 2015-02-03 13:37:48 -08:00
Jim Bankoski
d7783cae95 Merge "make low bitrates a lot less blocky" 2015-02-03 13:25:06 -08:00
Johann
ba18609502 Remove unnecessary pointer check
The original implementation had the following comment:
// Ignore mv costing if mvsadcost is NULL

However the current implementation does not allow for this.
If x exists then nmvsadcost must not be null.

This removes the only warning from -Wpointer-bool-conversion

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

Change-Id: I1a2cee340d7972d41e1bbbe1ec8dfbe917667085
2015-02-03 13:03:46 -08:00
Jingning Han
894f0fbd3b Merge "Assign 2nd ref frame in choose_partitioning" 2015-02-03 12:25:18 -08:00
Jingning Han
ca9c352fc3 Assign 2nd ref frame in choose_partitioning
Avoid the use of uninitialized second reference frame for fetching
reference block.

Change-Id: I9983a0daea829700b3270dc8bf2bcc6d6ea36652
2015-02-03 11:17:51 -08:00
Yunqing Wang
f5b3631621 Merge "vp9_dthread: pass frame counts to decoder functions" 2015-02-03 10:52:02 -08:00
Yaowu Xu
a6b3e01a27 Add mutex initialization in encoder
This resolves the encoder crashes on windows.

Change-Id: I159d79014cf9279751e403936ce1f84482ae82da
2015-02-03 09:53:08 -08:00
Yunqing Wang
85a9bc04d4 vp9_dthread: pass frame counts to decoder functions
The current multi-threaded tile decoder requires that the videoes
are encoded with frame_parallel_decoding_mode = 1. This requirement
is not necessary, and is better to be removed. This patch includes
the first part of the work.

Change-Id: Ic7695fb3cfe13f9022582c9f0edd2aa6e2e36d28
2015-02-03 09:39:15 -08:00
Jim Bankoski
9f1cf2c8cf make low bitrates a lot less blocky
Remove loop filter skip at speed 7+ because of bad visual artifacts and
up the postprocessing.

Change-Id: Ibdd0bac71aaee232d2bb2e14462733c51517768d
2015-02-03 06:45:56 -08:00
Yaowu Xu
65a1a3e85d adjust rtc setting and threshold
1. Adjusted the threshold for coef update computation based on counts
of tx used, avoid coef update computation when count is low (<20)
2. Move sf->lpf_pick = LPF_PICK_MINIMAL_LPF to speed 8.

Change-Id: I02b44309e40fcdbf135c7934ae067a3f42502d30
2015-02-02 17:43:46 -08:00
hkuang
4ed539f22e Merge "Fix a bug from merging frame parallel branch into master." 2015-02-02 17:08:42 -08:00
hkuang
94a459522e Fix a bug from merging frame parallel branch into master.
The merge did not merge the fix for issue #850.

Change-Id: I0dc1377dbfcb9497fb01a13d4f78ac65bff5eb33
2015-02-02 16:01:17 -08:00
Alex Converse
a79db92c07 Merge "Allow larger encoder configurations." 2015-02-02 12:05:56 -08:00
Yaowu Xu
80e729f601 Merge "Optimize coef update" 2015-02-01 20:08:29 -08:00
hkuang
be6aeadaf4 Try again to merge branch 'frame-parallel' into master branch.
In frame parallel decode, libvpx decoder decodes several frames on all
cpus in parallel fashion. If not being flushed, it will only return frame
when all the cpus are busy. If getting flushed, it will return all the
frames in the decoder. Compare with current serial decode mode in which
libvpx decoder is idle between decode calls, libvpx decoder is busy
between decode calls.

Current frame parallel decode will only speed up the decoding for frame
parallel encoded videos. For non frame parallel encoded videos, frame
parallel decode is slower than serial decode due to lack of loopfilter
worker thread.

There are still some known issues that need to be addressed. For example:
decode frame parallel videos with segmentation enabled is not right sometimes.

* frame-parallel:
  Add error handling for frame parallel decode and unit test for that.
  Fix a bug in frame parallel decode and add a unit test for that.
  Add two test vectors to test frame parallel decode.
  Add key frame seeking to webmdec and webm_video_source.
  Implement frame parallel decode for VP9.
  Increase the thread test range to cover 5, 6, 7, 8 threads.
  Fix a bug in adding frame parallel unit test.
  Add VP9 frame-parallel unit test.
  Manually pick "Make the api behavior conform to api spec." from master branch.
  Move vp9_dec_build_inter_predictors_* to decoder folder.
  Add segmentation map array for current and last frame segmentation.
  Include the right header for VP9 worker thread.
  Move vp9_thread.* to common.
  ctrl_get_reference does not need user_priv.
  Seperate the frame buffers from VP9 encoder/decoder structure.
  Revert "Revert "Revert "Revert 3 patches from Hangyu to get Chrome to build:"""
 Conflicts:
       test/codec_factory.h
       test/decode_test_driver.cc
       test/decode_test_driver.h
       test/invalid_file_test.cc
       test/test-data.sha1
       test/test.mk
       test/test_vectors.cc
       vp8/vp8_dx_iface.c
       vp9/common/vp9_alloccommon.c
       vp9/common/vp9_entropymode.c
       vp9/common/vp9_loopfilter_thread.c
       vp9/common/vp9_loopfilter_thread.h
       vp9/common/vp9_mvref_common.c
       vp9/common/vp9_onyxc_int.h
       vp9/common/vp9_reconinter.c
       vp9/decoder/vp9_decodeframe.c
       vp9/decoder/vp9_decodeframe.h
       vp9/decoder/vp9_decodemv.c
       vp9/decoder/vp9_decoder.c
       vp9/decoder/vp9_decoder.h
       vp9/encoder/vp9_encoder.c
       vp9/encoder/vp9_pickmode.c
       vp9/encoder/vp9_rdopt.c
       vp9/vp9_cx_iface.c
       vp9/vp9_dx_iface.c

This reverts commit a18da9760a.

Change-Id: I361442ffec1586d036ea2e0ee97ce4f077585f02
2015-01-30 21:00:13 -08:00
James Zern
f6c2a6c5d6 vp9: rename 'near' parameters
+ nearest for consistency

near is a reserved word in windows builds so using it as a parameter
name may cause build failures with some configurations

Change-Id: Iddf1d4ecdb39843f14e95dbfd9dca55f07f81403
2015-01-30 15:52:24 -08:00
Jingning Han
f1ab5c1021 Merge "Format fixes in vp9_rd_pick_inter_mode_sb/sub8x8" 2015-01-30 15:49:14 -08:00
Yaowu Xu
45971abd1d Optimize coef update
1. move the check of search method of USE_TX_8X8 up one level to
avoid operations of build_tree_distributions()
2. count tx used and avoid computaton for coef udpate when one size
is not used at all.

Change-Id: Ia3e54a2588aa531c41377a1bfaa64385d04a592c
2015-01-30 10:16:40 -08:00
Yunqing Wang
3b3e299650 Merge "Fix issues in 32bit PIC enabled build" 2015-01-29 16:41:25 -08:00
Alex Converse
797a2556eb Allow larger encoder configurations.
Allow changing colorspace in the encoder and increasing frame size.

Change-Id: I8e7c3b891af29ce420a15beb4f6f9c250245b2bb
2015-01-29 15:07:40 -08:00
Paul Wilkins
68340a3470 Merge "Change to update of rate control factors." 2015-01-29 13:50:52 -08:00
Marco
a80dd52b6e Merge "Fix to vp9 denoiser." 2015-01-29 09:10:30 -08:00
Paul Wilkins
f752da8ce2 Change to update of rate control factors.
Remove damping parameter and use the damping
formula introduced by Yaowu Xu in all cases.

Change-Id: I18db7e0d0f262d5140102f259ab07821d374d285
2015-01-28 15:44:53 -08:00
Yaowu Xu
ff99a3c750 Simplify update_coef_probs()
1. reduce the size of temporaray arrays on stack
2. avoid build_tree_distribution for tx size that is not used at all.

Change-Id: I0f8d7124e16a3789d3c15ad24cf02c1c12789e2c
2015-01-28 15:12:42 -08:00
Marco
c0923d4d3a Fix to vp9 denoiser.
Prevent from using wrong mv for denoiser motion compensation.

Change-Id: Ifa0f9daabdbdab0900d3c17304059fe0d15de914
2015-01-28 12:07:27 -08:00
hkuang
e8c42fb0bd Remove duplicate code.
(issue #934).

Change-Id: Ic8adaaff87aae0b33d9b508f160b48e0ccdaaf4c
2015-01-28 12:00:34 -08:00
Frank Galligan
d1e6b8231a Merge "Add vp9_sad32x32x4d_neon Neon intrinsic function." 2015-01-28 10:35:50 -08:00
Frank Galligan
eb12d880ab Merge "Add vp9_sad16x16x4d_neon Neon intrinsic function." 2015-01-27 23:01:44 -08:00
Frank Galligan
80a3a07929 Merge "Add vp9_sad64x64x4d_neon Neon intrinsic function." 2015-01-27 23:01:15 -08:00
Yunqing Wang
10d5e09c87 Fix issues in 32bit PIC enabled build
This patch was to fix issue 924:
https://code.google.com/p/webm/issues/detail?id=924

The SECTION_RODATA macro was modified to support macho32 format.
The sub-pixel functions were modified to pass in 2 more parameters
to handle the global offsets for PIC build.

Change-Id: I3bfcd336bcae945edf300bca4ab40376a2628cd4
2015-01-27 22:20:21 -08:00
Yaowu Xu
fe2439703d Merge "move clear_system_state() call before using double" 2015-01-27 12:42:13 -08:00