This fixes a lossless encoding bug as reported in the issue tracker. Coding performance change is neutral. BUG=webm:1700
Unified · Split
| @@ -4443,6 +4443,7 @@ void vp9_rd_pick_inter_mode_sub8x8(VP9_COMP *cpi, TileDataEnc *tile_data, · 4442 unmodified lines | ||
| 4443 | 4443 | tmp_best_sse = total_sse; |
| 4444 | 4444 | tmp_best_skippable = skippable; |
| 4445 | 4445 | tmp_best_mbmode = *mi; |
| 4446 | + x->sum_y_eobs[TX_4X4] = 0; | |
| 4446 | 4447 | for (i = 0; i < 4; i++) { |
| 4447 | 4448 | tmp_best_bmodes[i] = xd->mi[0]->bmi[i]; |
| 4448 | 4449 | x->zcoeff_blk[TX_4X4][i] = !x->plane[0].eobs[i]; |
| @@ -4476,6 +4477,11 @@ void vp9_rd_pick_inter_mode_sub8x8(VP9_COMP *cpi, TileDataEnc *tile_data, · 27 unmodified lines | ||
| 4476 | 4477 | &rate, &rate_y, &distortion, &skippable, &total_sse, |
| 4477 | 4478 | (int)this_rd_thresh, seg_mvs, bsi, 0, mi_row, mi_col); |
| 4478 | 4479 | if (tmp_rd == INT64_MAX) continue; |
| 4480 | + x->sum_y_eobs[TX_4X4] = 0; | |
| 4481 | + for (i = 0; i < 4; i++) { | |
| 4482 | + x->zcoeff_blk[TX_4X4][i] = !x->plane[0].eobs[i]; | |
| 4483 | + x->sum_y_eobs[TX_4X4] += x->plane[0].eobs[i]; | |
| 4484 | + } | |
| 4479 | 4485 | } else { |
| 4480 | 4486 | total_sse = tmp_best_sse; |
| 4481 | 4487 | rate = tmp_best_rate; |