Simplify OD_UNBIASED_RSHIFT.

Just in case the compiler can't figure it out.

Signed-off-by: Timothy B. Terriberry <tterribe@xiph.org>
Remove od_state.input
Make frame buffers explicitly aligned.
pkg-config: fix uninstalled .pc files
mcenc.c: Properly clear MVs hit cache

This avoids spurious hits when hit_bit is reset to 0.
Unfortunately this slightly increases rate on video-1-short:
           RATE (%)  DSNR (dB)
    PSNR 0.03606  -0.00193
 PSNRHVS 0.03931  -0.00311
    SSIM 0.01739  -0.00084
FASTSSIM 0.02251  -0.00138
Removing legacy metrics code.
mcenc: check allocations and cleanup
Improve .gitignore for doc and submit_awcy.py
Add SSE4.1 and AVX2 detection.

We'll want to renumber the flags they when we add other instruction
 sets, but this doesn't affect ABI, so that can be done later.

Signed-off-by: Timothy B. Terriberry <tterribe@xiph.org>
Add SSE2/SSE4.1 version of od_bin_fdct4x4.

Currently requires configuring with -msse4.1 in your CFLAGS to build
 the SSE4.1 version.

Signed-off-by: Timothy B. Terriberry <tterribe@xiph.org>
Add run-time CPU detection for the 4x4 DCT.

Also tests all implementations in dcttest.
This is not actually the test we want to run: we want to test that
 they match the C version exactly, using OD_CHECKASM similar to how
 sse2mc.c does it.
However, it's a start.

Signed-off-by: Timothy B. Terriberry <tterribe@xiph.org>
Add SSE2/SSE4.1 version of od_bin_idct4x4.

Signed-off-by: Timothy B. Terriberry <tterribe@xiph.org>
sad_4x4_sse: fix for i686

- Split into two blocks to avoid "impossible constraints"
- Removed earlyclobber "&" constraint modifiers for outputs which aren't
written to until all inputs have been consumed.
Fix desync introduced by dd3fca176f087d8fe72ddf2e972d728ef92d941f

Note that dd3fca176f087d8fe72ddf2e972d728ef92d941f itself fixed by
accident another desync introduced by
f317efd3bd8fa07ba5b7cfca139712ac3b200a78.
Add more assertions to level 3 MV encoding

This should make it harder to introduce desyncs like the one fixed by
by the previous commit.
Fix calculation of MV expectation

We were calculating E(ox) instead of E(abs(ox) - 3 | abs(ox) >= 3) (same
for oy).
Results on video-1-short:
           RATE (%)  DSNR (dB)
    PSNR -0.09505  0.00506
 PSNRHVS -0.10656  0.00841
    SSIM -0.09582  0.00459
FASTSSIM -0.10099  0.00617
Simplify (and improve) the adaptation of MV expectation

Use generic_{encode,decode} to do the adaptation instead of doing it by
hand.
Results on video-1-short:
           RATE (%)  DSNR (dB)
    PSNR -0.01933  0.00103
 PSNRHVS -0.02247  0.00178
    SSIM -0.01943  0.00093
FASTSSIM -0.02078  0.00127
Prepare half-pel BMA sad
do fullpell BMA search at halfpel resolution
round-to-even predictor