Commit acadacfa authored by Ronald S. Bultje's avatar Ronald S. Bultje

Take lossless into account when assigning loopfilter strength

Fixes #327.
parent de6e3170
......@@ -1876,10 +1876,11 @@ static int decode_b(Dav1dTileContext *const t,
b->inter_mode == (is_comp ? GLOBALMV_GLOBALMV : GLOBALMV);
const uint8_t (*const lf_lvls)[8][2] = (const uint8_t (*)[8][2])
&ts->lflvl[b->seg_id][0][b->ref[0] + 1][!is_globalmv];
dav1d_create_lf_mask_inter(t->lf_mask, f->lf.level, f->b4_stride,
lf_lvls, t->bx, t->by, f->w4, f->h4,
b->skip, bs, b->tx_split, b->uvtx,
f->cur.p.layout,
dav1d_create_lf_mask_inter(t->lf_mask, f->lf.level, f->b4_stride, lf_lvls,
t->bx, t->by, f->w4, f->h4, b->skip, bs,
f->frame_hdr->segmentation.lossless[b->seg_id] ?
(enum RectTxfmSize) TX_4X4 : b->max_ytx,
b->tx_split, b->uvtx, f->cur.p.layout,
&t->a->tx_lpf_y[bx4], &t->l.tx_lpf_y[by4],
has_chroma ? &t->a->tx_lpf_uv[cbx4] : NULL,
has_chroma ? &t->l.tx_lpf_uv[cby4] : NULL);
......
......@@ -350,6 +350,7 @@ void dav1d_create_lf_mask_inter(Av1Filter *const lflvl,
const int bx, const int by,
const int iw, const int ih,
const int skip, const enum BlockSize bs,
const enum RectTxfmSize max_ytx,
const uint16_t *const tx_masks,
const enum RectTxfmSize uvtx,
const enum Dav1dPixelLayout layout,
......@@ -373,7 +374,7 @@ void dav1d_create_lf_mask_inter(Av1Filter *const lflvl,
}
mask_edges_inter(lflvl->filter_y, by4, bx4, bw4, bh4, skip,
dav1d_max_txfm_size_for_bs[bs][0], tx_masks, ay, ly);
max_ytx, tx_masks, ay, ly);
}
if (!auv) return;
......
......@@ -72,8 +72,8 @@ void dav1d_create_lf_mask_inter(Av1Filter *lflvl, uint8_t (*level_cache)[4],
const ptrdiff_t b4_stride,
const uint8_t (*level)[8][2], int bx, int by,
int iw, int ih, int skip_inter,
enum BlockSize bs, const uint16_t *tx_mask,
enum RectTxfmSize uvtx,
enum BlockSize bs, enum RectTxfmSize max_ytx,
const uint16_t *tx_mask, enum RectTxfmSize uvtx,
enum Dav1dPixelLayout layout, uint8_t *ay,
uint8_t *ly, uint8_t *auv, uint8_t *luv);
void dav1d_calc_eih(Av1FilterLUT *lim_lut, int filter_sharpness);
......
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