xiph / daala

Modern video compression for the internet
https://xiph.org/daala/
BSD 2-Clause "Simplified" License
543 stars 106 forks source link

put chroma blocks in rdo loop #112

Open metajack opened 9 years ago

metajack commented 9 years ago

Currently we ignore chroma in the RDO loop for block size decisions. We should be considering chroma. This change may or may not improve metrics as metrics don't look at chroma.

This change is probably best done by first changing how the block coefficients are organized in the bistream. Currently for each superblock, all luma coeffs are written, followed by all chroma. This should be changed to be done at the actual block level. After that, it should be easy to move the loop over planes into several places inside od_encode_recursive and removing the rdo_only flag gates on handling chroma.

It seems like the best way to accomplish the reorganization is to make od_block_encode have two cases. The first case (4:4:4 and 8x8 or up in 4:2:0) always handles all planes of a single block. The second case (4:2:0 at 4x4) would handle 4 luma blocks, corresponding to a single chroma block.

cc @jmvalin

tmatth commented 8 years ago

In the last sentence, do you mean "4 luma blocks, corresponding to a Cb block and a Cr block"?