Yaowu Xu [Wed, 7 Mar 2012 20:25:50 +0000 (12:25 -0800)]
Added encode/decode recon buffer match test to vpxenc
The commit added a new command line option --test-decode to vpxenc.
The option enables encoder to decode compressed frames and test recon
buffers from the decode against those from encode for mismatch.
There are a few limitations on this option currently, one of them
being the match test is not done on a number of lagged frames at
the end of an encoding.
Yaowu Xu [Thu, 15 Mar 2012 00:29:39 +0000 (17:29 -0700)]
fixed a bug of context overwritten by key frame recoding
The recoding loop save and restore frame coding context for recodes.
However in recoding of key frames, some of the coding context saved
was stale from last encoded inter frame. The save/restore sometimes
overwrites the re-inintialized coding context with saved context
from last frame, resulting in encoder/decoder mismatch
Yaowu Xu [Sat, 10 Mar 2012 01:32:50 +0000 (17:32 -0800)]
WebM Experimental Codec Branch Snapshot
This is a code snapshot of experimental work currently ongoing for a
next-generation codec.
The codebase has been cut down considerably from the libvpx baseline.
For example, we are currently only supporting VBR 2-pass rate control
and have removed most of the code relating to coding speed, threading,
error resilience, partitions and various other features. This is in
part to make the codebase easier to work on and experiment with, but
also because we want to have an open discussion about how the bitstream
will be structured and partitioned and not have that conversation
constrained by past work.
Our basic working pattern has been to initially encapsulate experiments
using configure options linked to #IF CONFIG_XXX statements in the
code. Once experiments have matured and we are reasonably happy that
they give benefit and can be merged without breaking other experiments,
we remove the conditional compile statements and merge them in.
Current changes include:
* Temporal coding experiment for segments (though still only 4 max, it
will likely be increased).
* Segment feature experiment - to allow various bits of information to
be coded at the segment level. Features tested so far include mode
and reference frame information, limiting end of block offset and
transform size, alongside Q and loop filter parameters, but this set
is very fluid.
* Support for 8x8 transform - 8x8 dct with 2nd order 2x2 haar is used
in MBs using 16x16 prediction modes within inter frames.
* Compound prediction (combination of signals from existing predictors
to create a new predictor).
* 8 tap interpolation filters and 1/8th pel motion vectors.
* Loop filter modifications.
* Various entropy modifications and changes to how entropy contexts and
updates are handled.
* Extended quantizer range matched to transform precision improvements.
There are also ongoing further experiments that we hope to merge in the
near future: For example, coding of motion and other aspects of the
prediction signal to better support larger image formats, use of larger
block sizes (e.g. 32x32 and up) and lossless non-transform based coding
options (especially for key frames). It is our hope that we will be
able to make regular updates and we will warmly welcome community
contributions.
Please be warned that, at this stage, the codebase is currently slower
than VP8 stable branch as most new code has not been optimized, and
even the 'C' has been deliberately written to be simple and obvious,
not fast.
The following graphs have the initial test results, numbers in the
tables measure the compression improvement in terms of percentage. The
build has the following optional experiments configured:
--enable-experimental --enable-enhanced_interp --enable-uvintra
--enable-high_precision_mv --enable-sixteenth_subpel_uv
CIF Size clips:
http://getwebm.org/tmp/cif/
HD size clips:
http://getwebm.org/tmp/hd/
(stable_20120309 represents encoding results of WebM master branch
build as of commit#7a15907)
They were encoded using the following encode parameters:
--good --cpu-used=0 -t 0 --lag-in-frames=25 --min-q=0 --max-q=63
--end-usage=0 --auto-alt-ref=1 -p 2 --pass=2 --kf-max-dist=9999
--kf-min-dist=0 --drop-frame=0 --static-thresh=0 --bias-pct=50
--minsection-pct=0 --maxsection-pct=800 --sharpness=0
--arnr-maxframes=7 --arnr-strength=3(for HD,6 for CIF)
--arnr-type=3
Adrian Grange [Wed, 16 Nov 2011 00:39:53 +0000 (16:39 -0800)]
Added clipping of the buffer level to maximum_buffer_size
The buffer level was not being capped at the maximum decode
buffer size specified by the user.
In CBR mode this resulted in large files being generated
immediately after a dramatic reduction in the data rate
target. This fix should prevent this from happening.
Rd and Rm registers should be different in 'mul'. This register
combination results in unpredictable behaviour. GCC will give
a warning and RVCT an error in this case.
Restriction applies only to armv5 targets and not for armv6 and above.
Stefan Holmer [Tue, 6 Sep 2011 12:34:36 +0000 (14:34 +0200)]
Fix necessary for input partitions iface to match the RTP profile
These changes fixes a glitch between the RTP profile and the input
partitions interface. Since there's no way for the user to know the
actual number of partitions, the decoder have to read the
multi_token_paritition bits also when input partitions mode is
enabled.
Included are also a couple of fixes for issues with independent
partitions and uninitialized memory reads.
Scott LaVarnway [Fri, 16 Sep 2011 15:03:53 +0000 (11:03 -0400)]
clamp_mvs() using the wrong motion vector information
In the "Removed bmi copy to/from BLOCKD" commit, the copy
to the bmi in BLOCKD was eliminated. The clamp_mvs() used
the bmi in BLOCKD, which now contains incorrect values. This
patch fixes this problem.
Scott LaVarnway [Wed, 24 Aug 2011 18:42:26 +0000 (14:42 -0400)]
Removed bmi copy to/from BLOCKD
for SPLITMV and B_PRED modes. Modified code to use the bmi
found in mode_info_context instead of BLOCKD. On the decode
side, the uvmvs are calculated only when required, instead of
every macroblock. This is WIP. (bmi should eventually be
removed from BLOCKD)
Small performance gains noticed for RT encodes and decodes.(VGA)
Fritz Koenig [Mon, 22 Aug 2011 22:29:41 +0000 (15:29 -0700)]
Use local labels for jumps/loops in x86 assembly.
Prepend . to local labels in assembly code. This
allows non unique labels within a file. Also
makes profiling information more informative
by keeping the function name with the loop name.
Fritz Koenig [Mon, 22 Aug 2011 19:36:28 +0000 (12:36 -0700)]
Reclassify optimized ssim calculations as SSE2.
Calculations were incorrectly classified as either
SSE3 or SSSE3. Only using SSE2 instructions.
Cleanup function names and make non-RTCD code work
as well.
Fritz Koenig [Fri, 19 Aug 2011 15:51:27 +0000 (08:51 -0700)]
Reclasify optimized ssim calculations as SSE2.
Calculations were incorrectly classified as either
SSE3 or SSSE3. Only using SSE2 instructions.
Cleanup function names and make non-RTCD code work
as well.
Alpha Lam [Tue, 9 Aug 2011 19:59:45 +0000 (20:59 +0100)]
Copy less when active map is in use
When active map is specified and the current frame is not a key frame,
golden frame nor a altref frame then copy only those active regions.
This significantly reduces encoding time by as much as 19% on the test
system where realtime encoding is used. This is particularly useful
when the frame size is large (e.g. 2560x1600) and there's only a few
action macroblocks.
Paul Wilkins [Wed, 17 Aug 2011 13:14:23 +0000 (14:14 +0100)]
Small boost to every other frame.
Instead of a single mid GF boost apply a few extra bits to
every other frame. This gives a very small average metrics
improvement on both derf and YT sets.
John Koleszar [Fri, 12 Aug 2011 18:51:36 +0000 (14:51 -0400)]
Revert "Improved 1-pass CBR rate control"
This reverts commit b5ea2fbc2c1554769848774c836aad262af95072. Further
testing showed noticable keyframe popping in some cases, reverting this
for now to give time for a proper fix.
John Koleszar [Fri, 12 Aug 2011 15:30:54 +0000 (11:30 -0400)]
Propagate macroblock MV to subblocks for error concealment
EC expects the subblock MVs to be populated, but f1d6cc79e43f0066632f19c1854ca365086b712b removed this code. This
commit restores it, protected by CONFIG_ERROR_CONCEALMENT. May move this
to the EC code more directly in the future.
Stefan Holmer [Mon, 8 Aug 2011 08:56:20 +0000 (10:56 +0200)]
Disable error concealment until first key frame is decoded
When error concealment is enabled the first key frame must
be successfully received before error concealment is activated.
Error concealment will be activated when the delta following
delta frame is received.
Also fixed a couple of bugs related to error tracking in
multi-threading. And avoiding decoding corrupt residual
when we have multiple non-resilient partitions.
John Koleszar [Fri, 5 Aug 2011 16:27:25 +0000 (12:27 -0400)]
Fix potential OOB read with Error Concealment
This patch fixes an OOB read when error concealment is enabled and the
partition sizes are corrupt. The partition size read from the bitstream
was not being validated in EC mode.
John Koleszar [Fri, 12 Aug 2011 15:30:54 +0000 (11:30 -0400)]
Propagate macroblock MV to subblocks for error concealment
EC expects the subblock MVs to be populated, but f1d6cc79e43f0066632f19c1854ca365086b712b removed this code. This
commit restores it, protected by CONFIG_ERROR_CONCEALMENT. May move this
to the EC code more directly in the future.
Stefan Holmer [Mon, 8 Aug 2011 08:56:20 +0000 (10:56 +0200)]
Disable error concealment until first key frame is decoded
When error concealment is enabled the first key frame must
be successfully received before error concealment is activated.
Error concealment will be activated when the delta following
delta frame is received.
Also fixed a couple of bugs related to error tracking in
multi-threading. And avoiding decoding corrupt residual
when we have multiple non-resilient partitions.
John Koleszar [Fri, 5 Aug 2011 16:27:25 +0000 (12:27 -0400)]
Fix potential OOB read with Error Concealment
This patch fixes an OOB read when error concealment is enabled and the
partition sizes are corrupt. The partition size read from the bitstream
was not being validated in EC mode.
John Koleszar [Wed, 3 Aug 2011 20:12:12 +0000 (16:12 -0400)]
Fix source buffer selection
This patch fixes a bug in the interaction between the recode loop and
spatial resampling. If the codec was in a spatial resampling state,
and a subsequent iteration of the recode loop disables resampling,
then the source buffer must be reset to the unscaled source.
Yunqing Wang [Wed, 3 Aug 2011 15:51:07 +0000 (11:51 -0400)]
Adjust half-pixel only search
Changed motion search in vp8_find_best_half_pixel_step() to be the
same as in vp8_find_best_sub_pixel_step(), which checks 5 points
instead of 8 points. This only affects real-time mode with
cpu-used >=9. Tests showed it gives 2% encoding speedup with
a quality loss(psnr) of up to 0.5%.
John Koleszar [Wed, 3 Aug 2011 13:20:37 +0000 (09:20 -0400)]
Fix building of static libs on universal-darwin
The static libs should not be built from sources during the top level
of a universal build. This regression was introduced in commit 495b241fa6b03345baf2b2f39aa8c06c735fccc2, which made the static
libs selectable under CONFIG_STATIC.