vpx/vp8/decoder
Ronald S. Bultje f64725a009 Improved coding using 8x8 transform
In summary, this commit encompasses a series of changes in attempt to
improve the 8x8 transform based coding to help overall compression
quality, please refer to the detailed commit history below for what
are the rationale underly the series of changes:

a. A frame level flag to indicate if 8x8 transform is used at all.
b. 8x8 transform is not used for key frames and small image size.
c. On inter coded frame, macroblocks using modes B_PRED, SPLIT_MV
and I8X8_PRED are forced to using 4x4 transform based coding, the
rest uses 8x8 transform based coding.
d. Encoder and decoder has the same assumption on the relationship
between prediction modes and transform size, therefore no signaling
is encoded in bitstream.
e. Mode decision process now calculate the rate and distortion scores
using their respective transforms.

Overall test results:
1. HD set
http://www.corp.google.com/~yaowu/no_crawl/t8x8/HD_t8x8_20120206.html
(avg psnr: 3.09% glb psnr: 3.22%, ssim: 3.90%)
2. Cif set:
http://www.corp.google.com/~yaowu/no_crawl/t8x8/cif_t8x8_20120206.html
(avg psnr: -0.03%, glb psnr: -0.02%, ssim: -0.04%)
It should be noted here, as 8x8 transform coding itself is disabled
for cif size clips, the 0.03% loss is purely from the 1 bit/frame
flag overhead on if 8x8 transform is used or not for the frame.

---patch history for future reference---
Patch 1:
this commit tries to select transform size based on macroblock
prediction mode. If the size of a prediction mode is 16x16, then
the macroblock is forced to use 8x8 transform. If the prediction
mode is B_PRED, SPLITMV or I8X8_PRED, then the macroblock is forced
to use 4x4 transform. Tests on the following HD clips showed mixed
results: (all hd clips only used first 100 frames in the test)

http://www.corp.google.com/~yaowu/no_crawl/t8x8/hdmodebased8x8.html
http://www.corp.google.com/~yaowu/no_crawl/t8x8/hdmodebased8x8_log.html

while the results are mixed and overall negative, it is interesting to
see 8x8 helped a few of the clips.

Patch 2:
this patch tries to hard-wire selection of transform size based on
prediction modes without using segmentation to signal the transform size.
encoder and decoder both takes the same assumption that all macroblocks
use 8x8 transform except when prediciton mode is B_PRED, I8X8_PRED or
SPLITMV. Test results are as follows:

http://www.corp.google.com/~yaowu/no_crawl/t8x8/cifmodebase8x8_0125.html
http://www.corp.google.com/~yaowu/no_crawl/t8x8/hdmodebased8x8_0125log.html

Interestingly, by removing the overhead or coding the segmentation, the
results on this limited HD set have turn positive on average.

Patch 3:
this patch disabled the usage of 8x8 transform on key frames, and kept the
logic from patch 2 for inter frames only. test results on HD set turned
decidedly positive with 8x8 transform enabled on inter frame with 16x16
prediction modes: (avg psnr: .81% glb psnr: .82 ssim: .55%)

http://www.corp.google.com/~yaowu/no_crawl/t8x8/hdintermode8x8_0125.html
results on cif set still negative overall

Patch 4:
continued from last patch, but now in mode decision process, the rate and
distortion estimates are computed based on 8x8 transform results for MBs
with modes associated with 8x8 transform. This patch also fixed a problem
related to segment based eob coding when 8x8 transform is used. The patch
significantly improved the results on HD clips:

http://www.corp.google.com/~yaowu/no_crawl/t8x8/hd8x8RDintermode.html
(avg psnr: 2.70% glb psnr: 2.76% ssim: 3.34%)
results on cif also improved, though they are still negative compared to
baseline that uses 4x4 transform only:
http://www.corp.google.com/~yaowu/no_crawl/t8x8/cif8x8RDintermode.html
(avg psnr: -.78% glb psnr: -.86% ssim: -.19%)

Patch 5:
This patch does 3 things:
a. a bunch of decoder bug fixes, encodings and decodings were verified
to have matched recon buffer on a number of encodes on cif size mobile and
hd version of _pedestrian.
b. the patch further improved the rate distortion calculation of MBS that
use 8x8 transform. This provided some further gain on compression.
c. the patch also got the experimental work SEG_LVL_EOB to work with 8x8
transformed macroblock, test results indicates it improves the cif set
but hurt the HD set slightly.

Tests results on HD clips:
http://www.corp.google.com/~yaowu/no_crawl/t8x8/HD_t8x8_20120201.html
(avg psnr: 3.19% glb psnr: 3.30% ssim: 3.93%)

Test results on cif clips:
http://www.corp.google.com/~yaowu/no_crawl/t8x8/cif_t8x8_20120201.html
(avg psnr: -.47% glb psnr: -.51% ssim: +.28%)

Patch 6:
Added a frame level flag to indicate if 8x8 transform is allowed at all.
temporarily the decision is based on frame size, can be optimized later
one. This get the cif results to basically unchanged, with one bit per
frame overhead on both cif and hd clips.

Patch 8:
Rebase and Merge to head by PGW.
Fixed some suspect 4s that look like hey should be 64s in regard
to segmented EOB. Perhaps #defines would be bette.
Bulit and tested without T8x8 enabled and produces unchanged
output.

Patch 9:
Corrected misalligned code/decode of "txfm_mode" bit.
Limited testing for correct encode and decode with
T8x8 configured on derf clips.

Change-Id: I156e1405d25f81579d579dff8ab9af53944ec49c
2012-02-10 14:23:27 +00:00
..
arm Fix building with --disable-postproc 2011-08-01 17:50:23 -04:00
generic Merge Extended Q experiment. 2012-02-09 17:22:34 +00:00
x86 Fix naming of sse2 idct functions. 2011-08-24 10:25:32 -07:00
asm_dec_offsets.c "Eliminated TOKENEXTRABITS" broke the windows build. 2011-07-26 09:33:16 -04:00
dboolhuff.c Moved vp8_encode_bool into boolhuff.h 2011-07-19 09:17:25 -04:00
dboolhuff.h Moved vp8_encode_bool into boolhuff.h 2011-07-19 09:17:25 -04:00
decodemv.c Merge dualpred (compound prediction) experiment. 2012-02-09 16:29:18 -08:00
decodemv.h Use WebM in copyright notice for consistency 2010-09-09 10:01:21 -04:00
decoderthreading.h vp8mt_alloc_temp_buffers: make prototype return void 2010-11-17 09:13:57 -05:00
decodframe.c Improved coding using 8x8 transform 2012-02-10 14:23:27 +00:00
dequantize.c Merge Extended Q experiment. 2012-02-09 17:22:34 +00:00
dequantize.h changed function name for clarity 2011-11-11 09:01:16 -08:00
detokenize.c Improved coding using 8x8 transform 2012-02-10 14:23:27 +00:00
detokenize.h Add 8x8 transform to experimental branch 2011-07-20 09:49:22 -07:00
ec_types.h Broken EC after MODE_INFO size reduction 2011-05-26 15:13:00 -04:00
error_concealment.c Fixes the boundary checks for extrapolated and interpolated MVs. 2011-09-16 11:58:57 +02:00
error_concealment.h Adding error-concealment to the decoder. 2011-05-19 13:46:33 -04:00
idct_blk.c fix more merge issues 2011-07-21 09:01:53 -07:00
onyxd_if.c Merge Extended Q experiment. 2012-02-09 17:22:34 +00:00
onyxd_int.h Moved prob_dualpred to common. 2012-02-06 16:37:11 +00:00
reconintra_mt.c Fix relative include paths 2011-02-10 15:09:44 -05:00
reconintra_mt.h Eliminate more warnings. 2010-10-27 18:08:04 -07:00
threading.c Merge dualpred (compound prediction) experiment. 2012-02-09 16:29:18 -08:00
treereader.h Removed unused function vp8_treed_read_num 2011-06-07 09:32:51 -04:00