Commit 7361ef73 authored by Peter de Rivaz's avatar Peter de Rivaz Committed by Julia Robson

Fix for issue 1114 compile error

In 32-bit build with --enable-shared, there is a lot of
register pressure and register src_strideq is reused.
The code needs to use the stack based version of src_stride,
but this doesn't compile when used in an lea instruction.

This patch also fixes a related segmentation fault caused by the
implementation using src_strideq even though it has been

This patch also fixes the HBD subpel variance tests that fail
when compiled without disable-optimizations.
These failures were caused by local variables in the assembler
routines colliding with the caller's stack frame.

Change-Id: Ice9d4dafdcbdc6038ad5ee7c1c09a8f06deca362
parent 2404e329
......@@ -79,20 +79,13 @@ SECTION .text
%if ARCH_X86=1 && CONFIG_PIC=1
lea srcq, [srcq + src_stridemp*2]
add srcq, src_stridemp
add srcq, src_stridemp
lea srcq, [srcq + src_strideq*2]
%if ARCH_X86=1 && CONFIG_PIC=1
lea srcq, [srcq + src_stridemp*4]
lea srcq, [srcq + src_strideq*4]
%macro SUBPEL_VARIANCE 1-2 0 ; W
%define bilin_filter_m bilin_filter_m_sse2
%define filter_idx_shift 5
......@@ -984,8 +977,9 @@ SECTION .text
movu m2, [srcq]
movu m4, [srcq+2]
movu m3, [srcq+src_strideq*2]
movu m5, [srcq+src_strideq*2+2]
movu m3, [srcq]
movu m5, [srcq+2]
pmullw m2, filter_x_a
pmullw m4, filter_x_b
paddw m2, filter_rnd
......@@ -1018,7 +1012,7 @@ SECTION .text
SUM_SSE m0, m2, m4, m3, m6, m7
mova m0, m5
lea dstq, [dstq + dst_strideq * 4]
%if %2 == 1 ; avg
add secq, sec_str
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment