This makes the code faster.
Clément Bœsch authored on 2013/01/06 12:36:42... | ... |
@@ -147,6 +147,8 @@ static int filter_frame(AVFilterLink *inlink, AVFilterBufferRef *inpic) |
147 | 147 |
const int sharp = kerndeint->sharp; |
148 | 148 |
const int twoway = kerndeint->twoway; |
149 | 149 |
|
150 |
+ const int is_packed_rgb = av_pix_fmt_desc_get(inlink->format)->flags & PIX_FMT_RGB; |
|
151 |
+ |
|
150 | 152 |
outpic = ff_get_video_buffer(outlink, AV_PERM_WRITE|AV_PERM_ALIGN, outlink->w, outlink->h); |
151 | 153 |
if (!outpic) { |
152 | 154 |
avfilter_unref_bufferp(&inpic); |
... | ... |
@@ -208,7 +210,6 @@ static int filter_frame(AVFilterLink *inlink, AVFilterBufferRef *inpic) |
208 | 208 |
(abs((int)prvp[x] - (int)srcp[x]) > thresh) || |
209 | 209 |
(abs((int)prvpp[x] - (int)srcpp[x]) > thresh) || |
210 | 210 |
(abs((int)prvpn[x] - (int)srcpn[x]) > thresh)) { |
211 |
- int is_packed_rgb = av_pix_fmt_desc_get(inlink->format)->flags & PIX_FMT_RGB; |
|
212 | 211 |
if (map) { |
213 | 212 |
g = x & ~3; |
214 | 213 |
|