[FFmpeg-devel] Prepwork for DVCPRO HD inclusion

Roman V. Shaposhnik rvs
Sun Aug 10 22:31:50 CEST 2008


On Sun, 2008-08-10 at 22:25 +0200, Michael Niedermayer wrote:
> >  static void dv_build_unquantize_tables(DVVideoContext *s, uint8_t* perm)
> >  {
> > -    int i, q, j;
> > +    int i, q, a; 
> >  
> >      /* NOTE: max left shift is 6 */
> >      for(q = 0; q < 22; q++) {
> >          /* 88DCT */
> > -        for(i = 1; i < 64; i++) {
> > +        i=1;
> > +        for(a = 0; a<4; a++) {
> > +            for(; i < dv_quant_areas[a]; i++) {
> > -            /* 88 table */
> > +                /* 88 table */
> > -            j = perm[i];
> > -            s->dv_idct_shift[0][0][q][j] =
> > -                dv_quant_shifts[q][dv_88_areas[i]] + 1;
> > +                s->dv_idct_factor[0][0][q][i] = dv_iweight_88[i]<<(dv_quant_shifts[q][a] + 1);
> > -            s->dv_idct_shift[1][0][q][j] = s->dv_idct_shift[0][0][q][j] + 1;
> > +                s->dv_idct_factor[1][0][q][i] = s->dv_idct_factor[0][0][q][i]<<1;
> > -        }
> > -
> > -        /* 248DCT */
> > -        for(i = 1; i < 64; i++) {
> > +
> > +                /* 248 table */
> > -            /* 248 table */
> > -            s->dv_idct_shift[0][1][q][i] =
> > -                dv_quant_shifts[q][dv_248_areas[i]] + 1;
> > +                s->dv_idct_factor[0][1][q][i] = dv_iweight_248[i]<<(dv_quant_shifts[q][a] + 1);
> > -            s->dv_idct_shift[1][1][q][i] = s->dv_idct_shift[0][1][q][i] + 1;
> > +                s->dv_idct_factor[1][1][q][i] = s->dv_idct_factor[0][1][q][i]<<1;
> > +            }
> >          }
> >      }
> >  }
> 
> cosmetic and functional mix, please split the patch in a cosmetic and
> a functional patch. This is very hard to decypher otherwise

Which part of this patch have you considered to be cosmetic? The
indentation changes because of the extra loop (and that's functional)
and the table name is changed because the table now has nothing
to do with shifts.

Thanks,
Roman.





More information about the ffmpeg-devel mailing list