Add "entropy" experiment

This patch added two features to improve entropy coding efficiency
for coefficient tokens.

1. Choose 1 of 4 default probability tables based on q-index for
key-frames.
It is ported from nextgen branch:
https://chromium-review.googlesource.com/#/c/280586/

2. Do backward update after each superblock (64X64) row using
subframe token counts.

Coding gain: 0.1% on lowres; 0.42% on midres; 0.36% on hdres.
Much larger gain for key-frames: 2.6%, 2.3%, 1.7%.

Design doc: go/huisu-entropy

Change-Id: Ia3b6a615636be09247d70e4c520405637561532b
This commit is contained in:
hui su
2016-01-07 14:29:26 -08:00
parent c67dd39adc
commit 83b47af18d
13 changed files with 2368 additions and 6 deletions

View File

@@ -291,6 +291,19 @@ typedef struct {
YV12_BUFFER_CONFIG buf;
} EncRefCntBuffer;
#if CONFIG_ENTROPY
typedef struct SUBFRAME_STATS {
vp10_coeff_probs_model
coef_probs_buf[COEF_PROBS_BUFS][TX_SIZES][PLANE_TYPES];
vp10_coeff_count
coef_counts_buf[COEF_PROBS_BUFS][TX_SIZES][PLANE_TYPES];
unsigned int
eob_counts_buf[COEF_PROBS_BUFS]
[TX_SIZES][PLANE_TYPES][REF_TYPES][COEF_BANDS][COEFF_CONTEXTS];
vp10_coeff_probs_model enc_starting_coef_probs[TX_SIZES][PLANE_TYPES];
} SUBFRAME_STATS;
#endif // CONFIG_ENTROPY
typedef struct VP10_COMP {
QUANTS quants;
ThreadData td;
@@ -553,6 +566,9 @@ typedef struct VP10_COMP {
VPxWorker *workers;
struct EncWorkerData *tile_thr_data;
VP9LfSync lf_row_sync;
#if CONFIG_ENTROPY
SUBFRAME_STATS subframe_stats;
#endif // CONFIG_ENTROPY
} VP10_COMP;
void vp10_initialize_enc(void);
@@ -600,6 +616,11 @@ int vp10_set_size_literal(VP10_COMP *cpi, unsigned int width,
int vp10_get_quantizer(struct VP10_COMP *cpi);
#if CONFIG_ENTROPY
void full_to_model_counts(vp10_coeff_count_model *model_count,
vp10_coeff_count *full_count);
#endif // CONFIG_ENTROPY
static INLINE int frame_is_kf_gf_arf(const VP10_COMP *cpi) {
return frame_is_intra_only(&cpi->common) ||
cpi->refresh_alt_ref_frame ||