On Wed, Feb 15, 2012 at 02:06:01AM -0800, Mashiat Sarker Shakkhar wrote:
> ----- Original Message -----
> 
> > From: Aneesh Dogra <[email protected]>
> > To: [email protected]
> > Cc: 
> > Sent: Wednesday, February 15, 2012 2:54 AM
> > Subject: [libav-devel] [PATCH] Sun Rasterfile Encoder
> > 
> > ---
> > Changelog               |    1 +
> > libavcodec/Makefile     |    1 +
> > libavcodec/allcodecs.c  |    2 +-
> > libavcodec/sunrastenc.c |  246 
> > +++++++++++++++++++++++++++++++++++++++++++++++
> > libavformat/img2.c      |    3 +-
> > 5 files changed, 251 insertions(+), 2 deletions(-)
> [...]
> > +    switch (avctx->pix_fmt) {
> > +        case PIX_FMT_MONOWHITE:                  // Monochrome
> > +            s->depth  = 1;
> > +            s->length = ((avctx->width + 7) >> 3) * avctx->height +
> > +                        (((avctx->width / 8) + (avctx->width % 8 ? 1 : 0)) 
> > % 2 ?
> > +                         avctx->height : 0);
> 
> 
> Nit: I propose
> s->length = ((width + 7 >> 3) + 1 >> 1) * height * 2;

nit: which can be simplified to ((width + 15) >> 4) * height;
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to