Fix rate costing for small blocks with skip flag
Fix rate costing for small blocks with skip flag

In av1_rd_pick_intra_mode_sb, the code calculates the rate for Y and
UV planes separately. If the transform coefficient should be zero,
rd_pick_intra_sby_mode and rd_pick_intra_sbuv_mode return the cost of
actually coding up the zero coefficient, but also set a flag (y_skip
or uv_skip) saying that this could be skipped.

Since the skip flag isn't per-plane, av1_rd_pick_intra_mode_sb checks
to see whether both y_skip and uv_skip were true. In that case, it
costs the block for setting the skip flag rather than outputting zero
transform coefficients.

If a small block (less than 8x8) has no chroma information,
x->skip_chroma_rd is true. In that case, we don't call
rd_pick_intra_sbuv_mode and so uv_skip is never set. However, when we
come to write the block, it will be written using the skip flag. This
patch gets the costing right in that case.

Change-Id: Ib31b80b4b44a5c8ed9d9b3f86d782c54927345f3

GrokImageCompression/aom,GrokImageCompression/aom,GrokImageCompression/aom,GrokImageCompression/aom,GrokImageCompression/aom,GrokImageCompression/aom