mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
vf_phase: Reduce the scope of several variables
Reviewed-by: Paul B Mahol <onemda@gmail.com>
This commit is contained in:
parent
4ab4793c15
commit
014e4e4499
@ -116,14 +116,7 @@ static int config_input(AVFilterLink *inlink)
|
|||||||
*/
|
*/
|
||||||
static enum PhaseMode analyze_plane(void *ctx, enum PhaseMode mode, AVFrame *old, AVFrame *new)
|
static enum PhaseMode analyze_plane(void *ctx, enum PhaseMode mode, AVFrame *old, AVFrame *new)
|
||||||
{
|
{
|
||||||
double bdiff, tdiff, pdiff, scale;
|
double bdiff, tdiff, pdiff;
|
||||||
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;
|
|
||||||
|
|
||||||
if (mode == AUTO) {
|
if (mode == AUTO) {
|
||||||
mode = new->interlaced_frame ? new->top_field_first ?
|
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) {
|
if (mode <= BOTTOM_FIRST) {
|
||||||
bdiff = pdiff = tdiff = 65536.0;
|
bdiff = pdiff = tdiff = 65536.0;
|
||||||
} else {
|
} 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;
|
int top = 0, t;
|
||||||
const uint8_t *rend, *end = nptr + (h - 2) * ns;
|
const uint8_t *rend, *end = nptr + (h - 2) * ns;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user