Commit b1cc1f9d authored by hui su's avatar hui su Committed by Hui Su
Browse files

Fix a bug for high-bit-depth in av1_dist_block()


Change-Id: I246b0de3bd25863853643bdb238899bf8e5847be
parent 18ad894a
......@@ -1459,6 +1459,10 @@ void av1_dist_block(const AV1_COMP *cpi, MACROBLOCK *x, int plane,
const int16_t *diff = &p->src_diff[diff_idx];
tmp = sum_squares_visible(xd, plane, diff, diff_stride, blk_row, blk_col,
plane_bsize, tx_bsize);
if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH)
tmp = ROUND_POWER_OF_TWO(tmp, (xd->bd - 8) * 2);
*out_sse = (int64_t)tmp * 16;
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