aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-10-30 15:22:13 +0100
committerMichael Niedermayer <michaelni@gmx.at>2012-10-30 15:28:24 +0100
commit6f5f7f705d10e639cf047be216a94de1e39a96e9 (patch)
treef80bab61e34b6ad3bf73c165df9e3f7d9d6bdb4e
parente79c3858b35fcc77c68c33b627958e736686957e (diff)
parent08b028c18dc31b6de741861b9555669dcca4d12a (diff)
downloadffmpeg-6f5f7f705d10e639cf047be216a94de1e39a96e9.tar.gz
Merge commit '08b028c18dc31b6de741861b9555669dcca4d12a'
* commit '08b028c18dc31b6de741861b9555669dcca4d12a': Remove INIT_AVX from x86inc.asm. Remove usage of INIT_AVX in h264_intrapred_10bit.asm. dv: fix indentation Conflicts: libavformat/dv.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/x86/h264_intrapred_10bit.asm306
-rw-r--r--libavcodec/x86/h264_intrapred_init.c40
-rw-r--r--libavformat/dv.c62
3 files changed, 208 insertions, 200 deletions
diff --git a/libavcodec/x86/h264_intrapred_10bit.asm b/libavcodec/x86/h264_intrapred_10bit.asm
index 4eeb0a4303..7c597791a3 100644
--- a/libavcodec/x86/h264_intrapred_10bit.asm
+++ b/libavcodec/x86/h264_intrapred_10bit.asm
@@ -53,8 +53,8 @@ SECTION .text
;-----------------------------------------------------------------------------
; void pred4x4_down_right(pixel *src, const pixel *topright, int stride)
;-----------------------------------------------------------------------------
-%macro PRED4x4_DR 1
-cglobal pred4x4_down_right_10_%1, 3,3
+%macro PRED4x4_DR 0
+cglobal pred4x4_down_right_10, 3, 3
sub r0, r2
lea r1, [r0+r2*2]
movhps m1, [r1-8]
@@ -79,21 +79,22 @@ cglobal pred4x4_down_right_10_%1, 3,3
RET
%endmacro
-INIT_XMM
+INIT_XMM sse2
%define PALIGNR PALIGNR_MMX
-PRED4x4_DR sse2
+PRED4x4_DR
+INIT_XMM ssse3
%define PALIGNR PALIGNR_SSSE3
-PRED4x4_DR ssse3
+PRED4x4_DR
%if HAVE_AVX_EXTERNAL
-INIT_AVX
-PRED4x4_DR avx
+INIT_XMM avx
+PRED4x4_DR
%endif
;-----------------------------------------------------------------------------
; void pred4x4_vertical_right(pixel *src, const pixel *topright, int stride)
;-----------------------------------------------------------------------------
-%macro PRED4x4_VR 1
-cglobal pred4x4_vertical_right_10_%1, 3,3,6
+%macro PRED4x4_VR 0
+cglobal pred4x4_vertical_right_10, 3, 3, 6
sub r0, r2
lea r1, [r0+r2*2]
movq m5, [r0] ; ........t3t2t1t0
@@ -119,21 +120,22 @@ cglobal pred4x4_vertical_right_10_%1, 3,3,6
RET
%endmacro
-INIT_XMM
+INIT_XMM sse2
%define PALIGNR PALIGNR_MMX
-PRED4x4_VR sse2
+PRED4x4_VR
+INIT_XMM ssse3
%define PALIGNR PALIGNR_SSSE3
-PRED4x4_VR ssse3
+PRED4x4_VR
%if HAVE_AVX_EXTERNAL
-INIT_AVX
-PRED4x4_VR avx
+INIT_XMM avx
+PRED4x4_VR
%endif
;-----------------------------------------------------------------------------
; void pred4x4_horizontal_down(pixel *src, const pixel *topright, int stride)
;-----------------------------------------------------------------------------
-%macro PRED4x4_HD 1
-cglobal pred4x4_horizontal_down_10_%1, 3,3
+%macro PRED4x4_HD 0
+cglobal pred4x4_horizontal_down_10, 3, 3
sub r0, r2
lea r1, [r0+r2*2]
movq m0, [r0-8] ; lt ..
@@ -162,14 +164,15 @@ cglobal pred4x4_horizontal_down_10_%1, 3,3
RET
%endmacro
-INIT_XMM
+INIT_XMM sse2
%define PALIGNR PALIGNR_MMX
-PRED4x4_HD sse2
+PRED4x4_HD
+INIT_XMM ssse3
%define PALIGNR PALIGNR_SSSE3
-PRED4x4_HD ssse3
+PRED4x4_HD
%if HAVE_AVX_EXTERNAL
-INIT_AVX
-PRED4x4_HD avx
+INIT_XMM avx
+PRED4x4_HD
%endif
;-----------------------------------------------------------------------------
@@ -192,8 +195,8 @@ PRED4x4_HD avx
HADDD %1, %2
%endmacro
-INIT_MMX
-cglobal pred4x4_dc_10_mmxext, 3,3
+INIT_MMX mmx2
+cglobal pred4x4_dc_10, 3, 3
sub r0, r2
lea r1, [r0+r2*2]
movq m2, [r0+r2*1-8]
@@ -216,8 +219,8 @@ cglobal pred4x4_dc_10_mmxext, 3,3
;-----------------------------------------------------------------------------
; void pred4x4_down_left(pixel *src, const pixel *topright, int stride)
;-----------------------------------------------------------------------------
-%macro PRED4x4_DL 1
-cglobal pred4x4_down_left_10_%1, 3,3
+%macro PRED4x4_DL 0
+cglobal pred4x4_down_left_10, 3, 3
sub r0, r2
movq m0, [r0]
movhps m0, [r1]
@@ -236,18 +239,18 @@ cglobal pred4x4_down_left_10_%1, 3,3
RET
%endmacro
-INIT_XMM
-PRED4x4_DL sse2
+INIT_XMM sse2
+PRED4x4_DL
%if HAVE_AVX_EXTERNAL
-INIT_AVX
-PRED4x4_DL avx
+INIT_XMM avx
+PRED4x4_DL
%endif
;-----------------------------------------------------------------------------
; void pred4x4_vertical_left(pixel *src, const pixel *topright, int stride)
;-----------------------------------------------------------------------------
-%macro PRED4x4_VL 1
-cglobal pred4x4_vertical_left_10_%1, 3,3
+%macro PRED4x4_VL 0
+cglobal pred4x4_vertical_left_10, 3, 3
sub r0, r2
movu m1, [r0]
movhps m1, [r1]
@@ -265,18 +268,18 @@ cglobal pred4x4_vertical_left_10_%1, 3,3
RET
%endmacro
-INIT_XMM
-PRED4x4_VL sse2
+INIT_XMM sse2
+PRED4x4_VL
%if HAVE_AVX_EXTERNAL
-INIT_AVX
-PRED4x4_VL avx
+INIT_XMM avx
+PRED4x4_VL
%endif
;-----------------------------------------------------------------------------
; void pred4x4_horizontal_up(pixel *src, const pixel *topright, int stride)
;-----------------------------------------------------------------------------
-INIT_MMX
-cglobal pred4x4_horizontal_up_10_mmxext, 3,3
+INIT_MMX mmx2
+cglobal pred4x4_horizontal_up_10, 3, 3
sub r0, r2
lea r1, [r0+r2*2]
movq m0, [r0+r2*1-8]
@@ -309,8 +312,8 @@ cglobal pred4x4_horizontal_up_10_mmxext, 3,3
;-----------------------------------------------------------------------------
; void pred8x8_vertical(pixel *src, int stride)
;-----------------------------------------------------------------------------
-INIT_XMM
-cglobal pred8x8_vertical_10_sse2, 2,2
+INIT_XMM sse2
+cglobal pred8x8_vertical_10, 2, 2
sub r0, r1
mova m0, [r0]
%rep 3
@@ -325,8 +328,8 @@ cglobal pred8x8_vertical_10_sse2, 2,2
;-----------------------------------------------------------------------------
; void pred8x8_horizontal(pixel *src, int stride)
;-----------------------------------------------------------------------------
-INIT_XMM
-cglobal pred8x8_horizontal_10_sse2, 2,3
+INIT_XMM sse2
+cglobal pred8x8_horizontal_10, 2, 3
mov r2d, 4
.loop:
movq m0, [r0+r1*0-8]
@@ -355,8 +358,8 @@ cglobal pred8x8_horizontal_10_sse2, 2,3
%endif
%endmacro
-%macro PRED8x8_DC 2
-cglobal pred8x8_dc_10_%1, 2,6
+%macro PRED8x8_DC 1
+cglobal pred8x8_dc_10, 2, 6
sub r0, r1
pxor m4, m4
movq m0, [r0+0]
@@ -372,7 +375,7 @@ cglobal pred8x8_dc_10_%1, 2,6
paddw m1, m3
punpcklwd m0, m1
%endif
- %2 m2, m0, 00001110b
+ %1 m2, m0, 00001110b
paddw m0, m2
lea r5, [r1*3]
@@ -397,8 +400,8 @@ cglobal pred8x8_dc_10_%1, 2,6
punpcklwd m2, m3
punpckldq m0, m2 ; s0, s1, s2, s3
- %2 m3, m0, 11110110b ; s2, s1, s3, s3
- %2 m0, m0, 01110100b ; s0, s1, s3, s1
+ %1 m3, m0, 11110110b ; s2, s1, s3, s3
+ %1 m0, m0, 01110100b ; s0, s1, s3, s1
paddw m0, m3
psrlw m0, 2
pavgw m0, m4 ; s0+s2, s1, s3, s1+s3
@@ -424,16 +427,16 @@ cglobal pred8x8_dc_10_%1, 2,6
RET
%endmacro
-INIT_MMX
-PRED8x8_DC mmxext, pshufw
-INIT_XMM
-PRED8x8_DC sse2 , pshuflw
+INIT_MMX mmx2
+PRED8x8_DC pshufw
+INIT_XMM sse2
+PRED8x8_DC pshuflw
;-----------------------------------------------------------------------------
; void pred8x8_top_dc(pixel *src, int stride)
;-----------------------------------------------------------------------------
-INIT_XMM
-cglobal pred8x8_top_dc_10_sse2, 2,4
+INIT_XMM sse2
+cglobal pred8x8_top_dc_10, 2, 4
sub r0, r1
mova m0, [r0]
pshuflw m1, m0, 0x4e
@@ -459,8 +462,8 @@ cglobal pred8x8_top_dc_10_sse2, 2,4
;-----------------------------------------------------------------------------
; void pred8x8_plane(pixel *src, int stride)
;-----------------------------------------------------------------------------
-INIT_XMM
-cglobal pred8x8_plane_10_sse2, 2,7,7
+INIT_XMM sse2
+cglobal pred8x8_plane_10, 2, 7, 7
sub r0, r1
lea r2, [r1*3]
lea r3, [r0+r1*4]
@@ -522,8 +525,8 @@ cglobal pred8x8_plane_10_sse2, 2,7,7
;-----------------------------------------------------------------------------
; void pred8x8l_128_dc(pixel *src, int has_topleft, int has_topright, int stride)
;-----------------------------------------------------------------------------
-%macro PRED8x8L_128_DC 1
-cglobal pred8x8l_128_dc_10_%1, 4,4
+%macro PRED8x8L_128_DC 0
+cglobal pred8x8l_128_dc_10, 4, 4
mova m0, [pw_512] ; (1<<(BIT_DEPTH-1))
lea r1, [r3*3]
lea r2, [r0+r3*4]
@@ -538,16 +541,16 @@ cglobal pred8x8l_128_dc_10_%1, 4,4
RET
%endmacro
-INIT_MMX
-PRED8x8L_128_DC mmxext
-INIT_XMM
-PRED8x8L_128_DC sse2
+INIT_MMX mmx2
+PRED8x8L_128_DC
+INIT_XMM sse2
+PRED8x8L_128_DC
;-----------------------------------------------------------------------------
; void pred8x8l_top_dc(pixel *src, int has_topleft, int has_topright, int stride)
;-----------------------------------------------------------------------------
-%macro PRED8x8L_TOP_DC 1
-cglobal pred8x8l_top_dc_10_%1, 4,4,6
+%macro PRED8x8L_TOP_DC 0
+cglobal pred8x8l_top_dc_10, 4, 4, 6
sub r0, r3
mova m0, [r0]
shr r1d, 14
@@ -575,19 +578,19 @@ cglobal pred8x8l_top_dc_10_%1, 4,4,6
RET
%endmacro
-INIT_XMM
-PRED8x8L_TOP_DC sse2
+INIT_XMM sse2
+PRED8x8L_TOP_DC
%if HAVE_AVX_EXTERNAL
-INIT_AVX
-PRED8x8L_TOP_DC avx
+INIT_XMM avx
+PRED8x8L_TOP_DC
%endif
;-----------------------------------------------------------------------------
;void pred8x8l_dc(pixel *src, int has_topleft, int has_topright, int stride)
;-----------------------------------------------------------------------------
;TODO: see if scalar is faster
-%macro PRED8x8L_DC 1
-cglobal pred8x8l_dc_10_%1, 4,6,6
+%macro PRED8x8L_DC 0
+cglobal pred8x8l_dc_10, 4, 6, 6
sub r0, r3
lea r4, [r0+r3*4]
lea r5, [r3*3]
@@ -634,18 +637,18 @@ cglobal pred8x8l_dc_10_%1, 4,6,6
RET
%endmacro
-INIT_XMM
-PRED8x8L_DC sse2
+INIT_XMM sse2
+PRED8x8L_DC
%if HAVE_AVX_EXTERNAL
-INIT_AVX
-PRED8x8L_DC avx
+INIT_XMM avx
+PRED8x8L_DC
%endif
;-----------------------------------------------------------------------------
; void pred8x8l_vertical(pixel *src, int has_topleft, int has_topright, int stride)
;-----------------------------------------------------------------------------
-%macro PRED8x8L_VERTICAL 1
-cglobal pred8x8l_vertical_10_%1, 4,4,6
+%macro PRED8x8L_VERTICAL 0
+cglobal pred8x8l_vertical_10, 4, 4, 6
sub r0, r3
mova m0, [r0]
shr r1d, 14
@@ -669,18 +672,18 @@ cglobal pred8x8l_vertical_10_%1, 4,4,6
RET
%endmacro
-INIT_XMM
-PRED8x8L_VERTICAL sse2
+INIT_XMM sse2
+PRED8x8L_VERTICAL
%if HAVE_AVX_EXTERNAL
-INIT_AVX
-PRED8x8L_VERTICAL avx
+INIT_XMM avx
+PRED8x8L_VERTICAL
%endif
;-----------------------------------------------------------------------------
; void pred8x8l_horizontal(uint8_t *src, int has_topleft, int has_topright, int stride)
;-----------------------------------------------------------------------------
-%macro PRED8x8L_HORIZONTAL 1
-cglobal pred8x8l_horizontal_10_%1, 4,4,5
+%macro PRED8x8L_HORIZONTAL 0
+cglobal pred8x8l_horizontal_10, 4, 4, 5
mova m0, [r0-16]
shr r1d, 14
dec r1
@@ -723,21 +726,22 @@ cglobal pred8x8l_horizontal_10_%1, 4,4,5
RET
%endmacro
-INIT_XMM
+INIT_XMM sse2
%define PALIGNR PALIGNR_MMX
-PRED8x8L_HORIZONTAL sse2
+PRED8x8L_HORIZONTAL
+INIT_XMM ssse3
%define PALIGNR PALIGNR_SSSE3
-PRED8x8L_HORIZONTAL ssse3
+PRED8x8L_HORIZONTAL
%if HAVE_AVX_EXTERNAL
-INIT_AVX
-PRED8x8L_HORIZONTAL avx
+INIT_XMM avx
+PRED8x8L_HORIZONTAL
%endif
;-----------------------------------------------------------------------------
;void pred8x8l_down_left(pixel *src, int has_topleft, int has_topright, int stride)
;-----------------------------------------------------------------------------
-%macro PRED8x8L_DOWN_LEFT 1
-cglobal pred8x8l_down_left_10_%1, 4,4,7
+%macro PRED8x8L_DOWN_LEFT 0
+cglobal pred8x8l_down_left_10, 4, 4, 7
sub r0, r3
mova m3, [r0]
shr r1d, 14
@@ -792,23 +796,24 @@ cglobal pred8x8l_down_left_10_%1, 4,4,7
jmp .do_topright
%endmacro
-INIT_XMM
+INIT_XMM sse2
%define PALIGNR PALIGNR_MMX
-PRED8x8L_DOWN_LEFT sse2
+PRED8x8L_DOWN_LEFT
+INIT_XMM ssse3
%define PALIGNR PALIGNR_SSSE3
-PRED8x8L_DOWN_LEFT ssse3
+PRED8x8L_DOWN_LEFT
%if HAVE_AVX_EXTERNAL
-INIT_AVX
-PRED8x8L_DOWN_LEFT avx
+INIT_XMM avx
+PRED8x8L_DOWN_LEFT
%endif
;-----------------------------------------------------------------------------
;void pred8x8l_down_right(pixel *src, int has_topleft, int has_topright, int stride)
;-----------------------------------------------------------------------------
-%macro PRED8x8L_DOWN_RIGHT 1
+%macro PRED8x8L_DOWN_RIGHT 0
; standard forbids this when has_topleft is false
; no need to check
-cglobal pred8x8l_down_right_10_%1, 4,5,8
+cglobal pred8x8l_down_right_10, 4, 5, 8
sub r0, r3
lea r4, [r0+r3*4]
lea r1, [r3*3]
@@ -867,22 +872,23 @@ cglobal pred8x8l_down_right_10_%1, 4,5,8
RET
%endmacro
-INIT_XMM
+INIT_XMM sse2
%define PALIGNR PALIGNR_MMX
-PRED8x8L_DOWN_RIGHT sse2
+PRED8x8L_DOWN_RIGHT
+INIT_XMM ssse3
%define PALIGNR PALIGNR_SSSE3
-PRED8x8L_DOWN_RIGHT ssse3
+PRED8x8L_DOWN_RIGHT
%if HAVE_AVX_EXTERNAL
-INIT_AVX
-PRED8x8L_DOWN_RIGHT avx
+INIT_XMM avx
+PRED8x8L_DOWN_RIGHT
%endif
;-----------------------------------------------------------------------------
; void pred8x8l_vertical_right(pixel *src, int has_topleft, int has_topright, int stride)
;-----------------------------------------------------------------------------
-%macro PRED8x8L_VERTICAL_RIGHT 1
+%macro PRED8x8L_VERTICAL_RIGHT 0
; likewise with 8x8l_down_right
-cglobal pred8x8l_vertical_right_10_%1, 4,5,7
+cglobal pred8x8l_vertical_right_10, 4, 5, 7
sub r0, r3
lea r4, [r0+r3*4]
lea r1, [r3*3]
@@ -938,21 +944,22 @@ cglobal pred8x8l_vertical_right_10_%1, 4,5,7
RET
%endmacro
-INIT_XMM
+INIT_XMM sse2
%define PALIGNR PALIGNR_MMX
-PRED8x8L_VERTICAL_RIGHT sse2
+PRED8x8L_VERTICAL_RIGHT
+INIT_XMM ssse3
%define PALIGNR PALIGNR_SSSE3
-PRED8x8L_VERTICAL_RIGHT ssse3
+PRED8x8L_VERTICAL_RIGHT
%if HAVE_AVX_EXTERNAL
-INIT_AVX
-PRED8x8L_VERTICAL_RIGHT avx
+INIT_XMM avx
+PRED8x8L_VERTICAL_RIGHT
%endif
;-----------------------------------------------------------------------------
; void pred8x8l_horizontal_up(pixel *src, int has_topleft, int has_topright, int stride)
;-----------------------------------------------------------------------------
-%macro PRED8x8L_HORIZONTAL_UP 1
-cglobal pred8x8l_horizontal_up_10_%1, 4,4,6
+%macro PRED8x8L_HORIZONTAL_UP 0
+cglobal pred8x8l_horizontal_up_10, 4, 4, 6
mova m0, [r0+r3*0-16]
punpckhwd m0, [r0+r3*1-16]
shr r1d, 14
@@ -1000,14 +1007,15 @@ cglobal pred8x8l_horizontal_up_10_%1, 4,4,6
RET
%endmacro
-INIT_XMM
+INIT_XMM sse2
%define PALIGNR PALIGNR_MMX
-PRED8x8L_HORIZONTAL_UP sse2
+PRED8x8L_HORIZONTAL_UP
+INIT_XMM ssse3
%define PALIGNR PALIGNR_SSSE3
-PRED8x8L_HORIZONTAL_UP ssse3
+PRED8x8L_HORIZONTAL_UP
%if HAVE_AVX_EXTERNAL
-INIT_AVX
-PRED8x8L_HORIZONTAL_UP avx
+INIT_XMM avx
+PRED8x8L_HORIZONTAL_UP
%endif
@@ -1023,8 +1031,8 @@ PRED8x8L_HORIZONTAL_UP avx
%endif
%endmacro
-%macro PRED16x16_VERTICAL 1
-cglobal pred16x16_vertical_10_%1, 2,3
+%macro PRED16x16_VERTICAL 0
+cglobal pred16x16_vertical_10, 2, 3
sub r0, r1
mov r2d, 8
mova m0, [r0+ 0]
@@ -1042,16 +1050,16 @@ cglobal pred16x16_vertical_10_%1, 2,3
REP_RET
%endmacro
-INIT_MMX
-PRED16x16_VERTICAL mmxext
-INIT_XMM
-PRED16x16_VERTICAL sse2
+INIT_MMX mmx2
+PRED16x16_VERTICAL
+INIT_XMM sse2
+PRED16x16_VERTICAL
;-----------------------------------------------------------------------------
; void pred16x16_horizontal(pixel *src, int stride)
;-----------------------------------------------------------------------------
-%macro PRED16x16_HORIZONTAL 1
-cglobal pred16x16_horizontal_10_%1, 2,3
+%macro PRED16x16_HORIZONTAL 0
+cglobal pred16x16_horizontal_10, 2, 3
mov r2d, 8
.vloop:
movd m0, [r0+r1*0-4]
@@ -1066,16 +1074,16 @@ cglobal pred16x16_horizontal_10_%1, 2,3
REP_RET
%endmacro
-INIT_MMX
-PRED16x16_HORIZONTAL mmxext
-INIT_XMM
-PRED16x16_HORIZONTAL sse2
+INIT_MMX mmx2
+PRED16x16_HORIZONTAL
+INIT_XMM sse2
+PRED16x16_HORIZONTAL
;-----------------------------------------------------------------------------
; void pred16x16_dc(pixel *src, int stride)
;-----------------------------------------------------------------------------
-%macro PRED16x16_DC 1
-cglobal pred16x16_dc_10_%1, 2,6
+%macro PRED16x16_DC 0
+cglobal pred16x16_dc_10, 2, 6
mov r5, r0
sub r0, r1
mova m0, [r0+0]
@@ -1112,16 +1120,16 @@ cglobal pred16x16_dc_10_%1, 2,6
REP_RET
%endmacro
-INIT_MMX
-PRED16x16_DC mmxext
-INIT_XMM
-PRED16x16_DC sse2
+INIT_MMX mmx2
+PRED16x16_DC
+INIT_XMM sse2
+PRED16x16_DC
;-----------------------------------------------------------------------------
; void pred16x16_top_dc(pixel *src, int stride)
;-----------------------------------------------------------------------------
-%macro PRED16x16_TOP_DC 1
-cglobal pred16x16_top_dc_10_%1, 2,3
+%macro PRED16x16_TOP_DC 0
+cglobal pred16x16_top_dc_10, 2, 3
sub r0, r1
mova m0, [r0+0]
paddw m0, [r0+mmsize]
@@ -1144,16 +1152,16 @@ cglobal pred16x16_top_dc_10_%1, 2,3
REP_RET
%endmacro
-INIT_MMX
-PRED16x16_TOP_DC mmxext
-INIT_XMM
-PRED16x16_TOP_DC sse2
+INIT_MMX mmx2
+PRED16x16_TOP_DC
+INIT_XMM sse2
+PRED16x16_TOP_DC
;-----------------------------------------------------------------------------
; void pred16x16_left_dc(pixel *src, int stride)
;-----------------------------------------------------------------------------
-%macro PRED16x16_LEFT_DC 1
-cglobal pred16x16_left_dc_10_%1, 2,6
+%macro PRED16x16_LEFT_DC 0
+cglobal pred16x16_left_dc_10, 2, 6
mov r5, r0
sub r0, 2
@@ -1181,16 +1189,16 @@ cglobal pred16x16_left_dc_10_%1, 2,6
REP_RET
%endmacro
-INIT_MMX
-PRED16x16_LEFT_DC mmxext
-INIT_XMM
-PRED16x16_LEFT_DC sse2
+INIT_MMX mmx2
+PRED16x16_LEFT_DC
+INIT_XMM sse2
+PRED16x16_LEFT_DC
;-----------------------------------------------------------------------------
; void pred16x16_128_dc(pixel *src, int stride)
;-----------------------------------------------------------------------------
-%macro PRED16x16_128_DC 1
-cglobal pred16x16_128_dc_10_%1, 2,3
+%macro PRED16x16_128_DC 0
+cglobal pred16x16_128_dc_10, 2,3
mova m0, [pw_512]
mov r2d, 8
.loop:
@@ -1202,7 +1210,7 @@ cglobal pred16x16_128_dc_10_%1, 2,3
REP_RET
%endmacro
-INIT_MMX
-PRED16x16_128_DC mmxext
-INIT_XMM
-PRED16x16_128_DC sse2
+INIT_MMX mmx2
+PRED16x16_128_DC
+INIT_XMM sse2
+PRED16x16_128_DC
diff --git a/libavcodec/x86/h264_intrapred_init.c b/libavcodec/x86/h264_intrapred_init.c
index 6d8b414dd3..2ce02f0f6c 100644
--- a/libavcodec/x86/h264_intrapred_init.c
+++ b/libavcodec/x86/h264_intrapred_init.c
@@ -25,7 +25,7 @@
#define PRED4x4(TYPE, DEPTH, OPT) \
void ff_pred4x4_ ## TYPE ## _ ## DEPTH ## _ ## OPT (uint8_t *src, const uint8_t *topright, int stride);
-PRED4x4(dc, 10, mmxext)
+PRED4x4(dc, 10, mmx2)
PRED4x4(down_left, 10, sse2)
PRED4x4(down_left, 10, avx)
PRED4x4(down_right, 10, sse2)
@@ -36,7 +36,7 @@ PRED4x4(vertical_left, 10, avx)
PRED4x4(vertical_right, 10, sse2)
PRED4x4(vertical_right, 10, ssse3)
PRED4x4(vertical_right, 10, avx)
-PRED4x4(horizontal_up, 10, mmxext)
+PRED4x4(horizontal_up, 10, mmx2)
PRED4x4(horizontal_down, 10, sse2)
PRED4x4(horizontal_down, 10, ssse3)
PRED4x4(horizontal_down, 10, avx)
@@ -44,7 +44,7 @@ PRED4x4(horizontal_down, 10, avx)
#define PRED8x8(TYPE, DEPTH, OPT) \
void ff_pred8x8_ ## TYPE ## _ ## DEPTH ## _ ## OPT (uint8_t *src, int stride);
-PRED8x8(dc, 10, mmxext)
+PRED8x8(dc, 10, mmx2)
PRED8x8(dc, 10, sse2)
PRED8x8(top_dc, 10, sse2)
PRED8x8(plane, 10, sse2)
@@ -56,7 +56,7 @@ void ff_pred8x8l_ ## TYPE ## _ ## DEPTH ## _ ## OPT (uint8_t *src, int has_tople
PRED8x8L(dc, 10, sse2)
PRED8x8L(dc, 10, avx)
-PRED8x8L(128_dc, 10, mmxext)
+PRED8x8L(128_dc, 10, mmx2)
PRED8x8L(128_dc, 10, sse2)
PRED8x8L(top_dc, 10, sse2)
PRED8x8L(top_dc, 10, avx)
@@ -81,17 +81,17 @@ PRED8x8L(horizontal_up, 10, avx)
#define PRED16x16(TYPE, DEPTH, OPT)\
void ff_pred16x16_ ## TYPE ## _ ## DEPTH ## _ ## OPT (uint8_t *src, int stride);
-PRED16x16(dc, 10, mmxext)
+PRED16x16(dc, 10, mmx2)
PRED16x16(dc, 10, sse2)
-PRED16x16(top_dc, 10, mmxext)
+PRED16x16(top_dc, 10, mmx2)
PRED16x16(top_dc, 10, sse2)
-PRED16x16(128_dc, 10, mmxext)
+PRED16x16(128_dc, 10, mmx2)
PRED16x16(128_dc, 10, sse2)
-PRED16x16(left_dc, 10, mmxext)
+PRED16x16(left_dc, 10, mmx2)
PRED16x16(left_dc, 10, sse2)
-PRED16x16(vertical, 10, mmxext)
+PRED16x16(vertical, 10, mmx2)
PRED16x16(vertical, 10, sse2)
-PRED16x16(horizontal, 10, mmxext)
+PRED16x16(horizontal, 10, mmx2)
PRED16x16(horizontal, 10, sse2)
void ff_pred16x16_vertical_mmx (uint8_t *src, int stride);
@@ -309,20 +309,20 @@ void ff_h264_pred_init_x86(H264PredContext *h, int codec_id, const int bit_depth
}
} else if (bit_depth == 10) {
if (EXTERNAL_MMXEXT(mm_flags)) {
- h->pred4x4[DC_PRED ] = ff_pred4x4_dc_10_mmxext;
- h->pred4x4[HOR_UP_PRED ] = ff_pred4x4_horizontal_up_10_mmxext;
+ h->pred4x4[DC_PRED ] = ff_pred4x4_dc_10_mmx2;
+ h->pred4x4[HOR_UP_PRED ] = ff_pred4x4_horizontal_up_10_mmx2;
if (chroma_format_idc == 1)
- h->pred8x8[DC_PRED8x8 ] = ff_pred8x8_dc_10_mmxext;
+ h->pred8x8[DC_PRED8x8 ] = ff_pred8x8_dc_10_mmx2;
- h->pred8x8l[DC_128_PRED ] = ff_pred8x8l_128_dc_10_mmxext;
+ h->pred8x8l[DC_128_PRED ] = ff_pred8x8l_128_dc_10_mmx2;
- h->pred16x16[DC_PRED8x8 ] = ff_pred16x16_dc_10_mmxext;
- h->pred16x16[TOP_DC_PRED8x8 ] = ff_pred16x16_top_dc_10_mmxext;
- h->pred16x16[DC_128_PRED8x8 ] = ff_pred16x16_128_dc_10_mmxext;
- h->pred16x16[LEFT_DC_PRED8x8 ] = ff_pred16x16_left_dc_10_mmxext;
- h->pred16x16[VERT_PRED8x8 ] = ff_pred16x16_vertical_10_mmxext;
- h->pred16x16[HOR_PRED8x8 ] = ff_pred16x16_horizontal_10_mmxext;
+ h->pred16x16[DC_PRED8x8 ] = ff_pred16x16_dc_10_mmx2;
+ h->pred16x16[TOP_DC_PRED8x8 ] = ff_pred16x16_top_dc_10_mmx2;
+ h->pred16x16[DC_128_PRED8x8 ] = ff_pred16x16_128_dc_10_mmx2;
+ h->pred16x16[LEFT_DC_PRED8x8 ] = ff_pred16x16_left_dc_10_mmx2;
+ h->pred16x16[VERT_PRED8x8 ] = ff_pred16x16_vertical_10_mmx2;
+ h->pred16x16[HOR_PRED8x8 ] = ff_pred16x16_horizontal_10_mmx2;
}
if (EXTERNAL_SSE2(mm_flags)) {
h->pred4x4[DIAG_DOWN_LEFT_PRED ] = ff_pred4x4_down_left_10_sse2;
diff --git a/libavformat/dv.c b/libavformat/dv.c
index 75d2136628..ae39816a01 100644
--- a/libavformat/dv.c
+++ b/libavformat/dv.c
@@ -236,24 +236,24 @@ static int dv_extract_audio_info(DVDemuxContext* c, uint8_t* frame)
/* Dynamic handling of the audio streams in DV */
for (i = 0; i < ach; i++) {
- if (!c->ast[i]) {
- c->ast[i] = avformat_new_stream(c->fctx, NULL);
- if (!c->ast[i])
- break;
- avpriv_set_pts_info(c->ast[i], 64, 1, 30000);
- c->ast[i]->codec->codec_type = AVMEDIA_TYPE_AUDIO;
- c->ast[i]->codec->codec_id = AV_CODEC_ID_PCM_S16LE;
-
- av_init_packet(&c->audio_pkt[i]);
- c->audio_pkt[i].size = 0;
- c->audio_pkt[i].data = c->audio_buf[i];
- c->audio_pkt[i].stream_index = c->ast[i]->index;
- c->audio_pkt[i].flags |= AV_PKT_FLAG_KEY;
- }
- c->ast[i]->codec->sample_rate = dv_audio_frequency[freq];
- c->ast[i]->codec->channels = 2;
- c->ast[i]->codec->bit_rate = 2 * dv_audio_frequency[freq] * 16;
- c->ast[i]->start_time = 0;
+ if (!c->ast[i]) {
+ c->ast[i] = avformat_new_stream(c->fctx, NULL);
+ if (!c->ast[i])
+ break;
+ avpriv_set_pts_info(c->ast[i], 64, 1, 30000);
+ c->ast[i]->codec->codec_type = AVMEDIA_TYPE_AUDIO;
+ c->ast[i]->codec->codec_id = AV_CODEC_ID_PCM_S16LE;
+
+ av_init_packet(&c->audio_pkt[i]);
+ c->audio_pkt[i].size = 0;
+ c->audio_pkt[i].data = c->audio_buf[i];
+ c->audio_pkt[i].stream_index = c->ast[i]->index;
+ c->audio_pkt[i].flags |= AV_PKT_FLAG_KEY;
+ }
+ c->ast[i]->codec->sample_rate = dv_audio_frequency[freq];
+ c->ast[i]->codec->channels = 2;
+ c->ast[i]->codec->bit_rate = 2 * dv_audio_frequency[freq] * 16;
+ c->ast[i]->start_time = 0;
}
c->ach = i;
@@ -271,14 +271,14 @@ static int dv_extract_video_info(DVDemuxContext *c, uint8_t* frame)
avctx = c->vst->codec;
avpriv_set_pts_info(c->vst, 64, c->sys->time_base.num,
- c->sys->time_base.den);
+ c->sys->time_base.den);
avctx->time_base= c->sys->time_base;
/* finding out SAR is a little bit messy */
vsc_pack = dv_extract_pack(frame, dv_video_control);
apt = frame[4] & 0x07;
is16_9 = (vsc_pack && ((vsc_pack[2] & 0x07) == 0x02 ||
- (!apt && (vsc_pack[2] & 0x07) == 0x07)));
+ (!apt && (vsc_pack[2] & 0x07) == 0x07)));
c->vst->sample_aspect_ratio = c->sys->sar[is16_9];
avctx->bit_rate = av_rescale_q(c->sys->frame_size, (AVRational){8,1},
c->sys->time_base);
@@ -336,12 +336,12 @@ int avpriv_dv_get_packet(DVDemuxContext *c, AVPacket *pkt)
int i;
for (i = 0; i < c->ach; i++) {
- if (c->ast[i] && c->audio_pkt[i].size) {
- *pkt = c->audio_pkt[i];
- c->audio_pkt[i].size = 0;
- size = pkt->size;
- break;
- }
+ if (c->ast[i] && c->audio_pkt[i].size) {
+ *pkt = c->audio_pkt[i];
+ c->audio_pkt[i].size = 0;
+ size = pkt->size;
+ break;
+ }
}
return size;
@@ -356,17 +356,17 @@ int avpriv_dv_produce_packet(DVDemuxContext *c, AVPacket *pkt,
if (buf_size < DV_PROFILE_BYTES ||
!(c->sys = avpriv_dv_frame_profile(c->sys, buf, buf_size)) ||
buf_size < c->sys->frame_size) {
- return -1; /* Broken frame, or not enough data */
+ return -1; /* Broken frame, or not enough data */
}
/* Queueing audio packet */
/* FIXME: in case of no audio/bad audio we have to do something */
size = dv_extract_audio_info(c, buf);
for (i = 0; i < c->ach; i++) {
- c->audio_pkt[i].pos = pos;
- c->audio_pkt[i].size = size;
- c->audio_pkt[i].pts = c->abytes * 30000*8 / c->ast[i]->codec->bit_rate;
- ppcm[i] = c->audio_buf[i];
+ c->audio_pkt[i].pos = pos;
+ c->audio_pkt[i].size = size;
+ c->audio_pkt[i].pts = c->abytes * 30000 * 8 / c->ast[i]->codec->bit_rate;
+ ppcm[i] = c->audio_buf[i];
}
if (c->ach)
dv_extract_audio(buf, ppcm, c->sys);