Merge "Moving FRAME_CONTEXT & FRAME_COUNTS to vp9_entropymode.h."
This commit is contained in:
Коммит
594677a76b
|
@ -16,7 +16,6 @@
|
|||
#include "vp9/common/vp9_blockd.h"
|
||||
#include "vp9/common/vp9_common.h"
|
||||
#include "vp9/common/vp9_scan.h"
|
||||
#include "vp9/common/vp9_entropymode.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
|
||||
#include "vpx_mem/vpx_mem.h"
|
||||
|
||||
#include "vp9/common/vp9_alloccommon.h"
|
||||
#include "vp9/common/vp9_onyxc_int.h"
|
||||
#include "vp9/common/vp9_seg_common.h"
|
||||
|
||||
|
@ -315,18 +314,18 @@ static const vp9_prob default_switchable_interp_prob[SWITCHABLE_FILTER_CONTEXTS]
|
|||
{ 149, 144, },
|
||||
};
|
||||
|
||||
void vp9_init_mbmode_probs(VP9_COMMON *cm) {
|
||||
vp9_copy(cm->fc.uv_mode_prob, default_if_uv_probs);
|
||||
vp9_copy(cm->fc.y_mode_prob, default_if_y_probs);
|
||||
vp9_copy(cm->fc.switchable_interp_prob, default_switchable_interp_prob);
|
||||
vp9_copy(cm->fc.partition_prob, default_partition_probs);
|
||||
vp9_copy(cm->fc.intra_inter_prob, default_intra_inter_p);
|
||||
vp9_copy(cm->fc.comp_inter_prob, default_comp_inter_p);
|
||||
vp9_copy(cm->fc.comp_ref_prob, default_comp_ref_p);
|
||||
vp9_copy(cm->fc.single_ref_prob, default_single_ref_p);
|
||||
cm->fc.tx_probs = default_tx_probs;
|
||||
vp9_copy(cm->fc.skip_probs, default_skip_probs);
|
||||
vp9_copy(cm->fc.inter_mode_probs, default_inter_mode_probs);
|
||||
void vp9_init_mode_probs(FRAME_CONTEXT *fc) {
|
||||
vp9_copy(fc->uv_mode_prob, default_if_uv_probs);
|
||||
vp9_copy(fc->y_mode_prob, default_if_y_probs);
|
||||
vp9_copy(fc->switchable_interp_prob, default_switchable_interp_prob);
|
||||
vp9_copy(fc->partition_prob, default_partition_probs);
|
||||
vp9_copy(fc->intra_inter_prob, default_intra_inter_p);
|
||||
vp9_copy(fc->comp_inter_prob, default_comp_inter_p);
|
||||
vp9_copy(fc->comp_ref_prob, default_comp_ref_p);
|
||||
vp9_copy(fc->single_ref_prob, default_single_ref_p);
|
||||
fc->tx_probs = default_tx_probs;
|
||||
vp9_copy(fc->skip_probs, default_skip_probs);
|
||||
vp9_copy(fc->inter_mode_probs, default_inter_mode_probs);
|
||||
}
|
||||
|
||||
const vp9_tree_index vp9_switchable_interp_tree
|
||||
|
@ -452,7 +451,7 @@ void vp9_setup_past_independence(VP9_COMMON *cm) {
|
|||
lf->last_sharpness_level = -1;
|
||||
|
||||
vp9_default_coef_probs(cm);
|
||||
vp9_init_mbmode_probs(cm);
|
||||
vp9_init_mode_probs(&cm->fc);
|
||||
vp9_init_mv_probs(cm);
|
||||
|
||||
if (cm->frame_type == KEY_FRAME ||
|
||||
|
|
|
@ -12,6 +12,8 @@
|
|||
#define VP9_COMMON_VP9_ENTROPYMODE_H_
|
||||
|
||||
#include "vp9/common/vp9_blockd.h"
|
||||
#include "vp9/common/vp9_entropy.h"
|
||||
#include "vp9/common/vp9_entropymv.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
@ -35,6 +37,42 @@ struct tx_counts {
|
|||
unsigned int p8x8[TX_SIZE_CONTEXTS][TX_SIZES - 2];
|
||||
};
|
||||
|
||||
typedef struct frame_contexts {
|
||||
vp9_prob y_mode_prob[BLOCK_SIZE_GROUPS][INTRA_MODES - 1];
|
||||
vp9_prob uv_mode_prob[INTRA_MODES][INTRA_MODES - 1];
|
||||
vp9_prob partition_prob[PARTITION_CONTEXTS][PARTITION_TYPES - 1];
|
||||
vp9_coeff_probs_model coef_probs[TX_SIZES][PLANE_TYPES];
|
||||
vp9_prob switchable_interp_prob[SWITCHABLE_FILTER_CONTEXTS]
|
||||
[SWITCHABLE_FILTERS - 1];
|
||||
vp9_prob inter_mode_probs[INTER_MODE_CONTEXTS][INTER_MODES - 1];
|
||||
vp9_prob intra_inter_prob[INTRA_INTER_CONTEXTS];
|
||||
vp9_prob comp_inter_prob[COMP_INTER_CONTEXTS];
|
||||
vp9_prob single_ref_prob[REF_CONTEXTS][2];
|
||||
vp9_prob comp_ref_prob[REF_CONTEXTS];
|
||||
struct tx_probs tx_probs;
|
||||
vp9_prob skip_probs[SKIP_CONTEXTS];
|
||||
nmv_context nmvc;
|
||||
} FRAME_CONTEXT;
|
||||
|
||||
typedef struct {
|
||||
unsigned int y_mode[BLOCK_SIZE_GROUPS][INTRA_MODES];
|
||||
unsigned int uv_mode[INTRA_MODES][INTRA_MODES];
|
||||
unsigned int partition[PARTITION_CONTEXTS][PARTITION_TYPES];
|
||||
vp9_coeff_count_model coef[TX_SIZES][PLANE_TYPES];
|
||||
unsigned int eob_branch[TX_SIZES][PLANE_TYPES][REF_TYPES]
|
||||
[COEF_BANDS][COEFF_CONTEXTS];
|
||||
unsigned int switchable_interp[SWITCHABLE_FILTER_CONTEXTS]
|
||||
[SWITCHABLE_FILTERS];
|
||||
unsigned int inter_mode[INTER_MODE_CONTEXTS][INTER_MODES];
|
||||
unsigned int intra_inter[INTRA_INTER_CONTEXTS][2];
|
||||
unsigned int comp_inter[COMP_INTER_CONTEXTS][2];
|
||||
unsigned int single_ref[REF_CONTEXTS][2][2];
|
||||
unsigned int comp_ref[REF_CONTEXTS][2];
|
||||
struct tx_counts tx;
|
||||
unsigned int skip[SKIP_CONTEXTS][2];
|
||||
nmv_context_counts mv;
|
||||
} FRAME_COUNTS;
|
||||
|
||||
extern const vp9_prob vp9_kf_uv_mode_prob[INTRA_MODES][INTRA_MODES - 1];
|
||||
extern const vp9_prob vp9_kf_y_mode_prob[INTRA_MODES][INTRA_MODES]
|
||||
[INTRA_MODES - 1];
|
||||
|
@ -48,7 +86,7 @@ extern const vp9_tree_index vp9_switchable_interp_tree
|
|||
|
||||
void vp9_setup_past_independence(struct VP9Common *cm);
|
||||
|
||||
void vp9_init_mbmode_probs(struct VP9Common *cm);
|
||||
void vp9_init_mode_probs(FRAME_CONTEXT *fc);
|
||||
|
||||
void vp9_adapt_mode_probs(struct VP9Common *cm);
|
||||
|
||||
|
|
|
@ -48,42 +48,6 @@ extern const struct {
|
|||
PARTITION_CONTEXT left;
|
||||
} partition_context_lookup[BLOCK_SIZES];
|
||||
|
||||
typedef struct frame_contexts {
|
||||
vp9_prob y_mode_prob[BLOCK_SIZE_GROUPS][INTRA_MODES - 1];
|
||||
vp9_prob uv_mode_prob[INTRA_MODES][INTRA_MODES - 1];
|
||||
vp9_prob partition_prob[PARTITION_CONTEXTS][PARTITION_TYPES - 1];
|
||||
vp9_coeff_probs_model coef_probs[TX_SIZES][PLANE_TYPES];
|
||||
vp9_prob switchable_interp_prob[SWITCHABLE_FILTER_CONTEXTS]
|
||||
[SWITCHABLE_FILTERS - 1];
|
||||
vp9_prob inter_mode_probs[INTER_MODE_CONTEXTS][INTER_MODES - 1];
|
||||
vp9_prob intra_inter_prob[INTRA_INTER_CONTEXTS];
|
||||
vp9_prob comp_inter_prob[COMP_INTER_CONTEXTS];
|
||||
vp9_prob single_ref_prob[REF_CONTEXTS][2];
|
||||
vp9_prob comp_ref_prob[REF_CONTEXTS];
|
||||
struct tx_probs tx_probs;
|
||||
vp9_prob skip_probs[SKIP_CONTEXTS];
|
||||
nmv_context nmvc;
|
||||
} FRAME_CONTEXT;
|
||||
|
||||
typedef struct {
|
||||
unsigned int y_mode[BLOCK_SIZE_GROUPS][INTRA_MODES];
|
||||
unsigned int uv_mode[INTRA_MODES][INTRA_MODES];
|
||||
unsigned int partition[PARTITION_CONTEXTS][PARTITION_TYPES];
|
||||
vp9_coeff_count_model coef[TX_SIZES][PLANE_TYPES];
|
||||
unsigned int eob_branch[TX_SIZES][PLANE_TYPES][REF_TYPES]
|
||||
[COEF_BANDS][COEFF_CONTEXTS];
|
||||
unsigned int switchable_interp[SWITCHABLE_FILTER_CONTEXTS]
|
||||
[SWITCHABLE_FILTERS];
|
||||
unsigned int inter_mode[INTER_MODE_CONTEXTS][INTER_MODES];
|
||||
unsigned int intra_inter[INTRA_INTER_CONTEXTS][2];
|
||||
unsigned int comp_inter[COMP_INTER_CONTEXTS][2];
|
||||
unsigned int single_ref[REF_CONTEXTS][2][2];
|
||||
unsigned int comp_ref[REF_CONTEXTS][2];
|
||||
struct tx_counts tx;
|
||||
unsigned int skip[SKIP_CONTEXTS][2];
|
||||
nmv_context_counts mv;
|
||||
} FRAME_COUNTS;
|
||||
|
||||
|
||||
typedef enum {
|
||||
SINGLE_REFERENCE = 0,
|
||||
|
|
Загрузка…
Ссылка в новой задаче