Revision 98c6053c

View differences:

libavcodec/x86/h264_intrapred.asm
2046 2046
%endif
2047 2047

  
2048 2048
;-----------------------------------------------------------------------------
2049
; void pred8x8l_horizontal_up(uint8_t *src, int has_topleft, int has_topright, int stride)
2050
;-----------------------------------------------------------------------------
2051
%ifdef CONFIG_GPL
2052
%macro PRED8x8L_HORIZONTAL_UP 1
2053
cglobal pred8x8l_horizontal_up_%1, 4,4
2054
    sub          r0, r3
2055
    lea          r2, [r0+r3*2]
2056
    movq        mm0, [r0+r3*1-8]
2057
    punpckhbw   mm0, [r0+r3*0-8]
2058
    movq        mm1, [r2+r3*1-8]
2059
    punpckhbw   mm1, [r0+r3*2-8]
2060
    mov          r2, r0
2061
    punpckhwd   mm1, mm0
2062
    lea          r0, [r0+r3*4]
2063
    movq        mm2, [r0+r3*1-8]
2064
    punpckhbw   mm2, [r0+r3*0-8]
2065
    lea          r0, [r0+r3*2]
2066
    movq        mm3, [r0+r3*1-8]
2067
    punpckhbw   mm3, [r0+r3*0-8]
2068
    punpckhwd   mm3, mm2
2069
    punpckhdq   mm3, mm1
2070
    lea          r0, [r0+r3*2]
2071
    movq        mm0, [r0+r3*0-8]
2072
    movq        mm1, [r2]
2073
    mov          r0, r2
2074
    movq        mm4, mm3
2075
    movq        mm2, mm3
2076
    PALIGNR     mm4, mm0, 7, mm0
2077
    PALIGNR     mm1, mm2, 1, mm2
2078
    test        r1, r1
2079
    jnz .do_left
2080
.fix_lt_1:
2081
    movq        mm5, mm3
2082
    pxor        mm5, mm4
2083
    psrlq       mm5, 56
2084
    psllq       mm5, 48
2085
    pxor        mm1, mm5
2086
.do_left:
2087
    movq       mm0, mm4
2088
    PRED4x4_LOWPASS mm2, mm1, mm4, mm3, mm5
2089
    movq       mm4, mm0
2090
    movq       mm7, mm2
2091
    PRED4x4_LOWPASS mm1, mm3, mm0, mm4, mm5
2092
    psllq      mm1, 56
2093
    PALIGNR    mm7, mm1, 7, mm3
2094
    lea         r1, [r0+r3*2]
2095
    pshufw     mm0, mm7, 00011011b ; l6 l7 l4 l5 l2 l3 l0 l1
2096
    psllq      mm7, 56             ; l7 .. .. .. .. .. .. ..
2097
    movq       mm2, mm0
2098
    psllw      mm0, 8
2099
    psrlw      mm2, 8
2100
    por        mm2, mm0            ; l7 l6 l5 l4 l3 l2 l1 l0
2101
    movq       mm3, mm2
2102
    movq       mm4, mm2
2103
    movq       mm5, mm2
2104
    psrlq      mm2, 8
2105
    psrlq      mm3, 16
2106
    lea         r2, [r1+r3*2]
2107
    por        mm2, mm7            ; l7 l7 l6 l5 l4 l3 l2 l1
2108
    punpckhbw  mm7, mm7
2109
    por        mm3, mm7            ; l7 l7 l7 l6 l5 l4 l3 l2
2110
    pavgb      mm4, mm2
2111
    PRED4x4_LOWPASS mm1, mm3, mm5, mm2, mm6
2112
    movq       mm5, mm4
2113
    punpcklbw  mm4, mm1            ; p4 p3 p2 p1
2114
    punpckhbw  mm5, mm1            ; p8 p7 p6 p5
2115
    movq       mm6, mm5
2116
    movq       mm7, mm5
2117
    movq       mm0, mm5
2118
    PALIGNR    mm5, mm4, 2, mm1
2119
    pshufw     mm1, mm6, 11111001b
2120
    PALIGNR    mm6, mm4, 4, mm2
2121
    pshufw     mm2, mm7, 11111110b
2122
    PALIGNR    mm7, mm4, 6, mm3
2123
    pshufw     mm3, mm0, 11111111b
2124
    movq [r0+r3*1], mm4
2125
    movq [r0+r3*2], mm5
2126
    lea         r0, [r2+r3*2]
2127
    movq [r1+r3*1], mm6
2128
    movq [r1+r3*2], mm7
2129
    movq [r2+r3*1], mm0
2130
    movq [r2+r3*2], mm1
2131
    movq [r0+r3*1], mm2
2132
    movq [r0+r3*2], mm3
2133
    RET
2134
%endmacro
2135

  
2136
INIT_MMX
2137
%define PALIGNR PALIGNR_MMX
2138
PRED8x8L_HORIZONTAL_UP mmxext
2139
%define PALIGNR PALIGNR_SSSE3
2140
PRED8x8L_HORIZONTAL_UP ssse3
2141
%endif
2142

  
2143
;-----------------------------------------------------------------------------
2049 2144
; void pred4x4_dc_mmxext(uint8_t *src, const uint8_t *topright, int stride)
2050 2145
;-----------------------------------------------------------------------------
2051 2146

  
libavcodec/x86/h264_intrapred_init.c
77 77
void ff_pred8x8l_vertical_right_ssse3(uint8_t *src, int has_topleft, int has_topright, int stride);
78 78
void ff_pred8x8l_vertical_left_sse2(uint8_t *src, int has_topleft, int has_topright, int stride);
79 79
void ff_pred8x8l_vertical_left_ssse3(uint8_t *src, int has_topleft, int has_topright, int stride);
80
void ff_pred8x8l_horizontal_up_mmxext(uint8_t *src, int has_topleft, int has_topright, int stride);
81
void ff_pred8x8l_horizontal_up_ssse3(uint8_t *src, int has_topleft, int has_topright, int stride);
80 82
void ff_pred4x4_dc_mmxext          (uint8_t *src, const uint8_t *topright, int stride);
81 83
void ff_pred4x4_down_left_mmxext   (uint8_t *src, const uint8_t *topright, int stride);
82 84
void ff_pred4x4_tm_vp8_mmx         (uint8_t *src, const uint8_t *topright, int stride);
......
121 123
        h->pred8x8l [VERT_PRED   ] = ff_pred8x8l_vertical_mmxext;
122 124
        h->pred8x8l [DIAG_DOWN_RIGHT_PRED] = ff_pred8x8l_down_right_mmxext;
123 125
        h->pred8x8l [VERT_RIGHT_PRED     ] = ff_pred8x8l_vertical_right_mmxext;
126
        h->pred8x8l [HOR_UP_PRED         ] = ff_pred8x8l_horizontal_up_mmxext;
124 127
#endif
125 128
        h->pred4x4  [DC_PRED     ] = ff_pred4x4_dc_mmxext;
126 129
#if CONFIG_GPL
......
189 192
        h->pred8x8l [DIAG_DOWN_RIGHT_PRED] = ff_pred8x8l_down_right_ssse3;
190 193
        h->pred8x8l [VERT_RIGHT_PRED     ] = ff_pred8x8l_vertical_right_ssse3;
191 194
        h->pred8x8l [VERT_LEFT_PRED      ] = ff_pred8x8l_vertical_left_ssse3;
195
        h->pred8x8l [HOR_UP_PRED         ] = ff_pred8x8l_horizontal_up_ssse3;
192 196
#endif
193 197
        if (codec_id == CODEC_ID_VP8) {
194 198
            h->pred8x8  [PLANE_PRED8x8] = ff_pred8x8_tm_vp8_ssse3;

Also available in: Unified diff