On Thu, 05 Jan 2012 10:05:56 +0100, Diego Biurrun <[email protected]> wrote:
> On Wed, Jan 04, 2012 at 10:23:15PM -0600, Daniel Huang wrote:
> > 
> 
> > From aba286b8f9b5b60dd4a3ef24c7083a13187d1f7c Mon Sep 17 00:00:00 2001
> > From: Daniel <daniel@daniel-SX2803.(none)>
> > Date: Wed, 4 Jan 2012 21:43:20 -0600
> > Subject: [PATCH] cosmetics cleanup mjpegdec.c
> 
> Your git is not set up correctly; fix your name.
> 
> 
> > --- a/libavcodec/mjpegdec.c
> > +++ b/libavcodec/mjpegdec.c
> > @@ -42,40 +42,41 @@
> >  
> > -static int build_vlc(VLC *vlc, const uint8_t *bits_table, const uint8_t 
> > *val_table,
> > -                      int nb_codes, int use_static, int is_ac)
> > +static int build_vlc(VLC *vlc, const uint8_t *bits_table, const uint8_t 
> > *val_table, 
> > +                     int nb_codes, int use_static, int is_ac)
> >  {
> > -    uint8_t huff_size[256];
> > -    uint16_t huff_code[256];
> > -    uint16_t huff_sym[256];
> > -    int i;
> > +    uint8_t    huff_size[256];
> > +    uint16_t   huff_code[256];
> > +    uint16_t   huff_sym[256];
> > +    int        i;
> 
> No need for so many spaces.
> 
> > -    if(is_ac) huff_sym[0]= 16*256;
> > +    if (is_ac) huff_sym[0] = 16 * 256;
> 
> Break this line.
> 
> > -static void build_basic_mjpeg_vlc(MJpegDecodeContext * s) {
> > -    build_vlc(&s->vlcs[0][0], ff_mjpeg_bits_dc_luminance,
> > -              ff_mjpeg_val_dc, 12, 0, 0);
> > -    build_vlc(&s->vlcs[0][1], ff_mjpeg_bits_dc_chrominance,
> > -              ff_mjpeg_val_dc, 12, 0, 0);
> > -    build_vlc(&s->vlcs[1][0], ff_mjpeg_bits_ac_luminance,
> > -              ff_mjpeg_val_ac_luminance, 251, 0, 1);
> > -    build_vlc(&s->vlcs[1][1], ff_mjpeg_bits_ac_chrominance,
> > -              ff_mjpeg_val_ac_chrominance, 251, 0, 1);
> > -    build_vlc(&s->vlcs[2][0], ff_mjpeg_bits_ac_luminance,
> > -              ff_mjpeg_val_ac_luminance, 251, 0, 0);
> > -    build_vlc(&s->vlcs[2][1], ff_mjpeg_bits_ac_chrominance,
> > -              ff_mjpeg_val_ac_chrominance, 251, 0, 0);
> > +static void build_basic_mjpeg_vlc(MJpegDecodeContext *s) 
> > +{
> > +    build_vlc(&s->vlcs[0][0], ff_mjpeg_bits_dc_luminance, ff_mjpeg_val_dc, 
> > 12, 0, 0);
> > +    
> > +    build_vlc(&s->vlcs[0][1], ff_mjpeg_bits_dc_chrominance, 
> > ff_mjpeg_val_dc, 12, 0, 0);
> > +    
> > +    build_vlc(&s->vlcs[1][0], ff_mjpeg_bits_ac_luminance, 
> > ff_mjpeg_val_ac_luminance, 251, 0, 1);
> > +    
> > +    build_vlc(&s->vlcs[1][1], ff_mjpeg_bits_ac_chrominance, 
> > ff_mjpeg_val_ac_chrominance, 251, 0, 1);
> > +    
> > +    build_vlc(&s->vlcs[2][0], ff_mjpeg_bits_ac_luminance, 
> > ff_mjpeg_val_ac_luminance, 251, 0, 0);
> > +    
> > +    build_vlc(&s->vlcs[2][1], 
> > ff_mjpeg_bits_ac_chrominance,ff_mjpeg_val_ac_chrominance, 251, 0, 0);
> 
> Merging those lines was not an improvement.

But it would be if you removed the empty lines and vertically aligned
the result.

-- 
Anton Khirnov
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to