diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-03-13 14:18:53 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-03-13 14:18:53 +0100 |
commit | db4e4f766c0739f08eb66696395a66e47378189c (patch) | |
tree | 73dc557065ad26a7ca332339ae54d0e7c07aba0a /libavcodec/dsputil.c | |
parent | 849f015406e77921a2adbe05e58b0e65cbf035c5 (diff) | |
parent | a8b6015823e628047a45916404c00044c5e80415 (diff) | |
download | ffmpeg-db4e4f766c0739f08eb66696395a66e47378189c.tar.gz |
Merge commit 'a8b6015823e628047a45916404c00044c5e80415'
* commit 'a8b6015823e628047a45916404c00044c5e80415':
dsputil: convert remaining functions to use ptrdiff_t strides
Conflicts:
libavcodec/dsputil.h
libavcodec/dsputil_template.c
libavcodec/h264qpel_template.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/dsputil.c')
-rw-r--r-- | libavcodec/dsputil.c | 171 |
1 files changed, 114 insertions, 57 deletions
diff --git a/libavcodec/dsputil.c b/libavcodec/dsputil.c index 4b972e2724..f4f84b59e1 100644 --- a/libavcodec/dsputil.c +++ b/libavcodec/dsputil.c @@ -925,23 +925,27 @@ static void OPNAME ## mpeg4_qpel16_v_lowpass(uint8_t *dst, uint8_t *src, int dst }\ }\ \ -static void OPNAME ## qpel8_mc10_c(uint8_t *dst, uint8_t *src, int stride){\ +static void OPNAME ## qpel8_mc10_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride)\ +{\ uint8_t half[64];\ put ## RND ## mpeg4_qpel8_h_lowpass(half, src, 8, stride, 8);\ OPNAME ## pixels8_l2_8(dst, src, half, stride, stride, 8, 8);\ }\ \ -static void OPNAME ## qpel8_mc20_c(uint8_t *dst, uint8_t *src, int stride){\ +static void OPNAME ## qpel8_mc20_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride)\ +{\ OPNAME ## mpeg4_qpel8_h_lowpass(dst, src, stride, stride, 8);\ }\ \ -static void OPNAME ## qpel8_mc30_c(uint8_t *dst, uint8_t *src, int stride){\ +static void OPNAME ## qpel8_mc30_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride)\ +{\ uint8_t half[64];\ put ## RND ## mpeg4_qpel8_h_lowpass(half, src, 8, stride, 8);\ OPNAME ## pixels8_l2_8(dst, src+1, half, stride, stride, 8, 8);\ }\ \ -static void OPNAME ## qpel8_mc01_c(uint8_t *dst, uint8_t *src, int stride){\ +static void OPNAME ## qpel8_mc01_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride)\ +{\ uint8_t full[16*9];\ uint8_t half[64];\ copy_block9(full, src, 16, stride, 9);\ @@ -949,20 +953,23 @@ static void OPNAME ## qpel8_mc01_c(uint8_t *dst, uint8_t *src, int stride){\ OPNAME ## pixels8_l2_8(dst, full, half, stride, 16, 8, 8);\ }\ \ -static void OPNAME ## qpel8_mc02_c(uint8_t *dst, uint8_t *src, int stride){\ +static void OPNAME ## qpel8_mc02_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride)\ +{\ uint8_t full[16*9];\ copy_block9(full, src, 16, stride, 9);\ OPNAME ## mpeg4_qpel8_v_lowpass(dst, full, stride, 16);\ }\ \ -static void OPNAME ## qpel8_mc03_c(uint8_t *dst, uint8_t *src, int stride){\ +static void OPNAME ## qpel8_mc03_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride)\ +{\ uint8_t full[16*9];\ uint8_t half[64];\ copy_block9(full, src, 16, stride, 9);\ put ## RND ## mpeg4_qpel8_v_lowpass(half, full, 8, 16);\ OPNAME ## pixels8_l2_8(dst, full+16, half, stride, 16, 8, 8);\ }\ -void ff_ ## OPNAME ## qpel8_mc11_old_c(uint8_t *dst, uint8_t *src, int stride){\ +void ff_ ## OPNAME ## qpel8_mc11_old_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride)\ +{\ uint8_t full[16*9];\ uint8_t halfH[72];\ uint8_t halfV[64];\ @@ -973,7 +980,8 @@ void ff_ ## OPNAME ## qpel8_mc11_old_c(uint8_t *dst, uint8_t *src, int stride){\ put ## RND ## mpeg4_qpel8_v_lowpass(halfHV, halfH, 8, 8);\ OPNAME ## pixels8_l4_8(dst, full, halfH, halfV, halfHV, stride, 16, 8, 8, 8, 8);\ }\ -static void OPNAME ## qpel8_mc11_c(uint8_t *dst, uint8_t *src, int stride){\ +static void OPNAME ## qpel8_mc11_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride)\ +{\ uint8_t full[16*9];\ uint8_t halfH[72];\ uint8_t halfHV[64];\ @@ -983,7 +991,8 @@ static void OPNAME ## qpel8_mc11_c(uint8_t *dst, uint8_t *src, int stride){\ put ## RND ## mpeg4_qpel8_v_lowpass(halfHV, halfH, 8, 8);\ OPNAME ## pixels8_l2_8(dst, halfH, halfHV, stride, 8, 8, 8);\ }\ -void ff_ ## OPNAME ## qpel8_mc31_old_c(uint8_t *dst, uint8_t *src, int stride){\ +void ff_ ## OPNAME ## qpel8_mc31_old_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride)\ +{\ uint8_t full[16*9];\ uint8_t halfH[72];\ uint8_t halfV[64];\ @@ -994,7 +1003,8 @@ void ff_ ## OPNAME ## qpel8_mc31_old_c(uint8_t *dst, uint8_t *src, int stride){\ put ## RND ## mpeg4_qpel8_v_lowpass(halfHV, halfH, 8, 8);\ OPNAME ## pixels8_l4_8(dst, full+1, halfH, halfV, halfHV, stride, 16, 8, 8, 8, 8);\ }\ -static void OPNAME ## qpel8_mc31_c(uint8_t *dst, uint8_t *src, int stride){\ +static void OPNAME ## qpel8_mc31_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride)\ +{\ uint8_t full[16*9];\ uint8_t halfH[72];\ uint8_t halfHV[64];\ @@ -1004,7 +1014,8 @@ static void OPNAME ## qpel8_mc31_c(uint8_t *dst, uint8_t *src, int stride){\ put ## RND ## mpeg4_qpel8_v_lowpass(halfHV, halfH, 8, 8);\ OPNAME ## pixels8_l2_8(dst, halfH, halfHV, stride, 8, 8, 8);\ }\ -void ff_ ## OPNAME ## qpel8_mc13_old_c(uint8_t *dst, uint8_t *src, int stride){\ +void ff_ ## OPNAME ## qpel8_mc13_old_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride)\ +{\ uint8_t full[16*9];\ uint8_t halfH[72];\ uint8_t halfV[64];\ @@ -1015,7 +1026,8 @@ void ff_ ## OPNAME ## qpel8_mc13_old_c(uint8_t *dst, uint8_t *src, int stride){\ put ## RND ## mpeg4_qpel8_v_lowpass(halfHV, halfH, 8, 8);\ OPNAME ## pixels8_l4_8(dst, full+16, halfH+8, halfV, halfHV, stride, 16, 8, 8, 8, 8);\ }\ -static void OPNAME ## qpel8_mc13_c(uint8_t *dst, uint8_t *src, int stride){\ +static void OPNAME ## qpel8_mc13_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride)\ +{\ uint8_t full[16*9];\ uint8_t halfH[72];\ uint8_t halfHV[64];\ @@ -1025,7 +1037,8 @@ static void OPNAME ## qpel8_mc13_c(uint8_t *dst, uint8_t *src, int stride){\ put ## RND ## mpeg4_qpel8_v_lowpass(halfHV, halfH, 8, 8);\ OPNAME ## pixels8_l2_8(dst, halfH+8, halfHV, stride, 8, 8, 8);\ }\ -void ff_ ## OPNAME ## qpel8_mc33_old_c(uint8_t *dst, uint8_t *src, int stride){\ +void ff_ ## OPNAME ## qpel8_mc33_old_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride)\ +{\ uint8_t full[16*9];\ uint8_t halfH[72];\ uint8_t halfV[64];\ @@ -1036,7 +1049,8 @@ void ff_ ## OPNAME ## qpel8_mc33_old_c(uint8_t *dst, uint8_t *src, int stride){\ put ## RND ## mpeg4_qpel8_v_lowpass(halfHV, halfH, 8, 8);\ OPNAME ## pixels8_l4_8(dst, full+17, halfH+8, halfV, halfHV, stride, 16, 8, 8, 8, 8);\ }\ -static void OPNAME ## qpel8_mc33_c(uint8_t *dst, uint8_t *src, int stride){\ +static void OPNAME ## qpel8_mc33_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride)\ +{\ uint8_t full[16*9];\ uint8_t halfH[72];\ uint8_t halfHV[64];\ @@ -1046,21 +1060,24 @@ static void OPNAME ## qpel8_mc33_c(uint8_t *dst, uint8_t *src, int stride){\ put ## RND ## mpeg4_qpel8_v_lowpass(halfHV, halfH, 8, 8);\ OPNAME ## pixels8_l2_8(dst, halfH+8, halfHV, stride, 8, 8, 8);\ }\ -static void OPNAME ## qpel8_mc21_c(uint8_t *dst, uint8_t *src, int stride){\ +static void OPNAME ## qpel8_mc21_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride)\ +{\ uint8_t halfH[72];\ uint8_t halfHV[64];\ put ## RND ## mpeg4_qpel8_h_lowpass(halfH, src, 8, stride, 9);\ put ## RND ## mpeg4_qpel8_v_lowpass(halfHV, halfH, 8, 8);\ OPNAME ## pixels8_l2_8(dst, halfH, halfHV, stride, 8, 8, 8);\ }\ -static void OPNAME ## qpel8_mc23_c(uint8_t *dst, uint8_t *src, int stride){\ +static void OPNAME ## qpel8_mc23_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride)\ +{\ uint8_t halfH[72];\ uint8_t halfHV[64];\ put ## RND ## mpeg4_qpel8_h_lowpass(halfH, src, 8, stride, 9);\ put ## RND ## mpeg4_qpel8_v_lowpass(halfHV, halfH, 8, 8);\ OPNAME ## pixels8_l2_8(dst, halfH+8, halfHV, stride, 8, 8, 8);\ }\ -void ff_ ## OPNAME ## qpel8_mc12_old_c(uint8_t *dst, uint8_t *src, int stride){\ +void ff_ ## OPNAME ## qpel8_mc12_old_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride)\ +{\ uint8_t full[16*9];\ uint8_t halfH[72];\ uint8_t halfV[64];\ @@ -1071,7 +1088,8 @@ void ff_ ## OPNAME ## qpel8_mc12_old_c(uint8_t *dst, uint8_t *src, int stride){\ put ## RND ## mpeg4_qpel8_v_lowpass(halfHV, halfH, 8, 8);\ OPNAME ## pixels8_l2_8(dst, halfV, halfHV, stride, 8, 8, 8);\ }\ -static void OPNAME ## qpel8_mc12_c(uint8_t *dst, uint8_t *src, int stride){\ +static void OPNAME ## qpel8_mc12_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride)\ +{\ uint8_t full[16*9];\ uint8_t halfH[72];\ copy_block9(full, src, 16, stride, 9);\ @@ -1079,7 +1097,8 @@ static void OPNAME ## qpel8_mc12_c(uint8_t *dst, uint8_t *src, int stride){\ put ## RND ## pixels8_l2_8(halfH, halfH, full, 8, 8, 16, 9);\ OPNAME ## mpeg4_qpel8_v_lowpass(dst, halfH, stride, 8);\ }\ -void ff_ ## OPNAME ## qpel8_mc32_old_c(uint8_t *dst, uint8_t *src, int stride){\ +void ff_ ## OPNAME ## qpel8_mc32_old_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride)\ +{\ uint8_t full[16*9];\ uint8_t halfH[72];\ uint8_t halfV[64];\ @@ -1090,7 +1109,8 @@ void ff_ ## OPNAME ## qpel8_mc32_old_c(uint8_t *dst, uint8_t *src, int stride){\ put ## RND ## mpeg4_qpel8_v_lowpass(halfHV, halfH, 8, 8);\ OPNAME ## pixels8_l2_8(dst, halfV, halfHV, stride, 8, 8, 8);\ }\ -static void OPNAME ## qpel8_mc32_c(uint8_t *dst, uint8_t *src, int stride){\ +static void OPNAME ## qpel8_mc32_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride)\ +{\ uint8_t full[16*9];\ uint8_t halfH[72];\ copy_block9(full, src, 16, stride, 9);\ @@ -1098,29 +1118,34 @@ static void OPNAME ## qpel8_mc32_c(uint8_t *dst, uint8_t *src, int stride){\ put ## RND ## pixels8_l2_8(halfH, halfH, full+1, 8, 8, 16, 9);\ OPNAME ## mpeg4_qpel8_v_lowpass(dst, halfH, stride, 8);\ }\ -static void OPNAME ## qpel8_mc22_c(uint8_t *dst, uint8_t *src, int stride){\ +static void OPNAME ## qpel8_mc22_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride)\ +{\ uint8_t halfH[72];\ put ## RND ## mpeg4_qpel8_h_lowpass(halfH, src, 8, stride, 9);\ OPNAME ## mpeg4_qpel8_v_lowpass(dst, halfH, stride, 8);\ }\ \ -static void OPNAME ## qpel16_mc10_c(uint8_t *dst, uint8_t *src, int stride){\ +static void OPNAME ## qpel16_mc10_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride)\ +{\ uint8_t half[256];\ put ## RND ## mpeg4_qpel16_h_lowpass(half, src, 16, stride, 16);\ OPNAME ## pixels16_l2_8(dst, src, half, stride, stride, 16, 16);\ }\ \ -static void OPNAME ## qpel16_mc20_c(uint8_t *dst, uint8_t *src, int stride){\ +static void OPNAME ## qpel16_mc20_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride)\ +{\ OPNAME ## mpeg4_qpel16_h_lowpass(dst, src, stride, stride, 16);\ }\ \ -static void OPNAME ## qpel16_mc30_c(uint8_t *dst, uint8_t *src, int stride){\ +static void OPNAME ## qpel16_mc30_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride)\ +{\ uint8_t half[256];\ put ## RND ## mpeg4_qpel16_h_lowpass(half, src, 16, stride, 16);\ OPNAME ## pixels16_l2_8(dst, src+1, half, stride, stride, 16, 16);\ }\ \ -static void OPNAME ## qpel16_mc01_c(uint8_t *dst, uint8_t *src, int stride){\ +static void OPNAME ## qpel16_mc01_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride)\ +{\ uint8_t full[24*17];\ uint8_t half[256];\ copy_block17(full, src, 24, stride, 17);\ @@ -1128,20 +1153,23 @@ static void OPNAME ## qpel16_mc01_c(uint8_t *dst, uint8_t *src, int stride){\ OPNAME ## pixels16_l2_8(dst, full, half, stride, 24, 16, 16);\ }\ \ -static void OPNAME ## qpel16_mc02_c(uint8_t *dst, uint8_t *src, int stride){\ +static void OPNAME ## qpel16_mc02_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride)\ +{\ uint8_t full[24*17];\ copy_block17(full, src, 24, stride, 17);\ OPNAME ## mpeg4_qpel16_v_lowpass(dst, full, stride, 24);\ }\ \ -static void OPNAME ## qpel16_mc03_c(uint8_t *dst, uint8_t *src, int stride){\ +static void OPNAME ## qpel16_mc03_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride)\ +{\ uint8_t full[24*17];\ uint8_t half[256];\ copy_block17(full, src, 24, stride, 17);\ put ## RND ## mpeg4_qpel16_v_lowpass(half, full, 16, 24);\ OPNAME ## pixels16_l2_8(dst, full+24, half, stride, 24, 16, 16);\ }\ -void ff_ ## OPNAME ## qpel16_mc11_old_c(uint8_t *dst, uint8_t *src, int stride){\ +void ff_ ## OPNAME ## qpel16_mc11_old_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride)\ +{\ uint8_t full[24*17];\ uint8_t halfH[272];\ uint8_t halfV[256];\ @@ -1152,7 +1180,8 @@ void ff_ ## OPNAME ## qpel16_mc11_old_c(uint8_t *dst, uint8_t *src, int stride){ put ## RND ## mpeg4_qpel16_v_lowpass(halfHV, halfH, 16, 16);\ OPNAME ## pixels16_l4_8(dst, full, halfH, halfV, halfHV, stride, 24, 16, 16, 16, 16);\ }\ -static void OPNAME ## qpel16_mc11_c(uint8_t *dst, uint8_t *src, int stride){\ +static void OPNAME ## qpel16_mc11_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride)\ +{\ uint8_t full[24*17];\ uint8_t halfH[272];\ uint8_t halfHV[256];\ @@ -1162,7 +1191,8 @@ static void OPNAME ## qpel16_mc11_c(uint8_t *dst, uint8_t *src, int stride){\ put ## RND ## mpeg4_qpel16_v_lowpass(halfHV, halfH, 16, 16);\ OPNAME ## pixels16_l2_8(dst, halfH, halfHV, stride, 16, 16, 16);\ }\ -void ff_ ## OPNAME ## qpel16_mc31_old_c(uint8_t *dst, uint8_t *src, int stride){\ +void ff_ ## OPNAME ## qpel16_mc31_old_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride)\ +{\ uint8_t full[24*17];\ uint8_t halfH[272];\ uint8_t halfV[256];\ @@ -1173,7 +1203,8 @@ void ff_ ## OPNAME ## qpel16_mc31_old_c(uint8_t *dst, uint8_t *src, int stride){ put ## RND ## mpeg4_qpel16_v_lowpass(halfHV, halfH, 16, 16);\ OPNAME ## pixels16_l4_8(dst, full+1, halfH, halfV, halfHV, stride, 24, 16, 16, 16, 16);\ }\ -static void OPNAME ## qpel16_mc31_c(uint8_t *dst, uint8_t *src, int stride){\ +static void OPNAME ## qpel16_mc31_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride)\ +{\ uint8_t full[24*17];\ uint8_t halfH[272];\ uint8_t halfHV[256];\ @@ -1183,7 +1214,8 @@ static void OPNAME ## qpel16_mc31_c(uint8_t *dst, uint8_t *src, int stride){\ put ## RND ## mpeg4_qpel16_v_lowpass(halfHV, halfH, 16, 16);\ OPNAME ## pixels16_l2_8(dst, halfH, halfHV, stride, 16, 16, 16);\ }\ -void ff_ ## OPNAME ## qpel16_mc13_old_c(uint8_t *dst, uint8_t *src, int stride){\ +void ff_ ## OPNAME ## qpel16_mc13_old_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride)\ +{\ uint8_t full[24*17];\ uint8_t halfH[272];\ uint8_t halfV[256];\ @@ -1194,7 +1226,8 @@ void ff_ ## OPNAME ## qpel16_mc13_old_c(uint8_t *dst, uint8_t *src, int stride){ put ## RND ## mpeg4_qpel16_v_lowpass(halfHV, halfH, 16, 16);\ OPNAME ## pixels16_l4_8(dst, full+24, halfH+16, halfV, halfHV, stride, 24, 16, 16, 16, 16);\ }\ -static void OPNAME ## qpel16_mc13_c(uint8_t *dst, uint8_t *src, int stride){\ +static void OPNAME ## qpel16_mc13_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride)\ +{\ uint8_t full[24*17];\ uint8_t halfH[272];\ uint8_t halfHV[256];\ @@ -1204,7 +1237,8 @@ static void OPNAME ## qpel16_mc13_c(uint8_t *dst, uint8_t *src, int stride){\ put ## RND ## mpeg4_qpel16_v_lowpass(halfHV, halfH, 16, 16);\ OPNAME ## pixels16_l2_8(dst, halfH+16, halfHV, stride, 16, 16, 16);\ }\ -void ff_ ## OPNAME ## qpel16_mc33_old_c(uint8_t *dst, uint8_t *src, int stride){\ +void ff_ ## OPNAME ## qpel16_mc33_old_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride)\ +{\ uint8_t full[24*17];\ uint8_t halfH[272];\ uint8_t halfV[256];\ @@ -1215,7 +1249,8 @@ void ff_ ## OPNAME ## qpel16_mc33_old_c(uint8_t *dst, uint8_t *src, int stride){ put ## RND ## mpeg4_qpel16_v_lowpass(halfHV, halfH, 16, 16);\ OPNAME ## pixels16_l4_8(dst, full+25, halfH+16, halfV, halfHV, stride, 24, 16, 16, 16, 16);\ }\ -static void OPNAME ## qpel16_mc33_c(uint8_t *dst, uint8_t *src, int stride){\ +static void OPNAME ## qpel16_mc33_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride)\ +{\ uint8_t full[24*17];\ uint8_t halfH[272];\ uint8_t halfHV[256];\ @@ -1225,21 +1260,24 @@ static void OPNAME ## qpel16_mc33_c(uint8_t *dst, uint8_t *src, int stride){\ put ## RND ## mpeg4_qpel16_v_lowpass(halfHV, halfH, 16, 16);\ OPNAME ## pixels16_l2_8(dst, halfH+16, halfHV, stride, 16, 16, 16);\ }\ -static void OPNAME ## qpel16_mc21_c(uint8_t *dst, uint8_t *src, int stride){\ +static void OPNAME ## qpel16_mc21_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride)\ +{\ uint8_t halfH[272];\ uint8_t halfHV[256];\ put ## RND ## mpeg4_qpel16_h_lowpass(halfH, src, 16, stride, 17);\ put ## RND ## mpeg4_qpel16_v_lowpass(halfHV, halfH, 16, 16);\ OPNAME ## pixels16_l2_8(dst, halfH, halfHV, stride, 16, 16, 16);\ }\ -static void OPNAME ## qpel16_mc23_c(uint8_t *dst, uint8_t *src, int stride){\ +static void OPNAME ## qpel16_mc23_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride)\ +{\ uint8_t halfH[272];\ uint8_t halfHV[256];\ put ## RND ## mpeg4_qpel16_h_lowpass(halfH, src, 16, stride, 17);\ put ## RND ## mpeg4_qpel16_v_lowpass(halfHV, halfH, 16, 16);\ OPNAME ## pixels16_l2_8(dst, halfH+16, halfHV, stride, 16, 16, 16);\ }\ -void ff_ ## OPNAME ## qpel16_mc12_old_c(uint8_t *dst, uint8_t *src, int stride){\ +void ff_ ## OPNAME ## qpel16_mc12_old_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride)\ +{\ uint8_t full[24*17];\ uint8_t halfH[272];\ uint8_t halfV[256];\ @@ -1250,7 +1288,8 @@ void ff_ ## OPNAME ## qpel16_mc12_old_c(uint8_t *dst, uint8_t *src, int stride){ put ## RND ## mpeg4_qpel16_v_lowpass(halfHV, halfH, 16, 16);\ OPNAME ## pixels16_l2_8(dst, halfV, halfHV, stride, 16, 16, 16);\ }\ -static void OPNAME ## qpel16_mc12_c(uint8_t *dst, uint8_t *src, int stride){\ +static void OPNAME ## qpel16_mc12_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride)\ +{\ uint8_t full[24*17];\ uint8_t halfH[272];\ copy_block17(full, src, 24, stride, 17);\ @@ -1258,7 +1297,8 @@ static void OPNAME ## qpel16_mc12_c(uint8_t *dst, uint8_t *src, int stride){\ put ## RND ## pixels16_l2_8(halfH, halfH, full, 16, 16, 24, 17);\ OPNAME ## mpeg4_qpel16_v_lowpass(dst, halfH, stride, 16);\ }\ -void ff_ ## OPNAME ## qpel16_mc32_old_c(uint8_t *dst, uint8_t *src, int stride){\ +void ff_ ## OPNAME ## qpel16_mc32_old_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride)\ +{\ uint8_t full[24*17];\ uint8_t halfH[272];\ uint8_t halfV[256];\ @@ -1269,7 +1309,8 @@ void ff_ ## OPNAME ## qpel16_mc32_old_c(uint8_t *dst, uint8_t *src, int stride){ put ## RND ## mpeg4_qpel16_v_lowpass(halfHV, halfH, 16, 16);\ OPNAME ## pixels16_l2_8(dst, halfV, halfHV, stride, 16, 16, 16);\ }\ -static void OPNAME ## qpel16_mc32_c(uint8_t *dst, uint8_t *src, int stride){\ +static void OPNAME ## qpel16_mc32_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride)\ +{\ uint8_t full[24*17];\ uint8_t halfH[272];\ copy_block17(full, src, 24, stride, 17);\ @@ -1277,7 +1318,8 @@ static void OPNAME ## qpel16_mc32_c(uint8_t *dst, uint8_t *src, int stride){\ put ## RND ## pixels16_l2_8(halfH, halfH, full+1, 16, 16, 24, 17);\ OPNAME ## mpeg4_qpel16_v_lowpass(dst, halfH, stride, 16);\ }\ -static void OPNAME ## qpel16_mc22_c(uint8_t *dst, uint8_t *src, int stride){\ +static void OPNAME ## qpel16_mc22_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride)\ +{\ uint8_t halfH[272];\ put ## RND ## mpeg4_qpel16_h_lowpass(halfH, src, 16, stride, 17);\ OPNAME ## mpeg4_qpel16_v_lowpass(dst, halfH, stride, 16);\ @@ -1297,16 +1339,20 @@ QPEL_MC(0, avg_ , _ , op_avg) #undef op_put #undef op_put_no_rnd -void ff_put_pixels8x8_c(uint8_t *dst, uint8_t *src, int stride) { +void ff_put_pixels8x8_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride) +{ put_pixels8_8_c(dst, src, stride, 8); } -void ff_avg_pixels8x8_c(uint8_t *dst, uint8_t *src, int stride) { +void ff_avg_pixels8x8_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride) +{ avg_pixels8_8_c(dst, src, stride, 8); } -void ff_put_pixels16x16_c(uint8_t *dst, uint8_t *src, int stride) { +void ff_put_pixels16x16_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride) +{ put_pixels16_8_c(dst, src, stride, 16); } -void ff_avg_pixels16x16_c(uint8_t *dst, uint8_t *src, int stride) { +void ff_avg_pixels16x16_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride) +{ avg_pixels16_8_c(dst, src, stride, 16); } @@ -1336,16 +1382,20 @@ static void wmv2_mspel8_h_lowpass(uint8_t *dst, uint8_t *src, int dstStride, int } #if CONFIG_RV40_DECODER -void ff_put_rv40_qpel16_mc33_c(uint8_t *dst, uint8_t *src, int stride){ +void ff_put_rv40_qpel16_mc33_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride) +{ put_pixels16_xy2_8_c(dst, src, stride, 16); } -void ff_avg_rv40_qpel16_mc33_c(uint8_t *dst, uint8_t *src, int stride){ +void ff_avg_rv40_qpel16_mc33_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride) +{ avg_pixels16_xy2_8_c(dst, src, stride, 16); } -void ff_put_rv40_qpel8_mc33_c(uint8_t *dst, uint8_t *src, int stride){ +void ff_put_rv40_qpel8_mc33_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride) +{ put_pixels8_xy2_8_c(dst, src, stride, 8); } -void ff_avg_rv40_qpel8_mc33_c(uint8_t *dst, uint8_t *src, int stride){ +void ff_avg_rv40_qpel8_mc33_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride) +{ avg_pixels8_xy2_8_c(dst, src, stride, 8); } #endif /* CONFIG_RV40_DECODER */ @@ -1424,27 +1474,32 @@ static void wmv2_mspel8_v_lowpass(uint8_t *dst, uint8_t *src, int dstStride, int } } -static void put_mspel8_mc10_c(uint8_t *dst, uint8_t *src, int stride){ +static void put_mspel8_mc10_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride) +{ uint8_t half[64]; wmv2_mspel8_h_lowpass(half, src, 8, stride, 8); put_pixels8_l2_8(dst, src, half, stride, stride, 8, 8); } -static void put_mspel8_mc20_c(uint8_t *dst, uint8_t *src, int stride){ +static void put_mspel8_mc20_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride) +{ wmv2_mspel8_h_lowpass(dst, src, stride, stride, 8); } -static void put_mspel8_mc30_c(uint8_t *dst, uint8_t *src, int stride){ +static void put_mspel8_mc30_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride) +{ uint8_t half[64]; wmv2_mspel8_h_lowpass(half, src, 8, stride, 8); put_pixels8_l2_8(dst, src+1, half, stride, stride, 8, 8); } -static void put_mspel8_mc02_c(uint8_t *dst, uint8_t *src, int stride){ +static void put_mspel8_mc02_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride) +{ wmv2_mspel8_v_lowpass(dst, src, stride, stride, 8); } -static void put_mspel8_mc12_c(uint8_t *dst, uint8_t *src, int stride){ +static void put_mspel8_mc12_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride) +{ uint8_t halfH[88]; uint8_t halfV[64]; uint8_t halfHV[64]; @@ -1453,7 +1508,8 @@ static void put_mspel8_mc12_c(uint8_t *dst, uint8_t *src, int stride){ wmv2_mspel8_v_lowpass(halfHV, halfH+8, 8, 8, 8); put_pixels8_l2_8(dst, halfV, halfHV, stride, 8, 8, 8); } -static void put_mspel8_mc32_c(uint8_t *dst, uint8_t *src, int stride){ +static void put_mspel8_mc32_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride) +{ uint8_t halfH[88]; uint8_t halfV[64]; uint8_t halfHV[64]; @@ -1462,7 +1518,8 @@ static void put_mspel8_mc32_c(uint8_t *dst, uint8_t *src, int stride){ wmv2_mspel8_v_lowpass(halfHV, halfH+8, 8, 8, 8); put_pixels8_l2_8(dst, halfV, halfHV, stride, 8, 8, 8); } -static void put_mspel8_mc22_c(uint8_t *dst, uint8_t *src, int stride){ +static void put_mspel8_mc22_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride) +{ uint8_t halfH[88]; wmv2_mspel8_h_lowpass(halfH, src-stride, 8, stride, 11); wmv2_mspel8_v_lowpass(dst, halfH+8, stride, 8, 8); |