326 |
; const uint8_t * const src1, |
; const uint8_t * const src1, |
327 |
; const uint8_t * const src2, |
; const uint8_t * const src2, |
328 |
; const uint32_t stride, |
; const uint32_t stride, |
329 |
; const uint32_t rounding); |
; const uint32_t rounding, |
330 |
|
; const uint32_t height); |
331 |
; |
; |
332 |
;=========================================================================== |
;=========================================================================== |
333 |
|
|
432 |
push ebx |
push ebx |
433 |
|
|
434 |
mov eax, [esp + 4 + 20] ; rounding |
mov eax, [esp + 4 + 20] ; rounding |
435 |
|
test eax, eax |
436 |
|
|
437 |
|
jnz near .rounding1 |
438 |
|
|
439 |
|
mov eax, [esp + 4 + 24] ; height -> eax |
440 |
|
sub eax, 8 |
441 |
test eax, eax |
test eax, eax |
442 |
|
|
443 |
mov ecx, [esp + 4 + 4] ; dst -> edi |
mov ecx, [esp + 4 + 4] ; dst -> edi |
447 |
|
|
448 |
movq mm7, [mmx_one] |
movq mm7, [mmx_one] |
449 |
|
|
450 |
jnz near .rounding1 |
jz near .start0 |
451 |
|
|
452 |
|
AVG2_MMX_RND0 |
453 |
|
lea ecx, [ecx+2*edx] |
454 |
|
|
455 |
|
.start0 |
456 |
|
|
457 |
AVG2_MMX_RND0 |
AVG2_MMX_RND0 |
458 |
lea ecx, [ecx+2*edx] |
lea ecx, [ecx+2*edx] |
466 |
ret |
ret |
467 |
|
|
468 |
.rounding1 |
.rounding1 |
469 |
|
mov eax, [esp + 4 + 24] ; height -> eax |
470 |
|
sub eax, 8 |
471 |
|
test eax, eax |
472 |
|
|
473 |
|
mov ecx, [esp + 4 + 4] ; dst -> edi |
474 |
|
mov eax, [esp + 4 + 8] ; src1 -> esi |
475 |
|
mov ebx, [esp + 4 + 12] ; src2 -> eax |
476 |
|
mov edx, [esp + 4 + 16] ; stride -> edx |
477 |
|
|
478 |
|
movq mm7, [mmx_one] |
479 |
|
|
480 |
|
jz near .start1 |
481 |
|
|
482 |
|
AVG2_MMX_RND1 |
483 |
|
lea ecx, [ecx+2*edx] |
484 |
|
|
485 |
|
.start1 |
486 |
|
|
487 |
AVG2_MMX_RND1 |
AVG2_MMX_RND1 |
488 |
lea ecx, [ecx+2*edx] |
lea ecx, [ecx+2*edx] |
489 |
AVG2_MMX_RND1 |
AVG2_MMX_RND1 |