Deb Mukherjee [Thu, 3 Apr 2014 17:22:58 +0000 (10:22 -0700)]
Reinstating the DISABLE_RC_LONG_TERM_MEM macro
Reinstates this macro and truns it on in order to avoid issues
due to some frames at the end starving in harder videos.
A more acceptable solution is in the works.
Deb Mukherjee [Wed, 2 Apr 2014 00:31:59 +0000 (17:31 -0700)]
Rate ctrl changes to track target bitrates closer
Turns off the DISABLE_RC_LONG_TERM_MEM macro and makes other changes
in the way the bits are updated, to make 2-pass rate control track
target bitrates closer.
Marco Paniconi [Wed, 2 Apr 2014 00:50:14 +0000 (17:50 -0700)]
Remove the q division by 3 for first frame.
This code/setting was actually not used (since speed features were not set on first frame,
until a recent change) and should be removed.
In CBR mode, the q value for the first frame can be controlled by setting
the target size via the parameters rc_buf_initial_sz (and max_intra_size_pct).
Yunqing Wang [Fri, 28 Mar 2014 17:47:36 +0000 (10:47 -0700)]
Make last frame source available in current frame encoding
While encoding a frame, its last frame source can be used to give
acurate motion information. This patch prevents last frame to be
overwritten so that it is available during current frame encoding.
The last source is scaled when it is necessary. cpi->Last_Source
points to the last source frame.
Jingning Han [Sat, 29 Mar 2014 00:42:45 +0000 (17:42 -0700)]
Apply finer quantizer to partition search frames in non-RD flow
This commit optimizes the bit allocation for the non-RD coding flow.
It applies slightly better quantizer to the frames, where all blocks
run a non-RD partition search. Such frames typically have better
rate-distortion trade off, thus improving the reconstruction quality
for next few frames reference at reasonably low increment in rate
cost.
The coding performance for rtc set at speed -5 with error-resilient
tuned on and rate control set as cbr is improved by 19.58%. It improved
the coding speed by about 10% for a portion of local test clips.
Yaowu Xu [Thu, 27 Mar 2014 19:54:06 +0000 (12:54 -0700)]
[BITSTREAM]Fix the scaling calculation
For very large size video image, the scaling calculation may need use
value beyond the range of int. This commit upgrade the value to 64bit
to make sure the calculation do not wrap around INT_MAX.
The change corrected the decoder behavior.
The bug affects only very large resolution video because the scaling
calculation was sufficient for image size smaller than 2^13.
This resolves issue:
https://code.google.com/p/webm/issues/detail?id=750
Yaowu Xu [Wed, 26 Mar 2014 23:15:00 +0000 (16:15 -0700)]
Adjust rt speed steps.
This commit adjusted the speed steps in rt mode to make the steps
more evenly spaced on speed and quality, specifically:
1. Merged 3 and 4 into one single step 3 and removed confilicting
features.
2. Move 8, 7, 6, 5 to be 7, 6, 5, 4 repsectively.
Paul Wilkins [Mon, 24 Mar 2014 18:11:47 +0000 (18:11 +0000)]
Further speed trade off adjustments.
Small speed gain for speed 1.
Quality is generally a little up for speed 2.
Speed 3 was similar to speed 4 but now positioned more
evenly between 2 and 4 speed and quality wise.
(opsnr +5.6% ssim +8.25% across all sets)
Speed 4 is a little slower than before but sizable quality gains.
(opsnr +3.7% ssim +6.8% across all sets)
The code has been cleaned up a bit so that for each incremental
speed step changes over the previous speed step are applied.
This makes it easier to see what is changing from one setting to
the next.
Paul Wilkins [Fri, 21 Mar 2014 16:14:46 +0000 (16:14 +0000)]
Experimental change to speed 1 settings.
Allow tx search for ARF and GF helps quality but a little slower.
Setting subpel_iters_per_step to 1 improves encode speed.
Setting sf->mode_skip_start = 10 improves speed.
Initial local results suggest overall impact on quality is neutral
but encode is up to 15% faster.
Marco Paniconi [Thu, 27 Mar 2014 01:09:20 +0000 (18:09 -0700)]
aq_mode=3: Set target seg_map in sb-block order.
Removes a TODO. Changed meaning of some parameters
(target-max-percent refresh and starting index) to be
defined relative to superblock. Also, modify turn-off condition.
Jingning Han [Wed, 26 Mar 2014 20:00:06 +0000 (13:00 -0700)]
Motion referenced partition search for non-RD coding flow
This commit enables the non-RD mode decision coding flow to
adaptively apply partition search in non-refresh frame, when the
collocated block in previous frame suggests there might be a motion
activity. It refactors the update_state_rt() function to support
buffer swap of mode_info struct, thereby unifying the encoding
stage across various non-RD coding modes.
It provides 5% compression performance gains in speed -6 for rtc
test set, at about 12% speed slow down.
Jingning Han [Tue, 25 Mar 2014 18:05:50 +0000 (11:05 -0700)]
Apply early termination in non-RD partition search
This commit allows the recursive non-RD partition search to early
terminate sub search tree when the cumulative rate-distortion is
already above the best available.
Yaowu Xu [Tue, 25 Mar 2014 21:27:45 +0000 (14:27 -0700)]
Added a speed feature "allow_skip_recode"
This commit added a speed feature to make the logic of calculating
skip_recode on a block level more explicit. This also enable the
feature to be enabled at speed 5 where the previous logic is too
conservative, help gain back the lost speed for --rt(-5).
Jingning Han [Tue, 25 Mar 2014 16:54:32 +0000 (09:54 -0700)]
Fix compiling errors due to git merge
There were a few conflicts between the new non-RD partition search
and recent clean-up patches, which were not caught by git control.
This commit fixed these issues.