Skip to content
Snippets Groups Projects
Commit 37ebf187 authored by Urvang Joshi's avatar Urvang Joshi
Browse files

[Normative] DC_PRED: Avoid div using mult+shift.

DC_PRED requires dividing by 'count' = block width + height.
- For square blocks this is efficient, as count is a power of 2.
- But for 1x2 and 1x4 rectangular blocks the division is inefficient.

So, we approximate this division with an integer multiply and a shift.

test_intra_pred_speed test results:

Size    Before (ms) After (ms)
4x8     221         206
8x4     195         189
8x16    121          88
16x8     84          73
16x32    63          60
32x16    68          66

Compression quality is neutral:
- Division vs 32-bit mult + shift is neutral:
https://arewecompressedyet.com/?job=ALL_rectpred_bef%402018-01-10T19%3A02%3A20.745Z&job=ALL_rectpred_aft_mult_shift%402018-01-10T19%3A04%3A21.380Z
- And 32-bit mult + shift vs 8-bit mult + shift is also neutral:
https://arewecompressedyet.com/?job=mult_shift_32bit%402018-01-16T20%3A30%3A21.418Z&job=mult_shift_08bit%402018-01-16T20%3A31%3A25.673Z

BUG=aomedia:1191

Change-Id: I2343a055bc3d85cb7be7652d7a6db1b768361be9
parent 1e959897
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment