Minor PVQ cleanup
Rewrote od_convert_block_down to handle edge cases.

Exposed od_convert_block_down in tf.h for use in 4x4 TF intra
 prediction patch.
Merge branch 'master' of git://git.xiph.org/daala
Fix a few typos in design doc and source comments

Signed-off-by: Nathan E. Egge <negge@dgql.org>
Reformatting the source code.

Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
Reformatting pvq.c
Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
Fixing buffer overflow with long file names.
Decoder for new PVQ code

Hasn't been tested much, but PVQ is still off by default anyway.
encode/decode: fix sizeof mismatch
Using separate contexts for expectation of PVQ gain/angle of different bands

Results in identical images, but reduces the rate by 1% at high rate to
2.5% at low rate. Measured on subset1 with forced 8x8 blocks.
Support for PVQ on 4x4 blocks.

Overall, doesn't make much difference when block switching is enabled (probably
too few 4x4 blocks?). If forcing to 4x4, it's currently a small loss at low
rate and a small gain at high rate. Probably still needs some work (bands?).
Updating intra prediction to use adjacent TF'd 4x4 blocks.

All block sizes now using intra prediction based on just the adjacent
 neighboring 4x4 blocks from TF.  This has several benefits:

  (1) reduces complexity - no need for extra logic to TF up or TF down each
      block's neighbors when doing prediction
  (2) reduces memory footprint - only a single row's worth (plus 1) of TF'd
      4x4 blocks need to be held in memory while encoding / decoding
  (3) better prediction - training 16x16 predictors is now tractable as it
      uses only (4+1+4+4)*(4*4)=208 inputs instead of 4*(16*16)=1024

This comes with no significant encoder performance penalty based on tests
 against subset2 using intra predictors trained on subset1 + subset3.

Normal block switching:

            RATE     DSNR
    PSNR -0.020556 0.0014298
 PSNRHVS  0.38113 -0.026767
    SSIM  1.3508  -0.056021
FASTSSIM  0.63636 -0.019561

Only 4x4 blocks:

            RATE     DSNR
    PSNR  0.0      0.0
 PSNRHVS  0.0      0.0
    SSIM  0.0      0.0
FASTSSIM  0.0      0.0

Only 8x8 blocks:

            RATE     DSNR
    PSNR -0.26300  0.016693
 PSNRHVS  0.41150 -0.028184
    SSIM -0.27169  0.012379
FASTSSIM  0.53729 -0.011246

Only 16x16 blocks:

            RATE     DSNR
    PSNR -0.34254  0.018875
 PSNRHVS -0.19343  0.014677
    SSIM  1.1356  -0.045811
FASTSSIM -0.26803 -0.0011219
Update the tools to support 4x4 TF'd neighbors.

Add TF_BLOCKS global flag so that intra_pred, intra_stats and intra_trace
 all default to using neighbors that have been TF'd down to 4x4 blocks.
encoder: add --enable-encoder-check option

With this option enabled, the encoder will decode its encoded
packets and compare them against its reconstructed frames.

Signed-off-by: Nathan E. Egge <negge@dgql.org>
encoder_example: remove dead code

video_ready is always true at this point.
Remove redundant DUMP_IMAGES tests from Makefile.am.
tools: remove redefines
Fix unused parameter warnings in check_initial.c
Splitting the 16x16 block size coding into a separate function.

Will make it easier to do the top level.
Fix block size bug when TF'ing luma to 4x4.