39 #define QPEL_MC(r, OPNAME, RND, OP) \ 40 static void OPNAME ## mpeg4_qpel8_h_lowpass(uint8_t *dst, const uint8_t *src, \ 41 int dstStride, int srcStride, \ 44 const uint8_t *cm = ff_crop_tab + MAX_NEG_CROP; \ 47 for (i = 0; i < h; i++) { \ 48 OP(dst[0], (src[0] + src[1]) * 20 - (src[0] + src[2]) * 6 + (src[1] + src[3]) * 3 - (src[2] + src[4])); \ 49 OP(dst[1], (src[1] + src[2]) * 20 - (src[0] + src[3]) * 6 + (src[0] + src[4]) * 3 - (src[1] + src[5])); \ 50 OP(dst[2], (src[2] + src[3]) * 20 - (src[1] + src[4]) * 6 + (src[0] + src[5]) * 3 - (src[0] + src[6])); \ 51 OP(dst[3], (src[3] + src[4]) * 20 - (src[2] + src[5]) * 6 + (src[1] + src[6]) * 3 - (src[0] + src[7])); \ 52 OP(dst[4], (src[4] + src[5]) * 20 - (src[3] + src[6]) * 6 + (src[2] + src[7]) * 3 - (src[1] + src[8])); \ 53 OP(dst[5], (src[5] + src[6]) * 20 - (src[4] + src[7]) * 6 + (src[3] + src[8]) * 3 - (src[2] + src[8])); \ 54 OP(dst[6], (src[6] + src[7]) * 20 - (src[5] + src[8]) * 6 + (src[4] + src[8]) * 3 - (src[3] + src[7])); \ 55 OP(dst[7], (src[7] + src[8]) * 20 - (src[6] + src[8]) * 6 + (src[5] + src[7]) * 3 - (src[4] + src[6])); \ 61 static void OPNAME ## mpeg4_qpel8_v_lowpass(uint8_t *dst, const uint8_t *src, \ 62 int dstStride, int srcStride) \ 64 const uint8_t *cm = ff_crop_tab + MAX_NEG_CROP; \ 68 for (i = 0; i < w; i++) { \ 69 const int src0 = src[0 * srcStride]; \ 70 const int src1 = src[1 * srcStride]; \ 71 const int src2 = src[2 * srcStride]; \ 72 const int src3 = src[3 * srcStride]; \ 73 const int src4 = src[4 * srcStride]; \ 74 const int src5 = src[5 * srcStride]; \ 75 const int src6 = src[6 * srcStride]; \ 76 const int src7 = src[7 * srcStride]; \ 77 const int src8 = src[8 * srcStride]; \ 78 OP(dst[0 * dstStride], (src0 + src1) * 20 - (src0 + src2) * 6 + (src1 + src3) * 3 - (src2 + src4)); \ 79 OP(dst[1 * dstStride], (src1 + src2) * 20 - (src0 + src3) * 6 + (src0 + src4) * 3 - (src1 + src5)); \ 80 OP(dst[2 * dstStride], (src2 + src3) * 20 - (src1 + src4) * 6 + (src0 + src5) * 3 - (src0 + src6)); \ 81 OP(dst[3 * dstStride], (src3 + src4) * 20 - (src2 + src5) * 6 + (src1 + src6) * 3 - (src0 + src7)); \ 82 OP(dst[4 * dstStride], (src4 + src5) * 20 - (src3 + src6) * 6 + (src2 + src7) * 3 - (src1 + src8)); \ 83 OP(dst[5 * dstStride], (src5 + src6) * 20 - (src4 + src7) * 6 + (src3 + src8) * 3 - (src2 + src8)); \ 84 OP(dst[6 * dstStride], (src6 + src7) * 20 - (src5 + src8) * 6 + (src4 + src8) * 3 - (src3 + src7)); \ 85 OP(dst[7 * dstStride], (src7 + src8) * 20 - (src6 + src8) * 6 + (src5 + src7) * 3 - (src4 + src6)); \ 91 static void OPNAME ## mpeg4_qpel16_h_lowpass(uint8_t *dst, \ 93 int dstStride, int srcStride, \ 96 const uint8_t *cm = ff_crop_tab + MAX_NEG_CROP; \ 99 for (i = 0; i < h; i++) { \ 100 OP(dst[0], (src[0] + src[1]) * 20 - (src[0] + src[2]) * 6 + (src[1] + src[3]) * 3 - (src[2] + src[4])); \ 101 OP(dst[1], (src[1] + src[2]) * 20 - (src[0] + src[3]) * 6 + (src[0] + src[4]) * 3 - (src[1] + src[5])); \ 102 OP(dst[2], (src[2] + src[3]) * 20 - (src[1] + src[4]) * 6 + (src[0] + src[5]) * 3 - (src[0] + src[6])); \ 103 OP(dst[3], (src[3] + src[4]) * 20 - (src[2] + src[5]) * 6 + (src[1] + src[6]) * 3 - (src[0] + src[7])); \ 104 OP(dst[4], (src[4] + src[5]) * 20 - (src[3] + src[6]) * 6 + (src[2] + src[7]) * 3 - (src[1] + src[8])); \ 105 OP(dst[5], (src[5] + src[6]) * 20 - (src[4] + src[7]) * 6 + (src[3] + src[8]) * 3 - (src[2] + src[9])); \ 106 OP(dst[6], (src[6] + src[7]) * 20 - (src[5] + src[8]) * 6 + (src[4] + src[9]) * 3 - (src[3] + src[10])); \ 107 OP(dst[7], (src[7] + src[8]) * 20 - (src[6] + src[9]) * 6 + (src[5] + src[10]) * 3 - (src[4] + src[11])); \ 108 OP(dst[8], (src[8] + src[9]) * 20 - (src[7] + src[10]) * 6 + (src[6] + src[11]) * 3 - (src[5] + src[12])); \ 109 OP(dst[9], (src[9] + src[10]) * 20 - (src[8] + src[11]) * 6 + (src[7] + src[12]) * 3 - (src[6] + src[13])); \ 110 OP(dst[10], (src[10] + src[11]) * 20 - (src[9] + src[12]) * 6 + (src[8] + src[13]) * 3 - (src[7] + src[14])); \ 111 OP(dst[11], (src[11] + src[12]) * 20 - (src[10] + src[13]) * 6 + (src[9] + src[14]) * 3 - (src[8] + src[15])); \ 112 OP(dst[12], (src[12] + src[13]) * 20 - (src[11] + src[14]) * 6 + (src[10] + src[15]) * 3 - (src[9] + src[16])); \ 113 OP(dst[13], (src[13] + src[14]) * 20 - (src[12] + src[15]) * 6 + (src[11] + src[16]) * 3 - (src[10] + src[16])); \ 114 OP(dst[14], (src[14] + src[15]) * 20 - (src[13] + src[16]) * 6 + (src[12] + src[16]) * 3 - (src[11] + src[15])); \ 115 OP(dst[15], (src[15] + src[16]) * 20 - (src[14] + src[16]) * 6 + (src[13] + src[15]) * 3 - (src[12] + src[14])); \ 121 static void OPNAME ## mpeg4_qpel16_v_lowpass(uint8_t *dst, \ 122 const uint8_t *src, \ 123 int dstStride, int srcStride) \ 125 const uint8_t *cm = ff_crop_tab + MAX_NEG_CROP; \ 129 for (i = 0; i < w; i++) { \ 130 const int src0 = src[0 * srcStride]; \ 131 const int src1 = src[1 * srcStride]; \ 132 const int src2 = src[2 * srcStride]; \ 133 const int src3 = src[3 * srcStride]; \ 134 const int src4 = src[4 * srcStride]; \ 135 const int src5 = src[5 * srcStride]; \ 136 const int src6 = src[6 * srcStride]; \ 137 const int src7 = src[7 * srcStride]; \ 138 const int src8 = src[8 * srcStride]; \ 139 const int src9 = src[9 * srcStride]; \ 140 const int src10 = src[10 * srcStride]; \ 141 const int src11 = src[11 * srcStride]; \ 142 const int src12 = src[12 * srcStride]; \ 143 const int src13 = src[13 * srcStride]; \ 144 const int src14 = src[14 * srcStride]; \ 145 const int src15 = src[15 * srcStride]; \ 146 const int src16 = src[16 * srcStride]; \ 147 OP(dst[0 * dstStride], (src0 + src1) * 20 - (src0 + src2) * 6 + (src1 + src3) * 3 - (src2 + src4)); \ 148 OP(dst[1 * dstStride], (src1 + src2) * 20 - (src0 + src3) * 6 + (src0 + src4) * 3 - (src1 + src5)); \ 149 OP(dst[2 * dstStride], (src2 + src3) * 20 - (src1 + src4) * 6 + (src0 + src5) * 3 - (src0 + src6)); \ 150 OP(dst[3 * dstStride], (src3 + src4) * 20 - (src2 + src5) * 6 + (src1 + src6) * 3 - (src0 + src7)); \ 151 OP(dst[4 * dstStride], (src4 + src5) * 20 - (src3 + src6) * 6 + (src2 + src7) * 3 - (src1 + src8)); \ 152 OP(dst[5 * dstStride], (src5 + src6) * 20 - (src4 + src7) * 6 + (src3 + src8) * 3 - (src2 + src9)); \ 153 OP(dst[6 * dstStride], (src6 + src7) * 20 - (src5 + src8) * 6 + (src4 + src9) * 3 - (src3 + src10)); \ 154 OP(dst[7 * dstStride], (src7 + src8) * 20 - (src6 + src9) * 6 + (src5 + src10) * 3 - (src4 + src11)); \ 155 OP(dst[8 * dstStride], (src8 + src9) * 20 - (src7 + src10) * 6 + (src6 + src11) * 3 - (src5 + src12)); \ 156 OP(dst[9 * dstStride], (src9 + src10) * 20 - (src8 + src11) * 6 + (src7 + src12) * 3 - (src6 + src13)); \ 157 OP(dst[10 * dstStride], (src10 + src11) * 20 - (src9 + src12) * 6 + (src8 + src13) * 3 - (src7 + src14)); \ 158 OP(dst[11 * dstStride], (src11 + src12) * 20 - (src10 + src13) * 6 + (src9 + src14) * 3 - (src8 + src15)); \ 159 OP(dst[12 * dstStride], (src12 + src13) * 20 - (src11 + src14) * 6 + (src10 + src15) * 3 - (src9 + src16)); \ 160 OP(dst[13 * dstStride], (src13 + src14) * 20 - (src12 + src15) * 6 + (src11 + src16) * 3 - (src10 + src16)); \ 161 OP(dst[14 * dstStride], (src14 + src15) * 20 - (src13 + src16) * 6 + (src12 + src16) * 3 - (src11 + src15)); \ 162 OP(dst[15 * dstStride], (src15 + src16) * 20 - (src14 + src16) * 6 + (src13 + src15) * 3 - (src12 + src14)); \ 168 static void OPNAME ## qpel8_mc10_c(uint8_t *dst, const uint8_t *src, \ 173 put ## RND ## mpeg4_qpel8_h_lowpass(half, src, 8, stride, 8); \ 174 OPNAME ## pixels8_l2_8(dst, src, half, stride, stride, 8, 8); \ 177 static void OPNAME ## qpel8_mc20_c(uint8_t *dst, const uint8_t *src, \ 180 OPNAME ## mpeg4_qpel8_h_lowpass(dst, src, stride, stride, 8); \ 183 static void OPNAME ## qpel8_mc30_c(uint8_t *dst, const uint8_t *src, \ 188 put ## RND ## mpeg4_qpel8_h_lowpass(half, src, 8, stride, 8); \ 189 OPNAME ## pixels8_l2_8(dst, src + 1, half, stride, stride, 8, 8); \ 192 static void OPNAME ## qpel8_mc01_c(uint8_t *dst, const uint8_t *src, \ 195 uint8_t full[16 * 9]; \ 198 copy_block9(full, src, 16, stride, 9); \ 199 put ## RND ## mpeg4_qpel8_v_lowpass(half, full, 8, 16); \ 200 OPNAME ## pixels8_l2_8(dst, full, half, stride, 16, 8, 8); \ 203 static void OPNAME ## qpel8_mc02_c(uint8_t *dst, const uint8_t *src, \ 206 uint8_t full[16 * 9]; \ 208 copy_block9(full, src, 16, stride, 9); \ 209 OPNAME ## mpeg4_qpel8_v_lowpass(dst, full, stride, 16); \ 212 static void OPNAME ## qpel8_mc03_c(uint8_t *dst, const uint8_t *src, \ 215 uint8_t full[16 * 9]; \ 218 copy_block9(full, src, 16, stride, 9); \ 219 put ## RND ## mpeg4_qpel8_v_lowpass(half, full, 8, 16); \ 220 OPNAME ## pixels8_l2_8(dst, full + 16, half, stride, 16, 8, 8); \ 223 void ff_ ## OPNAME ## qpel8_mc11_old_c(uint8_t *dst, const uint8_t *src, \ 226 uint8_t full[16 * 9]; \ 229 uint8_t halfHV[64]; \ 231 copy_block9(full, src, 16, stride, 9); \ 232 put ## RND ## mpeg4_qpel8_h_lowpass(halfH, full, 8, 16, 9); \ 233 put ## RND ## mpeg4_qpel8_v_lowpass(halfV, full, 8, 16); \ 234 put ## RND ## mpeg4_qpel8_v_lowpass(halfHV, halfH, 8, 8); \ 235 OPNAME ## pixels8_l4_8(dst, full, halfH, halfV, halfHV, \ 236 stride, 16, 8, 8, 8, 8); \ 239 static void OPNAME ## qpel8_mc11_c(uint8_t *dst, const uint8_t *src, \ 242 uint8_t full[16 * 9]; \ 244 uint8_t halfHV[64]; \ 246 copy_block9(full, src, 16, stride, 9); \ 247 put ## RND ## mpeg4_qpel8_h_lowpass(halfH, full, 8, 16, 9); \ 248 put ## RND ## pixels8_l2_8(halfH, halfH, full, 8, 8, 16, 9); \ 249 put ## RND ## mpeg4_qpel8_v_lowpass(halfHV, halfH, 8, 8); \ 250 OPNAME ## pixels8_l2_8(dst, halfH, halfHV, stride, 8, 8, 8); \ 253 void ff_ ## OPNAME ## qpel8_mc31_old_c(uint8_t *dst, const uint8_t *src, \ 256 uint8_t full[16 * 9]; \ 259 uint8_t halfHV[64]; \ 261 copy_block9(full, src, 16, stride, 9); \ 262 put ## RND ## mpeg4_qpel8_h_lowpass(halfH, full, 8, 16, 9); \ 263 put ## RND ## mpeg4_qpel8_v_lowpass(halfV, full + 1, 8, 16); \ 264 put ## RND ## mpeg4_qpel8_v_lowpass(halfHV, halfH, 8, 8); \ 265 OPNAME ## pixels8_l4_8(dst, full + 1, halfH, halfV, halfHV, \ 266 stride, 16, 8, 8, 8, 8); \ 269 static void OPNAME ## qpel8_mc31_c(uint8_t *dst, const uint8_t *src, \ 272 uint8_t full[16 * 9]; \ 274 uint8_t halfHV[64]; \ 276 copy_block9(full, src, 16, stride, 9); \ 277 put ## RND ## mpeg4_qpel8_h_lowpass(halfH, full, 8, 16, 9); \ 278 put ## RND ## pixels8_l2_8(halfH, halfH, full + 1, 8, 8, 16, 9); \ 279 put ## RND ## mpeg4_qpel8_v_lowpass(halfHV, halfH, 8, 8); \ 280 OPNAME ## pixels8_l2_8(dst, halfH, halfHV, stride, 8, 8, 8); \ 283 void ff_ ## OPNAME ## qpel8_mc13_old_c(uint8_t *dst, const uint8_t *src, \ 286 uint8_t full[16 * 9]; \ 289 uint8_t halfHV[64]; \ 291 copy_block9(full, src, 16, stride, 9); \ 292 put ## RND ## mpeg4_qpel8_h_lowpass(halfH, full, 8, 16, 9); \ 293 put ## RND ## mpeg4_qpel8_v_lowpass(halfV, full, 8, 16); \ 294 put ## RND ## mpeg4_qpel8_v_lowpass(halfHV, halfH, 8, 8); \ 295 OPNAME ## pixels8_l4_8(dst, full + 16, halfH + 8, halfV, halfHV, \ 296 stride, 16, 8, 8, 8, 8); \ 299 static void OPNAME ## qpel8_mc13_c(uint8_t *dst, const uint8_t *src, \ 302 uint8_t full[16 * 9]; \ 304 uint8_t halfHV[64]; \ 306 copy_block9(full, src, 16, stride, 9); \ 307 put ## RND ## mpeg4_qpel8_h_lowpass(halfH, full, 8, 16, 9); \ 308 put ## RND ## pixels8_l2_8(halfH, halfH, full, 8, 8, 16, 9); \ 309 put ## RND ## mpeg4_qpel8_v_lowpass(halfHV, halfH, 8, 8); \ 310 OPNAME ## pixels8_l2_8(dst, halfH + 8, halfHV, stride, 8, 8, 8); \ 313 void ff_ ## OPNAME ## qpel8_mc33_old_c(uint8_t *dst, const uint8_t *src, \ 316 uint8_t full[16 * 9]; \ 319 uint8_t halfHV[64]; \ 321 copy_block9(full, src, 16, stride, 9); \ 322 put ## RND ## mpeg4_qpel8_h_lowpass(halfH, full, 8, 16, 9); \ 323 put ## RND ## mpeg4_qpel8_v_lowpass(halfV, full + 1, 8, 16); \ 324 put ## RND ## mpeg4_qpel8_v_lowpass(halfHV, halfH, 8, 8); \ 325 OPNAME ## pixels8_l4_8(dst, full + 17, halfH + 8, halfV, halfHV, \ 326 stride, 16, 8, 8, 8, 8); \ 329 static void OPNAME ## qpel8_mc33_c(uint8_t *dst, const uint8_t *src, \ 332 uint8_t full[16 * 9]; \ 334 uint8_t halfHV[64]; \ 336 copy_block9(full, src, 16, stride, 9); \ 337 put ## RND ## mpeg4_qpel8_h_lowpass(halfH, full, 8, 16, 9); \ 338 put ## RND ## pixels8_l2_8(halfH, halfH, full + 1, 8, 8, 16, 9); \ 339 put ## RND ## mpeg4_qpel8_v_lowpass(halfHV, halfH, 8, 8); \ 340 OPNAME ## pixels8_l2_8(dst, halfH + 8, halfHV, stride, 8, 8, 8); \ 343 static void OPNAME ## qpel8_mc21_c(uint8_t *dst, const uint8_t *src, \ 347 uint8_t halfHV[64]; \ 349 put ## RND ## mpeg4_qpel8_h_lowpass(halfH, src, 8, stride, 9); \ 350 put ## RND ## mpeg4_qpel8_v_lowpass(halfHV, halfH, 8, 8); \ 351 OPNAME ## pixels8_l2_8(dst, halfH, halfHV, stride, 8, 8, 8); \ 354 static void OPNAME ## qpel8_mc23_c(uint8_t *dst, const uint8_t *src, \ 358 uint8_t halfHV[64]; \ 360 put ## RND ## mpeg4_qpel8_h_lowpass(halfH, src, 8, stride, 9); \ 361 put ## RND ## mpeg4_qpel8_v_lowpass(halfHV, halfH, 8, 8); \ 362 OPNAME ## pixels8_l2_8(dst, halfH + 8, halfHV, stride, 8, 8, 8); \ 365 void ff_ ## OPNAME ## qpel8_mc12_old_c(uint8_t *dst, const uint8_t *src, \ 368 uint8_t full[16 * 9]; \ 371 uint8_t halfHV[64]; \ 373 copy_block9(full, src, 16, stride, 9); \ 374 put ## RND ## mpeg4_qpel8_h_lowpass(halfH, full, 8, 16, 9); \ 375 put ## RND ## mpeg4_qpel8_v_lowpass(halfV, full, 8, 16); \ 376 put ## RND ## mpeg4_qpel8_v_lowpass(halfHV, halfH, 8, 8); \ 377 OPNAME ## pixels8_l2_8(dst, halfV, halfHV, stride, 8, 8, 8); \ 380 static void OPNAME ## qpel8_mc12_c(uint8_t *dst, const uint8_t *src, \ 383 uint8_t full[16 * 9]; \ 386 copy_block9(full, src, 16, stride, 9); \ 387 put ## RND ## mpeg4_qpel8_h_lowpass(halfH, full, 8, 16, 9); \ 388 put ## RND ## pixels8_l2_8(halfH, halfH, full, 8, 8, 16, 9); \ 389 OPNAME ## mpeg4_qpel8_v_lowpass(dst, halfH, stride, 8); \ 392 void ff_ ## OPNAME ## qpel8_mc32_old_c(uint8_t *dst, const uint8_t *src, \ 395 uint8_t full[16 * 9]; \ 398 uint8_t halfHV[64]; \ 400 copy_block9(full, src, 16, stride, 9); \ 401 put ## RND ## mpeg4_qpel8_h_lowpass(halfH, full, 8, 16, 9); \ 402 put ## RND ## mpeg4_qpel8_v_lowpass(halfV, full + 1, 8, 16); \ 403 put ## RND ## mpeg4_qpel8_v_lowpass(halfHV, halfH, 8, 8); \ 404 OPNAME ## pixels8_l2_8(dst, halfV, halfHV, stride, 8, 8, 8); \ 407 static void OPNAME ## qpel8_mc32_c(uint8_t *dst, const uint8_t *src, \ 410 uint8_t full[16 * 9]; \ 413 copy_block9(full, src, 16, stride, 9); \ 414 put ## RND ## mpeg4_qpel8_h_lowpass(halfH, full, 8, 16, 9); \ 415 put ## RND ## pixels8_l2_8(halfH, halfH, full + 1, 8, 8, 16, 9); \ 416 OPNAME ## mpeg4_qpel8_v_lowpass(dst, halfH, stride, 8); \ 419 static void OPNAME ## qpel8_mc22_c(uint8_t *dst, const uint8_t *src, \ 424 put ## RND ## mpeg4_qpel8_h_lowpass(halfH, src, 8, stride, 9); \ 425 OPNAME ## mpeg4_qpel8_v_lowpass(dst, halfH, stride, 8); \ 428 static void OPNAME ## qpel16_mc10_c(uint8_t *dst, const uint8_t *src, \ 433 put ## RND ## mpeg4_qpel16_h_lowpass(half, src, 16, stride, 16); \ 434 OPNAME ## pixels16_l2_8(dst, src, half, stride, stride, 16, 16); \ 437 static void OPNAME ## qpel16_mc20_c(uint8_t *dst, const uint8_t *src, \ 440 OPNAME ## mpeg4_qpel16_h_lowpass(dst, src, stride, stride, 16); \ 443 static void OPNAME ## qpel16_mc30_c(uint8_t *dst, const uint8_t *src, \ 448 put ## RND ## mpeg4_qpel16_h_lowpass(half, src, 16, stride, 16); \ 449 OPNAME ## pixels16_l2_8(dst, src + 1, half, stride, stride, 16, 16); \ 452 static void OPNAME ## qpel16_mc01_c(uint8_t *dst, const uint8_t *src, \ 455 uint8_t full[24 * 17]; \ 458 copy_block17(full, src, 24, stride, 17); \ 459 put ## RND ## mpeg4_qpel16_v_lowpass(half, full, 16, 24); \ 460 OPNAME ## pixels16_l2_8(dst, full, half, stride, 24, 16, 16); \ 463 static void OPNAME ## qpel16_mc02_c(uint8_t *dst, const uint8_t *src, \ 466 uint8_t full[24 * 17]; \ 468 copy_block17(full, src, 24, stride, 17); \ 469 OPNAME ## mpeg4_qpel16_v_lowpass(dst, full, stride, 24); \ 472 static void OPNAME ## qpel16_mc03_c(uint8_t *dst, const uint8_t *src, \ 475 uint8_t full[24 * 17]; \ 478 copy_block17(full, src, 24, stride, 17); \ 479 put ## RND ## mpeg4_qpel16_v_lowpass(half, full, 16, 24); \ 480 OPNAME ## pixels16_l2_8(dst, full + 24, half, stride, 24, 16, 16); \ 483 void ff_ ## OPNAME ## qpel16_mc11_old_c(uint8_t *dst, const uint8_t *src, \ 486 uint8_t full[24 * 17]; \ 487 uint8_t halfH[272]; \ 488 uint8_t halfV[256]; \ 489 uint8_t halfHV[256]; \ 491 copy_block17(full, src, 24, stride, 17); \ 492 put ## RND ## mpeg4_qpel16_h_lowpass(halfH, full, 16, 24, 17); \ 493 put ## RND ## mpeg4_qpel16_v_lowpass(halfV, full, 16, 24); \ 494 put ## RND ## mpeg4_qpel16_v_lowpass(halfHV, halfH, 16, 16); \ 495 OPNAME ## pixels16_l4_8(dst, full, halfH, halfV, halfHV, \ 496 stride, 24, 16, 16, 16, 16); \ 499 static void OPNAME ## qpel16_mc11_c(uint8_t *dst, const uint8_t *src, \ 502 uint8_t full[24 * 17]; \ 503 uint8_t halfH[272]; \ 504 uint8_t halfHV[256]; \ 506 copy_block17(full, src, 24, stride, 17); \ 507 put ## RND ## mpeg4_qpel16_h_lowpass(halfH, full, 16, 24, 17); \ 508 put ## RND ## pixels16_l2_8(halfH, halfH, full, 16, 16, 24, 17); \ 509 put ## RND ## mpeg4_qpel16_v_lowpass(halfHV, halfH, 16, 16); \ 510 OPNAME ## pixels16_l2_8(dst, halfH, halfHV, stride, 16, 16, 16); \ 513 void ff_ ## OPNAME ## qpel16_mc31_old_c(uint8_t *dst, const uint8_t *src, \ 516 uint8_t full[24 * 17]; \ 517 uint8_t halfH[272]; \ 518 uint8_t halfV[256]; \ 519 uint8_t halfHV[256]; \ 521 copy_block17(full, src, 24, stride, 17); \ 522 put ## RND ## mpeg4_qpel16_h_lowpass(halfH, full, 16, 24, 17); \ 523 put ## RND ## mpeg4_qpel16_v_lowpass(halfV, full + 1, 16, 24); \ 524 put ## RND ## mpeg4_qpel16_v_lowpass(halfHV, halfH, 16, 16); \ 525 OPNAME ## pixels16_l4_8(dst, full + 1, halfH, halfV, halfHV, \ 526 stride, 24, 16, 16, 16, 16); \ 529 static void OPNAME ## qpel16_mc31_c(uint8_t *dst, const uint8_t *src, \ 532 uint8_t full[24 * 17]; \ 533 uint8_t halfH[272]; \ 534 uint8_t halfHV[256]; \ 536 copy_block17(full, src, 24, stride, 17); \ 537 put ## RND ## mpeg4_qpel16_h_lowpass(halfH, full, 16, 24, 17); \ 538 put ## RND ## pixels16_l2_8(halfH, halfH, full + 1, 16, 16, 24, 17); \ 539 put ## RND ## mpeg4_qpel16_v_lowpass(halfHV, halfH, 16, 16); \ 540 OPNAME ## pixels16_l2_8(dst, halfH, halfHV, stride, 16, 16, 16); \ 543 void ff_ ## OPNAME ## qpel16_mc13_old_c(uint8_t *dst, const uint8_t *src, \ 546 uint8_t full[24 * 17]; \ 547 uint8_t halfH[272]; \ 548 uint8_t halfV[256]; \ 549 uint8_t halfHV[256]; \ 551 copy_block17(full, src, 24, stride, 17); \ 552 put ## RND ## mpeg4_qpel16_h_lowpass(halfH, full, 16, 24, 17); \ 553 put ## RND ## mpeg4_qpel16_v_lowpass(halfV, full, 16, 24); \ 554 put ## RND ## mpeg4_qpel16_v_lowpass(halfHV, halfH, 16, 16); \ 555 OPNAME ## pixels16_l4_8(dst, full + 24, halfH + 16, halfV, halfHV, \ 556 stride, 24, 16, 16, 16, 16); \ 559 static void OPNAME ## qpel16_mc13_c(uint8_t *dst, const uint8_t *src, \ 562 uint8_t full[24 * 17]; \ 563 uint8_t halfH[272]; \ 564 uint8_t halfHV[256]; \ 566 copy_block17(full, src, 24, stride, 17); \ 567 put ## RND ## mpeg4_qpel16_h_lowpass(halfH, full, 16, 24, 17); \ 568 put ## RND ## pixels16_l2_8(halfH, halfH, full, 16, 16, 24, 17); \ 569 put ## RND ## mpeg4_qpel16_v_lowpass(halfHV, halfH, 16, 16); \ 570 OPNAME ## pixels16_l2_8(dst, halfH + 16, halfHV, stride, 16, 16, 16); \ 573 void ff_ ## OPNAME ## qpel16_mc33_old_c(uint8_t *dst, const uint8_t *src, \ 576 uint8_t full[24 * 17]; \ 577 uint8_t halfH[272]; \ 578 uint8_t halfV[256]; \ 579 uint8_t halfHV[256]; \ 581 copy_block17(full, src, 24, stride, 17); \ 582 put ## RND ## mpeg4_qpel16_h_lowpass(halfH, full, 16, 24, 17); \ 583 put ## RND ## mpeg4_qpel16_v_lowpass(halfV, full + 1, 16, 24); \ 584 put ## RND ## mpeg4_qpel16_v_lowpass(halfHV, halfH, 16, 16); \ 585 OPNAME ## pixels16_l4_8(dst, full + 25, halfH + 16, halfV, halfHV, \ 586 stride, 24, 16, 16, 16, 16); \ 589 static void OPNAME ## qpel16_mc33_c(uint8_t *dst, const uint8_t *src, \ 592 uint8_t full[24 * 17]; \ 593 uint8_t halfH[272]; \ 594 uint8_t halfHV[256]; \ 596 copy_block17(full, src, 24, stride, 17); \ 597 put ## RND ## mpeg4_qpel16_h_lowpass(halfH, full, 16, 24, 17); \ 598 put ## RND ## pixels16_l2_8(halfH, halfH, full + 1, 16, 16, 24, 17); \ 599 put ## RND ## mpeg4_qpel16_v_lowpass(halfHV, halfH, 16, 16); \ 600 OPNAME ## pixels16_l2_8(dst, halfH + 16, halfHV, stride, 16, 16, 16); \ 603 static void OPNAME ## qpel16_mc21_c(uint8_t *dst, const uint8_t *src, \ 606 uint8_t halfH[272]; \ 607 uint8_t halfHV[256]; \ 609 put ## RND ## mpeg4_qpel16_h_lowpass(halfH, src, 16, stride, 17); \ 610 put ## RND ## mpeg4_qpel16_v_lowpass(halfHV, halfH, 16, 16); \ 611 OPNAME ## pixels16_l2_8(dst, halfH, halfHV, stride, 16, 16, 16); \ 614 static void OPNAME ## qpel16_mc23_c(uint8_t *dst, const uint8_t *src, \ 617 uint8_t halfH[272]; \ 618 uint8_t halfHV[256]; \ 620 put ## RND ## mpeg4_qpel16_h_lowpass(halfH, src, 16, stride, 17); \ 621 put ## RND ## mpeg4_qpel16_v_lowpass(halfHV, halfH, 16, 16); \ 622 OPNAME ## pixels16_l2_8(dst, halfH + 16, halfHV, stride, 16, 16, 16); \ 625 void ff_ ## OPNAME ## qpel16_mc12_old_c(uint8_t *dst, const uint8_t *src, \ 628 uint8_t full[24 * 17]; \ 629 uint8_t halfH[272]; \ 630 uint8_t halfV[256]; \ 631 uint8_t halfHV[256]; \ 633 copy_block17(full, src, 24, stride, 17); \ 634 put ## RND ## mpeg4_qpel16_h_lowpass(halfH, full, 16, 24, 17); \ 635 put ## RND ## mpeg4_qpel16_v_lowpass(halfV, full, 16, 24); \ 636 put ## RND ## mpeg4_qpel16_v_lowpass(halfHV, halfH, 16, 16); \ 637 OPNAME ## pixels16_l2_8(dst, halfV, halfHV, stride, 16, 16, 16); \ 640 static void OPNAME ## qpel16_mc12_c(uint8_t *dst, const uint8_t *src, \ 643 uint8_t full[24 * 17]; \ 644 uint8_t halfH[272]; \ 646 copy_block17(full, src, 24, stride, 17); \ 647 put ## RND ## mpeg4_qpel16_h_lowpass(halfH, full, 16, 24, 17); \ 648 put ## RND ## pixels16_l2_8(halfH, halfH, full, 16, 16, 24, 17); \ 649 OPNAME ## mpeg4_qpel16_v_lowpass(dst, halfH, stride, 16); \ 652 void ff_ ## OPNAME ## qpel16_mc32_old_c(uint8_t *dst, const uint8_t *src, \ 655 uint8_t full[24 * 17]; \ 656 uint8_t halfH[272]; \ 657 uint8_t halfV[256]; \ 658 uint8_t halfHV[256]; \ 660 copy_block17(full, src, 24, stride, 17); \ 661 put ## RND ## mpeg4_qpel16_h_lowpass(halfH, full, 16, 24, 17); \ 662 put ## RND ## mpeg4_qpel16_v_lowpass(halfV, full + 1, 16, 24); \ 663 put ## RND ## mpeg4_qpel16_v_lowpass(halfHV, halfH, 16, 16); \ 664 OPNAME ## pixels16_l2_8(dst, halfV, halfHV, stride, 16, 16, 16); \ 667 static void OPNAME ## qpel16_mc32_c(uint8_t *dst, const uint8_t *src, \ 670 uint8_t full[24 * 17]; \ 671 uint8_t halfH[272]; \ 673 copy_block17(full, src, 24, stride, 17); \ 674 put ## RND ## mpeg4_qpel16_h_lowpass(halfH, full, 16, 24, 17); \ 675 put ## RND ## pixels16_l2_8(halfH, halfH, full + 1, 16, 16, 24, 17); \ 676 OPNAME ## mpeg4_qpel16_v_lowpass(dst, halfH, stride, 16); \ 679 static void OPNAME ## qpel16_mc22_c(uint8_t *dst, const uint8_t *src, \ 682 uint8_t halfH[272]; \ 684 put ## RND ## mpeg4_qpel16_h_lowpass(halfH, src, 16, stride, 17); \ 685 OPNAME ## mpeg4_qpel16_v_lowpass(dst, halfH, stride, 16); \ 688 #define op_avg(a, b) a = (((a) + cm[((b) + 16) >> 5] + 1) >> 1) 689 #define op_put(a, b) a = cm[((b) + 16) >> 5] 690 #define op_put_no_rnd(a, b) a = cm[((b) + 15) >> 5] 702 put_pixels8_8_c(dst, src, stride, 8);
707 avg_pixels8_8_c(dst, src, stride, 8);
712 put_pixels16_8_c(dst, src, stride, 16);
717 avg_pixels16_8_c(dst, src, stride, 16);
720 #define put_qpel8_mc00_c ff_put_pixels8x8_c 721 #define avg_qpel8_mc00_c ff_avg_pixels8x8_c 722 #define put_qpel16_mc00_c ff_put_pixels16x16_c 723 #define avg_qpel16_mc00_c ff_avg_pixels16x16_c 724 #define put_no_rnd_qpel8_mc00_c ff_put_pixels8x8_c 725 #define put_no_rnd_qpel16_mc00_c ff_put_pixels16x16_c 728 int dst_stride,
int src_stride1,
int src_stride2,
731 put_pixels8_l2_8(dst, src1, src2, dst_stride, src_stride1, src_stride2, h);
737 #define dspfunc(PFX, IDX, NUM) \ 738 c->PFX ## _pixels_tab[IDX][0] = PFX ## NUM ## _mc00_c; \ 739 c->PFX ## _pixels_tab[IDX][1] = PFX ## NUM ## _mc10_c; \ 740 c->PFX ## _pixels_tab[IDX][2] = PFX ## NUM ## _mc20_c; \ 741 c->PFX ## _pixels_tab[IDX][3] = PFX ## NUM ## _mc30_c; \ 742 c->PFX ## _pixels_tab[IDX][4] = PFX ## NUM ## _mc01_c; \ 743 c->PFX ## _pixels_tab[IDX][5] = PFX ## NUM ## _mc11_c; \ 744 c->PFX ## _pixels_tab[IDX][6] = PFX ## NUM ## _mc21_c; \ 745 c->PFX ## _pixels_tab[IDX][7] = PFX ## NUM ## _mc31_c; \ 746 c->PFX ## _pixels_tab[IDX][8] = PFX ## NUM ## _mc02_c; \ 747 c->PFX ## _pixels_tab[IDX][9] = PFX ## NUM ## _mc12_c; \ 748 c->PFX ## _pixels_tab[IDX][10] = PFX ## NUM ## _mc22_c; \ 749 c->PFX ## _pixels_tab[IDX][11] = PFX ## NUM ## _mc32_c; \ 750 c->PFX ## _pixels_tab[IDX][12] = PFX ## NUM ## _mc03_c; \ 751 c->PFX ## _pixels_tab[IDX][13] = PFX ## NUM ## _mc13_c; \ 752 c->PFX ## _pixels_tab[IDX][14] = PFX ## NUM ## _mc23_c; \ 753 c->PFX ## _pixels_tab[IDX][15] = PFX ## NUM ## _mc33_c 758 dspfunc(put_no_rnd_qpel, 0, 16);
759 dspfunc(put_no_rnd_qpel, 1, 8);
void ff_qpeldsp_init_x86(QpelDSPContext *c)
void ff_put_pixels8_l2_8(uint8_t *dst, const uint8_t *src1, const uint8_t *src2, int dst_stride, int src_stride1, int src_stride2, int h)
Macro definitions for various function/variable attributes.
#define op_put_no_rnd(a, b)
void ff_put_pixels8x8_c(uint8_t *dst, const uint8_t *src, ptrdiff_t stride)
#define QPEL_MC(r, OPNAME, RND, OP)
quarterpel DSP function templates
void ff_avg_pixels16x16_c(uint8_t *dst, const uint8_t *src, ptrdiff_t stride)
void ff_put_pixels16x16_c(uint8_t *dst, const uint8_t *src, ptrdiff_t stride)
#define dspfunc(PFX, IDX, NUM)
av_cold void ff_qpeldsp_init(QpelDSPContext *c)
void ff_avg_pixels8x8_c(uint8_t *dst, const uint8_t *src, ptrdiff_t stride)