[MPlayer-dev-eng] [PATCH]: framestep & tile filter.

danny guru at digitalfantasy.it
Tue Aug 26 22:35:52 CEST 2003


I take a look at how the filters work and now i have 2 filter.

The first one is very simple and permit to output only one of every x frame or 
only the key (intra) frame.

The use is different tha the option sstep secs. of mplayer because sstep 
option seeks on the stream (good to avoid to read all the frame but bad if 
you want a precise count or if you have an avi file without index, as was my 
first file on wich i try sstep option).

This filter simply ignore the frames you don't want.

At the beginning of the C module there is a little explanation of what the 
filter does.

The other one (tile) does what my vo_tga does at the start: tile some images 
to have a big one with the small 'preview' on it.

You can decide how many tiles you want on the output. Is probably useful scale 
the original image before tiling them (even if i made some 4300 * 2400 pixel 
targa file before fulling my hd (each image was 161 Megabytes!)).

On this filter i face some problem, the worst of all is the query_format(...) 
function

Now to use the tiling with the xv output you need to put a scale filter after 
the tile one.

My code is:

	....
	switch (fmt) {
		case RGB32:
		case RGB24:
		  ....
		case BGR16:
		case BGR15:
			return( vf_next_query_format(  vf, fmt ) );
			break;
        }
	return(0);
	...

And is clear that you need a vo module (or the next filter) that support 
BGR/RGB 15/16/24/32 (I decide to use this format because the main use of this 
filter is to outputing some images and jpeg, png and tga use all rgb or bgr 
format) but is nice to see the film tiled on the screen, expecially when you 
are testing all the options.

I made a mistake in the first module (Ctrl+C, Ctrl+V mania) and the test on 
the next filter was:

	return( vf_next_query_format( vf, IMGFMT_IYUV ) );

So it work for xv but it doesn't on tga (or png)!

The putimage function was the same used now but it seem to work.

Who is making the conversion between the tile filter (that operates on RGB 
colorspace) and the vo module (that operates on YUV colorspace)?

Or i missing something important and it was a strange and lucky case that the 
filter works?

Also in this case in the beginning of the module there is a brief description 
of the options you can pass to the filter.

The last question involve the make process.

If i modify a .c module in the directory libmpcodecs and i type make from the 
main mplayer directory the build process doesn't work (nothing to do for 
all!).

I have to type:

	make -C libmpcodecs && make

Is regular or i missing, once, something?

Thnaks in advance for your answer and for this piece of great software.

	Daniele Forghieri

P.S. I'm new to linux and to CVS (I only use RCS, and on Win system) so i put 
the two filters in the same patch because it seems to me that the source 
modification are 'near' (i modify the same line in the Makefile on 
libmpcodecs) and i don't know how to create two different patch (and if two 
patch of this type will work).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tile_step.diff
Type: text/x-diff
Size: 17452 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20030826/dd42bcb2/attachment.diff>


More information about the MPlayer-dev-eng mailing list