1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-08-04 22:03:09 +02:00

avfilter/x86/vf_blackdetect: don't use rax to return a 32bit integer

Fixes compilation on x86_32.

Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
James Almer
2025-07-18 13:00:22 -03:00
parent a218cafe4d
commit f263192f0e

View File

@ -35,12 +35,12 @@ cglobal blackdetect_%1, 5, 7, 2, src, stride, width, height, threshold
%endif %endif
add srcq, widthq add srcq, widthq
neg widthq neg widthq
xor r4, r4 xor r4d, r4d
mov r5, widthq mov r5, widthq
jmp .start jmp .start
.loop: .loop:
popcnt r6d, r6d popcnt r6d, r6d
add r4, r6 add r4d, r6d
.start: .start:
movu m0, [srcq + r5] movu m0, [srcq + r5]
%if %1 == 8 %if %1 == 8
@ -56,15 +56,15 @@ cglobal blackdetect_%1, 5, 7, 2, src, stride, width, height, threshold
; handle tail by shifting away unused high elements ; handle tail by shifting away unused high elements
shlx r6d, r6d, r5d shlx r6d, r6d, r5d
popcnt r6d, r6d popcnt r6d, r6d
add r4, r6 add r4d, r6d
add srcq, strideq add srcq, strideq
mov r5, widthq mov r5, widthq
dec heightq dec heightq
jg .start jg .start
%if %1 > 8 %if %1 > 8
shr r4, 1 shr r4d, 1
%endif %endif
mov rax, r4 mov eax, r4d
RET RET
%endmacro %endmacro