[vlc-devel] [PATCH] Direct2D video output module

Laurent Aimar fenrir at elivagar.org
Thu Jul 22 22:09:09 CEST 2010


On Thu, Jul 22, 2010 at 10:20:01PM +0300, David Kaplan wrote:
> On Thu, Jul 22, 2010 at 10:07 PM, Laurent Aimar <fenrir at elivagar.org> wrote:
> 
>      If pitch is the size in bytes of a line in picture->p[0].p_pixels, then
>     you
>     must use picture->p[0].i_pitch which may not be equal to
>     vd->fmt.i_width * 4. (It may be higher).
> 
>  
> If ii_pitch isn't equal to width*4 then how can I use it? D2D expects pitch
> (line byte size) to match the pixel format...?
> Is there something I'm missing here?
 picture_pool_NewFromFormat creates pictures using picture_New().
picture_New() will allocates pictures with suitable width/height/pitch so that
they works nicely with MMX/SSEx.
 If you have specific constraints about the pitch, you will have to use 
picture_pool_New() and picture_NewFromResource() where you can provides the
memory/pitches to use.
 Do the D2D API allows to only copy/display part of a picture?

>      Just for information, what are the available interpolation modes?
> 
> 
> Linear and nearest neighbor. Which do you think is the better choice?
 Linear.



More information about the vlc-devel mailing list