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, int);
00055 void ff_rv40_weight_func_8_neon(uint8_t *, uint8_t *, uint8_t *, int, int, int);
00056
00057 void ff_rv40dsp_init_neon(RV34DSPContext *c, DSPContext* dsp)
00058 {
00059 c->put_pixels_tab[0][ 1] = ff_put_rv40_qpel16_mc10_neon;
00060 c->put_pixels_tab[0][ 3] = ff_put_rv40_qpel16_mc30_neon;
00061 c->put_pixels_tab[0][ 4] = ff_put_rv40_qpel16_mc01_neon;
00062 c->put_pixels_tab[0][ 5] = ff_put_rv40_qpel16_mc11_neon;
00063 c->put_pixels_tab[0][ 6] = ff_put_rv40_qpel16_mc21_neon;
00064 c->put_pixels_tab[0][ 7] = ff_put_rv40_qpel16_mc31_neon;
00065 c->put_pixels_tab[0][ 9] = ff_put_rv40_qpel16_mc12_neon;
00066 c->put_pixels_tab[0][10] = ff_put_rv40_qpel16_mc22_neon;
00067 c->put_pixels_tab[0][11] = ff_put_rv40_qpel16_mc32_neon;
00068 c->put_pixels_tab[0][12] = ff_put_rv40_qpel16_mc03_neon;
00069 c->put_pixels_tab[0][13] = ff_put_rv40_qpel16_mc13_neon;
00070 c->put_pixels_tab[0][14] = ff_put_rv40_qpel16_mc23_neon;
00071 c->put_pixels_tab[0][15] = ff_put_rv40_qpel16_mc33_neon;
00072 c->avg_pixels_tab[0][ 1] = ff_avg_rv40_qpel16_mc10_neon;
00073 c->avg_pixels_tab[0][ 3] = ff_avg_rv40_qpel16_mc30_neon;
00074 c->avg_pixels_tab[0][ 4] = ff_avg_rv40_qpel16_mc01_neon;
00075 c->avg_pixels_tab[0][ 5] = ff_avg_rv40_qpel16_mc11_neon;
00076 c->avg_pixels_tab[0][ 6] = ff_avg_rv40_qpel16_mc21_neon;
00077 c->avg_pixels_tab[0][ 7] = ff_avg_rv40_qpel16_mc31_neon;
00078 c->avg_pixels_tab[0][ 9] = ff_avg_rv40_qpel16_mc12_neon;
00079 c->avg_pixels_tab[0][10] = ff_avg_rv40_qpel16_mc22_neon;
00080 c->avg_pixels_tab[0][11] = ff_avg_rv40_qpel16_mc32_neon;
00081 c->avg_pixels_tab[0][12] = ff_avg_rv40_qpel16_mc03_neon;
00082 c->avg_pixels_tab[0][13] = ff_avg_rv40_qpel16_mc13_neon;
00083 c->avg_pixels_tab[0][14] = ff_avg_rv40_qpel16_mc23_neon;
00084 c->avg_pixels_tab[0][15] = ff_avg_rv40_qpel16_mc33_neon;
00085 c->put_pixels_tab[1][ 1] = ff_put_rv40_qpel8_mc10_neon;
00086 c->put_pixels_tab[1][ 3] = ff_put_rv40_qpel8_mc30_neon;
00087 c->put_pixels_tab[1][ 4] = ff_put_rv40_qpel8_mc01_neon;
00088 c->put_pixels_tab[1][ 5] = ff_put_rv40_qpel8_mc11_neon;
00089 c->put_pixels_tab[1][ 6] = ff_put_rv40_qpel8_mc21_neon;
00090 c->put_pixels_tab[1][ 7] = ff_put_rv40_qpel8_mc31_neon;
00091 c->put_pixels_tab[1][ 9] = ff_put_rv40_qpel8_mc12_neon;
00092 c->put_pixels_tab[1][10] = ff_put_rv40_qpel8_mc22_neon;
00093 c->put_pixels_tab[1][11] = ff_put_rv40_qpel8_mc32_neon;
00094 c->put_pixels_tab[1][12] = ff_put_rv40_qpel8_mc03_neon;
00095 c->put_pixels_tab[1][13] = ff_put_rv40_qpel8_mc13_neon;
00096 c->put_pixels_tab[1][14] = ff_put_rv40_qpel8_mc23_neon;
00097 c->put_pixels_tab[1][15] = ff_put_rv40_qpel8_mc33_neon;
00098 c->avg_pixels_tab[1][ 1] = ff_avg_rv40_qpel8_mc10_neon;
00099 c->avg_pixels_tab[1][ 3] = ff_avg_rv40_qpel8_mc30_neon;
00100 c->avg_pixels_tab[1][ 4] = ff_avg_rv40_qpel8_mc01_neon;
00101 c->avg_pixels_tab[1][ 5] = ff_avg_rv40_qpel8_mc11_neon;
00102 c->avg_pixels_tab[1][ 6] = ff_avg_rv40_qpel8_mc21_neon;
00103 c->avg_pixels_tab[1][ 7] = ff_avg_rv40_qpel8_mc31_neon;
00104 c->avg_pixels_tab[1][ 9] = ff_avg_rv40_qpel8_mc12_neon;
00105 c->avg_pixels_tab[1][10] = ff_avg_rv40_qpel8_mc22_neon;
00106 c->avg_pixels_tab[1][11] = ff_avg_rv40_qpel8_mc32_neon;
00107 c->avg_pixels_tab[1][12] = ff_avg_rv40_qpel8_mc03_neon;
00108 c->avg_pixels_tab[1][13] = ff_avg_rv40_qpel8_mc13_neon;
00109 c->avg_pixels_tab[1][14] = ff_avg_rv40_qpel8_mc23_neon;
00110 c->avg_pixels_tab[1][15] = ff_avg_rv40_qpel8_mc33_neon;
00111
00112 c->put_chroma_pixels_tab[0] = ff_put_rv40_chroma_mc8_neon;
00113 c->put_chroma_pixels_tab[1] = ff_put_rv40_chroma_mc4_neon;
00114 c->avg_chroma_pixels_tab[0] = ff_avg_rv40_chroma_mc8_neon;
00115 c->avg_chroma_pixels_tab[1] = ff_avg_rv40_chroma_mc4_neon;
00116
00117 c->rv40_weight_pixels_tab[0] = ff_rv40_weight_func_16_neon;
00118 c->rv40_weight_pixels_tab[1] = ff_rv40_weight_func_8_neon;
00119 }