]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/dv.c
Merge commit '5adcef9c1bf701ba2dd43363ae983ba6d74bdb9a'
[ffmpeg] / libavcodec / dv.c
index c3c32864c5a90d4c3e5b767fe229c765d7ba7361..25f53a7c621452213b92d084ef66d99da0176d1e 100644 (file)
@@ -51,7 +51,7 @@
 /* XXX: also include quantization */
 RL_VLC_ELEM ff_dv_rl_vlc[1184];
 
-static inline void dv_calc_mb_coordinates(const DVprofile *d, int chan, int seq, int slot,
+static inline void dv_calc_mb_coordinates(const AVDVProfile *d, int chan, int seq, int slot,
                                           uint16_t *tbl)
 {
     static const uint8_t off[] = { 2, 6, 8, 0, 4 };
@@ -175,7 +175,7 @@ static const uint8_t dv100_qstep[16] = {
 
 static const uint8_t dv_quant_areas[4]  = { 6, 21, 43, 64 };
 
-int ff_dv_init_dynamic_tables(DVVideoContext *ctx, const DVprofile *d)
+int ff_dv_init_dynamic_tables(DVVideoContext *ctx, const AVDVProfile *d)
 {
     int j,i,c,s,p;
     uint32_t *factor1, *factor2;
@@ -235,7 +235,6 @@ int ff_dv_init_dynamic_tables(DVVideoContext *ctx, const DVprofile *d)
 av_cold int ff_dvvideo_init(AVCodecContext *avctx)
 {
     DVVideoContext *s = avctx->priv_data;
-    DSPContext dsp;
     static int done = 0;
     int i, j;
 
@@ -292,30 +291,6 @@ av_cold int ff_dvvideo_init(AVCodecContext *avctx)
         ff_free_vlc(&dv_vlc);
     }
 
-    /* Generic DSP setup */
-    memset(&dsp,0, sizeof(dsp));
-    ff_dsputil_init(&dsp, avctx);
-    ff_set_cmp(&dsp, dsp.ildct_cmp, avctx->ildct_cmp);
-    s->get_pixels = dsp.get_pixels;
-    s->ildct_cmp = dsp.ildct_cmp[5];
-
-    /* 88DCT setup */
-    s->fdct[0]     = dsp.fdct;
-    s->idct_put[0] = dsp.idct_put;
-    for (i = 0; i < 64; i++)
-       s->dv_zigzag[0][i] = dsp.idct_permutation[ff_zigzag_direct[i]];
-
-    /* 248DCT setup */
-    s->fdct[1]     = dsp.fdct248;
-    s->idct_put[1] = ff_simple_idct248_put;  // FIXME: need to add it to DSP
-    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, sizeof(s->dv_zigzag[1]));
-
     s->avctx = avctx;
     avctx->chroma_sample_location = AVCHROMA_LOC_TOPLEFT;