Commit b865e6c7 authored by David Michael Barr's avatar David Michael Barr Committed by Ronald S. Bultje

Simplify conditions for CfL prediction

parent 3aff1a37
......@@ -870,12 +870,12 @@ void bytefn(recon_b_intra)(Dav1dTileContext *const t, const enum BlockSize bs,
top_sb_edge, DC_PRED, &angle,
cfl_uv_t_dim->w,
cfl_uv_t_dim->h, edge);
if (b->cfl_alpha[pl] == 0) {
dsp->ipred.intra_pred[cfl_uvtx][m](uv_dst[pl], stride,
edge, 0);
} else {
if (b->cfl_alpha[pl]) {
dsp->ipred.intra_pred[cfl_uvtx][m](&uv_pred[32 * pl],
0, edge, 0);
} else {
dsp->ipred.intra_pred[cfl_uvtx][m](uv_dst[pl], stride,
edge, 0);
}
}
const int furthest_r =
......@@ -886,24 +886,19 @@ void bytefn(recon_b_intra)(Dav1dTileContext *const t, const enum BlockSize bs,
[cfl_uvtx](ac, y_src, f->cur.p.stride[0],
cbw4 - (furthest_r >> ss_hor),
cbh4 - (furthest_b >> ss_ver));
if (b->cfl_alpha[0] == 0) {
dsp->ipred.cfl_pred_1[cfl_uv_t_dim->lw](uv_dst[1],
stride, ac,
&uv_pred[32],
b->cfl_alpha[1],
cbh4 * 4);
} else if (b->cfl_alpha[1] == 0) {
dsp->ipred.cfl_pred_1[cfl_uv_t_dim->lw](uv_dst[0],
stride, ac,
uv_pred,
b->cfl_alpha[0],
cbh4 * 4);
} else {
if (b->cfl_alpha[0] && b->cfl_alpha[1]) {
dsp->ipred.cfl_pred[cfl_uv_t_dim->lw](uv_dst[0],
uv_dst[1], stride,
ac, uv_pred,
b->cfl_alpha,
cbh4 * 4);
} else {
const int pl = !b->cfl_alpha[0];
dsp->ipred.cfl_pred_1[cfl_uv_t_dim->lw](uv_dst[pl],
stride, ac,
&uv_pred[32 * pl],
b->cfl_alpha[pl],
cbh4 * 4);
}
if (DEBUG_BLOCK_INFO && DEBUG_B_PIXELS) {
ac_dump(ac, 4*cbw4, 4*cbh4, "ac");
......
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