Mercurial > libavcodec.hg
comparison vp3.c @ 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 | 7dff9c1061e1 |
children | 9d81bd6f2a81 |
comparison
equal
deleted
inserted
replaced
11781:22b17f922f2b | 11782:a617365c7c6f |
---|---|
134 AVFrame current_frame; | 134 AVFrame current_frame; |
135 int keyframe; | 135 int keyframe; |
136 DSPContext dsp; | 136 DSPContext dsp; |
137 int flipped_image; | 137 int flipped_image; |
138 int last_slice_end; | 138 int last_slice_end; |
139 int skip_loop_filter; | |
139 | 140 |
140 int qps[3]; | 141 int qps[3]; |
141 int nqps; | 142 int nqps; |
142 int last_qps[3]; | 143 int last_qps[3]; |
143 | 144 |
1492 } | 1493 } |
1493 } | 1494 } |
1494 } | 1495 } |
1495 | 1496 |
1496 // Filter up to the last row in the superblock row | 1497 // Filter up to the last row in the superblock row |
1497 apply_loop_filter(s, plane, 4*sb_y - !!sb_y, FFMIN(4*sb_y+3, fragment_height-1)); | 1498 if (!s->skip_loop_filter) |
1499 apply_loop_filter(s, plane, 4*sb_y - !!sb_y, FFMIN(4*sb_y+3, fragment_height-1)); | |
1498 } | 1500 } |
1499 } | 1501 } |
1500 | 1502 |
1501 /* this looks like a good place for slice dispatch... */ | 1503 /* this looks like a good place for slice dispatch... */ |
1502 /* algorithm: | 1504 /* algorithm: |
1746 | 1748 |
1747 if (s->avctx->debug & FF_DEBUG_PICT_INFO) | 1749 if (s->avctx->debug & FF_DEBUG_PICT_INFO) |
1748 av_log(s->avctx, AV_LOG_INFO, " VP3 %sframe #%d: Q index = %d\n", | 1750 av_log(s->avctx, AV_LOG_INFO, " VP3 %sframe #%d: Q index = %d\n", |
1749 s->keyframe?"key":"", counter, s->qps[0]); | 1751 s->keyframe?"key":"", counter, s->qps[0]); |
1750 counter++; | 1752 counter++; |
1753 | |
1754 s->skip_loop_filter = !s->filter_limit_values[s->qps[0]] || | |
1755 avctx->skip_loop_filter >= (s->keyframe ? AVDISCARD_ALL : AVDISCARD_NONKEY); | |
1751 | 1756 |
1752 if (s->qps[0] != s->last_qps[0]) | 1757 if (s->qps[0] != s->last_qps[0]) |
1753 init_loop_filter(s); | 1758 init_loop_filter(s); |
1754 | 1759 |
1755 for (i = 0; i < s->nqps; i++) | 1760 for (i = 0; i < s->nqps; i++) |