Mercurial > libavcodec.hg
changeset 11782:a617365c7c6f libavcodec
vp3: Skip the loop filter when strength is 0 or when requested
author | conrad |
---|---|
date | Thu, 27 May 2010 04:39:12 +0000 |
parents | 22b17f922f2b |
children | f97b1759c39a |
files | vp3.c |
diffstat | 1 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/vp3.c Thu May 27 04:25:50 2010 +0000 +++ b/vp3.c Thu May 27 04:39:12 2010 +0000 @@ -136,6 +136,7 @@ DSPContext dsp; int flipped_image; int last_slice_end; + int skip_loop_filter; int qps[3]; int nqps; @@ -1494,7 +1495,8 @@ } // Filter up to the last row in the superblock row - apply_loop_filter(s, plane, 4*sb_y - !!sb_y, FFMIN(4*sb_y+3, fragment_height-1)); + if (!s->skip_loop_filter) + apply_loop_filter(s, plane, 4*sb_y - !!sb_y, FFMIN(4*sb_y+3, fragment_height-1)); } } @@ -1749,6 +1751,9 @@ s->keyframe?"key":"", counter, s->qps[0]); counter++; + s->skip_loop_filter = !s->filter_limit_values[s->qps[0]] || + avctx->skip_loop_filter >= (s->keyframe ? AVDISCARD_ALL : AVDISCARD_NONKEY); + if (s->qps[0] != s->last_qps[0]) init_loop_filter(s);