diff options
author | David Conrad <lessen42@gmail.com> | 2010-05-27 08:39:12 +0400 |
---|---|---|
committer | David Conrad <lessen42@gmail.com> | 2010-05-27 08:39:12 +0400 |
commit | a4501a45dbaf5789dd2abb15bca4c2c3d2fab139 (patch) | |
tree | 7c9ef9080726a5b8371ea859c0d4efc5946283cb /libavcodec/vp3.c | |
parent | 3491a9b266a96dd3243ad8daf059af25049d39fa (diff) |
vp3: Skip the loop filter when strength is 0 or when requested
Originally committed as revision 23346 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/vp3.c')
-rw-r--r-- | libavcodec/vp3.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libavcodec/vp3.c b/libavcodec/vp3.c index bdad6f896a..6c76269b09 100644 --- a/libavcodec/vp3.c +++ b/libavcodec/vp3.c @@ -136,6 +136,7 @@ typedef struct Vp3DecodeContext { DSPContext dsp; int flipped_image; int last_slice_end; + int skip_loop_filter; int qps[3]; int nqps; @@ -1494,7 +1495,8 @@ static void render_slice(Vp3DecodeContext *s, int slice) } // 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 @@ static int vp3_decode_frame(AVCodecContext *avctx, 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); |