James Zern [Thu, 28 Jan 2016 20:53:41 +0000 (12:53 -0800)]
vp9/10: fix encoder crash on flush
the lookahead buffer allocation is deferred to receipt of the first
frame to allow profile changes. if the encoder was flushed before
supplying any frames the encoder would crash trying to dereference the
NULL buffer. vp8 is unaffected.
fixes mozilla bug:
https://bugzilla.mozilla.org/show_bug.cgi?id=1237848
Marco [Wed, 27 Jan 2016 20:01:58 +0000 (12:01 -0800)]
vp9-aqmode=3: Limit on period for golden update.
For aqmode=3, golden period update is set based on period of cyclic refresh.
Put a limit on max golden period update, for now set to 40.
And fix comment.
Alex Converse [Mon, 25 Jan 2016 20:03:50 +0000 (12:03 -0800)]
vp9: Be more responsive to massive overshoot.
Limit oscilation detection in the case where overshoot is very very
large.
This keeps the 9-bit cost patch from breaking the DownUp reisze test.
The patch pushed us to an 11% undershoot right before a scene cut
causing a 1200% overshoot. (Whereas before we were undershooting by
only 6% before overshooting by 1200%).
Marco [Wed, 20 Jan 2016 21:51:12 +0000 (13:51 -0800)]
vp9-svc: Allow frame-dropping in svc datarate control tests.
Remove comment(s) and enable frame-dropper for tests.
Frame dropper for 1 pass svc was fixed a while ago:
https://chromium-review.googlesource.com/#/c/309230/
Different quality levels are used for different regions in
the frame depending on how far they are vertically from the
center. Specifically, three segments are used based on the
mi_row index with respect number to the number of mi_rows in
the frame.
Yaowu Xu [Tue, 12 Jan 2016 17:47:07 +0000 (09:47 -0800)]
Fix encoder crashes and enc/dec mismatches
This commit adds the logic for segmentation map initialization and
disable temporal update of segmentation map when error-resilient
mode is on. It fixes the enc/dec mistmates (release build) and
assertions(debug) when both aq-mode and error-resilient are on.
Scott LaVarnway [Tue, 12 Jan 2016 13:09:06 +0000 (05:09 -0800)]
VP9: Eliminate unnecessary nearest/near searches
Prior to this patch, read_inter_block_mode_info() would
find the nearmv and nearestmv for all modes. Now it does not
search for ZEROMV modes and breaks out early for NEARMV and
NEWMV modes.
Yunqing Wang [Thu, 7 Jan 2016 02:27:37 +0000 (18:27 -0800)]
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.
Yaowu Xu [Thu, 7 Jan 2016 17:43:26 +0000 (09:43 -0800)]
Enable encoder to avoid 8x4 or 4x8 partitions
This commit enables encoder to avoid 8x4 and 4x8 partitions for
scaled reference frames when libvpx is configured and built with
--enable-better-hw-compatibility
Marco [Wed, 6 Jan 2016 19:30:02 +0000 (11:30 -0800)]
vp9-svc: Fix to avoid msan unitialized value.
Move the logic for forcing zero_mode after the
(ref_frame & flag_list) check.
This was causing an memory leak under msan:
https://bugs.chromium.org/p/webrtc/issues/detail?id=5402
Yaowu Xu [Tue, 5 Jan 2016 02:24:18 +0000 (18:24 -0800)]
Assert no mv clamping for scaled references
Under --enable-better-hw-compabibility, this commit adds the asserts
that no mv clamping is applied for scaled references, so when built
with this configure option, decoder will assert if an input bitstream
triggger mv clamping for scaled reference frames.
Yaowu Xu [Thu, 3 Dec 2015 01:00:26 +0000 (17:00 -0800)]
Assert no 8x4/4x8 partition for scaled references
This commit adds a new configure option:
--enable-better-hw-compatibility
The purpose of the configure option is to provide information on known
hardware decoder implementation bugs, so encoder implementers may
choose to implement their encoders in a way to avoid triggering these
decoder bugs.
The WebM team were made aware of that a number of hardware decoders
have trouble in handling the combination of scaled frame reference
frame and 8x4 or 4x8 partitions. This commit added asserts to vp9
decoder, so when built with above configure option, the decoder can
assert if an input bitstream triggers such decoder bug.
vp10: only assume ONLY_4X4 if segmentation is disabled.
Otherwise, per-segment lossless might mean that some segments are not
lossless and they could still want to use another mode. The per-block
tx points remain uncoded on blocks where (per the segment id) the Q
value implies lossless.
Marco [Mon, 21 Dec 2015 18:35:05 +0000 (10:35 -0800)]
aq-mode=3: Don't reset segment if block is determined to be skin.
For coding block sizes <=16X16, if the block is determined to be skin,
then always allow for that block to be candidate for refresh. So if that
block happens to be on the boost segment(s), segment won't get reset to 0
and delta-q will be applied.
PSNR/SSIM metrics neutral (little/no change) on RTC clips.
Speed increase small/negligible (< 1%).
Some visual improvement on faces in a few RTC clips.