diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-01-23 18:06:50 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-01-23 18:06:57 +0100 |
commit | f900fd5d31dcabc138a0f96511ddbf8e9a279765 (patch) | |
tree | 6f06f48f6d960089a4d7452e857d85f202529f23 /libavcodec/dsputil.c | |
parent | 70270f27538f7f6a5e1e5b199b1bbee5972632f4 (diff) | |
parent | 2612c4dc78e1750c4653bf5a9f2cbe95f7b4ed6e (diff) | |
download | ffmpeg-streaming-f900fd5d31dcabc138a0f96511ddbf8e9a279765.zip ffmpeg-streaming-f900fd5d31dcabc138a0f96511ddbf8e9a279765.tar.gz |
Merge commit '2612c4dc78e1750c4653bf5a9f2cbe95f7b4ed6e'
* commit '2612c4dc78e1750c4653bf5a9f2cbe95f7b4ed6e':
dsputil: remove 9/10 bits hpel functions.
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/dsputil.c')
-rw-r--r-- | libavcodec/dsputil.c | 37 |
1 files changed, 18 insertions, 19 deletions
diff --git a/libavcodec/dsputil.c b/libavcodec/dsputil.c index 5d31d70..cc53f5b 100644 --- a/libavcodec/dsputil.c +++ b/libavcodec/dsputil.c @@ -2869,17 +2869,29 @@ av_cold void ff_dsputil_init(DSPContext* c, AVCodecContext *avctx) c->shrink[2]= ff_shrink44; c->shrink[3]= ff_shrink88; +#define hpel_funcs(prefix, idx, num) \ + c->prefix ## _pixels_tab idx [0] = prefix ## _pixels ## num ## _8_c; \ + c->prefix ## _pixels_tab idx [1] = prefix ## _pixels ## num ## _x2_8_c; \ + c->prefix ## _pixels_tab idx [2] = prefix ## _pixels ## num ## _y2_8_c; \ + c->prefix ## _pixels_tab idx [3] = prefix ## _pixels ## num ## _xy2_8_c + + hpel_funcs(put, [0], 16); + hpel_funcs(put, [1], 8); + hpel_funcs(put, [2], 4); + hpel_funcs(put, [3], 2); + hpel_funcs(put_no_rnd, [0], 16); + hpel_funcs(put_no_rnd, [1], 8); + hpel_funcs(avg, [0], 16); + hpel_funcs(avg, [1], 8); + hpel_funcs(avg, [2], 4); + hpel_funcs(avg, [3], 2); + hpel_funcs(avg_no_rnd,[0], 16); + #undef FUNC #undef FUNCC #define FUNC(f, depth) f ## _ ## depth #define FUNCC(f, depth) f ## _ ## depth ## _c -#define dspfunc1(PFX, IDX, NUM, depth)\ - c->PFX ## _pixels_tab[IDX][0] = FUNCC(PFX ## _pixels ## NUM , depth);\ - c->PFX ## _pixels_tab[IDX][1] = FUNCC(PFX ## _pixels ## NUM ## _x2 , depth);\ - c->PFX ## _pixels_tab[IDX][2] = FUNCC(PFX ## _pixels ## NUM ## _y2 , depth);\ - c->PFX ## _pixels_tab[IDX][3] = FUNCC(PFX ## _pixels ## NUM ## _xy2, depth) - #define dspfunc2(PFX, IDX, NUM, depth)\ c->PFX ## _pixels_tab[IDX][ 0] = FUNCC(PFX ## NUM ## _mc00, depth);\ c->PFX ## _pixels_tab[IDX][ 1] = FUNCC(PFX ## NUM ## _mc10, depth);\ @@ -2898,7 +2910,6 @@ av_cold void ff_dsputil_init(DSPContext* c, AVCodecContext *avctx) c->PFX ## _pixels_tab[IDX][14] = FUNCC(PFX ## NUM ## _mc23, depth);\ c->PFX ## _pixels_tab[IDX][15] = FUNCC(PFX ## NUM ## _mc33, depth) - #define BIT_DEPTH_FUNCS(depth, dct)\ c->get_pixels = FUNCC(get_pixels ## dct , depth);\ c->draw_edges = FUNCC(draw_edges , depth);\ @@ -2914,18 +2925,6 @@ av_cold void ff_dsputil_init(DSPContext* c, AVCodecContext *avctx) c->avg_h264_chroma_pixels_tab[1] = FUNCC(avg_h264_chroma_mc4 , depth);\ c->avg_h264_chroma_pixels_tab[2] = FUNCC(avg_h264_chroma_mc2 , depth);\ \ - dspfunc1(put , 0, 16, depth);\ - dspfunc1(put , 1, 8, depth);\ - dspfunc1(put , 2, 4, depth);\ - dspfunc1(put , 3, 2, depth);\ - dspfunc1(put_no_rnd, 0, 16, depth);\ - dspfunc1(put_no_rnd, 1, 8, depth);\ - dspfunc1(avg , 0, 16, depth);\ - dspfunc1(avg , 1, 8, depth);\ - dspfunc1(avg , 2, 4, depth);\ - dspfunc1(avg , 3, 2, depth);\ - dspfunc1(avg_no_rnd, 0, 16, depth);\ -\ dspfunc2(put_h264_qpel, 0, 16, depth);\ dspfunc2(put_h264_qpel, 1, 8, depth);\ dspfunc2(put_h264_qpel, 2, 4, depth);\ |