[MPlayer-dev-eng] [PATCH]Implement bob-deinterlacing for VDPAU
Reimar Döffinger
Reimar.Doeffinger at stud.uni-karlsruhe.de
Tue Feb 24 19:39:50 CET 2009
On Mon, Feb 23, 2009 at 01:56:53AM +0100, Carl Eugen Hoyos wrote:
> + for (i = 0; i <= (deint ? 1 : 0); i++) {
IMO once you're used to it, !!deint is more readable.
_But_, this actually should be separate from deint, since as I
understand it VDPAU supports framerate-doubling and
non-framerate-doubling deinterlacing for all deinterlacing modes.
> + int field = top_field_first ? i : 1 - i;
Please use the constants VDP_VIDEO_MIXER_PICTURE_STRUCTURE...
IMO
int field = VDP_VIDEO_MIXER_PICTURE_STRUCTURE_FRAME;
if (frame doubling deint)
field = top_field_first == i ? VDP_VIDEO_MIXER_PICTURE_STRUCTURE_.. : ...;
> + if (i) {
> + flip_page();
> + output_surface = output_surfaces[surface_num];
> + }
output_surface = output_surfaces[surface_num];
can be done always, and move the declaration of output_surface into the
for loop.
> + top_field_first = mpi->fields & MP_IMGFIELD_TOP_FIRST;
top_field_first = !!(mpi->fields & MP_IMGFIELD_TOP_FIRST);
so that the == i above works.
Feel free to write that part in a way that seems more readable to you
though.
More information about the MPlayer-dev-eng
mailing list