[vlc-devel] Implementing crop using the current vout API

David Fuhrmann david.fuhrmann at googlemail.com
Sun Mar 11 12:06:34 CET 2012


Am 11.03.2012 um 00:07 schrieb Felix Paul Kühne:

> Hey Rémi,
> 
> On 10.03.2012, at 19:28, Rémi Denis-Courmont wrote:
> 
>> Le samedi 10 mars 2012 20:02:49 Felix Paul Kühne, vous avez écrit :
>>> http://pastie.org/3565475
>> 
>> You cannot invalidate picture buffers from a hardware-scaling video output 
>> (contrary to x11).
> 
> Thanks for the obvious *cough* insight.
> 
> 
> I re-wrote the code and got something working now, which doesn't show any of the previously mentioned symptoms.
> 
> However, a single problem is left: when going back to the "Default" state after cycling through the crop modes, the video isn't reset to Default, but some weird excerpt of the video, which doesn't fit any of the pre-defined formats.
> 
> Here's the diff: http://pastie.org/3567162 (virtually no Obj-C inside)
> 
> Any idea?

Hi,

I tested your diff and still got some distorted images, e.g. at crop 1:1: http://dl.dropbox.com/u/958997/Bildschirmfoto%202012-03-11%20um%2011.14.51.png. Look at the face which is squashed.

After that, I played around with your diff and ended up with this: http://pastie.org/3569966
Besides some minor other changes, I moved the crop code in order to let them execute on resize events, too. (Same is done in xcb/glx.c.)

Now, all crop ratios seem to work. Even when you cycled back to "default" the picture is back to normal.
This works quite good in different situations, the only problem is when you are in fit to screen mode: Here, all crop modes work fine, except when you come back to "Default", which again looks wrong: http://dl.dropbox.com/u/958997/Bildschirmfoto%202012-03-11%20um%2011.25.59.png
(The reason is that in fit to screen mode, the module get no resize events, obviously.)

But I have no idea if this whole thing is right at all.

Best,
David


More information about the vlc-devel mailing list