diff options
author | Mans Rullgard <mans@mansr.com> | 2013-01-23 20:24:53 -0800 |
---|---|---|
committer | Luca Barbato <lu_zero@gentoo.org> | 2013-01-24 10:44:43 +0100 |
commit | e9d817351b28e62868528476971afe4cde1fa280 (patch) | |
tree | f17f5c43d1ce5856a275dd4b40a970d15b7a9eac /libavcodec/rv40dsp.c | |
parent | 7a95afe433b2a692f490b98948c082e62ffc1d27 (diff) | |
download | ffmpeg-e9d817351b28e62868528476971afe4cde1fa280.tar.gz |
dsputil: Separate h264 qpel
The sh4 optimizations are removed, because the code is
100% identical to the C code, so it is unlikely to
provide any real practical benefit.
Signed-off-by: Diego Biurrun <diego@biurrun.de>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Diffstat (limited to 'libavcodec/rv40dsp.c')
-rw-r--r-- | libavcodec/rv40dsp.c | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/libavcodec/rv40dsp.c b/libavcodec/rv40dsp.c index c6968d948e..ef723b015d 100644 --- a/libavcodec/rv40dsp.c +++ b/libavcodec/rv40dsp.c @@ -26,6 +26,7 @@ #include "avcodec.h" #include "dsputil.h" +#include "h264qpel.h" #include "rv34dsp.h" #include "libavutil/common.h" @@ -518,18 +519,20 @@ static int rv40_v_loop_filter_strength(uint8_t *src, ptrdiff_t stride, } av_cold void ff_rv40dsp_init(RV34DSPContext *c, DSPContext* dsp) { + H264QpelContext qpel; ff_rv34dsp_init(c, dsp); + ff_h264qpel_init(&qpel, 8); - c->put_pixels_tab[0][ 0] = dsp->put_h264_qpel_pixels_tab[0][0]; + c->put_pixels_tab[0][ 0] = qpel.put_h264_qpel_pixels_tab[0][0]; c->put_pixels_tab[0][ 1] = put_rv40_qpel16_mc10_c; - c->put_pixels_tab[0][ 2] = dsp->put_h264_qpel_pixels_tab[0][2]; + c->put_pixels_tab[0][ 2] = qpel.put_h264_qpel_pixels_tab[0][2]; c->put_pixels_tab[0][ 3] = put_rv40_qpel16_mc30_c; c->put_pixels_tab[0][ 4] = put_rv40_qpel16_mc01_c; c->put_pixels_tab[0][ 5] = put_rv40_qpel16_mc11_c; c->put_pixels_tab[0][ 6] = put_rv40_qpel16_mc21_c; c->put_pixels_tab[0][ 7] = put_rv40_qpel16_mc31_c; - c->put_pixels_tab[0][ 8] = dsp->put_h264_qpel_pixels_tab[0][8]; + c->put_pixels_tab[0][ 8] = qpel.put_h264_qpel_pixels_tab[0][8]; c->put_pixels_tab[0][ 9] = put_rv40_qpel16_mc12_c; c->put_pixels_tab[0][10] = put_rv40_qpel16_mc22_c; c->put_pixels_tab[0][11] = put_rv40_qpel16_mc32_c; @@ -537,15 +540,15 @@ av_cold void ff_rv40dsp_init(RV34DSPContext *c, DSPContext* dsp) { c->put_pixels_tab[0][13] = put_rv40_qpel16_mc13_c; c->put_pixels_tab[0][14] = put_rv40_qpel16_mc23_c; c->put_pixels_tab[0][15] = ff_put_rv40_qpel16_mc33_c; - c->avg_pixels_tab[0][ 0] = dsp->avg_h264_qpel_pixels_tab[0][0]; + c->avg_pixels_tab[0][ 0] = qpel.avg_h264_qpel_pixels_tab[0][0]; c->avg_pixels_tab[0][ 1] = avg_rv40_qpel16_mc10_c; - c->avg_pixels_tab[0][ 2] = dsp->avg_h264_qpel_pixels_tab[0][2]; + c->avg_pixels_tab[0][ 2] = qpel.avg_h264_qpel_pixels_tab[0][2]; c->avg_pixels_tab[0][ 3] = avg_rv40_qpel16_mc30_c; c->avg_pixels_tab[0][ 4] = avg_rv40_qpel16_mc01_c; c->avg_pixels_tab[0][ 5] = avg_rv40_qpel16_mc11_c; c->avg_pixels_tab[0][ 6] = avg_rv40_qpel16_mc21_c; c->avg_pixels_tab[0][ 7] = avg_rv40_qpel16_mc31_c; - c->avg_pixels_tab[0][ 8] = dsp->avg_h264_qpel_pixels_tab[0][8]; + c->avg_pixels_tab[0][ 8] = qpel.avg_h264_qpel_pixels_tab[0][8]; c->avg_pixels_tab[0][ 9] = avg_rv40_qpel16_mc12_c; c->avg_pixels_tab[0][10] = avg_rv40_qpel16_mc22_c; c->avg_pixels_tab[0][11] = avg_rv40_qpel16_mc32_c; @@ -553,15 +556,15 @@ av_cold void ff_rv40dsp_init(RV34DSPContext *c, DSPContext* dsp) { c->avg_pixels_tab[0][13] = avg_rv40_qpel16_mc13_c; c->avg_pixels_tab[0][14] = avg_rv40_qpel16_mc23_c; c->avg_pixels_tab[0][15] = ff_avg_rv40_qpel16_mc33_c; - c->put_pixels_tab[1][ 0] = dsp->put_h264_qpel_pixels_tab[1][0]; + c->put_pixels_tab[1][ 0] = qpel.put_h264_qpel_pixels_tab[1][0]; c->put_pixels_tab[1][ 1] = put_rv40_qpel8_mc10_c; - c->put_pixels_tab[1][ 2] = dsp->put_h264_qpel_pixels_tab[1][2]; + c->put_pixels_tab[1][ 2] = qpel.put_h264_qpel_pixels_tab[1][2]; c->put_pixels_tab[1][ 3] = put_rv40_qpel8_mc30_c; c->put_pixels_tab[1][ 4] = put_rv40_qpel8_mc01_c; c->put_pixels_tab[1][ 5] = put_rv40_qpel8_mc11_c; c->put_pixels_tab[1][ 6] = put_rv40_qpel8_mc21_c; c->put_pixels_tab[1][ 7] = put_rv40_qpel8_mc31_c; - c->put_pixels_tab[1][ 8] = dsp->put_h264_qpel_pixels_tab[1][8]; + c->put_pixels_tab[1][ 8] = qpel.put_h264_qpel_pixels_tab[1][8]; c->put_pixels_tab[1][ 9] = put_rv40_qpel8_mc12_c; c->put_pixels_tab[1][10] = put_rv40_qpel8_mc22_c; c->put_pixels_tab[1][11] = put_rv40_qpel8_mc32_c; @@ -569,15 +572,15 @@ av_cold void ff_rv40dsp_init(RV34DSPContext *c, DSPContext* dsp) { c->put_pixels_tab[1][13] = put_rv40_qpel8_mc13_c; c->put_pixels_tab[1][14] = put_rv40_qpel8_mc23_c; c->put_pixels_tab[1][15] = ff_put_rv40_qpel8_mc33_c; - c->avg_pixels_tab[1][ 0] = dsp->avg_h264_qpel_pixels_tab[1][0]; + c->avg_pixels_tab[1][ 0] = qpel.avg_h264_qpel_pixels_tab[1][0]; c->avg_pixels_tab[1][ 1] = avg_rv40_qpel8_mc10_c; - c->avg_pixels_tab[1][ 2] = dsp->avg_h264_qpel_pixels_tab[1][2]; + c->avg_pixels_tab[1][ 2] = qpel.avg_h264_qpel_pixels_tab[1][2]; c->avg_pixels_tab[1][ 3] = avg_rv40_qpel8_mc30_c; c->avg_pixels_tab[1][ 4] = avg_rv40_qpel8_mc01_c; c->avg_pixels_tab[1][ 5] = avg_rv40_qpel8_mc11_c; c->avg_pixels_tab[1][ 6] = avg_rv40_qpel8_mc21_c; c->avg_pixels_tab[1][ 7] = avg_rv40_qpel8_mc31_c; - c->avg_pixels_tab[1][ 8] = dsp->avg_h264_qpel_pixels_tab[1][8]; + c->avg_pixels_tab[1][ 8] = qpel.avg_h264_qpel_pixels_tab[1][8]; c->avg_pixels_tab[1][ 9] = avg_rv40_qpel8_mc12_c; c->avg_pixels_tab[1][10] = avg_rv40_qpel8_mc22_c; c->avg_pixels_tab[1][11] = avg_rv40_qpel8_mc32_c; |