diff options
author | Timothy Gu <timothygu99@gmail.com> | 2016-01-30 10:00:19 -0800 |
---|---|---|
committer | Timothy Gu <timothygu99@gmail.com> | 2016-01-31 15:34:09 -0800 |
commit | 014e4e4499fd5615340d0001f2a0f02382d53718 (patch) | |
tree | 78a0e651058d1843d8f80da72aa4953adc9afdc6 /libavfilter | |
parent | 4ab4793c155e66ce7845831a5761c2bc0d04b035 (diff) | |
download | ffmpeg-014e4e4499fd5615340d0001f2a0f02382d53718.tar.gz |
vf_phase: Reduce the scope of several variables
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavfilter')
-rw-r--r-- | libavfilter/vf_phase.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/libavfilter/vf_phase.c b/libavfilter/vf_phase.c index 7249388fc0..fadeb6266d 100644 --- a/libavfilter/vf_phase.c +++ b/libavfilter/vf_phase.c @@ -116,14 +116,7 @@ static int config_input(AVFilterLink *inlink) */ static enum PhaseMode analyze_plane(void *ctx, enum PhaseMode mode, AVFrame *old, AVFrame *new) { - double bdiff, tdiff, pdiff, scale; - const int ns = new->linesize[0]; - const int os = old->linesize[0]; - const uint8_t *nptr = new->data[0]; - const uint8_t *optr = old->data[0]; - const int h = new->height; - const int w = new->width; - int bdif, tdif, pdif; + double bdiff, tdiff, pdiff; if (mode == AUTO) { mode = new->interlaced_frame ? new->top_field_first ? @@ -136,6 +129,15 @@ static enum PhaseMode analyze_plane(void *ctx, enum PhaseMode mode, AVFrame *old if (mode <= BOTTOM_FIRST) { bdiff = pdiff = tdiff = 65536.0; } else { + const int ns = new->linesize[0]; + const int os = old->linesize[0]; + const uint8_t *nptr = new->data[0]; + const uint8_t *optr = old->data[0]; + const int h = new->height; + const int w = new->width; + int bdif, tdif, pdif; + double scale; + int top = 0, t; const uint8_t *rend, *end = nptr + (h - 2) * ns; |