Remove Y2 and Y-no-DC token types from the bitstream.
Change-Id: I7a5314daca993d46b8666ba1ec2ff3766c1e5042
This commit is contained in:
Родитель
48598e30b1
Коммит
3af36ea8cc
|
@ -52,10 +52,8 @@ typedef struct {
|
|||
} POS;
|
||||
|
||||
typedef enum PlaneType {
|
||||
PLANE_TYPE_Y_NO_DC_UNUSED = 0,
|
||||
PLANE_TYPE_Y2_UNUSED,
|
||||
PLANE_TYPE_UV,
|
||||
PLANE_TYPE_Y_WITH_DC,
|
||||
PLANE_TYPE_UV,
|
||||
} PLANE_TYPE;
|
||||
|
||||
typedef char ENTROPY_CONTEXT;
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -1,4 +1,4 @@
|
|||
/*
|
||||
/*
|
||||
* Copyright (c) 2010 The WebM project authors. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by a BSD-style license
|
||||
|
@ -290,7 +290,7 @@ static void update_coef_probs(vp9_coeff_probs *dst_coef_probs,
|
|||
for (i = 0; i < block_types; ++i)
|
||||
for (j = 0; j < COEF_BANDS; ++j)
|
||||
for (k = 0; k < PREV_COEF_CONTEXTS; ++k) {
|
||||
if (k >= 3 && ((i == 0 && j == 1) || (i > 0 && j == 0)))
|
||||
if (k >= 3 && j == 0)
|
||||
continue;
|
||||
vp9_tree_probs_from_distribution(MAX_ENTROPY_TOKENS,
|
||||
vp9_coef_encodings, vp9_coef_tree,
|
||||
|
@ -389,21 +389,21 @@ void vp9_adapt_coef_probs(VP9_COMMON *cm) {
|
|||
count_sat, update_factor);
|
||||
update_coef_probs(cm->fc.hybrid_coef_probs_4x4,
|
||||
cm->fc.pre_hybrid_coef_probs_4x4,
|
||||
BLOCK_TYPES_4X4, cm->fc.hybrid_coef_counts_4x4,
|
||||
BLOCK_TYPES_4X4_HYBRID, cm->fc.hybrid_coef_counts_4x4,
|
||||
count_sat, update_factor);
|
||||
update_coef_probs(cm->fc.coef_probs_8x8, cm->fc.pre_coef_probs_8x8,
|
||||
BLOCK_TYPES_8X8, cm->fc.coef_counts_8x8,
|
||||
count_sat, update_factor);
|
||||
update_coef_probs(cm->fc.hybrid_coef_probs_8x8,
|
||||
cm->fc.pre_hybrid_coef_probs_8x8,
|
||||
BLOCK_TYPES_8X8, cm->fc.hybrid_coef_counts_8x8,
|
||||
BLOCK_TYPES_8X8_HYBRID, cm->fc.hybrid_coef_counts_8x8,
|
||||
count_sat, update_factor);
|
||||
update_coef_probs(cm->fc.coef_probs_16x16, cm->fc.pre_coef_probs_16x16,
|
||||
BLOCK_TYPES_16X16, cm->fc.coef_counts_16x16,
|
||||
count_sat, update_factor);
|
||||
update_coef_probs(cm->fc.hybrid_coef_probs_16x16,
|
||||
cm->fc.pre_hybrid_coef_probs_16x16,
|
||||
BLOCK_TYPES_16X16, cm->fc.hybrid_coef_counts_16x16,
|
||||
BLOCK_TYPES_16X16_HYBRID, cm->fc.hybrid_coef_counts_16x16,
|
||||
count_sat, update_factor);
|
||||
update_coef_probs(cm->fc.coef_probs_32x32, cm->fc.pre_coef_probs_32x32,
|
||||
BLOCK_TYPES_32X32, cm->fc.coef_counts_32x32,
|
||||
|
|
|
@ -59,14 +59,17 @@ extern vp9_extra_bit_struct vp9_extra_bits[12]; /* indexed by token value */
|
|||
|
||||
/* Coefficients are predicted via a 3-dimensional probability table. */
|
||||
|
||||
/* Outside dimension. 0 = Y no DC, 1 = Y2, 2 = UV, 3 = Y with DC */
|
||||
#define BLOCK_TYPES_4X4 4
|
||||
/* Outside dimension. 0 = Y with DC, 1 = UV */
|
||||
#define BLOCK_TYPES_4X4 2
|
||||
#define BLOCK_TYPES_4X4_HYBRID 1
|
||||
|
||||
#define BLOCK_TYPES_8X8 4
|
||||
#define BLOCK_TYPES_8X8 2
|
||||
#define BLOCK_TYPES_8X8_HYBRID 1
|
||||
|
||||
#define BLOCK_TYPES_16X16 4
|
||||
#define BLOCK_TYPES_16X16 2
|
||||
#define BLOCK_TYPES_16X16_HYBRID 1
|
||||
|
||||
#define BLOCK_TYPES_32X32 4
|
||||
#define BLOCK_TYPES_32X32 1
|
||||
|
||||
/* Middle dimension is a coarsening of the coefficient's
|
||||
position within the 4x4 DCT. */
|
||||
|
|
|
@ -55,11 +55,11 @@ typedef struct frame_contexts {
|
|||
vp9_prob sub_mv_ref_prob[SUBMVREF_COUNT][VP9_SUBMVREFS - 1];
|
||||
vp9_prob mbsplit_prob[VP9_NUMMBSPLITS - 1];
|
||||
vp9_coeff_probs coef_probs_4x4[BLOCK_TYPES_4X4];
|
||||
vp9_coeff_probs hybrid_coef_probs_4x4[BLOCK_TYPES_4X4];
|
||||
vp9_coeff_probs hybrid_coef_probs_4x4[BLOCK_TYPES_4X4_HYBRID];
|
||||
vp9_coeff_probs coef_probs_8x8[BLOCK_TYPES_8X8];
|
||||
vp9_coeff_probs hybrid_coef_probs_8x8[BLOCK_TYPES_8X8];
|
||||
vp9_coeff_probs hybrid_coef_probs_8x8[BLOCK_TYPES_8X8_HYBRID];
|
||||
vp9_coeff_probs coef_probs_16x16[BLOCK_TYPES_16X16];
|
||||
vp9_coeff_probs hybrid_coef_probs_16x16[BLOCK_TYPES_16X16];
|
||||
vp9_coeff_probs hybrid_coef_probs_16x16[BLOCK_TYPES_16X16_HYBRID];
|
||||
vp9_coeff_probs coef_probs_32x32[BLOCK_TYPES_32X32];
|
||||
|
||||
nmv_context nmvc;
|
||||
|
@ -80,19 +80,19 @@ typedef struct frame_contexts {
|
|||
unsigned int mbsplit_counts[VP9_NUMMBSPLITS];
|
||||
|
||||
vp9_coeff_probs pre_coef_probs_4x4[BLOCK_TYPES_4X4];
|
||||
vp9_coeff_probs pre_hybrid_coef_probs_4x4[BLOCK_TYPES_4X4];
|
||||
vp9_coeff_probs pre_hybrid_coef_probs_4x4[BLOCK_TYPES_4X4_HYBRID];
|
||||
vp9_coeff_probs pre_coef_probs_8x8[BLOCK_TYPES_8X8];
|
||||
vp9_coeff_probs pre_hybrid_coef_probs_8x8[BLOCK_TYPES_8X8];
|
||||
vp9_coeff_probs pre_hybrid_coef_probs_8x8[BLOCK_TYPES_8X8_HYBRID];
|
||||
vp9_coeff_probs pre_coef_probs_16x16[BLOCK_TYPES_16X16];
|
||||
vp9_coeff_probs pre_hybrid_coef_probs_16x16[BLOCK_TYPES_16X16];
|
||||
vp9_coeff_probs pre_hybrid_coef_probs_16x16[BLOCK_TYPES_16X16_HYBRID];
|
||||
vp9_coeff_probs pre_coef_probs_32x32[BLOCK_TYPES_32X32];
|
||||
|
||||
vp9_coeff_count coef_counts_4x4[BLOCK_TYPES_4X4];
|
||||
vp9_coeff_count hybrid_coef_counts_4x4[BLOCK_TYPES_4X4];
|
||||
vp9_coeff_count hybrid_coef_counts_4x4[BLOCK_TYPES_4X4_HYBRID];
|
||||
vp9_coeff_count coef_counts_8x8[BLOCK_TYPES_8X8];
|
||||
vp9_coeff_count hybrid_coef_counts_8x8[BLOCK_TYPES_8X8];
|
||||
vp9_coeff_count hybrid_coef_counts_8x8[BLOCK_TYPES_8X8_HYBRID];
|
||||
vp9_coeff_count coef_counts_16x16[BLOCK_TYPES_16X16];
|
||||
vp9_coeff_count hybrid_coef_counts_16x16[BLOCK_TYPES_16X16];
|
||||
vp9_coeff_count hybrid_coef_counts_16x16[BLOCK_TYPES_16X16_HYBRID];
|
||||
vp9_coeff_count coef_counts_32x32[BLOCK_TYPES_32X32];
|
||||
|
||||
nmv_context_counts NMVcount;
|
||||
|
|
|
@ -1179,11 +1179,10 @@ static void read_coef_probs_common(BOOL_DECODER* const bc,
|
|||
|
||||
if (vp9_read_bit(bc)) {
|
||||
for (i = 0; i < block_types; i++) {
|
||||
for (j = !i; j < COEF_BANDS; j++) {
|
||||
for (j = 0; j < COEF_BANDS; j++) {
|
||||
/* NB: This j loop starts from 1 on block type i == 0 */
|
||||
for (k = 0; k < PREV_COEF_CONTEXTS; k++) {
|
||||
if (k >= 3 && ((i == 0 && j == 1) ||
|
||||
(i > 0 && j == 0)))
|
||||
if (k >= 3 && j == 0)
|
||||
continue;
|
||||
for (l = 0; l < ENTROPY_NODES; l++) {
|
||||
vp9_prob *const p = coef_probs[i][j][k] + l;
|
||||
|
@ -1202,16 +1201,18 @@ static void read_coef_probs(VP9D_COMP *pbi, BOOL_DECODER* const bc) {
|
|||
VP9_COMMON *const pc = &pbi->common;
|
||||
|
||||
read_coef_probs_common(bc, pc->fc.coef_probs_4x4, BLOCK_TYPES_4X4);
|
||||
read_coef_probs_common(bc, pc->fc.hybrid_coef_probs_4x4, BLOCK_TYPES_4X4);
|
||||
read_coef_probs_common(bc, pc->fc.hybrid_coef_probs_4x4,
|
||||
BLOCK_TYPES_4X4_HYBRID);
|
||||
|
||||
if (pbi->common.txfm_mode != ONLY_4X4) {
|
||||
read_coef_probs_common(bc, pc->fc.coef_probs_8x8, BLOCK_TYPES_8X8);
|
||||
read_coef_probs_common(bc, pc->fc.hybrid_coef_probs_8x8, BLOCK_TYPES_8X8);
|
||||
read_coef_probs_common(bc, pc->fc.hybrid_coef_probs_8x8,
|
||||
BLOCK_TYPES_8X8_HYBRID);
|
||||
}
|
||||
if (pbi->common.txfm_mode > ALLOW_8X8) {
|
||||
read_coef_probs_common(bc, pc->fc.coef_probs_16x16, BLOCK_TYPES_16X16);
|
||||
read_coef_probs_common(bc, pc->fc.hybrid_coef_probs_16x16,
|
||||
BLOCK_TYPES_16X16);
|
||||
BLOCK_TYPES_16X16_HYBRID);
|
||||
}
|
||||
if (pbi->common.txfm_mode > ALLOW_16X16) {
|
||||
read_coef_probs_common(bc, pc->fc.coef_probs_32x32, BLOCK_TYPES_32X32);
|
||||
|
|
|
@ -43,11 +43,11 @@ int intra_mode_stats[VP9_KF_BINTRAMODES]
|
|||
[VP9_KF_BINTRAMODES]
|
||||
[VP9_KF_BINTRAMODES];
|
||||
vp9_coeff_stats tree_update_hist_4x4[BLOCK_TYPES_4X4];
|
||||
vp9_coeff_stats hybrid_tree_update_hist_4x4[BLOCK_TYPES_4X4];
|
||||
vp9_coeff_stats hybrid_tree_update_hist_4x4[BLOCK_TYPES_4X4_HYBRID];
|
||||
vp9_coeff_stats tree_update_hist_8x8[BLOCK_TYPES_8X8];
|
||||
vp9_coeff_stats hybrid_tree_update_hist_8x8[BLOCK_TYPES_8X8];
|
||||
vp9_coeff_stats hybrid_tree_update_hist_8x8[BLOCK_TYPES_8X8_HYBRID];
|
||||
vp9_coeff_stats tree_update_hist_16x16[BLOCK_TYPES_16X16];
|
||||
vp9_coeff_stats hybrid_tree_update_hist_16x16[BLOCK_TYPES_16X16];
|
||||
vp9_coeff_stats hybrid_tree_update_hist_16x16[BLOCK_TYPES_16X16_HYBRID];
|
||||
vp9_coeff_stats tree_update_hist_32x32[BLOCK_TYPES_32X32];
|
||||
|
||||
extern unsigned int active_section;
|
||||
|
@ -1187,7 +1187,7 @@ static void build_tree_distribution(vp9_coeff_probs *coef_probs,
|
|||
for (i = 0; i < block_types; ++i) {
|
||||
for (j = 0; j < COEF_BANDS; ++j) {
|
||||
for (k = 0; k < PREV_COEF_CONTEXTS; ++k) {
|
||||
if (k >= 3 && ((i == 0 && j == 1) || (i > 0 && j == 0)))
|
||||
if (k >= 3 && j == 0)
|
||||
continue;
|
||||
vp9_tree_probs_from_distribution(MAX_ENTROPY_TOKENS,
|
||||
vp9_coef_encodings, vp9_coef_tree,
|
||||
|
@ -1216,7 +1216,8 @@ static void build_coeff_contexts(VP9_COMP *cpi) {
|
|||
#ifdef ENTROPY_STATS
|
||||
cpi, hybrid_context_counters_4x4,
|
||||
#endif
|
||||
cpi->frame_hybrid_branch_ct_4x4, BLOCK_TYPES_4X4);
|
||||
cpi->frame_hybrid_branch_ct_4x4,
|
||||
BLOCK_TYPES_4X4_HYBRID);
|
||||
build_tree_distribution(cpi->frame_coef_probs_8x8,
|
||||
cpi->coef_counts_8x8,
|
||||
#ifdef ENTROPY_STATS
|
||||
|
@ -1228,7 +1229,8 @@ static void build_coeff_contexts(VP9_COMP *cpi) {
|
|||
#ifdef ENTROPY_STATS
|
||||
cpi, hybrid_context_counters_8x8,
|
||||
#endif
|
||||
cpi->frame_hybrid_branch_ct_8x8, BLOCK_TYPES_8X8);
|
||||
cpi->frame_hybrid_branch_ct_8x8,
|
||||
BLOCK_TYPES_8X8_HYBRID);
|
||||
build_tree_distribution(cpi->frame_coef_probs_16x16,
|
||||
cpi->coef_counts_16x16,
|
||||
#ifdef ENTROPY_STATS
|
||||
|
@ -1240,7 +1242,8 @@ static void build_coeff_contexts(VP9_COMP *cpi) {
|
|||
#ifdef ENTROPY_STATS
|
||||
cpi, hybrid_context_counters_16x16,
|
||||
#endif
|
||||
cpi->frame_hybrid_branch_ct_16x16, BLOCK_TYPES_16X16);
|
||||
cpi->frame_hybrid_branch_ct_16x16,
|
||||
BLOCK_TYPES_16X16_HYBRID);
|
||||
build_tree_distribution(cpi->frame_coef_probs_32x32,
|
||||
cpi->coef_counts_32x32,
|
||||
#ifdef ENTROPY_STATS
|
||||
|
@ -1266,7 +1269,7 @@ static void update_coef_probs_common(vp9_writer* const bc,
|
|||
/* dry run to see if there is any udpate at all needed */
|
||||
savings = 0;
|
||||
for (i = 0; i < block_types; ++i) {
|
||||
for (j = !i; j < COEF_BANDS; ++j) {
|
||||
for (j = 0; j < COEF_BANDS; ++j) {
|
||||
int prev_coef_savings[ENTROPY_NODES] = {0};
|
||||
for (k = 0; k < PREV_COEF_CONTEXTS; ++k) {
|
||||
for (t = 0; t < ENTROPY_NODES; ++t) {
|
||||
|
@ -1275,7 +1278,7 @@ static void update_coef_probs_common(vp9_writer* const bc,
|
|||
const vp9_prob upd = COEF_UPDATE_PROB;
|
||||
int s = prev_coef_savings[t];
|
||||
int u = 0;
|
||||
if (k >= 3 && ((i == 0 && j == 1) || (i > 0 && j == 0)))
|
||||
if (k >= 3 && j == 0)
|
||||
continue;
|
||||
#if defined(SEARCH_NEWP)
|
||||
s = prob_diff_update_savings_search(
|
||||
|
@ -1310,7 +1313,7 @@ static void update_coef_probs_common(vp9_writer* const bc,
|
|||
} else {
|
||||
vp9_write_bit(bc, 1);
|
||||
for (i = 0; i < block_types; ++i) {
|
||||
for (j = !i; j < COEF_BANDS; ++j) {
|
||||
for (j = 0; j < COEF_BANDS; ++j) {
|
||||
int prev_coef_savings[ENTROPY_NODES] = {0};
|
||||
for (k = 0; k < PREV_COEF_CONTEXTS; ++k) {
|
||||
// calc probs and branch cts for this frame only
|
||||
|
@ -1320,7 +1323,7 @@ static void update_coef_probs_common(vp9_writer* const bc,
|
|||
const vp9_prob upd = COEF_UPDATE_PROB;
|
||||
int s = prev_coef_savings[t];
|
||||
int u = 0;
|
||||
if (k >= 3 && ((i == 0 && j == 1) || (i > 0 && j == 0)))
|
||||
if (k >= 3 && j == 0)
|
||||
continue;
|
||||
|
||||
#if defined(SEARCH_NEWP)
|
||||
|
@ -1377,7 +1380,7 @@ static void update_coef_probs(VP9_COMP* const cpi, vp9_writer* const bc) {
|
|||
cpi->frame_hybrid_coef_probs_4x4,
|
||||
cpi->common.fc.hybrid_coef_probs_4x4,
|
||||
cpi->frame_hybrid_branch_ct_4x4,
|
||||
BLOCK_TYPES_4X4);
|
||||
BLOCK_TYPES_4X4_HYBRID);
|
||||
|
||||
/* do not do this if not even allowed */
|
||||
if (cpi->common.txfm_mode != ONLY_4X4) {
|
||||
|
@ -1399,7 +1402,7 @@ static void update_coef_probs(VP9_COMP* const cpi, vp9_writer* const bc) {
|
|||
cpi->frame_hybrid_coef_probs_8x8,
|
||||
cpi->common.fc.hybrid_coef_probs_8x8,
|
||||
cpi->frame_hybrid_branch_ct_8x8,
|
||||
BLOCK_TYPES_8X8);
|
||||
BLOCK_TYPES_8X8_HYBRID);
|
||||
}
|
||||
|
||||
if (cpi->common.txfm_mode > ALLOW_8X8) {
|
||||
|
@ -1420,7 +1423,7 @@ static void update_coef_probs(VP9_COMP* const cpi, vp9_writer* const bc) {
|
|||
cpi->frame_hybrid_coef_probs_16x16,
|
||||
cpi->common.fc.hybrid_coef_probs_16x16,
|
||||
cpi->frame_hybrid_branch_ct_16x16,
|
||||
BLOCK_TYPES_16X16);
|
||||
BLOCK_TYPES_16X16_HYBRID);
|
||||
}
|
||||
|
||||
if (cpi->common.txfm_mode > ALLOW_16X16) {
|
||||
|
@ -2153,17 +2156,22 @@ void print_tree_update_probs() {
|
|||
|
||||
print_tree_update_for_type(f, tree_update_hist_4x4, BLOCK_TYPES_4X4,
|
||||
"vp9_coef_update_probs_4x4[BLOCK_TYPES_4X4]");
|
||||
print_tree_update_for_type(f, hybrid_tree_update_hist_4x4, BLOCK_TYPES_4X4,
|
||||
"vp9_coef_update_probs_4x4[BLOCK_TYPES_4X4]");
|
||||
print_tree_update_for_type(f, hybrid_tree_update_hist_4x4,
|
||||
BLOCK_TYPES_4X4_HYBRID,
|
||||
"vp9_coef_update_probs_4x4"
|
||||
"[BLOCK_TYPES_4X4_HYBRID]");
|
||||
print_tree_update_for_type(f, tree_update_hist_8x8, BLOCK_TYPES_8X8,
|
||||
"vp9_coef_update_probs_8x8[BLOCK_TYPES_8X8]");
|
||||
print_tree_update_for_type(f, hybrid_tree_update_hist_8x8, BLOCK_TYPES_8X8,
|
||||
"vp9_coef_update_probs_8x8[BLOCK_TYPES_8X8]");
|
||||
print_tree_update_for_type(f, hybrid_tree_update_hist_8x8,
|
||||
BLOCK_TYPES_8X8_HYBRID,
|
||||
"vp9_coef_update_probs_8x8"
|
||||
"[BLOCK_TYPES_8X8_HYBRID]");
|
||||
print_tree_update_for_type(f, tree_update_hist_16x16, BLOCK_TYPES_16X16,
|
||||
"vp9_coef_update_probs_16x16[BLOCK_TYPES_16X16]");
|
||||
print_tree_update_for_type(f, hybrid_tree_update_hist_16x16,
|
||||
BLOCK_TYPES_16X16,
|
||||
"vp9_coef_update_probs_16x16[BLOCK_TYPES_16X16]");
|
||||
BLOCK_TYPES_16X16_HYBRID,
|
||||
"vp9_coef_update_probs_16x16"
|
||||
"[BLOCK_TYPES_16X16_HYBRID]");
|
||||
print_tree_update_for_type(f, tree_update_hist_32x32, BLOCK_TYPES_32X32,
|
||||
"vp9_coef_update_probs_32x32[BLOCK_TYPES_32X32]");
|
||||
|
||||
|
|
|
@ -157,7 +157,7 @@ typedef struct macroblock {
|
|||
unsigned char *active_ptr;
|
||||
|
||||
vp9_coeff_count token_costs[TX_SIZE_MAX_SB][BLOCK_TYPES_4X4];
|
||||
vp9_coeff_count hybrid_token_costs[TX_SIZE_MAX_SB][BLOCK_TYPES_4X4];
|
||||
vp9_coeff_count hybrid_token_costs[TX_SIZE_MAX_SB][BLOCK_TYPES_4X4_HYBRID];
|
||||
|
||||
int optimize;
|
||||
|
||||
|
|
|
@ -288,13 +288,10 @@ struct vp9_token_state {
|
|||
// TODO: experiments to find optimal multiple numbers
|
||||
#define Y1_RD_MULT 4
|
||||
#define UV_RD_MULT 2
|
||||
#define Y2_RD_MULT 4
|
||||
|
||||
static const int plane_rd_mult[4] = {
|
||||
Y1_RD_MULT,
|
||||
Y2_RD_MULT,
|
||||
UV_RD_MULT,
|
||||
Y1_RD_MULT
|
||||
};
|
||||
|
||||
#define UPDATE_RD_COST()\
|
||||
|
|
|
@ -87,11 +87,11 @@ typedef struct {
|
|||
signed char last_mode_lf_deltas[MAX_MODE_LF_DELTAS];
|
||||
|
||||
vp9_coeff_probs coef_probs_4x4[BLOCK_TYPES_4X4];
|
||||
vp9_coeff_probs hybrid_coef_probs_4x4[BLOCK_TYPES_4X4];
|
||||
vp9_coeff_probs hybrid_coef_probs_4x4[BLOCK_TYPES_4X4_HYBRID];
|
||||
vp9_coeff_probs coef_probs_8x8[BLOCK_TYPES_8X8];
|
||||
vp9_coeff_probs hybrid_coef_probs_8x8[BLOCK_TYPES_8X8];
|
||||
vp9_coeff_probs hybrid_coef_probs_8x8[BLOCK_TYPES_8X8_HYBRID];
|
||||
vp9_coeff_probs coef_probs_16x16[BLOCK_TYPES_16X16];
|
||||
vp9_coeff_probs hybrid_coef_probs_16x16[BLOCK_TYPES_16X16];
|
||||
vp9_coeff_probs hybrid_coef_probs_16x16[BLOCK_TYPES_16X16_HYBRID];
|
||||
vp9_coeff_probs coef_probs_32x32[BLOCK_TYPES_32X32];
|
||||
|
||||
vp9_prob sb_ymode_prob[VP9_I32X32_MODES - 1];
|
||||
|
@ -467,23 +467,23 @@ typedef struct VP9_COMP {
|
|||
vp9_coeff_count coef_counts_4x4[BLOCK_TYPES_4X4];
|
||||
vp9_coeff_probs frame_coef_probs_4x4[BLOCK_TYPES_4X4];
|
||||
vp9_coeff_stats frame_branch_ct_4x4[BLOCK_TYPES_4X4];
|
||||
vp9_coeff_count hybrid_coef_counts_4x4[BLOCK_TYPES_4X4];
|
||||
vp9_coeff_probs frame_hybrid_coef_probs_4x4[BLOCK_TYPES_4X4];
|
||||
vp9_coeff_stats frame_hybrid_branch_ct_4x4[BLOCK_TYPES_4X4];
|
||||
vp9_coeff_count hybrid_coef_counts_4x4[BLOCK_TYPES_4X4_HYBRID];
|
||||
vp9_coeff_probs frame_hybrid_coef_probs_4x4[BLOCK_TYPES_4X4_HYBRID];
|
||||
vp9_coeff_stats frame_hybrid_branch_ct_4x4[BLOCK_TYPES_4X4_HYBRID];
|
||||
|
||||
vp9_coeff_count coef_counts_8x8[BLOCK_TYPES_8X8];
|
||||
vp9_coeff_probs frame_coef_probs_8x8[BLOCK_TYPES_8X8];
|
||||
vp9_coeff_stats frame_branch_ct_8x8[BLOCK_TYPES_8X8];
|
||||
vp9_coeff_count hybrid_coef_counts_8x8[BLOCK_TYPES_8X8];
|
||||
vp9_coeff_probs frame_hybrid_coef_probs_8x8[BLOCK_TYPES_8X8];
|
||||
vp9_coeff_stats frame_hybrid_branch_ct_8x8[BLOCK_TYPES_8X8];
|
||||
vp9_coeff_count hybrid_coef_counts_8x8[BLOCK_TYPES_8X8_HYBRID];
|
||||
vp9_coeff_probs frame_hybrid_coef_probs_8x8[BLOCK_TYPES_8X8_HYBRID];
|
||||
vp9_coeff_stats frame_hybrid_branch_ct_8x8[BLOCK_TYPES_8X8_HYBRID];
|
||||
|
||||
vp9_coeff_count coef_counts_16x16[BLOCK_TYPES_16X16];
|
||||
vp9_coeff_probs frame_coef_probs_16x16[BLOCK_TYPES_16X16];
|
||||
vp9_coeff_stats frame_branch_ct_16x16[BLOCK_TYPES_16X16];
|
||||
vp9_coeff_count hybrid_coef_counts_16x16[BLOCK_TYPES_16X16];
|
||||
vp9_coeff_probs frame_hybrid_coef_probs_16x16[BLOCK_TYPES_16X16];
|
||||
vp9_coeff_stats frame_hybrid_branch_ct_16x16[BLOCK_TYPES_16X16];
|
||||
vp9_coeff_count hybrid_coef_counts_16x16[BLOCK_TYPES_16X16_HYBRID];
|
||||
vp9_coeff_probs frame_hybrid_coef_probs_16x16[BLOCK_TYPES_16X16_HYBRID];
|
||||
vp9_coeff_stats frame_hybrid_branch_ct_16x16[BLOCK_TYPES_16X16_HYBRID];
|
||||
|
||||
vp9_coeff_count coef_counts_32x32[BLOCK_TYPES_32X32];
|
||||
vp9_coeff_probs frame_coef_probs_32x32[BLOCK_TYPES_32X32];
|
||||
|
|
|
@ -155,7 +155,7 @@ static void fill_token_costs(vp9_coeff_count *c,
|
|||
for (i = 0; i < block_type_counts; i++)
|
||||
for (j = 0; j < COEF_BANDS; j++)
|
||||
for (k = 0; k < PREV_COEF_CONTEXTS; k++) {
|
||||
if (k == 0 && ((j > 0 && i > 0) || (j > 1 && i == 0)))
|
||||
if (k == 0 && j > 0)
|
||||
vp9_cost_tokens_skip((int *)(c[i][j][k]),
|
||||
p[i][j][k],
|
||||
vp9_coef_tree);
|
||||
|
@ -280,17 +280,20 @@ void vp9_initialize_rd_consts(VP9_COMP *cpi, int QIndex) {
|
|||
fill_token_costs(cpi->mb.token_costs[TX_4X4],
|
||||
cpi->common.fc.coef_probs_4x4, BLOCK_TYPES_4X4);
|
||||
fill_token_costs(cpi->mb.hybrid_token_costs[TX_4X4],
|
||||
cpi->common.fc.hybrid_coef_probs_4x4, BLOCK_TYPES_4X4);
|
||||
cpi->common.fc.hybrid_coef_probs_4x4,
|
||||
BLOCK_TYPES_4X4_HYBRID);
|
||||
|
||||
fill_token_costs(cpi->mb.token_costs[TX_8X8],
|
||||
cpi->common.fc.coef_probs_8x8, BLOCK_TYPES_8X8);
|
||||
fill_token_costs(cpi->mb.hybrid_token_costs[TX_8X8],
|
||||
cpi->common.fc.hybrid_coef_probs_8x8, BLOCK_TYPES_8X8);
|
||||
cpi->common.fc.hybrid_coef_probs_8x8,
|
||||
BLOCK_TYPES_8X8_HYBRID);
|
||||
|
||||
fill_token_costs(cpi->mb.token_costs[TX_16X16],
|
||||
cpi->common.fc.coef_probs_16x16, BLOCK_TYPES_16X16);
|
||||
fill_token_costs(cpi->mb.hybrid_token_costs[TX_16X16],
|
||||
cpi->common.fc.hybrid_coef_probs_16x16, BLOCK_TYPES_16X16);
|
||||
cpi->common.fc.hybrid_coef_probs_16x16,
|
||||
BLOCK_TYPES_16X16_HYBRID);
|
||||
|
||||
fill_token_costs(cpi->mb.token_costs[TX_32X32],
|
||||
cpi->common.fc.coef_probs_32x32, BLOCK_TYPES_32X32);
|
||||
|
|
|
@ -26,19 +26,19 @@
|
|||
|
||||
#ifdef ENTROPY_STATS
|
||||
vp9_coeff_accum context_counters_4x4[BLOCK_TYPES_4X4];
|
||||
vp9_coeff_accum hybrid_context_counters_4x4[BLOCK_TYPES_4X4];
|
||||
vp9_coeff_accum hybrid_context_counters_4x4[BLOCK_TYPES_4X4_HYBRID];
|
||||
vp9_coeff_accum context_counters_8x8[BLOCK_TYPES_8X8];
|
||||
vp9_coeff_accum hybrid_context_counters_8x8[BLOCK_TYPES_8X8];
|
||||
vp9_coeff_accum hybrid_context_counters_8x8[BLOCK_TYPES_8X8_HYBRID];
|
||||
vp9_coeff_accum context_counters_16x16[BLOCK_TYPES_16X16];
|
||||
vp9_coeff_accum hybrid_context_counters_16x16[BLOCK_TYPES_16X16];
|
||||
vp9_coeff_accum hybrid_context_counters_16x16[BLOCK_TYPES_16X16_HYBRID];
|
||||
vp9_coeff_accum context_counters_32x32[BLOCK_TYPES_32X32];
|
||||
|
||||
extern vp9_coeff_stats tree_update_hist_4x4[BLOCK_TYPES_4X4];
|
||||
extern vp9_coeff_stats hybrid_tree_update_hist_4x4[BLOCK_TYPES_4X4];
|
||||
extern vp9_coeff_stats hybrid_tree_update_hist_4x4[BLOCK_TYPES_4X4_HYBRID];
|
||||
extern vp9_coeff_stats tree_update_hist_8x8[BLOCK_TYPES_8X8];
|
||||
extern vp9_coeff_stats hybrid_tree_update_hist_8x8[BLOCK_TYPES_8X8];
|
||||
extern vp9_coeff_stats hybrid_tree_update_hist_8x8[BLOCK_TYPES_8X8_HYBRID];
|
||||
extern vp9_coeff_stats tree_update_hist_16x16[BLOCK_TYPES_16X16];
|
||||
extern vp9_coeff_stats hybrid_tree_update_hist_16x16[BLOCK_TYPES_16X16];
|
||||
extern vp9_coeff_stats hybrid_tree_update_hist_16x16[BLOCK_TYPES_16X16_HYBRID];
|
||||
extern vp9_coeff_stats tree_update_hist_32x32[BLOCK_TYPES_32X32];
|
||||
#endif /* ENTROPY_STATS */
|
||||
|
||||
|
@ -605,32 +605,33 @@ void print_context_counters() {
|
|||
/* print counts */
|
||||
print_counter(f, context_counters_4x4, BLOCK_TYPES_4X4,
|
||||
"vp9_default_coef_counts_4x4[BLOCK_TYPES_4X4]");
|
||||
print_counter(f, hybrid_context_counters_4x4, BLOCK_TYPES_4X4,
|
||||
"vp9_default_hybrid_coef_counts_4x4[BLOCK_TYPES_4X4]");
|
||||
print_counter(f, hybrid_context_counters_4x4, BLOCK_TYPES_4X4_HYBRID,
|
||||
"vp9_default_hybrid_coef_counts_4x4[BLOCK_TYPES_4X4_HYBRID]");
|
||||
print_counter(f, context_counters_8x8, BLOCK_TYPES_8X8,
|
||||
"vp9_default_coef_counts_8x8[BLOCK_TYPES_8X8]");
|
||||
print_counter(f, hybrid_context_counters_8x8, BLOCK_TYPES_8X8,
|
||||
"vp9_default_hybrid_coef_counts_8x8[BLOCK_TYPES_8X8]");
|
||||
print_counter(f, hybrid_context_counters_8x8, BLOCK_TYPES_8X8_HYBRID,
|
||||
"vp9_default_hybrid_coef_counts_8x8[BLOCK_TYPES_8X8_HYBRID]");
|
||||
print_counter(f, context_counters_16x16, BLOCK_TYPES_16X16,
|
||||
"vp9_default_coef_counts_16x16[BLOCK_TYPES_16X16]");
|
||||
print_counter(f, hybrid_context_counters_16x16, BLOCK_TYPES_16X16,
|
||||
"vp9_default_hybrid_coef_counts_16x16[BLOCK_TYPES_16X16]");
|
||||
print_counter(f, hybrid_context_counters_16x16, BLOCK_TYPES_16X16_HYBRID,
|
||||
"vp9_default_hybrid_coef_counts_16x16"
|
||||
"[BLOCK_TYPES_16X16_HYBRID]");
|
||||
print_counter(f, context_counters_32x32, BLOCK_TYPES_32X32,
|
||||
"vp9_default_coef_counts_32x32[BLOCK_TYPES_32X32]");
|
||||
|
||||
/* print coefficient probabilities */
|
||||
print_probs(f, context_counters_4x4, BLOCK_TYPES_4X4,
|
||||
"default_coef_probs_4x4[BLOCK_TYPES_4X4]");
|
||||
print_probs(f, hybrid_context_counters_4x4, BLOCK_TYPES_4X4,
|
||||
"default_hybrid_coef_probs_4x4[BLOCK_TYPES_4X4]");
|
||||
print_probs(f, hybrid_context_counters_4x4, BLOCK_TYPES_4X4_HYBRID,
|
||||
"default_hybrid_coef_probs_4x4[BLOCK_TYPES_4X4_HYBRID]");
|
||||
print_probs(f, context_counters_8x8, BLOCK_TYPES_8X8,
|
||||
"default_coef_probs_8x8[BLOCK_TYPES_8X8]");
|
||||
print_probs(f, hybrid_context_counters_8x8, BLOCK_TYPES_8X8,
|
||||
"default_hybrid_coef_probs_8x8[BLOCK_TYPES_8X8]");
|
||||
print_probs(f, hybrid_context_counters_8x8, BLOCK_TYPES_8X8_HYBRID,
|
||||
"default_hybrid_coef_probs_8x8[BLOCK_TYPES_8X8_HYBRID]");
|
||||
print_probs(f, context_counters_16x16, BLOCK_TYPES_16X16,
|
||||
"default_coef_probs_16x16[BLOCK_TYPES_16X16]");
|
||||
print_probs(f, hybrid_context_counters_16x16, BLOCK_TYPES_16X16,
|
||||
"default_hybrid_coef_probs_16x16[BLOCK_TYPES_16X16]");
|
||||
print_probs(f, hybrid_context_counters_16x16, BLOCK_TYPES_16X16_HYBRID,
|
||||
"default_hybrid_coef_probs_16x16[BLOCK_TYPES_16X16_HYBRID]");
|
||||
print_probs(f, context_counters_32x32, BLOCK_TYPES_32X32,
|
||||
"default_coef_probs_32x32[BLOCK_TYPES_32X32]");
|
||||
|
||||
|
|
|
@ -61,9 +61,9 @@ extern vp9_coeff_accum context_counters_8x8[BLOCK_TYPES_8X8];
|
|||
extern vp9_coeff_accum context_counters_16x16[BLOCK_TYPES_16X16];
|
||||
extern vp9_coeff_accum context_counters_32x32[BLOCK_TYPES_32X32];
|
||||
|
||||
extern vp9_coeff_accum hybrid_context_counters_4x4[BLOCK_TYPES_4X4];
|
||||
extern vp9_coeff_accum hybrid_context_counters_8x8[BLOCK_TYPES_8X8];
|
||||
extern vp9_coeff_accum hybrid_context_counters_16x16[BLOCK_TYPES_16X16];
|
||||
extern vp9_coeff_accum hybrid_context_counters_4x4[BLOCK_TYPES_4X4_HYBRID];
|
||||
extern vp9_coeff_accum hybrid_context_counters_8x8[BLOCK_TYPES_8X8_HYBRID];
|
||||
extern vp9_coeff_accum hybrid_context_counters_16x16[BLOCK_TYPES_16X16_HYBRID];
|
||||
#endif
|
||||
|
||||
extern const int *vp9_dct_value_cost_ptr;
|
||||
|
|
Загрузка…
Ссылка в новой задаче