Commit 4dc5bd7b authored by Yi Luo's avatar Yi Luo

Apply branch prediction on quantize/quantize_skip functions

- On E5-2680, park_joy_1080p, 5 frames, baseline encoding time
  reduces about 0.8~1.0%.
- Credit goes to Erik Niemeyer (erik.a.niemeyer@intel.com).

Change-Id: I69f191d5a4e4b96a5f9ffd8286e484b69d565c01
parent 454fd586
......@@ -452,12 +452,12 @@ void vp10_xform_quant(MACROBLOCK *x, int plane, int block, int blk_row,
if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) {
highbd_fwd_txfm(src_diff, coeff, diff_stride, &fwd_txfm_param);
if (xform_quant_idx != VP10_XFORM_QUANT_SKIP_QUANT) {
if (x->skip_block) {
vp10_quantize_skip(tx2d_size, qcoeff, dqcoeff, eob);
} else {
if (LIKELY(!x->skip_block)) {
quant_func_list[xform_quant_idx][QUANT_FUNC_HIGHBD](
coeff, tx2d_size, p, qcoeff, pd, dqcoeff, eob,
scan_order, &qparam);
} else {
vp10_quantize_skip(tx2d_size, qcoeff, dqcoeff, eob);
}
}
return;
......@@ -466,12 +466,12 @@ void vp10_xform_quant(MACROBLOCK *x, int plane, int block, int blk_row,
fwd_txfm(src_diff, coeff, diff_stride, &fwd_txfm_param);
if (xform_quant_idx != VP10_XFORM_QUANT_SKIP_QUANT) {
if (x->skip_block) {
vp10_quantize_skip(tx2d_size, qcoeff, dqcoeff, eob);
} else {
if (LIKELY(!x->skip_block)) {
quant_func_list[xform_quant_idx][QUANT_FUNC_LOWBD](
coeff, tx2d_size, p, qcoeff, pd, dqcoeff, eob,
scan_order, &qparam);
} else {
vp10_quantize_skip(tx2d_size, qcoeff, dqcoeff, eob);
}
}
}
......
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