00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #include <stdint.h>
00022
00023 #include "libavcodec/avcodec.h"
00024 #include "libavcodec/rv34dsp.h"
00025
00026 #define DECL_QPEL3(type, w, pos) \
00027 void ff_##type##_rv40_qpel##w##_mc##pos##_neon(uint8_t *dst, uint8_t *src,\
00028 int stride)
00029 #define DECL_QPEL2(w, pos) \
00030 DECL_QPEL3(put, w, pos); \
00031 DECL_QPEL3(avg, w, pos)
00032
00033 #define DECL_QPEL_XY(x, y) \
00034 DECL_QPEL2(16, x ## y); \
00035 DECL_QPEL2(8, x ## y)
00036
00037 #define DECL_QPEL_Y(y) \
00038 DECL_QPEL_XY(0, y); \
00039 DECL_QPEL_XY(1, y); \
00040 DECL_QPEL_XY(2, y); \
00041 DECL_QPEL_XY(3, y); \
00042
00043 DECL_QPEL_Y(0);
00044 DECL_QPEL_Y(1);
00045 DECL_QPEL_Y(2);
00046 DECL_QPEL_Y(3);
00047
00048 void ff_put_rv40_chroma_mc8_neon(uint8_t *, uint8_t *, int, int, int, int);
00049 void ff_put_rv40_chroma_mc4_neon(uint8_t *, uint8_t *, int, int, int, int);
00050
00051 void ff_avg_rv40_chroma_mc8_neon(uint8_t *, uint8_t *, int, int, int, int);
00052 void ff_avg_rv40_chroma_mc4_neon(uint8_t *, uint8_t *, int, int, int, int);
00053
00054 void ff_rv40_weight_func_16_neon(uint8_t *, uint8_t *, uint8_t *, int, int, ptrdiff_t);
00055 void ff_rv40_weight_func_8_neon(uint8_t *, uint8_t *, uint8_t *, int, int, ptrdiff_t);
00056
00057 int ff_rv40_h_loop_filter_strength_neon(uint8_t *src, ptrdiff_t stride,
00058 int beta, int beta2, int edge,
00059 int *p1, int *q1);
00060 int ff_rv40_v_loop_filter_strength_neon(uint8_t *src, ptrdiff_t stride,
00061 int beta, int beta2, int edge,
00062 int *p1, int *q1);
00063
00064 void ff_rv40_h_weak_loop_filter_neon(uint8_t *src, ptrdiff_t stride, int filter_p1,
00065 int filter_q1, int alpha, int beta,
00066 int lim_p0q0, int lim_q1, int lim_p1);
00067 void ff_rv40_v_weak_loop_filter_neon(uint8_t *src, ptrdiff_t stride, int filter_p1,
00068 int filter_q1, int alpha, int beta,
00069 int lim_p0q0, int lim_q1, int lim_p1);
00070
00071 void ff_rv40dsp_init_neon(RV34DSPContext *c, DSPContext* dsp)
00072 {
00073 c->put_pixels_tab[0][ 1] = ff_put_rv40_qpel16_mc10_neon;
00074 c->put_pixels_tab[0][ 3] = ff_put_rv40_qpel16_mc30_neon;
00075 c->put_pixels_tab[0][ 4] = ff_put_rv40_qpel16_mc01_neon;
00076 c->put_pixels_tab[0][ 5] = ff_put_rv40_qpel16_mc11_neon;
00077 c->put_pixels_tab[0][ 6] = ff_put_rv40_qpel16_mc21_neon;
00078 c->put_pixels_tab[0][ 7] = ff_put_rv40_qpel16_mc31_neon;
00079 c->put_pixels_tab[0][ 9] = ff_put_rv40_qpel16_mc12_neon;
00080 c->put_pixels_tab[0][10] = ff_put_rv40_qpel16_mc22_neon;
00081 c->put_pixels_tab[0][11] = ff_put_rv40_qpel16_mc32_neon;
00082 c->put_pixels_tab[0][12] = ff_put_rv40_qpel16_mc03_neon;
00083 c->put_pixels_tab[0][13] = ff_put_rv40_qpel16_mc13_neon;
00084 c->put_pixels_tab[0][14] = ff_put_rv40_qpel16_mc23_neon;
00085 c->put_pixels_tab[0][15] = ff_put_rv40_qpel16_mc33_neon;
00086 c->avg_pixels_tab[0][ 1] = ff_avg_rv40_qpel16_mc10_neon;
00087 c->avg_pixels_tab[0][ 3] = ff_avg_rv40_qpel16_mc30_neon;
00088 c->avg_pixels_tab[0][ 4] = ff_avg_rv40_qpel16_mc01_neon;
00089 c->avg_pixels_tab[0][ 5] = ff_avg_rv40_qpel16_mc11_neon;
00090 c->avg_pixels_tab[0][ 6] = ff_avg_rv40_qpel16_mc21_neon;
00091 c->avg_pixels_tab[0][ 7] = ff_avg_rv40_qpel16_mc31_neon;
00092 c->avg_pixels_tab[0][ 9] = ff_avg_rv40_qpel16_mc12_neon;
00093 c->avg_pixels_tab[0][10] = ff_avg_rv40_qpel16_mc22_neon;
00094 c->avg_pixels_tab[0][11] = ff_avg_rv40_qpel16_mc32_neon;
00095 c->avg_pixels_tab[0][12] = ff_avg_rv40_qpel16_mc03_neon;
00096 c->avg_pixels_tab[0][13] = ff_avg_rv40_qpel16_mc13_neon;
00097 c->avg_pixels_tab[0][14] = ff_avg_rv40_qpel16_mc23_neon;
00098 c->avg_pixels_tab[0][15] = ff_avg_rv40_qpel16_mc33_neon;
00099 c->put_pixels_tab[1][ 1] = ff_put_rv40_qpel8_mc10_neon;
00100 c->put_pixels_tab[1][ 3] = ff_put_rv40_qpel8_mc30_neon;
00101 c->put_pixels_tab[1][ 4] = ff_put_rv40_qpel8_mc01_neon;
00102 c->put_pixels_tab[1][ 5] = ff_put_rv40_qpel8_mc11_neon;
00103 c->put_pixels_tab[1][ 6] = ff_put_rv40_qpel8_mc21_neon;
00104 c->put_pixels_tab[1][ 7] = ff_put_rv40_qpel8_mc31_neon;
00105 c->put_pixels_tab[1][ 9] = ff_put_rv40_qpel8_mc12_neon;
00106 c->put_pixels_tab[1][10] = ff_put_rv40_qpel8_mc22_neon;
00107 c->put_pixels_tab[1][11] = ff_put_rv40_qpel8_mc32_neon;
00108 c->put_pixels_tab[1][12] = ff_put_rv40_qpel8_mc03_neon;
00109 c->put_pixels_tab[1][13] = ff_put_rv40_qpel8_mc13_neon;
00110 c->put_pixels_tab[1][14] = ff_put_rv40_qpel8_mc23_neon;
00111 c->put_pixels_tab[1][15] = ff_put_rv40_qpel8_mc33_neon;
00112 c->avg_pixels_tab[1][ 1] = ff_avg_rv40_qpel8_mc10_neon;
00113 c->avg_pixels_tab[1][ 3] = ff_avg_rv40_qpel8_mc30_neon;
00114 c->avg_pixels_tab[1][ 4] = ff_avg_rv40_qpel8_mc01_neon;
00115 c->avg_pixels_tab[1][ 5] = ff_avg_rv40_qpel8_mc11_neon;
00116 c->avg_pixels_tab[1][ 6] = ff_avg_rv40_qpel8_mc21_neon;
00117 c->avg_pixels_tab[1][ 7] = ff_avg_rv40_qpel8_mc31_neon;
00118 c->avg_pixels_tab[1][ 9] = ff_avg_rv40_qpel8_mc12_neon;
00119 c->avg_pixels_tab[1][10] = ff_avg_rv40_qpel8_mc22_neon;
00120 c->avg_pixels_tab[1][11] = ff_avg_rv40_qpel8_mc32_neon;
00121 c->avg_pixels_tab[1][12] = ff_avg_rv40_qpel8_mc03_neon;
00122 c->avg_pixels_tab[1][13] = ff_avg_rv40_qpel8_mc13_neon;
00123 c->avg_pixels_tab[1][14] = ff_avg_rv40_qpel8_mc23_neon;
00124 c->avg_pixels_tab[1][15] = ff_avg_rv40_qpel8_mc33_neon;
00125
00126 c->put_chroma_pixels_tab[0] = ff_put_rv40_chroma_mc8_neon;
00127 c->put_chroma_pixels_tab[1] = ff_put_rv40_chroma_mc4_neon;
00128 c->avg_chroma_pixels_tab[0] = ff_avg_rv40_chroma_mc8_neon;
00129 c->avg_chroma_pixels_tab[1] = ff_avg_rv40_chroma_mc4_neon;
00130
00131 c->rv40_weight_pixels_tab[0][0] = ff_rv40_weight_func_16_neon;
00132 c->rv40_weight_pixels_tab[0][1] = ff_rv40_weight_func_8_neon;
00133
00134 c->rv40_loop_filter_strength[0] = ff_rv40_h_loop_filter_strength_neon;
00135 c->rv40_loop_filter_strength[1] = ff_rv40_v_loop_filter_strength_neon;
00136 c->rv40_weak_loop_filter[0] = ff_rv40_h_weak_loop_filter_neon;
00137 c->rv40_weak_loop_filter[1] = ff_rv40_v_weak_loop_filter_neon;
00138 }