[MPlayer-dev-eng] video filter layer

Fredrik Kuivinen freku045 at student.liu.se
Tue Jan 15 19:48:47 CET 2002


On Mon, Jan 14, 2002 at 06:04:12PM +0200, Arpi wrote:
> Hi,
> 
> Some weeks ago we talked about some filtering layer over the video codecs.
> It could handle general postprocessing, crip, resize, colorspace conversion,
> and could be used by both mplayer and mencoder.
> 
> K. Kaplan said he is interested in implementing it. What's the status? Did
> you already do something? Or should I start working on that?
>

The virtualdub filter support I have been working on works quite good now. Most 
of the filters I have tried works. I have few problems though. Currently the 
filtering is done in the end of dec_video.c it looks like this:

if(vfilter_p()) {
    uint8_t** filtered_planes = vfilter_run(planes, sh_video, planar, stride);
    video_out->draw_frame(filtered_planes);
}
else {
    if(planar)
        video_out->draw_slice(planes,stride,sh_video->disp_w,sh_video->disp_h,0,0);
     else 
         video_out->draw_frame(planes);
}

But this don't work when the codecs call video_out->draw_* also it don't work with
planar imgfmts. So my problem is that I don't know were to add the filtering. One
way to do it is to create a function called 'draw_frame' which looks like this:

void draw_frame(vo_functions_t* video_out, uint8_t** src)
{
    if(using filters) {
        do filtering.
	video_out->draw_frame(...);
    }
    else 
        video_out->draw_frame(...);
}

And do something similiar with draw_slice and flip_page. Instead of calling 
video_out->draw_frame(...) everyone would call draw_frame(video_out, ...).

Another option is to add a new special filter driver in libvo which does the
filtering and then uses some other driver in libvo to display it.

Some feedback on this would be nice.

Arpi: Are you going to work on the filter layer now?

/ Fredrik Kuivinen




More information about the MPlayer-dev-eng mailing list