Mercurial > mplayer.hg
comparison libmpcodecs/vf_spp.c @ 37138:b69f68af3d6e
mpcodecs/vf_spp: Update for FDCTDSPContext
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
author | michael |
---|---|
date | Tue, 08 Jul 2014 01:37:38 +0000 |
parents | 488545e72316 |
children | 7ef7684adaa0 |
comparison
equal
deleted
inserted
replaced
37137:75d68ce0d43f | 37138:b69f68af3d6e |
---|---|
41 #include "libavutil/internal.h" | 41 #include "libavutil/internal.h" |
42 #include "libavutil/intreadwrite.h" | 42 #include "libavutil/intreadwrite.h" |
43 #include "libavcodec/avcodec.h" | 43 #include "libavcodec/avcodec.h" |
44 #include "libavcodec/dsputil.h" | 44 #include "libavcodec/dsputil.h" |
45 #include "libavcodec/idctdsp.h" | 45 #include "libavcodec/idctdsp.h" |
46 #include "libavcodec/fdctdsp.h" | |
46 | 47 |
47 #undef fprintf | 48 #undef fprintf |
48 #undef free | 49 #undef free |
49 #undef malloc | 50 #undef malloc |
50 | 51 |
101 uint8_t *src; | 102 uint8_t *src; |
102 int16_t *temp; | 103 int16_t *temp; |
103 AVCodecContext *avctx; | 104 AVCodecContext *avctx; |
104 DSPContext dsp; | 105 DSPContext dsp; |
105 IDCTDSPContext idsp; | 106 IDCTDSPContext idsp; |
107 FDCTDSPContext fdsp; | |
106 char *non_b_qp; | 108 char *non_b_qp; |
107 }; | 109 }; |
108 | 110 |
109 #define SHIFT 22 | 111 #define SHIFT 22 |
110 | 112 |
415 for(i=0; i<count; i++){ | 417 for(i=0; i<count; i++){ |
416 const int x1= x + offset[i+count-1][0]; | 418 const int x1= x + offset[i+count-1][0]; |
417 const int y1= y + offset[i+count-1][1]; | 419 const int y1= y + offset[i+count-1][1]; |
418 const int index= x1 + y1*stride; | 420 const int index= x1 + y1*stride; |
419 p->dsp.get_pixels(block, p->src + index, stride); | 421 p->dsp.get_pixels(block, p->src + index, stride); |
420 p->dsp.fdct(block); | 422 p->fdsp.fdct(block); |
421 requantize(block2, block, qp, p->idsp.idct_permutation); | 423 requantize(block2, block, qp, p->idsp.idct_permutation); |
422 p->idsp.idct(block2); | 424 p->idsp.idct(block2); |
423 add_block(p->temp + index, stride, block2); | 425 add_block(p->temp + index, stride, block2); |
424 } | 426 } |
425 } | 427 } |
582 init_avcodec(); | 584 init_avcodec(); |
583 | 585 |
584 vf->priv->avctx= avcodec_alloc_context3(NULL); | 586 vf->priv->avctx= avcodec_alloc_context3(NULL); |
585 ff_dsputil_init(&vf->priv->dsp, vf->priv->avctx); | 587 ff_dsputil_init(&vf->priv->dsp, vf->priv->avctx); |
586 ff_idctdsp_init(&vf->priv->idsp, vf->priv->avctx); | 588 ff_idctdsp_init(&vf->priv->idsp, vf->priv->avctx); |
589 ff_fdctdsp_init(&vf->priv->fdsp, vf->priv->avctx); | |
587 | 590 |
588 vf->priv->log2_count= 3; | 591 vf->priv->log2_count= 3; |
589 | 592 |
590 if (args) sscanf(args, "%d:%d:%d", &log2c, &vf->priv->qp, &vf->priv->mode); | 593 if (args) sscanf(args, "%d:%d:%d", &log2c, &vf->priv->qp, &vf->priv->mode); |
591 | 594 |