Skip to content

Commit 1f0dced

Browse files
author
Erik Språng
committed
Fix SumOfFrame for extremely wide frames
1 parent 3bc90ba commit 1f0dced

3 files changed

Lines changed: 6 additions & 2 deletions

File tree

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ endif
7171

7272
ifeq ($(USE_ASAN), Yes)
7373
CFLAGS += -fsanitize=address
74+
CXXFLAGS += -fsanitize=address
7475
LDFLAGS += -fsanitize=address
7576
endif
7677

codec/encoder/core/x86/sample_sc.asm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ WIDTH_LOOP:
127127
psadbw xmm2, xmm0
128128
psubd xmm1, xmm2
129129
movd eax, xmm1
130-
mov cx, [edi]
130+
movzx ecx, word [edi]
131131
add eax, ecx
132132

133133
mov [edi+ebp*2], ax
@@ -906,7 +906,7 @@ WIDTH_LOOP:
906906
psadbw xmm2, xmm0
907907
psubd xmm1, xmm2
908908
movd r2d, xmm1
909-
mov r6w, [r4]
909+
movzx r6d, word [r4]
910910
add r2d, r6d
911911
mov [r4+r1*2], r2w
912912
inc dword [r5+r2*4]

test/encoder/EncUT_SVC_me.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,9 @@ GENERATE_SumOfFrame (SumOf8x8BlockOfFrame_ref, SumOf8x8BlockOfFrame_sse2, 6, 320
283283
GENERATE_SumOfFrame (SumOf16x16BlockOfFrame_ref, SumOf16x16BlockOfFrame_sse2, 6, 320, WELS_CPU_SSE2)
284284
GENERATE_SumOfFrame (SumOf8x8BlockOfFrame_ref, SumOf8x8BlockOfFrame_sse2, 640, 320, WELS_CPU_SSE2)
285285
GENERATE_SumOfFrame (SumOf16x16BlockOfFrame_ref, SumOf16x16BlockOfFrame_sse2, 640, 320, WELS_CPU_SSE2)
286+
GENERATE_SumOfFrame (SumOf8x8BlockOfFrame_ref, SumOf8x8BlockOfFrame_sse2, 21840, 16, WELS_CPU_SSE2)
287+
GENERATE_SumOfFrame (SumOf16x16BlockOfFrame_ref, SumOf16x16BlockOfFrame_sse2, 21840, 16, WELS_CPU_SSE2)
288+
286289

287290
GENERATE_SumOfFrame (SumOf8x8BlockOfFrame_ref, SumOf8x8BlockOfFrame_sse4, 8, 2, WELS_CPU_SSE41)
288291
GENERATE_SumOfFrame (SumOf16x16BlockOfFrame_ref, SumOf16x16BlockOfFrame_sse4, 16, 2, WELS_CPU_SSE41)

0 commit comments

Comments
 (0)