[Mesa-dev] [PATCH 7/9] vl: improve motion adaptive deinterlacer
Emil Velikov
emil.l.velikov at gmail.com
Fri Dec 18 06:54:38 PST 2015
On 16 December 2015 at 20:14, Christian König <deathsimple at vodafone.de> wrote:
> @@ -367,7 +385,9 @@ vl_deint_filter_cleanup(struct vl_deint_filter *filter)
> assert(filter);
>
> filter->pipe->delete_sampler_state(filter->pipe, filter->sampler[0]);
> - filter->pipe->delete_blend_state(filter->pipe, filter->blend);
> + filter->pipe->delete_blend_state(filter->pipe, filter->blend[0]);
> + filter->pipe->delete_blend_state(filter->pipe, filter->blend[1]);
> + filter->pipe->delete_blend_state(filter->pipe, filter->blend[2]);
nitpick: please keep the order in reverse direction. just like the
error path in init()
> filter->pipe->delete_rasterizer_state(filter->pipe, filter->rs_state);
> filter->pipe->delete_vertex_elements_state(filter->pipe, filter->ves);
> pipe_resource_reference(&filter->quad.buffer, NULL);
> @@ -420,12 +440,14 @@ vl_deint_filter_render(struct vl_deint_filter *filter,
> struct pipe_sampler_view **next_sv;
> struct pipe_sampler_view *sampler_views[4];
> struct pipe_surface **dst_surfaces;
> - int j;
> + const unsigned *plane_order;
> + int i, j;
>
nitpick: i, j and k can be unsigned ?
> @@ -479,11 +501,16 @@ vl_deint_filter_render(struct vl_deint_filter *filter,
> /* blit or interpolate other field */
> fb_state.cbufs[0] = dst_surf;
> filter->pipe->set_framebuffer_state(filter->pipe, &fb_state);
> - if (j > 0 && filter->skip_chroma) {
> + if (i > 0 && filter->skip_chroma) {
> util_draw_arrays(filter->pipe, PIPE_PRIM_QUADS, 0, 4);
> } else {
> filter->pipe->bind_fs_state(filter->pipe, field ? filter->fs_deint_top : filter->fs_deint_bottom);
> util_draw_arrays(filter->pipe, PIPE_PRIM_QUADS, 0, 4);
> }
> +
> + if (++j >= util_format_get_nr_components(dst_surf->format)) {
> + dst_surfaces += 2;
Brain is saying "looks fine" but gut disagrees.
> @@ -38,7 +38,7 @@ struct vl_deint_filter
> struct pipe_vertex_buffer quad;
>
> void *rs_state;
> - void *blend;
> + void *blend[3];
nitpick: use the VL_NUM_COMPONENTS define ?
-Emil
More information about the mesa-dev
mailing list