Commit ba91b54d authored by Yaowu Xu's avatar Yaowu Xu
Browse files

Simplify bsize calculation

Change-Id: Ibc514684def9914c66f04cb7931f773e2b79c168
parent a0043c6d
...@@ -559,18 +559,10 @@ static void choose_partitioning(VP9_COMP *cpi, ...@@ -559,18 +559,10 @@ static void choose_partitioning(VP9_COMP *cpi,
const YV12_BUFFER_CONFIG *yv12_g = get_ref_frame_buffer(cpi, GOLDEN_FRAME); const YV12_BUFFER_CONFIG *yv12_g = get_ref_frame_buffer(cpi, GOLDEN_FRAME);
unsigned int y_sad, y_sad_g; unsigned int y_sad, y_sad_g;
BLOCK_SIZE bsize; const BLOCK_SIZE bsize = BLOCK_32X32
if (mi_row + 4 < cm->mi_rows && mi_col + 4 < cm->mi_cols) + (mi_col + 4 < cm->mi_cols) * 2 + (mi_row + 4 < cm->mi_rows);
bsize = BLOCK_64X64;
else if (mi_row + 4 < cm->mi_rows && mi_col + 4 >= cm->mi_cols)
bsize = BLOCK_32X64;
else if (mi_row + 4 >= cm->mi_rows && mi_col + 4 < cm->mi_cols)
bsize = BLOCK_64X32;
else
bsize = BLOCK_32X32;
assert(yv12 != NULL); assert(yv12 != NULL);
if (yv12_g && yv12_g != yv12) { if (yv12_g && yv12_g != yv12) {
vp9_setup_pre_planes(xd, 0, yv12_g, mi_row, mi_col, vp9_setup_pre_planes(xd, 0, yv12_g, mi_row, mi_col,
&cm->frame_refs[GOLDEN_FRAME - 1].sf); &cm->frame_refs[GOLDEN_FRAME - 1].sf);
......
Supports Markdown
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