Revision ecc7efbb

View differences:

libavcodec/x86/h264_intrapred.asm
1954 1954
%endif
1955 1955

  
1956 1956
;-----------------------------------------------------------------------------
1957
;void pred8x8l_vertical_left(uint8_t *src, int has_topleft, int has_topright, int stride)
1958
;-----------------------------------------------------------------------------
1959
%ifdef CONFIG_GPL
1960
%macro PRED8x8L_VERTICAL_LEFT 1
1961
cglobal pred8x8l_vertical_left_%1, 4,4
1962
    sub          r0, r3
1963
    movq        mm0, [r0-8]
1964
    movq        mm3, [r0]
1965
    movq        mm1, [r0+8]
1966
    movq        mm2, mm3
1967
    movq        mm4, mm3
1968
    PALIGNR     mm2, mm0, 7, mm0
1969
    PALIGNR     mm1, mm4, 1, mm4
1970
    test         r1, r1
1971
    jz .fix_lt_2
1972
    test         r2, r2
1973
    jz .fix_tr_1
1974
    jmp .do_top
1975
.fix_lt_2:
1976
    movq        mm5, mm3
1977
    pxor        mm5, mm2
1978
    psllq       mm5, 56
1979
    psrlq       mm5, 56
1980
    pxor        mm2, mm5
1981
    test         r2, r2
1982
    jnz .do_top
1983
.fix_tr_1:
1984
    movq        mm5, mm3
1985
    pxor        mm5, mm1
1986
    psrlq       mm5, 56
1987
    psllq       mm5, 56
1988
    pxor        mm1, mm5
1989
    jmp .do_top
1990
.fix_tr_2:
1991
    punpckhbw   mm3, mm3
1992
    pshufw      mm1, mm3, 0xFF
1993
    jmp .do_topright
1994
.do_top:
1995
    PRED4x4_LOWPASS mm4, mm2, mm1, mm3, mm5
1996
    movq2dq    xmm4, mm4
1997
    test         r2, r2
1998
    jz .fix_tr_2
1999
    movq        mm0, [r0+8]
2000
    movq        mm5, mm0
2001
    movq        mm2, mm0
2002
    movq        mm4, mm0
2003
    psrlq       mm5, 56
2004
    PALIGNR     mm2, mm3, 7, mm3
2005
    PALIGNR     mm5, mm4, 1, mm4
2006
    PRED4x4_LOWPASS mm1, mm2, mm5, mm0, mm4
2007
.do_topright:
2008
    movq2dq   xmm3, mm1
2009
    lea         r1, [r0+r3*2]
2010
    pslldq    xmm3, 8
2011
    por       xmm4, xmm3
2012
    movdqa    xmm2, xmm4
2013
    movdqa    xmm1, xmm4
2014
    movdqa    xmm3, xmm4
2015
    psrldq    xmm2, 1
2016
    pslldq    xmm1, 1
2017
    pavgb     xmm3, xmm2
2018
    lea         r2, [r1+r3*2]
2019
INIT_XMM
2020
    PRED4x4_LOWPASS xmm0, xmm1, xmm2, xmm4, xmm5
2021
    psrldq    xmm0, 1
2022
    movq [r0+r3*1], xmm3
2023
    movq [r0+r3*2], xmm0
2024
    lea         r0, [r2+r3*2]
2025
    psrldq    xmm3, 1
2026
    psrldq    xmm0, 1
2027
    movq [r1+r3*1], xmm3
2028
    movq [r1+r3*2], xmm0
2029
    psrldq    xmm3, 1
2030
    psrldq    xmm0, 1
2031
    movq [r2+r3*1], xmm3
2032
    movq [r2+r3*2], xmm0
2033
    psrldq    xmm3, 1
2034
    psrldq    xmm0, 1
2035
    movq [r0+r3*1], xmm3
2036
    movq [r0+r3*2], xmm0
2037
    RET
2038
%endmacro
2039

  
2040
INIT_MMX
2041
%define PALIGNR PALIGNR_MMX
2042
PRED8x8L_VERTICAL_LEFT sse2
2043
%define PALIGNR PALIGNR_SSSE3
2044
INIT_MMX
2045
PRED8x8L_VERTICAL_LEFT ssse3
2046
%endif
2047

  
2048
;-----------------------------------------------------------------------------
1957 2049
; void pred4x4_dc_mmxext(uint8_t *src, const uint8_t *topright, int stride)
1958 2050
;-----------------------------------------------------------------------------
1959 2051

  
libavcodec/x86/h264_intrapred_init.c
75 75
void ff_pred8x8l_vertical_right_mmxext(uint8_t *src, int has_topleft, int has_topright, int stride);
76 76
void ff_pred8x8l_vertical_right_sse2(uint8_t *src, int has_topleft, int has_topright, int stride);
77 77
void ff_pred8x8l_vertical_right_ssse3(uint8_t *src, int has_topleft, int has_topright, int stride);
78
void ff_pred8x8l_vertical_left_sse2(uint8_t *src, int has_topleft, int has_topright, int stride);
79
void ff_pred8x8l_vertical_left_ssse3(uint8_t *src, int has_topleft, int has_topright, int stride);
78 80
void ff_pred4x4_dc_mmxext          (uint8_t *src, const uint8_t *topright, int stride);
79 81
void ff_pred4x4_down_left_mmxext   (uint8_t *src, const uint8_t *topright, int stride);
80 82
void ff_pred4x4_tm_vp8_mmx         (uint8_t *src, const uint8_t *topright, int stride);
......
157 159
        h->pred8x8l [DIAG_DOWN_LEFT_PRED] = ff_pred8x8l_down_left_sse2;
158 160
        h->pred8x8l [DIAG_DOWN_RIGHT_PRED] = ff_pred8x8l_down_right_sse2;
159 161
        h->pred8x8l [VERT_RIGHT_PRED     ] = ff_pred8x8l_vertical_right_sse2;
162
        h->pred8x8l [VERT_LEFT_PRED      ] = ff_pred8x8l_vertical_left_sse2;
160 163
#endif
161 164
        if (codec_id == CODEC_ID_VP8) {
162 165
            h->pred16x16[PLANE_PRED8x8] = ff_pred16x16_tm_vp8_sse2;
......
185 188
        h->pred8x8l [DIAG_DOWN_LEFT_PRED] = ff_pred8x8l_down_left_ssse3;
186 189
        h->pred8x8l [DIAG_DOWN_RIGHT_PRED] = ff_pred8x8l_down_right_ssse3;
187 190
        h->pred8x8l [VERT_RIGHT_PRED     ] = ff_pred8x8l_vertical_right_ssse3;
191
        h->pred8x8l [VERT_LEFT_PRED      ] = ff_pred8x8l_vertical_left_ssse3;
188 192
#endif
189 193
        if (codec_id == CODEC_ID_VP8) {
190 194
            h->pred8x8  [PLANE_PRED8x8] = ff_pred8x8_tm_vp8_ssse3;

Also available in: Unified diff