| OLD | NEW | 
|---|
| 1 /* | 1 /* | 
| 2  *  Copyright (c) 2010 The WebM project authors. All Rights Reserved. | 2  *  Copyright (c) 2010 The WebM project authors. All Rights Reserved. | 
| 3  * | 3  * | 
| 4  *  Use of this source code is governed by a BSD-style license | 4  *  Use of this source code is governed by a BSD-style license | 
| 5  *  that can be found in the LICENSE file in the root of the source | 5  *  that can be found in the LICENSE file in the root of the source | 
| 6  *  tree. An additional intellectual property rights grant can be found | 6  *  tree. An additional intellectual property rights grant can be found | 
| 7  *  in the file PATENTS.  All contributing project authors may | 7  *  in the file PATENTS.  All contributing project authors may | 
| 8  *  be found in the AUTHORS file in the root of the source tree. | 8  *  be found in the AUTHORS file in the root of the source tree. | 
| 9  */ | 9  */ | 
| 10 | 10 | 
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 94         int rp, \ | 94         int rp, \ | 
| 95         unsigned long *sum_s, \ | 95         unsigned long *sum_s, \ | 
| 96         unsigned long *sum_r, \ | 96         unsigned long *sum_r, \ | 
| 97         unsigned long *sum_sq_s, \ | 97         unsigned long *sum_sq_s, \ | 
| 98         unsigned long *sum_sq_r, \ | 98         unsigned long *sum_sq_r, \ | 
| 99         unsigned long *sum_sxr \ | 99         unsigned long *sum_sxr \ | 
| 100       ); | 100       ); | 
| 101 | 101 | 
| 102 #define prototype_getmbss(sym) unsigned int (sym)(const short *) | 102 #define prototype_getmbss(sym) unsigned int (sym)(const short *) | 
| 103 | 103 | 
|  | 104 #define prototype_get16x16prederror(sym)\ | 
|  | 105     unsigned int (sym)\ | 
|  | 106     (\ | 
|  | 107      const unsigned char *src_ptr, \ | 
|  | 108      int source_stride, \ | 
|  | 109      const unsigned char *ref_ptr, \ | 
|  | 110      int  ref_stride \ | 
|  | 111     ) | 
|  | 112 | 
| 104 #if ARCH_X86 || ARCH_X86_64 | 113 #if ARCH_X86 || ARCH_X86_64 | 
| 105 #include "x86/variance_x86.h" | 114 #include "x86/variance_x86.h" | 
| 106 #endif | 115 #endif | 
| 107 | 116 | 
| 108 #if ARCH_ARM | 117 #if ARCH_ARM | 
| 109 #include "arm/variance_arm.h" | 118 #include "arm/variance_arm.h" | 
| 110 #endif | 119 #endif | 
| 111 | 120 | 
| 112 #ifndef vp8_variance_sad4x4 | 121 #ifndef vp8_variance_sad4x4 | 
| 113 #define vp8_variance_sad4x4 vp8_sad4x4_c | 122 #define vp8_variance_sad4x4 vp8_sad4x4_c | 
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 206 #ifndef vp8_variance_sad8x16x4d | 215 #ifndef vp8_variance_sad8x16x4d | 
| 207 #define vp8_variance_sad8x16x4d vp8_sad8x16x4d_c | 216 #define vp8_variance_sad8x16x4d vp8_sad8x16x4d_c | 
| 208 #endif | 217 #endif | 
| 209 extern prototype_sad_multi_dif_address(vp8_variance_sad8x16x4d); | 218 extern prototype_sad_multi_dif_address(vp8_variance_sad8x16x4d); | 
| 210 | 219 | 
| 211 #ifndef vp8_variance_sad4x4x4d | 220 #ifndef vp8_variance_sad4x4x4d | 
| 212 #define vp8_variance_sad4x4x4d vp8_sad4x4x4d_c | 221 #define vp8_variance_sad4x4x4d vp8_sad4x4x4d_c | 
| 213 #endif | 222 #endif | 
| 214 extern prototype_sad_multi_dif_address(vp8_variance_sad4x4x4d); | 223 extern prototype_sad_multi_dif_address(vp8_variance_sad4x4x4d); | 
| 215 | 224 | 
|  | 225 #if ARCH_X86 || ARCH_X86_64 | 
|  | 226 #ifndef vp8_variance_copy32xn | 
|  | 227 #define vp8_variance_copy32xn vp8_copy32xn_c | 
|  | 228 #endif | 
|  | 229 extern prototype_sad(vp8_variance_copy32xn); | 
|  | 230 #endif | 
|  | 231 | 
| 216 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- | 232 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- | 
| 217 | 233 | 
| 218 #ifndef vp8_variance_var4x4 | 234 #ifndef vp8_variance_var4x4 | 
| 219 #define vp8_variance_var4x4 vp8_variance4x4_c | 235 #define vp8_variance_var4x4 vp8_variance4x4_c | 
| 220 #endif | 236 #endif | 
| 221 extern prototype_variance(vp8_variance_var4x4); | 237 extern prototype_variance(vp8_variance_var4x4); | 
| 222 | 238 | 
| 223 #ifndef vp8_variance_var8x8 | 239 #ifndef vp8_variance_var8x8 | 
| 224 #define vp8_variance_var8x8 vp8_variance8x8_c | 240 #define vp8_variance_var8x8 vp8_variance8x8_c | 
| 225 #endif | 241 #endif | 
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 292 #ifndef vp8_variance_getmbss | 308 #ifndef vp8_variance_getmbss | 
| 293 #define vp8_variance_getmbss vp8_get_mb_ss_c | 309 #define vp8_variance_getmbss vp8_get_mb_ss_c | 
| 294 #endif | 310 #endif | 
| 295 extern prototype_getmbss(vp8_variance_getmbss); | 311 extern prototype_getmbss(vp8_variance_getmbss); | 
| 296 | 312 | 
| 297 #ifndef vp8_variance_mse16x16 | 313 #ifndef vp8_variance_mse16x16 | 
| 298 #define vp8_variance_mse16x16 vp8_mse16x16_c | 314 #define vp8_variance_mse16x16 vp8_mse16x16_c | 
| 299 #endif | 315 #endif | 
| 300 extern prototype_variance(vp8_variance_mse16x16); | 316 extern prototype_variance(vp8_variance_mse16x16); | 
| 301 | 317 | 
| 302 #ifndef vp8_variance_get16x16prederror |  | 
| 303 #define vp8_variance_get16x16prederror vp8_get16x16pred_error_c |  | 
| 304 #endif |  | 
| 305 extern prototype_sad(vp8_variance_get16x16prederror); |  | 
| 306 |  | 
| 307 #ifndef vp8_variance_get8x8var |  | 
| 308 #define vp8_variance_get8x8var vp8_get8x8var_c |  | 
| 309 #endif |  | 
| 310 extern prototype_variance2(vp8_variance_get8x8var); |  | 
| 311 |  | 
| 312 #ifndef vp8_variance_get16x16var |  | 
| 313 #define vp8_variance_get16x16var vp8_get16x16var_c |  | 
| 314 #endif |  | 
| 315 extern prototype_variance2(vp8_variance_get16x16var); |  | 
| 316 |  | 
| 317 #ifndef vp8_variance_get4x4sse_cs | 318 #ifndef vp8_variance_get4x4sse_cs | 
| 318 #define vp8_variance_get4x4sse_cs vp8_get4x4sse_cs_c | 319 #define vp8_variance_get4x4sse_cs vp8_get4x4sse_cs_c | 
| 319 #endif | 320 #endif | 
| 320 extern prototype_sad(vp8_variance_get4x4sse_cs); | 321 extern prototype_get16x16prederror(vp8_variance_get4x4sse_cs); | 
| 321 | 322 | 
| 322 #ifndef vp8_ssimpf | 323 #ifndef vp8_ssimpf | 
| 323 #define vp8_ssimpf ssim_parms_c | 324 #define vp8_ssimpf ssim_parms_c | 
| 324 #endif | 325 #endif | 
| 325 extern prototype_ssimpf(vp8_ssimpf) | 326 extern prototype_ssimpf(vp8_ssimpf) | 
| 326 | 327 | 
| 327 #ifndef vp8_ssimpf_8x8 | 328 #ifndef vp8_ssimpf_8x8 | 
| 328 #define vp8_ssimpf_8x8 ssim_parms_8x8_c | 329 #define vp8_ssimpf_8x8 ssim_parms_8x8_c | 
| 329 #endif | 330 #endif | 
| 330 extern prototype_ssimpf(vp8_ssimpf_8x8) | 331 extern prototype_ssimpf(vp8_ssimpf_8x8) | 
| 331 | 332 | 
| 332 typedef prototype_sad(*vp8_sad_fn_t); | 333 typedef prototype_sad(*vp8_sad_fn_t); | 
| 333 typedef prototype_sad_multi_same_address(*vp8_sad_multi_fn_t); | 334 typedef prototype_sad_multi_same_address(*vp8_sad_multi_fn_t); | 
| 334 typedef prototype_sad_multi_same_address_1(*vp8_sad_multi1_fn_t); | 335 typedef prototype_sad_multi_same_address_1(*vp8_sad_multi1_fn_t); | 
| 335 typedef prototype_sad_multi_dif_address(*vp8_sad_multi_d_fn_t); | 336 typedef prototype_sad_multi_dif_address(*vp8_sad_multi_d_fn_t); | 
| 336 typedef prototype_variance(*vp8_variance_fn_t); | 337 typedef prototype_variance(*vp8_variance_fn_t); | 
| 337 typedef prototype_variance2(*vp8_variance2_fn_t); | 338 typedef prototype_variance2(*vp8_variance2_fn_t); | 
| 338 typedef prototype_subpixvariance(*vp8_subpixvariance_fn_t); | 339 typedef prototype_subpixvariance(*vp8_subpixvariance_fn_t); | 
| 339 typedef prototype_getmbss(*vp8_getmbss_fn_t); | 340 typedef prototype_getmbss(*vp8_getmbss_fn_t); | 
| 340 | 341 typedef prototype_ssimpf(*vp8_ssimpf_fn_t); | 
| 341 typedef prototype_ssimpf(*vp8_ssimpf_fn_t) | 342 typedef prototype_get16x16prederror(*vp8_get16x16prederror_fn_t); | 
| 342 |  | 
| 343 | 343 | 
| 344 typedef struct | 344 typedef struct | 
| 345 { | 345 { | 
| 346     vp8_sad_fn_t             sad4x4; | 346     vp8_sad_fn_t             sad4x4; | 
| 347     vp8_sad_fn_t             sad8x8; | 347     vp8_sad_fn_t             sad8x8; | 
| 348     vp8_sad_fn_t             sad8x16; | 348     vp8_sad_fn_t             sad8x16; | 
| 349     vp8_sad_fn_t             sad16x8; | 349     vp8_sad_fn_t             sad16x8; | 
| 350     vp8_sad_fn_t             sad16x16; | 350     vp8_sad_fn_t             sad16x16; | 
| 351 | 351 | 
| 352     vp8_variance_fn_t        var4x4; | 352     vp8_variance_fn_t        var4x4; | 
| 353     vp8_variance_fn_t        var8x8; | 353     vp8_variance_fn_t        var8x8; | 
| 354     vp8_variance_fn_t        var8x16; | 354     vp8_variance_fn_t        var8x16; | 
| 355     vp8_variance_fn_t        var16x8; | 355     vp8_variance_fn_t        var16x8; | 
| 356     vp8_variance_fn_t        var16x16; | 356     vp8_variance_fn_t        var16x16; | 
| 357 | 357 | 
| 358     vp8_subpixvariance_fn_t  subpixvar4x4; | 358     vp8_subpixvariance_fn_t  subpixvar4x4; | 
| 359     vp8_subpixvariance_fn_t  subpixvar8x8; | 359     vp8_subpixvariance_fn_t  subpixvar8x8; | 
| 360     vp8_subpixvariance_fn_t  subpixvar8x16; | 360     vp8_subpixvariance_fn_t  subpixvar8x16; | 
| 361     vp8_subpixvariance_fn_t  subpixvar16x8; | 361     vp8_subpixvariance_fn_t  subpixvar16x8; | 
| 362     vp8_subpixvariance_fn_t  subpixvar16x16; | 362     vp8_subpixvariance_fn_t  subpixvar16x16; | 
| 363     vp8_variance_fn_t        halfpixvar16x16_h; | 363     vp8_variance_fn_t        halfpixvar16x16_h; | 
| 364     vp8_variance_fn_t        halfpixvar16x16_v; | 364     vp8_variance_fn_t        halfpixvar16x16_v; | 
| 365     vp8_variance_fn_t        halfpixvar16x16_hv; | 365     vp8_variance_fn_t        halfpixvar16x16_hv; | 
| 366     vp8_subpixvariance_fn_t  subpixmse16x16; | 366     vp8_subpixvariance_fn_t  subpixmse16x16; | 
| 367 | 367 | 
| 368     vp8_getmbss_fn_t         getmbss; | 368     vp8_getmbss_fn_t         getmbss; | 
| 369     vp8_variance_fn_t        mse16x16; | 369     vp8_variance_fn_t        mse16x16; | 
| 370 | 370 | 
| 371     vp8_sad_fn_t             get16x16prederror; | 371     vp8_get16x16prederror_fn_t get4x4sse_cs; | 
| 372     vp8_variance2_fn_t       get8x8var; |  | 
| 373     vp8_variance2_fn_t       get16x16var; |  | 
| 374     vp8_sad_fn_t             get4x4sse_cs; |  | 
| 375 | 372 | 
| 376     vp8_sad_multi_fn_t       sad16x16x3; | 373     vp8_sad_multi_fn_t       sad16x16x3; | 
| 377     vp8_sad_multi_fn_t       sad16x8x3; | 374     vp8_sad_multi_fn_t       sad16x8x3; | 
| 378     vp8_sad_multi_fn_t       sad8x16x3; | 375     vp8_sad_multi_fn_t       sad8x16x3; | 
| 379     vp8_sad_multi_fn_t       sad8x8x3; | 376     vp8_sad_multi_fn_t       sad8x8x3; | 
| 380     vp8_sad_multi_fn_t       sad4x4x3; | 377     vp8_sad_multi_fn_t       sad4x4x3; | 
| 381 | 378 | 
| 382     vp8_sad_multi1_fn_t      sad16x16x8; | 379     vp8_sad_multi1_fn_t      sad16x16x8; | 
| 383     vp8_sad_multi1_fn_t      sad16x8x8; | 380     vp8_sad_multi1_fn_t      sad16x8x8; | 
| 384     vp8_sad_multi1_fn_t      sad8x16x8; | 381     vp8_sad_multi1_fn_t      sad8x16x8; | 
| 385     vp8_sad_multi1_fn_t      sad8x8x8; | 382     vp8_sad_multi1_fn_t      sad8x8x8; | 
| 386     vp8_sad_multi1_fn_t      sad4x4x8; | 383     vp8_sad_multi1_fn_t      sad4x4x8; | 
| 387 | 384 | 
| 388     vp8_sad_multi_d_fn_t     sad16x16x4d; | 385     vp8_sad_multi_d_fn_t     sad16x16x4d; | 
| 389     vp8_sad_multi_d_fn_t     sad16x8x4d; | 386     vp8_sad_multi_d_fn_t     sad16x8x4d; | 
| 390     vp8_sad_multi_d_fn_t     sad8x16x4d; | 387     vp8_sad_multi_d_fn_t     sad8x16x4d; | 
| 391     vp8_sad_multi_d_fn_t     sad8x8x4d; | 388     vp8_sad_multi_d_fn_t     sad8x8x4d; | 
| 392     vp8_sad_multi_d_fn_t     sad4x4x4d; | 389     vp8_sad_multi_d_fn_t     sad4x4x4d; | 
| 393 | 390 | 
| 394 #if CONFIG_PSNR | 391 #if ARCH_X86 || ARCH_X86_64 | 
|  | 392     vp8_sad_fn_t             copy32xn; | 
|  | 393 #endif | 
|  | 394 | 
|  | 395 #if CONFIG_INTERNAL_STATS | 
| 395     vp8_ssimpf_fn_t          ssimpf_8x8; | 396     vp8_ssimpf_fn_t          ssimpf_8x8; | 
| 396     vp8_ssimpf_fn_t          ssimpf; | 397     vp8_ssimpf_fn_t          ssimpf; | 
| 397 #endif | 398 #endif | 
| 398 | 399 | 
| 399 } vp8_variance_rtcd_vtable_t; | 400 } vp8_variance_rtcd_vtable_t; | 
| 400 | 401 | 
| 401 typedef struct | 402 typedef struct | 
| 402 { | 403 { | 
| 403     vp8_sad_fn_t            sdf; | 404     vp8_sad_fn_t            sdf; | 
| 404     vp8_variance_fn_t       vf; | 405     vp8_variance_fn_t       vf; | 
| 405     vp8_subpixvariance_fn_t svf; | 406     vp8_subpixvariance_fn_t svf; | 
| 406     vp8_variance_fn_t       svf_halfpix_h; | 407     vp8_variance_fn_t       svf_halfpix_h; | 
| 407     vp8_variance_fn_t       svf_halfpix_v; | 408     vp8_variance_fn_t       svf_halfpix_v; | 
| 408     vp8_variance_fn_t       svf_halfpix_hv; | 409     vp8_variance_fn_t       svf_halfpix_hv; | 
| 409     vp8_sad_multi_fn_t      sdx3f; | 410     vp8_sad_multi_fn_t      sdx3f; | 
| 410     vp8_sad_multi1_fn_t     sdx8f; | 411     vp8_sad_multi1_fn_t     sdx8f; | 
| 411     vp8_sad_multi_d_fn_t    sdx4df; | 412     vp8_sad_multi_d_fn_t    sdx4df; | 
| 412 | 413 #if ARCH_X86 || ARCH_X86_64 | 
|  | 414     vp8_sad_fn_t            copymem; | 
|  | 415 #endif | 
| 413 } vp8_variance_fn_ptr_t; | 416 } vp8_variance_fn_ptr_t; | 
| 414 | 417 | 
| 415 #if CONFIG_RUNTIME_CPU_DETECT | 418 #if CONFIG_RUNTIME_CPU_DETECT | 
| 416 #define VARIANCE_INVOKE(ctx,fn) (ctx)->fn | 419 #define VARIANCE_INVOKE(ctx,fn) (ctx)->fn | 
| 417 #else | 420 #else | 
| 418 #define VARIANCE_INVOKE(ctx,fn) vp8_variance_##fn | 421 #define VARIANCE_INVOKE(ctx,fn) vp8_variance_##fn | 
| 419 #endif | 422 #endif | 
| 420 | 423 | 
| 421 #endif | 424 #endif | 
| OLD | NEW | 
|---|