fd18d5dffe
Replaces the default tables for single coefficient magnitudes with those obtained from an appropriate distribution. The EOB node is left unchanged. The model is represeted as a 256-size codebook where the index corresponds to the probability of the Zero or the One node. Two variations are implemented corresponding to whether the Zero node or the One-node is used as the peg. The main advantage is that the default prob tables will become considerably smaller and manageable. Besides there is substantially less risk of over-fitting for a training set. Various distributions are tried and the one that gives the best results is the family of Generalized Gaussian distributions with shape parameter 0.75. The results are within about 0.2% of fully trained tables for the Zero peg variant, and within 0.1% of the One peg variant. The forward updates are optionally (controlled by a macro) model-based, i.e. restricted to only convey probabilities from the codebook. Backward updates can also be optionally (controlled by another macro) model-based, but is turned off by default. Currently model-based forward updates work about the same as unconstrained updates, but there is a drop in performance with backward-updates being model based. The model based approach also allows the probabilities for the key frames to be adjusted from the defaults based on the base_qindex of the frame. Currently the adjustment function is a placeholder that adjusts the prob of EOB and Zero node from the nominal one at higher quality (lower qindex) or lower quality (higher qindex) ends of the range. The rest of the probabilities are then derived based on the model from the adjusted prob of zero. Change-Id: Iae050f3cbcc6d8b3f204e8dc395ae47b3b2192c9
34 lines
1.0 KiB
C
34 lines
1.0 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.
|
|
*/
|
|
|
|
#ifndef VP9_COMMON_VP9_COEFUPDATEPROBS_H_
|
|
#define VP9_COMMON_VP9_COEFUPDATEPROBS_H_
|
|
|
|
/* Update probabilities for the nodes in the token entropy tree.
|
|
Generated file included by vp9_entropy.c */
|
|
|
|
static const vp9_prob vp9_coef_update_prob[ENTROPY_NODES] = {
|
|
252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252
|
|
};
|
|
|
|
#if CONFIG_CODE_NONZEROCOUNT
|
|
#define NZC_UPDATE_PROB_4X4 252
|
|
#define NZC_UPDATE_PROB_8X8 252
|
|
#define NZC_UPDATE_PROB_16X16 252
|
|
#define NZC_UPDATE_PROB_32X32 252
|
|
#define NZC_UPDATE_PROB_PCAT 252
|
|
#endif
|
|
|
|
#if CONFIG_MODELCOEFPROB
|
|
#define COEF_MODEL_UPDATE_PROB 16
|
|
#endif
|
|
|
|
#endif // VP9_COMMON_VP9_COEFUPDATEPROBS_H__
|