From 4c20e45561817dfe13634289161da11cf85e560e Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 1 Jun 2015 01:33:19 +0200 Subject: vf_vavpp: cosmetics Adjust coding style. Get rid of some useless consts too. --- video/filter/vf_vavpp.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/video/filter/vf_vavpp.c b/video/filter/vf_vavpp.c index 803e09a01e..5c9fcf3bbc 100644 --- a/video/filter/vf_vavpp.c +++ b/video/filter/vf_vavpp.c @@ -86,8 +86,8 @@ static bool update_pipeline(struct vf_instance *vf, bool deint) VABufferID *filters = p->buffers; int num_filters = p->num_buffers; if (p->deint_type && !deint) { - ++filters; - --num_filters; + filters++; + num_filters--; } if (filters == p->pipe.filters && num_filters == p->pipe.num_filters) return true; @@ -116,7 +116,7 @@ static bool update_pipeline(struct vf_instance *vf, bool deint) } static inline int get_deint_field(struct vf_priv_s *p, int i, - const struct mp_image *mpi) + struct mp_image *mpi) { if (!p->do_deint || !(mpi->fields & MP_IMGFIELD_INTERLACED)) return VA_FRAME_PICTURE; @@ -193,13 +193,13 @@ static struct mp_image *render(struct vf_instance *vf, struct mp_image *in, static void process(struct vf_instance *vf, struct mp_image *in) { struct vf_priv_s *p = vf->priv; - const bool deint = p->do_deint && p->deint_type > 0; + bool deint = p->do_deint && p->deint_type > 0; if (!update_pipeline(vf, deint) || !p->pipe.filters) { // no filtering vf_add_output_frame(vf, mp_image_new_ref(in)); return; } - const unsigned int csp = va_get_colorspace_flag(p->params.colorspace); - const unsigned int field = get_deint_field(p, 0, in); + unsigned int csp = va_get_colorspace_flag(p->params.colorspace); + unsigned int field = get_deint_field(p, 0, in); struct mp_image *out1 = render(vf, in, field | csp); if (!out1) { // cannot render vf_add_output_frame(vf, mp_image_new_ref(in)); @@ -210,7 +210,7 @@ static void process(struct vf_instance *vf, struct mp_image *in) // first-field only if (field == VA_FRAME_PICTURE || (p->do_deint && p->deint_type < 2)) return; - const double add = (in->pts - p->prev_pts)*0.5; + double add = (in->pts - p->prev_pts) * 0.5; if (p->prev_pts == MP_NOPTS_VALUE || add <= 0.0 || add > 0.5) // no pts, skip it return; struct mp_image *out2 = render(vf, in, get_deint_field(p, 1, in) | csp); @@ -278,7 +278,7 @@ static int reconfig(struct vf_instance *vf, struct mp_image_params *in, static void uninit(struct vf_instance *vf) { struct vf_priv_s *p = vf->priv; - for (int i=0; inum_buffers; ++i) + for (int i = 0; i < p->num_buffers; i++) vaDestroyBuffer(p->display, p->buffers[i]); if (p->context != VA_INVALID_ID) vaDestroyContext(p->display, p->context); @@ -355,9 +355,9 @@ static bool initialize(struct vf_instance *vf) return false; VABufferID buffers[VAProcFilterCount]; - for (int i=0; ideint_type < 2) continue; -- cgit v1.2.3