In mode selection loop, once mode_index pass mode_skip_start, all
modes with a different reference frame from current best mode are
masked out using mode_skip_mask.
However, the setting of mode_skip_mask may use an invalid mode if
there is no mode tested yet. This commit fixes the issue by making
sure a mode has been tested and selected. Otherwise, no mode will be
masked out because of their reference frame.
Yunqing Wang [Wed, 2 Apr 2014 00:32:20 +0000 (17:32 -0700)]
Use source frame difference to make partition decision
Calculate the difference variance between last source frame and
current source frame. The variance is calculated at 16x16 block
level. The variances are compared to several thresholds to decide
final partition sizes.
An adaptive strategy is implemented to decide using
SOURCE_VAR_BASED_PARTITION or FIXED_PARTITION based on motions
in the video. The switching test is done once every
search_type_check_frequency frames.
The selection of source_var_thresh needs to be investigated
further later.
RTC set Borg test showed 0.424% overall psnr gain, and 0.357%
ssim gain. For clips with large enough static area, the
encoding speedup is around 2% to 15%.
Jingning Han [Fri, 4 Apr 2014 22:59:10 +0000 (15:59 -0700)]
Select prediction filter type in non-RD mode decision
This commit allows the non-RD mode decision flow to select
prediction filter type in NEWMV mode. It provides 8.14% compression
performance gains in both settings of AQ=0 and 3. The current speed
impact is about 5% to 10% slower.
Deb Mukherjee [Sat, 5 Apr 2014 00:30:16 +0000 (17:30 -0700)]
High-level hooks for Profile 2 (10/12 bit)
Adds some high-level hooks for profile 2 before further
progress on the implementation.
According to the definitiion in this patch:
1. Profile 2 only supports 10 or 12 bit color but not 8
2. Profile 2 supports all color sampling modes: 444, 422 and 420,
and alpha plane.
3. Profile 3 is currently undefined.
Please consider the definition carefully and suggest modifications
to the definition as needed.
Frank Galligan [Mon, 7 Apr 2014 03:07:14 +0000 (20:07 -0700)]
Fix decoder resolution change with tiles
There was a bug with the decoder that if you started the decoder
with more threads than the first frame had tile columns. Afterwards
tried to decode a frame with more tile columns than the first frame,
the decoder would hang. E.g. run vpxdec --threads=4. The first frame
had two tile columns, then the next key frame had 4 tile columns, the
decoder would hang. If you started with 4 tiles and switched to 2
tiles the decoder would be fine. The issue is that the worker the thread
loop is using is stale.
I added a test vector "vp90-2-14-resize-848x480-1280x720.webm" that
exhibited the bug.
Marco Paniconi [Fri, 4 Apr 2014 22:10:14 +0000 (15:10 -0700)]
Add constrained-copy partition to speed features.
Copy up to a certain bsize, otherwise set to a fixed bsize.
This helsp to reduce artifact near moving boundary caused by full partition
copy without checking motion of super-block.
This artifact can occur at speeds 3,4 in real-time mode.
Issue: https://code.google.com/p/webm/issues/detail?id=738.
ARF overlays now use the same rate correction factor as regular inter
frames, further testing would be needed to see if it makes sense to use
a completely separate rate correction factor for ARF overlays.
Jingning Han [Fri, 4 Apr 2014 01:04:04 +0000 (18:04 -0700)]
Set up early RD cost check for NEWMV in non-RD mode decision flow
This commit estimates the motion vector rate cost right after full
pixel motion search. It combines this and the mode cost and compares
the corresponding rate-distortion cost. If it is already above the
current best one, skip the rest sub-pixel motion search and modeling
process. For pedestrian_area 1080p at 4000 kpbs, the speed -5 runtime
goes down from 39425 ms -> 38399 ms.
Tom Finegan [Thu, 3 Apr 2014 20:16:58 +0000 (13:16 -0700)]
Add shell scripts for verifying basic vpx{dec,enc} features.
Tests the basics (first confirms feature is available in vpx_config.h):
- VP8 decode (in IVF file).
- VP9 decode (in WebM file).
- VP8 encode (to IVF and WebM).
- VP9 encode (to IVF and WebM).
- VP9 lossless encode (to IVF, currently disabled due to failure).
- Pipe input (to vpxdec and vpxenc).
Test data path and path to vpx{dec,enc} have been parameterized. In
addition:
- Supports disabling tests (test names prefixed with DISABLED_ are not
run by default).
- Supports filtering tests.
vpxdec.sh: Tests vpxdec.
vpxenc.sh: Tests vpxenc.
tools_common.sh: Common test functions.
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.