]> git.sesse.net Git - ffmpeg/commitdiff
Merge commit '593d2326ef985cdffe413df629419938f7b07c4c'
authorMichael Niedermayer <michaelni@gmx.at>
Thu, 26 Jun 2014 01:15:55 +0000 (03:15 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Thu, 26 Jun 2014 01:16:53 +0000 (03:16 +0200)
* commit '593d2326ef985cdffe413df629419938f7b07c4c':
  dv: Replace a magic number by sizeof()

Conflicts:
libavcodec/dv.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
1  2 
libavcodec/dv.c

diff --cc libavcodec/dv.c
index 554ec452d661abc2b1414b967d9a0e7c53d99422,e840f4858ef2b425ad4f73c1d93ef363fa4a3ee3..c3c32864c5a90d4c3e5b767fe229c765d7ba7361
@@@ -308,13 -307,7 +308,13 @@@ av_cold int ff_dvvideo_init(AVCodecCont
      /* 248DCT setup */
      s->fdct[1]     = dsp.fdct248;
      s->idct_put[1] = ff_simple_idct248_put;  // FIXME: need to add it to DSP
 -    memcpy(s->dv_zigzag[1], ff_dv_zigzag248_direct, sizeof(s->dv_zigzag[1]));
 +    if (avctx->lowres){
 +        for (i = 0; i < 64; i++){
 +            int j = ff_dv_zigzag248_direct[i];
 +            s->dv_zigzag[1][i] = dsp.idct_permutation[(j & 7) + (j & 8) * 4 + (j & 48) / 2];
 +        }
 +    }else
-         memcpy(s->dv_zigzag[1], ff_dv_zigzag248_direct, 64);
++        memcpy(s->dv_zigzag[1], ff_dv_zigzag248_direct, sizeof(s->dv_zigzag[1]));
  
      s->avctx = avctx;
      avctx->chroma_sample_location = AVCHROMA_LOC_TOPLEFT;