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
This commit is contained in:
@@ -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) {
|
if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) {
|
||||||
highbd_fwd_txfm(src_diff, coeff, diff_stride, &fwd_txfm_param);
|
highbd_fwd_txfm(src_diff, coeff, diff_stride, &fwd_txfm_param);
|
||||||
if (xform_quant_idx != VP10_XFORM_QUANT_SKIP_QUANT) {
|
if (xform_quant_idx != VP10_XFORM_QUANT_SKIP_QUANT) {
|
||||||
if (x->skip_block) {
|
if (LIKELY(!x->skip_block)) {
|
||||||
vp10_quantize_skip(tx2d_size, qcoeff, dqcoeff, eob);
|
|
||||||
} else {
|
|
||||||
quant_func_list[xform_quant_idx][QUANT_FUNC_HIGHBD](
|
quant_func_list[xform_quant_idx][QUANT_FUNC_HIGHBD](
|
||||||
coeff, tx2d_size, p, qcoeff, pd, dqcoeff, eob,
|
coeff, tx2d_size, p, qcoeff, pd, dqcoeff, eob,
|
||||||
scan_order, &qparam);
|
scan_order, &qparam);
|
||||||
|
} else {
|
||||||
|
vp10_quantize_skip(tx2d_size, qcoeff, dqcoeff, eob);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return;
|
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);
|
fwd_txfm(src_diff, coeff, diff_stride, &fwd_txfm_param);
|
||||||
if (xform_quant_idx != VP10_XFORM_QUANT_SKIP_QUANT) {
|
if (xform_quant_idx != VP10_XFORM_QUANT_SKIP_QUANT) {
|
||||||
if (x->skip_block) {
|
if (LIKELY(!x->skip_block)) {
|
||||||
vp10_quantize_skip(tx2d_size, qcoeff, dqcoeff, eob);
|
|
||||||
} else {
|
|
||||||
quant_func_list[xform_quant_idx][QUANT_FUNC_LOWBD](
|
quant_func_list[xform_quant_idx][QUANT_FUNC_LOWBD](
|
||||||
coeff, tx2d_size, p, qcoeff, pd, dqcoeff, eob,
|
coeff, tx2d_size, p, qcoeff, pd, dqcoeff, eob,
|
||||||
scan_order, &qparam);
|
scan_order, &qparam);
|
||||||
|
} else {
|
||||||
|
vp10_quantize_skip(tx2d_size, qcoeff, dqcoeff, eob);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user