[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
Showing
- aom_dsp/aom_dsp_rtcd_defs.pl 24 additions, 16 deletionsaom_dsp/aom_dsp_rtcd_defs.pl
- aom_dsp/intrapred.c 244 additions, 1 deletionaom_dsp/intrapred.c
- test/intrapred_test.cc 9 additions, 9 deletionstest/intrapred_test.cc
- test/test_intra_pred_speed.cc 48 additions, 50 deletionstest/test_intra_pred_speed.cc
Loading