diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-05-16 12:08:17 +0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-05-16 12:08:17 +0400 |
commit | e77647c52863189508a4f995821f86ccb42a4b32 (patch) | |
tree | d6034c4341b6af26cd07852ce3f470de268ac8c8 /libavfilter/vf_blackframe.c | |
parent | efc08e00cc0b05ea478aef51693199bfb0c3b489 (diff) | |
parent | 7f83959598b6565baa0091e5739dd9091ab7a990 (diff) |
Merge commit '7f83959598b6565baa0091e5739dd9091ab7a990'
* commit '7f83959598b6565baa0091e5739dd9091ab7a990':
vf_crop: use the name 's' for the pointer to the private context
vf_boxblur: use the name 's' for the pointer to the private context
vf_blackframe: use the name 's' for the pointer to the private context
Conflicts:
libavfilter/vf_blackframe.c
libavfilter/vf_boxblur.c
libavfilter/vf_crop.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavfilter/vf_blackframe.c')
-rw-r--r-- | libavfilter/vf_blackframe.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/libavfilter/vf_blackframe.c b/libavfilter/vf_blackframe.c index 7b38fcb782..b83e1f8bbe 100644 --- a/libavfilter/vf_blackframe.c +++ b/libavfilter/vf_blackframe.c @@ -62,30 +62,30 @@ static int query_formats(AVFilterContext *ctx) static int filter_frame(AVFilterLink *inlink, AVFrame *frame) { AVFilterContext *ctx = inlink->dst; - BlackFrameContext *blackframe = ctx->priv; + BlackFrameContext *s = ctx->priv; int x, i; int pblack = 0; uint8_t *p = frame->data[0]; for (i = 0; i < frame->height; i++) { for (x = 0; x < inlink->w; x++) - blackframe->nblack += p[x] < blackframe->bthresh; + s->nblack += p[x] < s->bthresh; p += frame->linesize[0]; } if (frame->key_frame) - blackframe->last_keyframe = blackframe->frame; + s->last_keyframe = s->frame; - pblack = blackframe->nblack * 100 / (inlink->w * inlink->h); - if (pblack >= blackframe->bamount) + pblack = s->nblack * 100 / (inlink->w * inlink->h); + if (pblack >= s->bamount) av_log(ctx, AV_LOG_INFO, "frame:%u pblack:%u pts:%"PRId64" t:%f " "type:%c last_keyframe:%d\n", - blackframe->frame, pblack, frame->pts, + s->frame, pblack, frame->pts, frame->pts == AV_NOPTS_VALUE ? -1 : frame->pts * av_q2d(inlink->time_base), - av_get_picture_type_char(frame->pict_type), blackframe->last_keyframe); + av_get_picture_type_char(frame->pict_type), s->last_keyframe); - blackframe->frame++; - blackframe->nblack = 0; + s->frame++; + s->nblack = 0; return ff_filter_frame(inlink->dst->outputs[0], frame); } |