Mercurial > libavcodec.hg
diff dsputil.c @ 2044:b6f2add2511e libavcodec
h261 decoder by (Maarten Daniels <maarten.daniels at student dot luc dot ac dot be>)
author | michael |
---|---|
date | Sun, 30 May 2004 20:37:15 +0000 |
parents | ef919e9ef73e |
children | 9447bbd8a7e9 |
line wrap: on
line diff
--- a/dsputil.c Sun May 30 01:53:43 2004 +0000 +++ b/dsputil.c Sun May 30 20:37:15 2004 +0000 @@ -2360,6 +2360,36 @@ } } +static void h261_v_loop_filter_c(uint8_t *dest,uint8_t *src, int stride){ + int i,j,xy,yz; + int res; + for(i=0; i<8; i++){ + for(j=1; j<7; j++){ + xy = j * stride + i; + yz = j * 8 + i; + res = (int)src[yz-1*8] + ((int)(src[yz+0*8]) * 2) + (int)src[yz+1*8]; + res +=2; + res >>=2; + dest[xy] = (uint8_t)res; + } + } +} + +static void h261_h_loop_filter_c(uint8_t *dest,uint8_t *src, int stride){ + int i,j,xy,yz; + int res; + for(i=1; i<7; i++){ + for(j=0; j<8; j++){ + xy = j * stride + i; + yz = j * 8 + i; + res = (int)src[yz-1] + ((int)(src[yz]) *2) + (int)src[yz+1]; + res+=2; + res>>=2; + dest[xy] = (uint8_t)res; + } + } +} + static inline int pix_abs16_c(void *v, uint8_t *pix1, uint8_t *pix2, int line_size, int h) { int s, i; @@ -3295,6 +3325,9 @@ c->h263_h_loop_filter= h263_h_loop_filter_c; c->h263_v_loop_filter= h263_v_loop_filter_c; + c->h261_h_loop_filter= h261_h_loop_filter_c; + c->h261_v_loop_filter= h261_v_loop_filter_c; + c->try_8x8basis= try_8x8basis_c; c->add_8x8basis= add_8x8basis_c;