comparison libmpcodecs/vf_spp.c @ 11280:b677102fa650

10l and minor optimization
author michael
date Sun, 26 Oct 2003 23:35:46 +0000
parents fffd200d81a7
children 47b69dcf384d
comparison
equal deleted inserted replaced
11279:46067d1a28aa 11280:b677102fa650
112 } 112 }
113 } 113 }
114 } 114 }
115 115
116 static inline void add_block(int16_t *dst, int stride, DCTELEM block[64]){ 116 static inline void add_block(int16_t *dst, int stride, DCTELEM block[64]){
117 int x,y; 117 int y;
118 118
119 for(y=0; y<8; y++){ 119 for(y=0; y<8; y++){
120 for(x=0; x<8; x++){ 120 *(uint32_t*)&dst[0 + y*stride]+= *(uint32_t*)&block[0 + y*8];
121 dst[x + y*stride]+= block[x + y*8]; 121 *(uint32_t*)&dst[2 + y*stride]+= *(uint32_t*)&block[2 + y*8];
122 } 122 *(uint32_t*)&dst[4 + y*stride]+= *(uint32_t*)&block[4 + y*8];
123 *(uint32_t*)&dst[6 + y*stride]+= *(uint32_t*)&block[6 + y*8];
123 } 124 }
124 } 125 }
125 126
126 static void filter(struct vf_priv_s *p, uint8_t *dst, uint8_t *src, int dst_stride, int src_stride, int width, int height, uint8_t *qp_store, int qp_stride, int is_luma){ 127 static void filter(struct vf_priv_s *p, uint8_t *dst, uint8_t *src, int dst_stride, int src_stride, int width, int height, uint8_t *qp_store, int qp_stride, int is_luma){
127 int x, y, i; 128 int x, y, i;
288 vf->get_image=get_image; 289 vf->get_image=get_image;
289 vf->query_format=query_format; 290 vf->query_format=query_format;
290 vf->uninit=uninit; 291 vf->uninit=uninit;
291 vf->priv=malloc(sizeof(struct vf_priv_s)); 292 vf->priv=malloc(sizeof(struct vf_priv_s));
292 memset(vf->priv, 0, sizeof(struct vf_priv_s)); 293 memset(vf->priv, 0, sizeof(struct vf_priv_s));
294
295 avcodec_init();
296
293 vf->priv->avctx= avcodec_alloc_context(); 297 vf->priv->avctx= avcodec_alloc_context();
294 dsputil_init(&vf->priv->dsp, vf->priv->avctx); 298 dsputil_init(&vf->priv->dsp, vf->priv->avctx);
295 299
296 vf->priv->log2_count= 6; 300 vf->priv->log2_count= 6;
297 301