diff options
author | Diego Biurrun <diego@biurrun.de> | 2013-11-05 11:11:47 +0400 |
---|---|---|
committer | Diego Biurrun <diego@biurrun.de> | 2013-11-08 15:40:47 +0400 |
commit | 0338c396987c82b41d322630ea9712fe5f9561d6 (patch) | |
tree | 62c5b48c7705ecfb62fb667683b72436c48490e9 /libavcodec/dsputil.c | |
parent | 86f910806b2c303c43727d357a5b927e662bb3d1 (diff) |
dsputil: Split off H.263 bits into their own H263DSPContext
Diffstat (limited to 'libavcodec/dsputil.c')
-rw-r--r-- | libavcodec/dsputil.c | 79 |
1 files changed, 0 insertions, 79 deletions
diff --git a/libavcodec/dsputil.c b/libavcodec/dsputil.c index 6d93706fb0..5839eb3fcc 100644 --- a/libavcodec/dsputil.c +++ b/libavcodec/dsputil.c @@ -1409,80 +1409,6 @@ static void put_mspel8_mc22_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride) wmv2_mspel8_v_lowpass(dst, halfH+8, stride, 8, 8); } -static void h263_v_loop_filter_c(uint8_t *src, int stride, int qscale){ - if(CONFIG_H263_DECODER || CONFIG_H263_ENCODER) { - int x; - const int strength= ff_h263_loop_filter_strength[qscale]; - - for(x=0; x<8; x++){ - int d1, d2, ad1; - int p0= src[x-2*stride]; - int p1= src[x-1*stride]; - int p2= src[x+0*stride]; - int p3= src[x+1*stride]; - int d = (p0 - p3 + 4*(p2 - p1)) / 8; - - if (d<-2*strength) d1= 0; - else if(d<- strength) d1=-2*strength - d; - else if(d< strength) d1= d; - else if(d< 2*strength) d1= 2*strength - d; - else d1= 0; - - p1 += d1; - p2 -= d1; - if(p1&256) p1= ~(p1>>31); - if(p2&256) p2= ~(p2>>31); - - src[x-1*stride] = p1; - src[x+0*stride] = p2; - - ad1= FFABS(d1)>>1; - - d2= av_clip((p0-p3)/4, -ad1, ad1); - - src[x-2*stride] = p0 - d2; - src[x+ stride] = p3 + d2; - } - } -} - -static void h263_h_loop_filter_c(uint8_t *src, int stride, int qscale){ - if(CONFIG_H263_DECODER || CONFIG_H263_ENCODER) { - int y; - const int strength= ff_h263_loop_filter_strength[qscale]; - - for(y=0; y<8; y++){ - int d1, d2, ad1; - int p0= src[y*stride-2]; - int p1= src[y*stride-1]; - int p2= src[y*stride+0]; - int p3= src[y*stride+1]; - int d = (p0 - p3 + 4*(p2 - p1)) / 8; - - if (d<-2*strength) d1= 0; - else if(d<- strength) d1=-2*strength - d; - else if(d< strength) d1= d; - else if(d< 2*strength) d1= 2*strength - d; - else d1= 0; - - p1 += d1; - p2 -= d1; - if(p1&256) p1= ~(p1>>31); - if(p2&256) p2= ~(p2>>31); - - src[y*stride-1] = p1; - src[y*stride+0] = p2; - - ad1= FFABS(d1)>>1; - - d2= av_clip((p0-p3)/4, -ad1, ad1); - - src[y*stride-2] = p0 - d2; - src[y*stride+1] = p3 + d2; - } - } -} - static inline int pix_abs16_c(void *v, uint8_t *pix1, uint8_t *pix2, int line_size, int h) { int s, i; @@ -2701,11 +2627,6 @@ av_cold void ff_dsputil_init(DSPContext* c, AVCodecContext *avctx) c->bswap_buf= bswap_buf; c->bswap16_buf = bswap16_buf; - if (CONFIG_H263_DECODER || CONFIG_H263_ENCODER) { - c->h263_h_loop_filter= h263_h_loop_filter_c; - c->h263_v_loop_filter= h263_v_loop_filter_c; - } - c->try_8x8basis= try_8x8basis_c; c->add_8x8basis= add_8x8basis_c; |