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