Commit 4fbd678f authored by Julia Robson's avatar Julia Robson
Browse files

Supertx fix for 422 colour subsampling

Fixes assertion for football_422_4sif.y4m when supertx, var_tx and
ext_tx are all enabled. Problem was after subsampling, the u and v
blocks being encoded were no longer square.

Change-Id: Ie626f30a2e64538d33343a26d5124a79a6f2b985
parent 331b0295
......@@ -1513,9 +1513,18 @@ static void write_modes_sb(VP10_COMP *cpi,
!m->mbmi.skip) {
assert(*tok < tok_end);
for (plane = 0; plane < MAX_MB_PLANE; ++plane) {
const int mbmi_txb_size = txsize_to_bsize[m->mbmi.tx_size];
const int num_4x4_w = num_4x4_blocks_wide_lookup[mbmi_txb_size];
const int num_4x4_h = num_4x4_blocks_high_lookup[mbmi_txb_size];
int row, col;
TX_SIZE tx = plane ? get_uv_tx_size(&m->mbmi, &xd->plane[plane])
: m->mbmi.tx_size;
pack_mb_tokens(w, tok, tok_end, cm->bit_depth, tx);
BLOCK_SIZE txb_size = txsize_to_bsize[tx];
int bw = num_4x4_blocks_wide_lookup[txb_size];
for (row = 0; row < num_4x4_h; row += bw)
for (col = 0; col < num_4x4_w; col += bw)
pack_mb_tokens(w, tok, tok_end, cm->bit_depth, tx);
assert(*tok < tok_end && (*tok)->token == EOSB_TOKEN);
(*tok)++;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment