Commit a4501a45 authored by David Conrad's avatar David Conrad

vp3: Skip the loop filter when strength is 0 or when requested

Originally committed as revision 23346 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 3491a9b2
...@@ -136,6 +136,7 @@ typedef struct Vp3DecodeContext { ...@@ -136,6 +136,7 @@ typedef struct Vp3DecodeContext {
DSPContext dsp; DSPContext dsp;
int flipped_image; int flipped_image;
int last_slice_end; int last_slice_end;
int skip_loop_filter;
int qps[3]; int qps[3];
int nqps; int nqps;
...@@ -1494,6 +1495,7 @@ static void render_slice(Vp3DecodeContext *s, int slice) ...@@ -1494,6 +1495,7 @@ static void render_slice(Vp3DecodeContext *s, int slice)
} }
// Filter up to the last row in the superblock row // Filter up to the last row in the superblock row
if (!s->skip_loop_filter)
apply_loop_filter(s, plane, 4*sb_y - !!sb_y, FFMIN(4*sb_y+3, fragment_height-1)); 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, ...@@ -1749,6 +1751,9 @@ static int vp3_decode_frame(AVCodecContext *avctx,
s->keyframe?"key":"", counter, s->qps[0]); s->keyframe?"key":"", counter, s->qps[0]);
counter++; 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]) if (s->qps[0] != s->last_qps[0])
init_loop_filter(s); init_loop_filter(s);
......
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