diff options
author | Paul Wilkins <paulwilkins@google.com> | 2012-02-09 16:10:46 +0000 |
---|---|---|
committer | Paul Wilkins <paulwilkins@google.com> | 2012-02-09 16:10:46 +0000 |
commit | cf8af867dddc7830cf42577dd9bb27bf0330a682 (patch) | |
tree | a9fd276314ad7e7705bfbc7466836da030e35a84 /vp8/encoder/encodeframe.c | |
parent | 8266abfe96cb1b46f537aec66b3dfcf22da2bb1c (diff) | |
download | libvpx-cf8af867dddc7830cf42577dd9bb27bf0330a682.tar libvpx-cf8af867dddc7830cf42577dd9bb27bf0330a682.tar.gz libvpx-cf8af867dddc7830cf42577dd9bb27bf0330a682.tar.bz2 libvpx-cf8af867dddc7830cf42577dd9bb27bf0330a682.zip |
Merge COMPRED
Merged in most of the current common prediction changes
that were under the #if CONFIG_COMPRED option.
Change-Id: If4e6f61dbe7b86dd449f6effbe93b5eb7e893885
Diffstat (limited to 'vp8/encoder/encodeframe.c')
-rw-r--r-- | vp8/encoder/encodeframe.c | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/vp8/encoder/encodeframe.c b/vp8/encoder/encodeframe.c index c79ce67df..1600456ec 100644 --- a/vp8/encoder/encodeframe.c +++ b/vp8/encoder/encodeframe.c @@ -1181,12 +1181,10 @@ static void encode_frame_internal(VP8_COMP *cpi) TOKENEXTRA *tp = cpi->tok; int totalrate; -#if CONFIG_COMPRED // Compute a modified set of reference frame probabilities to use when // prediction fails. These are based on the current genreal estimates for // this frame which may be updated with each itteration of the recode loop. compute_mod_refprobs( cm ); -#endif //#if CONFIG_SEGFEATURES // debug output @@ -1785,9 +1783,7 @@ int vp8cx_encode_inter_macroblock int distortion; unsigned char *segment_id = &xd->mode_info_context->mbmi.segment_id; int seg_ref_active; -#if CONFIG_COMPRED unsigned char ref_pred_flag; -#endif x->skip = 0; @@ -1824,15 +1820,8 @@ int vp8cx_encode_inter_macroblock { unsigned char pred_context; -#if CONFIG_COMPRED pred_context = get_pred_context( cm, xd, PRED_DUAL ); -#else - MB_MODE_INFO *t = &x->e_mbd.mode_info_context - [-cpi->common.mode_info_stride].mbmi; - MB_MODE_INFO *l = &x->e_mbd.mode_info_context[-1].mbmi; - pred_context = (t->second_ref_frame != INTRA_FRAME) + - (l->second_ref_frame != INTRA_FRAME); -#endif + if (xd->mode_info_context->mbmi.second_ref_frame == INTRA_FRAME) cpi->single_pred_count[pred_context]++; else @@ -1941,7 +1930,6 @@ int vp8cx_encode_inter_macroblock //#if CONFIG_SEGFEATURES seg_ref_active = segfeature_active( xd, *segment_id, SEG_LVL_REF_FRAME ); -#if CONFIG_COMPRED // SET VARIOUS PREDICTION FLAGS // Did the chosen reference frame match its predicted value. @@ -1949,8 +1937,6 @@ int vp8cx_encode_inter_macroblock get_pred_ref( cm, xd )) ); set_pred_flag( xd, PRED_REF, ref_pred_flag ); -#endif - // If we have just a single reference frame coded for a segment then // exclude from the reference frame counts used to work out // probabilities. NOTE: At the moment we dont support custom trees |