On Wed, 5 Apr 2017 16:42:07 +0300
Pekka Paalanen <[email protected]> wrote:

> On Tue,  4 Apr 2017 17:54:20 +0100
> Daniel Stone <[email protected]> wrote:
> 
> > Rather than duplicating knowledge of pixel formats across several
> > components, create a custom central repository.
> > 
> > Signed-off-by: Daniel Stone <[email protected]>
> > ---
> >  Makefile.am               |   2 +
> >  libweston/pixel-formats.c | 430 
> > ++++++++++++++++++++++++++++++++++++++++++++++
> >  libweston/pixel-formats.h | 194 +++++++++++++++++++++
> >  3 files changed, 626 insertions(+)
> >  create mode 100644 libweston/pixel-formats.c
> >  create mode 100644 libweston/pixel-formats.h
> > 
> > v10: Add more docs. Build without EGL. Fix format transposition errors.
> >      Insert omitted [hv]sub.
> > 
> > diff --git a/Makefile.am b/Makefile.am
> > index 519d9115..7b24d40c 100644
> > --- a/Makefile.am
> > +++ b/Makefile.am
> > @@ -105,6 +105,8 @@ libweston_@LIBWESTON_MAJOR@_la_SOURCES =                
> >         \
> >     libweston/timeline-object.h                     \
> >     libweston/linux-dmabuf.c                        \
> >     libweston/linux-dmabuf.h                        \
> > +   libweston/pixel-formats.c                       \
> > +   libweston/pixel-formats.h                       \
> >     shared/helpers.h                                \
> >     shared/matrix.c                                 \
> >     shared/matrix.h                                 \  
> 
> Hi,
> 
> all the actual content is good now, there are a couple of typoes in the
> comments.
> 
> The remaining issue is the dependency on libdrm headers, more below.
> 
> > diff --git a/libweston/pixel-formats.c b/libweston/pixel-formats.c

> > + *
> > + * Author: Daniel Stone <[email protected]>
> > + */
> > +
> > +#include "config.h"
> > +
> > +#include <endian.h>
> > +#include <inttypes.h>
> > +#include <stdbool.h>
> > +#include <unistd.h>
> > +#include <libdrm/drm_fourcc.h>  
> 
> Shouldn't this be just <drm_fourcc.h>? We have pkg-config providing us
> with -I/usr/include/libdrm.

Hi,

I fixed that.

> The problem with this is that this makes libweston unconditionally
> depend on libdrm headers at build time (not the library, and nothing
> new at runtime).
> 
> I think that is ok by now. Do people agree?

We now unconditionally depend on libdrm for build in master.


> > +
> > +/**
> > + * Return the effective sampling height for a given plane
> > + *
> > + * When vertical subsampling is in effect, a sampler bound to a secondary
> > + * plane must bind the sampler with a smaller effective height. This 
> > function
> > + * returns the effective width to use for the sampler, i.e. dividing by 
> > vsub.  
> 
> s/width/height/
> 
> > + *
> > + * If vertical subsampling is not in effect, this will be equal to the 
> > height.
> > + *
> > + * @param format Pixel format info structure
> > + * @param plane Zero-indexed plane number
> > + * @param width Height of the buffer  
> 
> s/width/height/
> 
> > + * @returns Effective width for sampling
> > + */
> > +unsigned int
> > +pixel_format_height_for_plane(const struct pixel_format_info *format,
> > +                         unsigned int plane,
> > +                         unsigned int height);  

I fixed the pasties too, and pushed this patch:
   b030897..903721a  master -> master


Thanks,
pq

Attachment: pgpBfSaZPnO3l.pgp
Description: OpenPGP digital signature

_______________________________________________
wayland-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to