Merge "Renaming refresh_entropy_probs to refresh_frame_context." into experimental

This commit is contained in:
Dmitry Kovalev 2013-04-30 10:21:24 -07:00 коммит произвёл Gerrit Code Review
Родитель 51a73fbba2 9713a68719
Коммит 70d12c3a75
5 изменённых файлов: 13 добавлений и 19 удалений

Просмотреть файл

@ -248,7 +248,7 @@ typedef struct VP9Common {
int sharpness_level;
int dering_enabled;
int refresh_entropy_probs; /* Two state 0 = NO, 1 = YES */
int refresh_frame_context; /* Two state 0 = NO, 1 = YES */
int ref_frame_sign_bias[MAX_REF_FRAMES]; /* Two state 0, 1 */

Просмотреть файл

@ -1391,10 +1391,10 @@ int vp9_decode_frame(VP9D_COMP *pbi, const uint8_t **p_data_end) {
}
if (!pc->error_resilient_mode) {
pc->refresh_entropy_probs = vp9_read_bit(&header_bc);
pc->refresh_frame_context = vp9_read_bit(&header_bc);
pc->frame_parallel_decoding_mode = vp9_read_bit(&header_bc);
} else {
pc->refresh_entropy_probs = 0;
pc->refresh_frame_context = 0;
pc->frame_parallel_decoding_mode = 1;
}
@ -1486,7 +1486,7 @@ int vp9_decode_frame(VP9D_COMP *pbi, const uint8_t **p_data_end) {
}
#endif
if (pc->refresh_entropy_probs)
if (pc->refresh_frame_context)
pc->frame_contexts[pc->frame_context_idx] = pc->fc;
*p_data_end = vp9_reader_find_end(&residual_bc);

Просмотреть файл

@ -1975,7 +1975,7 @@ void vp9_pack_bitstream(VP9_COMP *cpi, unsigned char *dest,
}
if (!pc->error_resilient_mode) {
vp9_write_bit(&header_bc, pc->refresh_entropy_probs);
vp9_write_bit(&header_bc, pc->refresh_frame_context);
vp9_write_bit(&header_bc, pc->frame_parallel_decoding_mode);
}

Просмотреть файл

@ -1207,7 +1207,7 @@ void vp9_change_config(VP9_PTR ptr, VP9_CONFIG *oxcf) {
// cpi->use_last_frame_only = 0;
cpi->refresh_golden_frame = 0;
cpi->refresh_last_frame = 1;
cm->refresh_entropy_probs = 1;
cm->refresh_frame_context = 1;
setup_features(cpi);
cpi->mb.e_mbd.allow_high_precision_mv = 0; // Default mv precision adaptation
@ -2137,10 +2137,7 @@ int vp9_set_reference_enc(VP9_PTR ptr, VP9_REFFRAME ref_frame_flag,
return 0;
}
int vp9_update_entropy(VP9_PTR comp, int update) {
VP9_COMP *cpi = (VP9_COMP *) comp;
VP9_COMMON *cm = &cpi->common;
cm->refresh_entropy_probs = update;
((VP9_COMP *)comp)->common.refresh_frame_context = update;
return 0;
}
@ -2753,7 +2750,7 @@ static void encode_frame_to_data_rate(VP9_COMP *cpi,
(cpi->oxcf.frame_parallel_decoding_mode != 0);
if (cm->error_resilient_mode) {
cm->frame_parallel_decoding_mode = 1;
cm->refresh_entropy_probs = 0;
cm->refresh_frame_context = 0;
}
}
@ -3735,7 +3732,7 @@ static int frame_is_reference(const VP9_COMP *cpi) {
cpi->refresh_last_frame ||
cpi->refresh_golden_frame ||
cpi->refresh_alt_ref_frame ||
cm->refresh_entropy_probs ||
cm->refresh_frame_context ||
mb->mode_ref_lf_delta_update ||
mb->update_mb_segmentation_map ||
mb->update_mb_segmentation_data;
@ -4005,17 +4002,15 @@ int vp9_get_compressed_data(VP9_PTR ptr, unsigned int *frame_flags,
encode_frame_to_data_rate(cpi, size, dest, frame_flags);
}
if (cm->refresh_entropy_probs) {
vpx_memcpy(&cm->frame_contexts[cm->frame_context_idx], &cm->fc,
sizeof(cm->fc));
}
if (cm->refresh_frame_context)
cm->frame_contexts[cm->frame_context_idx] = cm->fc;
if (*size > 0) {
// if its a dropped frame honor the requests on subsequent frames
cpi->droppable = !frame_is_reference(cpi);
// return to normal state
cm->refresh_entropy_probs = 1;
cm->refresh_frame_context = 1;
cpi->refresh_alt_ref_frame = 0;
cpi->refresh_golden_frame = 0;
cpi->refresh_last_frame = 1;

Просмотреть файл

@ -262,8 +262,7 @@ void vp9_setup_inter_frame(VP9_COMP *cpi) {
vp9_setup_past_independence(cm, xd);
assert(cm->frame_context_idx < NUM_FRAME_CONTEXTS);
vpx_memcpy(&cm->fc, &cm->frame_contexts[cm->frame_context_idx],
sizeof(cm->fc));
cm->fc = cm->frame_contexts[cm->frame_context_idx];
}
static int estimate_bits_at_q(int frame_kind, int q, int mbs,