vpx/vp9/common/modecont.c
Paul Wilkins a57dbd957b Further experimentation with the mode context
Experiments with a larger set of contexts and some
clean up to replace magic numbers regarding the
number of contexts.

The starting values and rate of backwards adaption
are still suspect and based on a small set of tests.
Added forwards adjustment of probabilities.

The net result of adding the new context and forward
update is small compared to the old context from the
legacy find_near function.  (down a little on derf but
up by a similar amount for HD)

HOWEVER.... with the new context and forward update
the impact of disabling the reverse update (which may be
necessary in some use cases to facilitate parallel decoding)
is hugely reduced.

For the old context without forward update, the impact of
turning off reverse update (Experiment was with SB off) was
Derf - 0.9, Yt -1.89, ythd -2.75 and sthd -8.35. The impact was
mainly at low data rates.

With the new context and forward update enabled the impact
for all the test sets was no more than 0.5-1% (again most at
the low end).

Change-Id: Ic751b414c8ce7f7f3ebc6f19a741d774d2b4b556
2012-11-16 16:58:00 +00:00

32 lines
1.5 KiB
C

/*
* Copyright (c) 2010 The WebM project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#include "entropy.h"
const int vp9_default_mode_contexts[INTER_MODE_CONTEXTS][4] = {
{223, 1, 1, 237}, // 0,0 best: Only candidate
{87, 166, 26, 219}, // 0,0 best: non zero candidates
{89, 67, 18, 125}, // 0,0 best: non zero candidates, split
{16, 141, 69, 226}, // strong nz candidate(s), no split
{35, 122, 14, 227}, // weak nz candidate(s), no split
{14, 122, 22, 164}, // strong nz candidate(s), split
{16, 70, 9, 183}, // weak nz candidate(s), split
};
const int vp9_default_mode_contexts_a[INTER_MODE_CONTEXTS][4] = {
{204, 1, 1, 213}, // 0,0 best: Only candidate
{106, 139, 22, 203}, // 0,0 best: non zero candidates
{75, 52, 15, 118}, // 0,0 best: non zero candidates, split
{12, 148, 61, 211}, // strong nz candidate(s), no split
{18, 98, 17, 199}, // weak nz candidate(s), no split
{11, 91, 25, 148}, // strong nz candidate(s), split
{10, 53, 9, 145}, // weak nz candidate(s), split
};