Skip to content
Snippets Groups Projects
Ralph Giles's avatar
Ralph Giles authored
This change inserts a new speed level OC_SP_LEVEL_NOSATD (3)
between OC_SP_LEVEL_FAST_ANALYSIS (still 2) and OC_SP_LEVEL_NOMC
(now 4). The new speed level further accelerates analysis by
using the cheaper SAD (sum of absolute differences) metric
for measuring distortion instead of the more expensive SATD
(sum of absolute transformed differences).

The new level is intermediate in both quality and encoding
speed between the adjacent speed levels, allowing smoother
adaptation to realtime encoding contraints. In particular
it's much closer to realtime 720p30 on current Core2 cpus.

The cheaper SAD metric is now also used for the fastest NOMC
speed level. This is a reduction in quality for this speed level
as well, but it also about 10% faster. Since the NOMC mode is
already very poor quality, used as a last resort when performance
is critical, we deemed this a better option than adding a further
NOMC_SATD mode or keeping the old NOMC behaviour.

To support the new speed level, parallel copies of the OC_MODE_RD
table are kept, one for each metric. The encoder context keeps
track of which on to use based ont eh current speed level. Analysis
code chooses which metric to calculate and use on the fly. The extra
conditionals did not measurably affect encoding time in benchmarks.

The metrics collection and fitting code used to generate modedec.h
is also updated to track both SAD and SATD measurements.

Thanks to Tim Terriberry and Greg Maxwell for their comments and
and contributions in reviewing this patch. The implementation
of oc_enc_frag_intra_sad is based on one from earlier development
work by Greg Maxwell.

svn path=/trunk/theora/; revision=17821
40d573e1
History
Name Last commit Last update
..