diff options
author | Adrian Grange <agrange@google.com> | 2011-12-15 10:00:46 -0800 |
---|---|---|
committer | Adrian Grange <agrange@google.com> | 2011-12-15 10:00:46 -0800 |
commit | ae63ce248afb20d2463449e617cfc5e626a5d63d (patch) | |
tree | 8e1ee458ee31ad4ed537c6237973c3eac0124090 /vp8 | |
parent | ae9023a3c915a95e13e96721888b174d68c83553 (diff) | |
download | libvpx-ae63ce248afb20d2463449e617cfc5e626a5d63d.tar libvpx-ae63ce248afb20d2463449e617cfc5e626a5d63d.tar.gz libvpx-ae63ce248afb20d2463449e617cfc5e626a5d63d.tar.bz2 libvpx-ae63ce248afb20d2463449e617cfc5e626a5d63d.zip |
Fixed bug to use mode_info_stride rather than mb_cols
Both encoder & decoder were using mb_cols to
offset from one row of MODE_INFO structures to the next
when they should have been using mode_info_stride.
Fixing this in both encoder and decoder gives around
a 3KB size saving and 0.025dB PSNR improvement on the one
720P clip I tried.
(Also removed "index" which was being updated but not used)
Change-Id: I413bea802b142886bfcf8d8aa7f5a2f0c524fd4b
Diffstat (limited to 'vp8')
-rw-r--r-- | vp8/decoder/decodemv.c | 2 | ||||
-rw-r--r-- | vp8/encoder/bitstream.c | 6 |
2 files changed, 2 insertions, 6 deletions
diff --git a/vp8/decoder/decodemv.c b/vp8/decoder/decodemv.c index d8b93a8ff..b3799c78d 100644 --- a/vp8/decoder/decodemv.c +++ b/vp8/decoder/decodemv.c @@ -479,7 +479,7 @@ static void read_mb_modes_mv(VP8D_COMP *pbi, MODE_INFO *mi, MB_MODE_INFO *mbmi, pred_context += (mi-1)->mbmi.seg_id_predicted; if (mb_row != 0) pred_context += - (mi-pbi->common.mb_cols)->mbmi.seg_id_predicted; + (mi-pbi->common.mode_info_stride)->mbmi.seg_id_predicted; mbmi->seg_id_predicted = vp8_read(bc, diff --git a/vp8/encoder/bitstream.c b/vp8/encoder/bitstream.c index c49e2bd3e..6f92ff0a7 100644 --- a/vp8/encoder/bitstream.c +++ b/vp8/encoder/bitstream.c @@ -944,7 +944,6 @@ static void pack_inter_mode_mvs(VP8_COMP *const cpi) int i; int pred_context; - int index = 0; const int *const rfct = cpi->count_mb_ref_frame_usage; const int rf_intra = rfct[INTRA_FRAME]; @@ -1093,7 +1092,7 @@ static void pack_inter_mode_mvs(VP8_COMP *const cpi) if (mb_col != 0) pred_context += (m-1)->mbmi.seg_id_predicted; if (mb_row != 0) - pred_context += (m-pc->mb_cols)->mbmi.seg_id_predicted; + pred_context += (m-pc->mode_info_stride)->mbmi.seg_id_predicted; // Code the prediction flag for this mb vp8_write( w, m->mbmi.seg_id_predicted, @@ -1108,7 +1107,6 @@ static void pack_inter_mode_mvs(VP8_COMP *const cpi) // Normal undpredicted coding write_mb_segid(w, mi, &cpi->mb.e_mbd); } - index++; } //#if CONFIG_SEGFEATURES @@ -1329,7 +1327,6 @@ static void write_kfmodes(VP8_COMP *cpi) /* const */ MODE_INFO *m = c->mi; int i; - int index = 0; int mb_row = -1; int prob_skip_false = 0; @@ -1375,7 +1372,6 @@ static void write_kfmodes(VP8_COMP *cpi) if (cpi->mb.e_mbd.update_mb_segmentation_map) { - index++; write_mb_segid(bc, &m->mbmi, &cpi->mb.e_mbd); } |