# HG changeset patch # User michael # Date 1067211346 0 # Node ID b677102fa6501d68600af9878b0b9055b8af5acd # Parent 46067d1a28aa70be4257cf84ceb2d0b6d1658821 10l and minor optimization diff -r 46067d1a28aa -r b677102fa650 libmpcodecs/vf_spp.c --- a/libmpcodecs/vf_spp.c Sun Oct 26 23:20:47 2003 +0000 +++ b/libmpcodecs/vf_spp.c Sun Oct 26 23:35:46 2003 +0000 @@ -114,12 +114,13 @@ } static inline void add_block(int16_t *dst, int stride, DCTELEM block[64]){ - int x,y; + int y; for(y=0; y<8; y++){ - for(x=0; x<8; x++){ - dst[x + y*stride]+= block[x + y*8]; - } + *(uint32_t*)&dst[0 + y*stride]+= *(uint32_t*)&block[0 + y*8]; + *(uint32_t*)&dst[2 + y*stride]+= *(uint32_t*)&block[2 + y*8]; + *(uint32_t*)&dst[4 + y*stride]+= *(uint32_t*)&block[4 + y*8]; + *(uint32_t*)&dst[6 + y*stride]+= *(uint32_t*)&block[6 + y*8]; } } @@ -290,6 +291,9 @@ vf->uninit=uninit; vf->priv=malloc(sizeof(struct vf_priv_s)); memset(vf->priv, 0, sizeof(struct vf_priv_s)); + + avcodec_init(); + vf->priv->avctx= avcodec_alloc_context(); dsputil_init(&vf->priv->dsp, vf->priv->avctx);