diff options
author | Luc Trudeau <ltrudeau@twoorioles.com> | 2019-10-04 00:22:58 +0300 |
---|---|---|
committer | Jean-Baptiste Kempf <jb@videolan.org> | 2019-10-04 00:22:58 +0300 |
commit | e570088de116bbbbb0e24ae5b70c0927130e5964 (patch) | |
tree | df11fd759b13d20c5e88a232088cef37d59339cd /src/lr_apply_tmpl.c | |
parent | a4ceff6ff3567164be40192aca6b117a261e080c (diff) |
Check for RESTORATION_NONE once per frame
Prior checks were done at the sbrow level. This now allows to call
dav1d_lr_sbrow and dav1d_lr_copy_lpf only when there's something
for them to do.
Diffstat (limited to 'src/lr_apply_tmpl.c')
-rw-r--r-- | src/lr_apply_tmpl.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/src/lr_apply_tmpl.c b/src/lr_apply_tmpl.c index 4c8b1cb..2a66501 100644 --- a/src/lr_apply_tmpl.c +++ b/src/lr_apply_tmpl.c @@ -112,10 +112,7 @@ void bytefn(dav1d_lr_copy_lpf)(Dav1dFrameContext *const f, const ptrdiff_t lr_stride = ((f->sr_cur.p.p.w + 31) & ~31) * sizeof(pixel); // TODO Also check block level restore type to reduce copying. - const int restore_planes = - ((f->frame_hdr->restoration.type[0] != DAV1D_RESTORATION_NONE) << 0) + - ((f->frame_hdr->restoration.type[1] != DAV1D_RESTORATION_NONE) << 1) + - ((f->frame_hdr->restoration.type[2] != DAV1D_RESTORATION_NONE) << 2); + const int restore_planes = f->lf.restore_planes; if (restore_planes & LR_RESTORE_Y) { const int h = f->cur.p.h; @@ -279,11 +276,7 @@ void bytefn(dav1d_lr_sbrow)(Dav1dFrameContext *const f, pixel *const dst[3], { const int offset_y = 8 * !!sby; const ptrdiff_t *const dst_stride = f->sr_cur.p.stride; - - const int restore_planes = - ((f->frame_hdr->restoration.type[0] != DAV1D_RESTORATION_NONE) << 0) + - ((f->frame_hdr->restoration.type[1] != DAV1D_RESTORATION_NONE) << 1) + - ((f->frame_hdr->restoration.type[2] != DAV1D_RESTORATION_NONE) << 2); + const int restore_planes = f->lf.restore_planes; if (restore_planes & LR_RESTORE_Y) { const int h = f->sr_cur.p.p.h; |