diff options
author | Ronald S. Bultje <rsbultje@gmail.com> | 2013-01-22 11:00:35 -0800 |
---|---|---|
committer | Ronald S. Bultje <rsbultje@gmail.com> | 2013-01-22 18:41:36 -0800 |
commit | 2612c4dc78e1750c4653bf5a9f2cbe95f7b4ed6e (patch) | |
tree | 3676b9cd751cf67a23543899b462f92d6760a2d1 /libavcodec/dsputil_template.c | |
parent | 2bef1a83d7a3ca60b161ab90bf4d4338e5def5e7 (diff) | |
download | ffmpeg-2612c4dc78e1750c4653bf5a9f2cbe95f7b4ed6e.tar.gz |
dsputil: remove 9/10 bits hpel functions.
These are never used.
Diffstat (limited to 'libavcodec/dsputil_template.c')
-rw-r--r-- | libavcodec/dsputil_template.c | 64 |
1 files changed, 36 insertions, 28 deletions
diff --git a/libavcodec/dsputil_template.c b/libavcodec/dsputil_template.c index 28ff0e5f09..2de0e65465 100644 --- a/libavcodec/dsputil_template.c +++ b/libavcodec/dsputil_template.c @@ -197,15 +197,7 @@ DCTELEM_FUNCS(int16_t, _16) DCTELEM_FUNCS(dctcoef, _32) #endif -#define PIXOP2(OPNAME, OP) \ -static void FUNCC(OPNAME ## _pixels2)(uint8_t *block, const uint8_t *pixels, int line_size, int h){\ - int i;\ - for(i=0; i<h; i++){\ - OP(*((pixel2*)(block )), AV_RN2P(pixels ));\ - pixels+=line_size;\ - block +=line_size;\ - }\ -}\ +#define PIXOP3(OPNAME, OP) \ static void FUNCC(OPNAME ## _pixels4)(uint8_t *block, const uint8_t *pixels, int line_size, int h){\ int i;\ for(i=0; i<h; i++){\ @@ -227,20 +219,6 @@ static inline void FUNCC(OPNAME ## _no_rnd_pixels8)(uint8_t *block, const uint8_ FUNCC(OPNAME ## _pixels8)(block, pixels, line_size, h);\ }\ \ -static inline void FUNC(OPNAME ## _no_rnd_pixels8_l2)(uint8_t *dst, const uint8_t *src1, const uint8_t *src2, int dst_stride, \ - int src_stride1, int src_stride2, int h){\ - int i;\ - for(i=0; i<h; i++){\ - pixel4 a,b;\ - a= AV_RN4P(&src1[i*src_stride1 ]);\ - b= AV_RN4P(&src2[i*src_stride2 ]);\ - OP(*((pixel4*)&dst[i*dst_stride ]), no_rnd_avg_pixel4(a, b));\ - a= AV_RN4P(&src1[i*src_stride1+4*sizeof(pixel)]);\ - b= AV_RN4P(&src2[i*src_stride2+4*sizeof(pixel)]);\ - OP(*((pixel4*)&dst[i*dst_stride+4*sizeof(pixel)]), no_rnd_avg_pixel4(a, b));\ - }\ -}\ -\ static inline void FUNC(OPNAME ## _pixels8_l2)(uint8_t *dst, const uint8_t *src1, const uint8_t *src2, int dst_stride, \ int src_stride1, int src_stride2, int h){\ int i;\ @@ -283,6 +261,36 @@ static inline void FUNC(OPNAME ## _pixels16_l2)(uint8_t *dst, const uint8_t *src FUNC(OPNAME ## _pixels8_l2)(dst+8*sizeof(pixel), src1+8*sizeof(pixel), src2+8*sizeof(pixel), dst_stride, src_stride1, src_stride2, h);\ }\ \ +CALL_2X_PIXELS(FUNCC(OPNAME ## _pixels16) , FUNCC(OPNAME ## _pixels8) , 8*sizeof(pixel)) + +#define PIXOP4(OPNAME, OP) \ +static void FUNCC(OPNAME ## _pixels2)(uint8_t *block, const uint8_t *pixels, int line_size, int h){\ + int i;\ + for(i=0; i<h; i++){\ + OP(*((pixel2*)(block )), AV_RN2P(pixels ));\ + pixels+=line_size;\ + block +=line_size;\ + }\ +}\ +PIXOP3(OPNAME, OP) + +#define PIXOP2(OPNAME, OP) \ +PIXOP4(OPNAME, OP)\ +\ +static inline void FUNC(OPNAME ## _no_rnd_pixels8_l2)(uint8_t *dst, const uint8_t *src1, const uint8_t *src2, int dst_stride, \ + int src_stride1, int src_stride2, int h){\ + int i;\ + for(i=0; i<h; i++){\ + pixel4 a,b;\ + a= AV_RN4P(&src1[i*src_stride1 ]);\ + b= AV_RN4P(&src2[i*src_stride2 ]);\ + OP(*((pixel4*)&dst[i*dst_stride ]), no_rnd_avg_pixel4(a, b));\ + a= AV_RN4P(&src1[i*src_stride1+4*sizeof(pixel)]);\ + b= AV_RN4P(&src2[i*src_stride2+4*sizeof(pixel)]);\ + OP(*((pixel4*)&dst[i*dst_stride+4*sizeof(pixel)]), no_rnd_avg_pixel4(a, b));\ + }\ +}\ +\ static inline void FUNC(OPNAME ## _no_rnd_pixels16_l2)(uint8_t *dst, const uint8_t *src1, const uint8_t *src2, int dst_stride, \ int src_stride1, int src_stride2, int h){\ FUNC(OPNAME ## _no_rnd_pixels8_l2)(dst , src1 , src2 , dst_stride, src_stride1, src_stride2, h);\ @@ -562,7 +570,6 @@ static inline void FUNCC(OPNAME ## _no_rnd_pixels8_xy2)(uint8_t *block, const ui }\ }\ \ -CALL_2X_PIXELS(FUNCC(OPNAME ## _pixels16) , FUNCC(OPNAME ## _pixels8) , 8*sizeof(pixel))\ CALL_2X_PIXELS(FUNCC(OPNAME ## _pixels16_x2) , FUNCC(OPNAME ## _pixels8_x2) , 8*sizeof(pixel))\ CALL_2X_PIXELS(FUNCC(OPNAME ## _pixels16_y2) , FUNCC(OPNAME ## _pixels8_y2) , 8*sizeof(pixel))\ CALL_2X_PIXELS(FUNCC(OPNAME ## _pixels16_xy2), FUNCC(OPNAME ## _pixels8_xy2), 8*sizeof(pixel))\ @@ -573,15 +580,16 @@ CALL_2X_PIXELS(FUNCC(OPNAME ## _no_rnd_pixels16_xy2), FUNCC(OPNAME ## _no_rnd_pi #define op_avg(a, b) a = rnd_avg_pixel4(a, b) #define op_put(a, b) a = b - +#if BIT_DEPTH == 8 PIXOP2(avg, op_avg) PIXOP2(put, op_put) +#else +PIXOP3(avg, op_avg) +PIXOP4(put, op_put) +#endif #undef op_avg #undef op_put -#define put_no_rnd_pixels8_c put_pixels8_c -#define put_no_rnd_pixels16_c put_pixels16_c - #define H264_CHROMA_MC(OPNAME, OP)\ static void FUNCC(OPNAME ## h264_chroma_mc2)(uint8_t *_dst/*align 8*/, uint8_t *_src/*align 1*/, int stride, int h, int x, int y){\ pixel *dst = (pixel*)_dst;\ |