Frank Galligan [Tue, 26 Mar 2019 06:48:04 +0000 (23:48 -0700)]
Add a test to test rollover of int64 in encoder interface.
The current libvpx encoder interface can potentially rollover an int64_t
value used to calculate the current timestamp. If the timebase was set
to microseconds and first timestamp was 0, then the rollover would
occur in about 10.675 days.
Jingning Han [Wed, 3 Apr 2019 23:46:07 +0000 (16:46 -0700)]
Bypass skip check in tune for sharpness mode
The sharpness mode is enabled for hvc visual quality. Bypass the
skip block check that could potentially force all zero block in
sharpness mode. This resolves the patchy blockiness issue raised
in the 4K SDR HVC encode.
Histogram-based noise estimation algorithm leveraged that low-noise sequences
tend to populate lower-valued histogram bins and high-noise sequences tend to
populate higher-valued histogram bins in a predictable/repeatable manner. The
algorithm compensates for histogram flattening and skewing toward zero as the
scene darkens.
Marco Paniconi [Mon, 1 Apr 2019 21:18:54 +0000 (14:18 -0700)]
vp9-rtc: Move noise estimation to after scene change detection
This allows to use result from scene chage detection to exclude
the current frame from noise estimation analysis if the frame has
scene/ big content change (i.e., high_source_sad flag is set).
The behavior change for noise estimation may be small in practice,
since in the current code, a scene change would have blocks excluded
due to thresh_sum_diff, and the subsequent frames would also be mostly
excluded due to (past) non-zero motion vectors (until the
consec_zeromv > thresh_consec_zeromv is satisfied again).
But its better to completely exclude current frame if its a scene change.
Marco Paniconi [Fri, 29 Mar 2019 22:18:14 +0000 (15:18 -0700)]
vp9-rtc: Speed feature changes for speed 9.
Add threshold multipler for variance partitioning
as speed feature, and increase it by 2x for speed >= 9
for resoln >= VGA. Also only allow simple_interpol
filter when avg_low_motion is below threshold.
Better tradeoff of speed/quality comparing to speed 8.
Paul Wilkins [Tue, 2 Apr 2019 12:00:03 +0000 (12:00 +0000)]
Merge changes Ied3992f4,I83ca669b,I8f1c1a29
* changes:
Further Adjustments to film mode bias.
Add GF group noise weighting in rd_variance_adjustment()
Adjustment to low variance block bias in rd_variance_adjustment()
Marco Paniconi [Tue, 26 Mar 2019 17:45:22 +0000 (10:45 -0700)]
vp9-rtc: Disable cyclic refresh under some conditions
cyclic refresh does not work for speeds <= 4, so disable
it for this case. And dynamically disable it when
average_qp is close to MAXQ (only for non-svc), to improve
quality/rate control at very low bitrates.
Jingning Han [Mon, 25 Mar 2019 18:27:14 +0000 (11:27 -0700)]
Unify the transform and quantization process
Unify the transform and quantization process for 4x4 - 16x16
transform block sizes. This doesn't affect the encoding speed
visibly. Remove it to reduce the maintenance load.
Jerome Jiang [Thu, 21 Mar 2019 21:17:15 +0000 (14:17 -0700)]
vp9 postproc neon: Remove the condition on mb cols.
VP8 and VP9 have different padding on buffer stride.
VP8 microblock is 16x16 so the buffer stride needs to be divisible by
16. Thus UV buffer stride is divisible by 8.
VP9 microblock is 8x8 so the buffer stride is only extended to be
divisible by 8. Then UV buffer stride isn't divisible by 8.
Marco Paniconi [Thu, 21 Mar 2019 17:36:31 +0000 (10:36 -0700)]
vp9-screen: Adjust speed features at speed 8
Keep loopfilter on, and use half-pel instead of full.
This reduces big quality gap between the speed 8 and 7,
but still keeps speed 8 about 30-40% faster than speed 7.
Tested on screenshare clips with scroll and slide changes.
Marco Paniconi [Wed, 20 Mar 2019 20:39:48 +0000 (13:39 -0700)]
vp9-rtc: Fixes for low-resoln
The force smooth_filter should only be used
for noisy content, so for now keep it off and
add TODO. Also fix/adjust low-resoln condition
and threshold in cyclic refresh.
Marco Paniconi [Fri, 15 Mar 2019 16:13:45 +0000 (09:13 -0700)]
vp9-rtc: Adjustments for base layer in screen.
On scene/content changes for base layer of screen:
reduce 32x32 split threshold, bias rdcost for flat
blocks if sse_y is non-zero, and avoid early exit on
intra-check.
Paul Wilkins [Wed, 13 Mar 2019 16:20:23 +0000 (16:20 +0000)]
Improve key frame detection
Improve detection of key frames especially in low contrast
and low motion regions.
This patch adds a function to the key frame detection to test
for specific patterns in the intra signal in the first pass stats
that tend to be indicative of a key frame.
This is intended to compliment the existing code and finds some
scene cuts that were previously being misssed.
Tested on two clips where the existing code was struggling to
identify the key frames this patch improved detection as follows.
Film clip 1: (detected / actual)
Old (2/5) New (5/5)
Film Clip 2
Old 4/11 and one false +, New 7/11 and 1 false +.
Short 4K Film Scene
Old 1/2 New 2/2
In testing so far I have not seen many extra false +'s though
it is likely that there will be some cases and this may need
further tweaking.
One one of our longer form film test reels ~20k frames)
the change picked up around 35 key frames that were
previously missed, mainly in darker scenes. There were a few
extra (or different) false positives cause by bright flashes or
explosions but these were cases where there was little
difference between inter and intra coding.
Marco Paniconi [Fri, 15 Mar 2019 00:27:58 +0000 (17:27 -0700)]
vp9-rtc: Some adjustments for low-resolns real-time
Force smooth_interpol filter for low resolutions at high Q,
avoid the loopfilter strength reduction for similar conditon,
and reduce thresh_motion for cyclic refresh turnoff.
Jingning Han [Thu, 14 Mar 2019 15:28:44 +0000 (08:28 -0700)]
Refactor tile boundary condition for intra prediction
Explicitly compare the block location against tile coordinate to
decide if intra prediction boundary is available. No coding stats
will be changed by this refactoring.
Marco Paniconi [Wed, 13 Mar 2019 20:46:12 +0000 (13:46 -0700)]
vp9-svc: Reorganize the simulcast mode
Set the lst/gld/alt_fb_idx and refresh flags for
key frames at the start of encoding (in svc_set_params).
This then avoids new code/function in update_references()
and in copy_flags_ref_update().