;******************************************************************************
;* H.264 intra prediction asm optimizations
-;* Copyright (c) 2010 Jason Garrett-Glaser
+;* Copyright (c) 2010 Fiona Glaser
;* Copyright (c) 2010 Holger Lubitz
;* Copyright (c) 2010 Loren Merritt
;* Copyright (c) 2010 Ronald S. Bultje
cextern pw_32
;-----------------------------------------------------------------------------
-; void pred16x16_vertical_8(uint8_t *src, int stride)
+; void ff_pred16x16_vertical_8(uint8_t *src, int stride)
;-----------------------------------------------------------------------------
INIT_MMX mmx
REP_RET
;-----------------------------------------------------------------------------
-; void pred16x16_horizontal_8(uint8_t *src, int stride)
+; void ff_pred16x16_horizontal_8(uint8_t *src, int stride)
;-----------------------------------------------------------------------------
%macro PRED16x16_H 0
PRED16x16_H
;-----------------------------------------------------------------------------
-; void pred16x16_dc_8(uint8_t *src, int stride)
+; void ff_pred16x16_dc_8(uint8_t *src, int stride)
;-----------------------------------------------------------------------------
%macro PRED16x16_DC 0
PRED16x16_DC
;-----------------------------------------------------------------------------
-; void pred16x16_tm_vp8_8(uint8_t *src, int stride)
+; void ff_pred16x16_tm_vp8_8(uint8_t *src, int stride)
;-----------------------------------------------------------------------------
%macro PRED16x16_TM 0
REP_RET
;-----------------------------------------------------------------------------
-; void pred16x16_plane_*_8(uint8_t *src, int stride)
+; void ff_pred16x16_plane_*_8(uint8_t *src, int stride)
;-----------------------------------------------------------------------------
%macro H264_PRED16x16_PLANE 1
H264_PRED16x16_PLANE svq3
;-----------------------------------------------------------------------------
-; void pred8x8_plane_8(uint8_t *src, int stride)
+; void ff_pred8x8_plane_8(uint8_t *src, int stride)
;-----------------------------------------------------------------------------
%macro H264_PRED8x8_PLANE 0
H264_PRED8x8_PLANE
;-----------------------------------------------------------------------------
-; void pred8x8_vertical_8(uint8_t *src, int stride)
+; void ff_pred8x8_vertical_8(uint8_t *src, int stride)
;-----------------------------------------------------------------------------
INIT_MMX mmx
RET
;-----------------------------------------------------------------------------
-; void pred8x8_horizontal_8(uint8_t *src, int stride)
+; void ff_pred8x8_horizontal_8(uint8_t *src, int stride)
;-----------------------------------------------------------------------------
%macro PRED8x8_H 0
PRED8x8_H
;-----------------------------------------------------------------------------
-; void pred8x8_top_dc_8_mmxext(uint8_t *src, int stride)
+; void ff_pred8x8_top_dc_8_mmxext(uint8_t *src, int stride)
;-----------------------------------------------------------------------------
INIT_MMX mmxext
cglobal pred8x8_top_dc_8, 2,5
RET
;-----------------------------------------------------------------------------
-; void pred8x8_dc_8_mmxext(uint8_t *src, int stride)
+; void ff_pred8x8_dc_8_mmxext(uint8_t *src, int stride)
;-----------------------------------------------------------------------------
INIT_MMX mmxext
RET
;-----------------------------------------------------------------------------
-; void pred8x8_dc_rv40_8(uint8_t *src, int stride)
+; void ff_pred8x8_dc_rv40_8(uint8_t *src, int stride)
;-----------------------------------------------------------------------------
INIT_MMX mmxext
REP_RET
;-----------------------------------------------------------------------------
-; void pred8x8_tm_vp8_8(uint8_t *src, int stride)
+; void ff_pred8x8_tm_vp8_8(uint8_t *src, int stride)
;-----------------------------------------------------------------------------
%macro PRED8x8_TM 0
%endmacro
;-----------------------------------------------------------------------------
-; void pred8x8l_top_dc_8(uint8_t *src, int has_topleft, int has_topright, int stride)
+; void ff_pred8x8l_top_dc_8(uint8_t *src, int has_topleft, int has_topright,
+; int stride)
;-----------------------------------------------------------------------------
%macro PRED8x8L_TOP_DC 0
cglobal pred8x8l_top_dc_8, 4,4
PRED8x8L_TOP_DC
;-----------------------------------------------------------------------------
-;void pred8x8l_dc_8(uint8_t *src, int has_topleft, int has_topright, int stride)
+; void ff_pred8x8l_dc_8(uint8_t *src, int has_topleft, int has_topright,
+; int stride)
;-----------------------------------------------------------------------------
%macro PRED8x8L_DC 0
PRED8x8L_DC
;-----------------------------------------------------------------------------
-; void pred8x8l_horizontal_8(uint8_t *src, int has_topleft, int has_topright, int stride)
+; void ff_pred8x8l_horizontal_8(uint8_t *src, int has_topleft,
+; int has_topright, int stride)
;-----------------------------------------------------------------------------
%macro PRED8x8L_HORIZONTAL 0
PRED8x8L_HORIZONTAL
;-----------------------------------------------------------------------------
-; void pred8x8l_vertical_8(uint8_t *src, int has_topleft, int has_topright, int stride)
+; void ff_pred8x8l_vertical_8(uint8_t *src, int has_topleft, int has_topright,
+; int stride)
;-----------------------------------------------------------------------------
%macro PRED8x8L_VERTICAL 0
PRED8x8L_VERTICAL
;-----------------------------------------------------------------------------
-;void pred8x8l_down_left_8(uint8_t *src, int has_topleft, int has_topright, int stride)
+; void ff_pred8x8l_down_left_8(uint8_t *src, int has_topleft,
+; int has_topright, int stride)
;-----------------------------------------------------------------------------
INIT_MMX mmxext
PRED8x8L_DOWN_LEFT
;-----------------------------------------------------------------------------
-;void pred8x8l_down_right_8_mmxext(uint8_t *src, int has_topleft, int has_topright, int stride)
+; void ff_pred8x8l_down_right_8_mmxext(uint8_t *src, int has_topleft,
+; int has_topright, int stride)
;-----------------------------------------------------------------------------
INIT_MMX mmxext
PRED8x8L_DOWN_RIGHT
;-----------------------------------------------------------------------------
-; void pred8x8l_vertical_right_8(uint8_t *src, int has_topleft, int has_topright, int stride)
+; void ff_pred8x8l_vertical_right_8(uint8_t *src, int has_topleft,
+; int has_topright, int stride)
;-----------------------------------------------------------------------------
INIT_MMX mmxext
PRED8x8L_VERTICAL_RIGHT
;-----------------------------------------------------------------------------
-;void pred8x8l_vertical_left_8(uint8_t *src, int has_topleft, int has_topright, int stride)
+; void ff_pred8x8l_vertical_left_8(uint8_t *src, int has_topleft,
+; int has_topright, int stride)
;-----------------------------------------------------------------------------
%macro PRED8x8L_VERTICAL_LEFT 0
PRED8x8L_VERTICAL_LEFT
;-----------------------------------------------------------------------------
-; void pred8x8l_horizontal_up_8(uint8_t *src, int has_topleft, int has_topright, int stride)
+; void ff_pred8x8l_horizontal_up_8(uint8_t *src, int has_topleft,
+; int has_topright, int stride)
;-----------------------------------------------------------------------------
%macro PRED8x8L_HORIZONTAL_UP 0
PRED8x8L_HORIZONTAL_UP
;-----------------------------------------------------------------------------
-;void pred8x8l_horizontal_down_8(uint8_t *src, int has_topleft, int has_topright, int stride)
+; void ff_pred8x8l_horizontal_down_8(uint8_t *src, int has_topleft,
+; int has_topright, int stride)
;-----------------------------------------------------------------------------
INIT_MMX mmxext
INIT_MMX ssse3
PRED8x8L_HORIZONTAL_DOWN
-;-----------------------------------------------------------------------------
-; void pred4x4_dc_8_mmxext(uint8_t *src, const uint8_t *topright, int stride)
-;-----------------------------------------------------------------------------
+;-------------------------------------------------------------------------------
+; void ff_pred4x4_dc_8_mmxext(uint8_t *src, const uint8_t *topright, int stride)
+;-------------------------------------------------------------------------------
INIT_MMX mmxext
cglobal pred4x4_dc_8, 3,5
RET
;-----------------------------------------------------------------------------
-; void pred4x4_tm_vp8_8_mmxext(uint8_t *src, const uint8_t *topright, int stride)
+; void ff_pred4x4_tm_vp8_8_mmxext(uint8_t *src, const uint8_t *topright,
+; int stride)
;-----------------------------------------------------------------------------
%macro PRED4x4_TM 0
pshufb mm3, mm6
pshufb mm4, mm6
pshufb mm5, mm6
- psubw mm2, mm7
- psubw mm3, mm7
- psubw mm4, mm7
- psubw mm5, mm7
+ psubw mm0, mm7
paddw mm2, mm0
paddw mm3, mm0
paddw mm4, mm0
RET
;-----------------------------------------------------------------------------
-; void pred4x4_vertical_vp8_8_mmxext(uint8_t *src, const uint8_t *topright, int stride)
+; void ff_pred4x4_vertical_vp8_8_mmxext(uint8_t *src, const uint8_t *topright,
+; int stride)
;-----------------------------------------------------------------------------
INIT_MMX mmxext
RET
;-----------------------------------------------------------------------------
-; void pred4x4_down_left_8_mmxext(uint8_t *src, const uint8_t *topright, int stride)
+; void ff_pred4x4_down_left_8_mmxext(uint8_t *src, const uint8_t *topright,
+; int stride)
;-----------------------------------------------------------------------------
INIT_MMX mmxext
cglobal pred4x4_down_left_8, 3,3
movd [r1+r2*2], m0
RET
-;-----------------------------------------------------------------------------
-; void pred4x4_vertical_left_8_mmxext(uint8_t *src, const uint8_t *topright, int stride)
-;-----------------------------------------------------------------------------
+;------------------------------------------------------------------------------
+; void ff_pred4x4_vertical_left_8_mmxext(uint8_t *src, const uint8_t *topright,
+; int stride)
+;------------------------------------------------------------------------------
INIT_MMX mmxext
cglobal pred4x4_vertical_left_8, 3,3
movh [r1+r2*2], m0
RET
-;-----------------------------------------------------------------------------
-; void pred4x4_horizontal_up_8_mmxext(uint8_t *src, const uint8_t *topright, int stride)
-;-----------------------------------------------------------------------------
+;------------------------------------------------------------------------------
+; void ff_pred4x4_horizontal_up_8_mmxext(uint8_t *src, const uint8_t *topright,
+; int stride)
+;------------------------------------------------------------------------------
INIT_MMX mmxext
cglobal pred4x4_horizontal_up_8, 3,3
movd [r1+r2*2], m1
RET
-;-----------------------------------------------------------------------------
-; void pred4x4_horizontal_down_8_mmxext(uint8_t *src, const uint8_t *topright, int stride)
-;-----------------------------------------------------------------------------
+;------------------------------------------------------------------------------
+; void ff_pred4x4_horizontal_down_8_mmxext(uint8_t *src,
+; const uint8_t *topright, int stride)
+;------------------------------------------------------------------------------
INIT_MMX mmxext
cglobal pred4x4_horizontal_down_8, 3,3
RET
;-----------------------------------------------------------------------------
-; void pred4x4_vertical_right_8_mmxext(uint8_t *src, const uint8_t *topright, int stride)
+; void ff_pred4x4_vertical_right_8_mmxext(uint8_t *src,
+; const uint8_t *topright, int stride)
;-----------------------------------------------------------------------------
INIT_MMX mmxext
RET
;-----------------------------------------------------------------------------
-; void pred4x4_down_right_8_mmxext(uint8_t *src, const uint8_t *topright, int stride)
+; void ff_pred4x4_down_right_8_mmxext(uint8_t *src, const uint8_t *topright,
+; int stride)
;-----------------------------------------------------------------------------
INIT_MMX mmxext