|
|
@ -36,7 +36,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094
|
|
|
|
+#endif
|
|
|
|
+#endif
|
|
|
|
--- libdv-0.104-old/libdv/dct_block_mmx.S
|
|
|
|
--- libdv-0.104-old/libdv/dct_block_mmx.S
|
|
|
|
+++ libdv-0.104/libdv/dct_block_mmx.S
|
|
|
|
+++ libdv-0.104/libdv/dct_block_mmx.S
|
|
|
|
@@ -53,19 +53,22 @@ scratch2: .quad 0
|
|
|
|
@@ -55,19 +55,22 @@ scratch2: .quad 0
|
|
|
|
|
|
|
|
|
|
|
|
.section .note.GNU-stack, "", @progbits
|
|
|
|
.section .note.GNU-stack, "", @progbits
|
|
|
|
|
|
|
|
|
|
|
@ -61,7 +61,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094
|
|
|
|
|
|
|
|
|
|
|
|
# column 0
|
|
|
|
# column 0
|
|
|
|
movq 16*0(%esi), %mm0 # v0
|
|
|
|
movq 16*0(%esi), %mm0 # v0
|
|
|
|
@@ -86,22 +91,22 @@ _dv_dct_88_block_mmx:
|
|
|
|
@@ -88,22 +93,22 @@ _dv_dct_88_block_mmx:
|
|
|
|
|
|
|
|
|
|
|
|
movq 16*3(%esi), %mm5 # v3
|
|
|
|
movq 16*3(%esi), %mm5 # v3
|
|
|
|
movq 16*4(%esi), %mm7 # v4
|
|
|
|
movq 16*4(%esi), %mm7 # v4
|
|
|
@ -94,7 +94,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094
|
|
|
|
movq %mm0, %mm6 # duplicate v10
|
|
|
|
movq %mm0, %mm6 # duplicate v10
|
|
|
|
|
|
|
|
|
|
|
|
paddw %mm1, %mm0 # v10+v11
|
|
|
|
paddw %mm1, %mm0 # v10+v11
|
|
|
|
@@ -111,10 +116,10 @@ _dv_dct_88_block_mmx:
|
|
|
|
@@ -113,10 +118,10 @@ _dv_dct_88_block_mmx:
|
|
|
|
movq %mm6, 16*4(%esi) # out4: v10-v11
|
|
|
|
movq %mm6, 16*4(%esi) # out4: v10-v11
|
|
|
|
|
|
|
|
|
|
|
|
movq %mm4, %mm0 # mm0: v06
|
|
|
|
movq %mm4, %mm0 # mm0: v06
|
|
|
@ -107,7 +107,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094
|
|
|
|
psllw $1, %mm4 # v35: compensate the coeefient scale
|
|
|
|
psllw $1, %mm4 # v35: compensate the coeefient scale
|
|
|
|
|
|
|
|
|
|
|
|
movq %mm4, %mm6 # duplicate v35
|
|
|
|
movq %mm4, %mm6 # duplicate v35
|
|
|
|
@@ -123,7 +128,7 @@ _dv_dct_88_block_mmx:
|
|
|
|
@@ -125,7 +130,7 @@ _dv_dct_88_block_mmx:
|
|
|
|
|
|
|
|
|
|
|
|
paddw %mm5, %mm3 # v22: v12+v13
|
|
|
|
paddw %mm5, %mm3 # v22: v12+v13
|
|
|
|
|
|
|
|
|
|
|
@ -116,7 +116,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094
|
|
|
|
psllw $16-NSHIFT, %mm3 # v32: compensate the coeefient scale
|
|
|
|
psllw $16-NSHIFT, %mm3 # v32: compensate the coeefient scale
|
|
|
|
movq %mm5, %mm6 # duplicate v13
|
|
|
|
movq %mm5, %mm6 # duplicate v13
|
|
|
|
|
|
|
|
|
|
|
|
@@ -134,13 +139,13 @@ _dv_dct_88_block_mmx:
|
|
|
|
@@ -136,13 +141,13 @@ _dv_dct_88_block_mmx:
|
|
|
|
movq %mm6, 16*6(%esi) # out6: v13-v32
|
|
|
|
movq %mm6, 16*6(%esi) # out6: v13-v32
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -134,7 +134,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094
|
|
|
|
psllw $16-WA4_SHIFT, %mm5 # v36: compensate the coeefient scale
|
|
|
|
psllw $16-WA4_SHIFT, %mm5 # v36: compensate the coeefient scale
|
|
|
|
psllw $16-NSHIFT, %mm7 # v34: compensate the coeefient scale
|
|
|
|
psllw $16-NSHIFT, %mm7 # v34: compensate the coeefient scale
|
|
|
|
|
|
|
|
|
|
|
|
@@ -188,22 +193,22 @@ _dv_dct_88_block_mmx:
|
|
|
|
@@ -190,22 +195,22 @@ _dv_dct_88_block_mmx:
|
|
|
|
|
|
|
|
|
|
|
|
movq 16*3(%esi), %mm5 # v3
|
|
|
|
movq 16*3(%esi), %mm5 # v3
|
|
|
|
movq 16*4(%esi), %mm7 # v4
|
|
|
|
movq 16*4(%esi), %mm7 # v4
|
|
|
@ -167,7 +167,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094
|
|
|
|
movq %mm0, %mm6 # duplicate v10
|
|
|
|
movq %mm0, %mm6 # duplicate v10
|
|
|
|
|
|
|
|
|
|
|
|
paddw %mm1, %mm0 # v10+v11
|
|
|
|
paddw %mm1, %mm0 # v10+v11
|
|
|
|
@@ -213,10 +218,10 @@ _dv_dct_88_block_mmx:
|
|
|
|
@@ -215,10 +220,10 @@ _dv_dct_88_block_mmx:
|
|
|
|
movq %mm6, 16*4(%esi) # out4: v10-v11
|
|
|
|
movq %mm6, 16*4(%esi) # out4: v10-v11
|
|
|
|
|
|
|
|
|
|
|
|
movq %mm4, %mm0 # mm0: v06
|
|
|
|
movq %mm4, %mm0 # mm0: v06
|
|
|
@ -180,7 +180,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094
|
|
|
|
psllw $16-NSHIFT, %mm4 # v35: compensate the coeefient scale
|
|
|
|
psllw $16-NSHIFT, %mm4 # v35: compensate the coeefient scale
|
|
|
|
|
|
|
|
|
|
|
|
movq %mm4, %mm6 # duplicate v35
|
|
|
|
movq %mm4, %mm6 # duplicate v35
|
|
|
|
@@ -225,7 +230,7 @@ _dv_dct_88_block_mmx:
|
|
|
|
@@ -227,7 +232,7 @@ _dv_dct_88_block_mmx:
|
|
|
|
|
|
|
|
|
|
|
|
paddw %mm5, %mm3 # v22: v12+v13
|
|
|
|
paddw %mm5, %mm3 # v22: v12+v13
|
|
|
|
|
|
|
|
|
|
|
@ -189,7 +189,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094
|
|
|
|
psllw $16-NSHIFT, %mm3 # v32: compensate the coeefient scale
|
|
|
|
psllw $16-NSHIFT, %mm3 # v32: compensate the coeefient scale
|
|
|
|
movq %mm5, %mm6 # duplicate v13
|
|
|
|
movq %mm5, %mm6 # duplicate v13
|
|
|
|
|
|
|
|
|
|
|
|
@@ -235,13 +240,13 @@ _dv_dct_88_block_mmx:
|
|
|
|
@@ -237,13 +242,13 @@ _dv_dct_88_block_mmx:
|
|
|
|
movq %mm5, 16*2(%esi) # out2: v13+v32
|
|
|
|
movq %mm5, 16*2(%esi) # out2: v13+v32
|
|
|
|
movq %mm6, 16*6(%esi) # out6: v13-v32
|
|
|
|
movq %mm6, 16*6(%esi) # out6: v13-v32
|
|
|
|
|
|
|
|
|
|
|
@ -207,7 +207,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094
|
|
|
|
psllw $16-NSHIFT, %mm7
|
|
|
|
psllw $16-NSHIFT, %mm7
|
|
|
|
psllw $16-WA4_SHIFT, %mm5 # v36: compensate the coeffient
|
|
|
|
psllw $16-WA4_SHIFT, %mm5 # v36: compensate the coeffient
|
|
|
|
# scale note that WA4 is shifted 1 bit less than the others
|
|
|
|
# scale note that WA4 is shifted 1 bit less than the others
|
|
|
|
@@ -748,11 +755,12 @@ _dv_dct_block_mmx_postscale_88:
|
|
|
|
@@ -755,11 +762,12 @@ _dv_dct_block_mmx_postscale_88:
|
|
|
|
_dv_dct_248_block_mmx:
|
|
|
|
_dv_dct_248_block_mmx:
|
|
|
|
|
|
|
|
|
|
|
|
pushl %ebp
|
|
|
|
pushl %ebp
|
|
|
@ -222,7 +222,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094
|
|
|
|
|
|
|
|
|
|
|
|
# column 0
|
|
|
|
# column 0
|
|
|
|
|
|
|
|
|
|
|
|
@@ -779,7 +789,7 @@ _dv_dct_248_block_mmx:
|
|
|
|
@@ -781,7 +791,7 @@ _dv_dct_248_block_mmx:
|
|
|
|
paddw %mm1, %mm0 # v20: v10+v11
|
|
|
|
paddw %mm1, %mm0 # v20: v10+v11
|
|
|
|
psubw %mm1, %mm3 # v21: v10-v11
|
|
|
|
psubw %mm1, %mm3 # v21: v10-v11
|
|
|
|
|
|
|
|
|
|
|
@ -231,7 +231,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094
|
|
|
|
movq %mm4, %mm2
|
|
|
|
movq %mm4, %mm2
|
|
|
|
psllw $16-NSHIFT, %mm5 # v32: compensate the coeffient scale
|
|
|
|
psllw $16-NSHIFT, %mm5 # v32: compensate the coeffient scale
|
|
|
|
|
|
|
|
|
|
|
|
@@ -818,7 +828,7 @@ _dv_dct_248_block_mmx:
|
|
|
|
@@ -820,7 +830,7 @@ _dv_dct_248_block_mmx:
|
|
|
|
paddw %mm1, %mm0 # v20: v10+v11
|
|
|
|
paddw %mm1, %mm0 # v20: v10+v11
|
|
|
|
psubw %mm1, %mm3 # v21: v10-v11
|
|
|
|
psubw %mm1, %mm3 # v21: v10-v11
|
|
|
|
|
|
|
|
|
|
|
@ -240,7 +240,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094
|
|
|
|
movq %mm4, %mm2
|
|
|
|
movq %mm4, %mm2
|
|
|
|
psllw $16-NSHIFT, %mm5 # v32: compensate the coeffient scale
|
|
|
|
psllw $16-NSHIFT, %mm5 # v32: compensate the coeffient scale
|
|
|
|
|
|
|
|
|
|
|
|
@@ -855,7 +865,7 @@ _dv_dct_248_block_mmx:
|
|
|
|
@@ -857,7 +867,7 @@ _dv_dct_248_block_mmx:
|
|
|
|
paddw %mm1, %mm0 # v20: v10+v11
|
|
|
|
paddw %mm1, %mm0 # v20: v10+v11
|
|
|
|
psubw %mm1, %mm3 # v21: v10-v11
|
|
|
|
psubw %mm1, %mm3 # v21: v10-v11
|
|
|
|
|
|
|
|
|
|
|
@ -249,7 +249,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094
|
|
|
|
movq %mm4, %mm2
|
|
|
|
movq %mm4, %mm2
|
|
|
|
psllw $16-NSHIFT, %mm5 # v32: compensate the coeffient scale
|
|
|
|
psllw $16-NSHIFT, %mm5 # v32: compensate the coeffient scale
|
|
|
|
|
|
|
|
|
|
|
|
@@ -892,7 +902,7 @@ _dv_dct_248_block_mmx:
|
|
|
|
@@ -894,7 +904,7 @@ _dv_dct_248_block_mmx:
|
|
|
|
paddw %mm1, %mm0 # v20: v10+v11
|
|
|
|
paddw %mm1, %mm0 # v20: v10+v11
|
|
|
|
psubw %mm1, %mm3 # v21: v10-v11
|
|
|
|
psubw %mm1, %mm3 # v21: v10-v11
|
|
|
|
|
|
|
|
|
|
|
@ -339,7 +339,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.section .note.GNU-stack, "", @progbits
|
|
|
|
.section .note.GNU-stack, "", @progbits
|
|
|
|
@@ -45,11 +43,14 @@ _dv_vlc_encode_block_mmx:
|
|
|
|
@@ -49,11 +47,14 @@ _dv_vlc_encode_block_mmx:
|
|
|
|
|
|
|
|
|
|
|
|
movl $63, %ecx
|
|
|
|
movl $63, %ecx
|
|
|
|
|
|
|
|
|
|
|
@ -356,7 +356,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094
|
|
|
|
xorl %ebp, %ebp
|
|
|
|
xorl %ebp, %ebp
|
|
|
|
subl $8, %edx
|
|
|
|
subl $8, %edx
|
|
|
|
vlc_encode_block_mmx_loop:
|
|
|
|
vlc_encode_block_mmx_loop:
|
|
|
|
@@ -121,7 +124,7 @@ _dv_vlc_num_bits_block_x86:
|
|
|
|
@@ -125,7 +128,7 @@ _dv_vlc_num_bits_block_x86:
|
|
|
|
addl $2, %edi
|
|
|
|
addl $2, %edi
|
|
|
|
|
|
|
|
|
|
|
|
movl $63, %ecx
|
|
|
|
movl $63, %ecx
|
|
|
@ -365,7 +365,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094
|
|
|
|
|
|
|
|
|
|
|
|
vlc_num_bits_block_x86_loop:
|
|
|
|
vlc_num_bits_block_x86_loop:
|
|
|
|
movw (%edi), %ax
|
|
|
|
movw (%edi), %ax
|
|
|
|
@@ -579,8 +590,11 @@ _dv_need_dct_248_mmx_rows:
|
|
|
|
@@ -583,8 +594,11 @@ _dv_need_dct_248_mmx_rows:
|
|
|
|
paddw %mm5, %mm1
|
|
|
|
paddw %mm5, %mm1
|
|
|
|
|
|
|
|
|
|
|
|
paddw %mm1, %mm0
|
|
|
|
paddw %mm1, %mm0
|
|
|
@ -406,7 +406,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
/*
|
|
|
|
* column 0: even part
|
|
|
|
* column 0: even part
|
|
|
|
@@ -35,7 +41,7 @@ _dv_idct_block_mmx:
|
|
|
|
@@ -34,7 +40,7 @@ _dv_idct_block_mmx:
|
|
|
|
movq %mm1, %mm2 /* added 11/1/96 */
|
|
|
|
movq %mm1, %mm2 /* added 11/1/96 */
|
|
|
|
pmulhw 8*8(%esi),%mm5 /* V8 */
|
|
|
|
pmulhw 8*8(%esi),%mm5 /* V8 */
|
|
|
|
psubsw %mm0, %mm1 /* V16 */
|
|
|
|
psubsw %mm0, %mm1 /* V16 */
|
|
|
@ -415,7 +415,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094
|
|
|
|
paddsw %mm0, %mm2 /* V17 */
|
|
|
|
paddsw %mm0, %mm2 /* V17 */
|
|
|
|
movq %mm2, %mm0 /* duplicate V17 */
|
|
|
|
movq %mm2, %mm0 /* duplicate V17 */
|
|
|
|
psraw $1, %mm2 /* t75=t82 */
|
|
|
|
psraw $1, %mm2 /* t75=t82 */
|
|
|
|
@@ -76,7 +82,7 @@ _dv_idct_block_mmx:
|
|
|
|
@@ -75,7 +81,7 @@ _dv_idct_block_mmx:
|
|
|
|
paddsw %mm0, %mm3 /* V29 ; free mm0 */
|
|
|
|
paddsw %mm0, %mm3 /* V29 ; free mm0 */
|
|
|
|
movq %mm7, %mm1 /* duplicate V26 */
|
|
|
|
movq %mm7, %mm1 /* duplicate V26 */
|
|
|
|
psraw $1, %mm3 /* t91=t94 */
|
|
|
|
psraw $1, %mm3 /* t91=t94 */
|
|
|
@ -424,7 +424,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094
|
|
|
|
psraw $1, %mm1 /* t96 */
|
|
|
|
psraw $1, %mm1 /* t96 */
|
|
|
|
movq %mm5, %mm0 /* duplicate V2 */
|
|
|
|
movq %mm5, %mm0 /* duplicate V2 */
|
|
|
|
psraw $2, %mm4 /* t85=t87 */
|
|
|
|
psraw $2, %mm4 /* t85=t87 */
|
|
|
|
@@ -84,15 +90,15 @@ _dv_idct_block_mmx:
|
|
|
|
@@ -83,15 +89,15 @@ _dv_idct_block_mmx:
|
|
|
|
psubsw %mm4, %mm0 /* V28 ; free mm4 */
|
|
|
|
psubsw %mm4, %mm0 /* V28 ; free mm4 */
|
|
|
|
movq %mm0, %mm2 /* duplicate V28 */
|
|
|
|
movq %mm0, %mm2 /* duplicate V28 */
|
|
|
|
psraw $1, %mm5 /* t90=t93 */
|
|
|
|
psraw $1, %mm5 /* t90=t93 */
|
|
|
@ -443,7 +443,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094
|
|
|
|
nop
|
|
|
|
nop
|
|
|
|
psubsw %mm1, %mm0 /* V38 */
|
|
|
|
psubsw %mm1, %mm0 /* V38 */
|
|
|
|
psubsw %mm7, %mm1 /* V37 ; free mm7 */
|
|
|
|
psubsw %mm7, %mm1 /* V37 ; free mm7 */
|
|
|
|
@@ -159,7 +165,7 @@ _dv_idct_block_mmx:
|
|
|
|
@@ -158,7 +164,7 @@ _dv_idct_block_mmx:
|
|
|
|
psubsw %mm7, %mm1 /* V50 */
|
|
|
|
psubsw %mm7, %mm1 /* V50 */
|
|
|
|
pmulhw 8*9(%esi), %mm5 /* V9 */
|
|
|
|
pmulhw 8*9(%esi), %mm5 /* V9 */
|
|
|
|
paddsw %mm7, %mm2 /* V51 */
|
|
|
|
paddsw %mm7, %mm2 /* V51 */
|
|
|
@ -452,7 +452,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094
|
|
|
|
movq %mm2, %mm6 /* duplicate V51 */
|
|
|
|
movq %mm2, %mm6 /* duplicate V51 */
|
|
|
|
psraw $1, %mm2 /* t138=t144 */
|
|
|
|
psraw $1, %mm2 /* t138=t144 */
|
|
|
|
movq %mm3, %mm4 /* duplicate V1 */
|
|
|
|
movq %mm3, %mm4 /* duplicate V1 */
|
|
|
|
@@ -200,11 +206,11 @@ _dv_idct_block_mmx:
|
|
|
|
@@ -199,11 +205,11 @@ _dv_idct_block_mmx:
|
|
|
|
* even more by doing the correction step in a later stage when the number
|
|
|
|
* even more by doing the correction step in a later stage when the number
|
|
|
|
* is actually multiplied by 16
|
|
|
|
* is actually multiplied by 16
|
|
|
|
*/
|
|
|
|
*/
|
|
|
@ -466,7 +466,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094
|
|
|
|
movq %mm5, %mm6 /* duplicate V3 */
|
|
|
|
movq %mm5, %mm6 /* duplicate V3 */
|
|
|
|
psraw $2, %mm4 /* t148=t150 */
|
|
|
|
psraw $2, %mm4 /* t148=t150 */
|
|
|
|
paddsw %mm4, %mm5 /* V61 */
|
|
|
|
paddsw %mm4, %mm5 /* V61 */
|
|
|
|
@@ -213,13 +219,13 @@ _dv_idct_block_mmx:
|
|
|
|
@@ -212,13 +218,13 @@ _dv_idct_block_mmx:
|
|
|
|
psllw $1, %mm1 /* t169 */
|
|
|
|
psllw $1, %mm1 /* t169 */
|
|
|
|
paddsw %mm0, %mm5 /* V65 -> result */
|
|
|
|
paddsw %mm0, %mm5 /* V65 -> result */
|
|
|
|
psubsw %mm0, %mm4 /* V64 ; free mm0 */
|
|
|
|
psubsw %mm0, %mm4 /* V64 ; free mm0 */
|
|
|
@ -483,7 +483,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094
|
|
|
|
psraw $1, %mm2 /* t172 */
|
|
|
|
psraw $1, %mm2 /* t172 */
|
|
|
|
/* moved from next block */
|
|
|
|
/* moved from next block */
|
|
|
|
movq 8*5(%esi), %mm0 /* V56 */
|
|
|
|
movq 8*5(%esi), %mm0 /* V56 */
|
|
|
|
@@ -344,7 +350,7 @@ _dv_idct_block_mmx:
|
|
|
|
@@ -343,7 +349,7 @@ _dv_idct_block_mmx:
|
|
|
|
* movq 8*13(%esi), %mm4 tmt13
|
|
|
|
* movq 8*13(%esi), %mm4 tmt13
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
psubsw %mm4, %mm3 /* V134 */
|
|
|
|
psubsw %mm4, %mm3 /* V134 */
|
|
|
@ -492,7 +492,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094
|
|
|
|
movq 8*9(%esi), %mm6 /* tmt9 */
|
|
|
|
movq 8*9(%esi), %mm6 /* tmt9 */
|
|
|
|
paddsw %mm4, %mm5 /* V135 ; mm4 free */
|
|
|
|
paddsw %mm4, %mm5 /* V135 ; mm4 free */
|
|
|
|
movq %mm0, %mm4 /* duplicate tmt1 */
|
|
|
|
movq %mm0, %mm4 /* duplicate tmt1 */
|
|
|
|
@@ -373,17 +379,17 @@ _dv_idct_block_mmx:
|
|
|
|
@@ -372,17 +378,17 @@ _dv_idct_block_mmx:
|
|
|
|
psubsw %mm7, %mm0 /* V144 */
|
|
|
|
psubsw %mm7, %mm0 /* V144 */
|
|
|
|
movq %mm0, %mm3 /* duplicate V144 */
|
|
|
|
movq %mm0, %mm3 /* duplicate V144 */
|
|
|
|
paddsw %mm7, %mm2 /* V147 ; free mm7 */
|
|
|
|
paddsw %mm7, %mm2 /* V147 ; free mm7 */
|
|
|
@ -514,7 +514,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094
|
|
|
|
paddsw %mm2, %mm7 /* V149 ; free mm2 */
|
|
|
|
paddsw %mm2, %mm7 /* V149 ; free mm2 */
|
|
|
|
psllw $1, %mm1 /* t313 */
|
|
|
|
psllw $1, %mm1 /* t313 */
|
|
|
|
nop /* without the nop - freeze here for one clock */
|
|
|
|
nop /* without the nop - freeze here for one clock */
|
|
|
|
@@ -409,7 +415,7 @@ _dv_idct_block_mmx:
|
|
|
|
@@ -408,7 +414,7 @@ _dv_idct_block_mmx:
|
|
|
|
paddsw %mm3, %mm6 /* V164 ; free mm3 */
|
|
|
|
paddsw %mm3, %mm6 /* V164 ; free mm3 */
|
|
|
|
movq %mm4, %mm3 /* duplicate V142 */
|
|
|
|
movq %mm4, %mm3 /* duplicate V142 */
|
|
|
|
psubsw %mm5, %mm4 /* V165 ; free mm5 */
|
|
|
|
psubsw %mm5, %mm4 /* V165 ; free mm5 */
|
|
|
@ -523,7 +523,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094
|
|
|
|
psraw $4, %mm6
|
|
|
|
psraw $4, %mm6
|
|
|
|
psraw $4, %mm4
|
|
|
|
psraw $4, %mm4
|
|
|
|
paddsw %mm5, %mm3 /* V162 */
|
|
|
|
paddsw %mm5, %mm3 /* V162 */
|
|
|
|
@@ -420,11 +426,11 @@ _dv_idct_block_mmx:
|
|
|
|
@@ -419,11 +425,11 @@ _dv_idct_block_mmx:
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
movq %mm6, 8*9(%esi) /* out9 */
|
|
|
|
movq %mm6, 8*9(%esi) /* out9 */
|
|
|
|
paddsw %mm1, %mm0 /* V161 */
|
|
|
|
paddsw %mm1, %mm0 /* V161 */
|
|
|
@ -537,7 +537,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094
|
|
|
|
movq %mm2, %mm4 /* duplicate V140 */
|
|
|
|
movq %mm2, %mm4 /* duplicate V140 */
|
|
|
|
movq %mm5, 8*13(%esi) /* out13 */
|
|
|
|
movq %mm5, 8*13(%esi) /* out13 */
|
|
|
|
paddsw %mm7, %mm2 /* V160 */
|
|
|
|
paddsw %mm7, %mm2 /* V160 */
|
|
|
|
@@ -434,7 +440,7 @@ _dv_idct_block_mmx:
|
|
|
|
@@ -433,7 +439,7 @@ _dv_idct_block_mmx:
|
|
|
|
/* moved from the next block */
|
|
|
|
/* moved from the next block */
|
|
|
|
movq 8*3(%esi), %mm7
|
|
|
|
movq 8*3(%esi), %mm7
|
|
|
|
psraw $4, %mm4
|
|
|
|
psraw $4, %mm4
|
|
|
@ -546,7 +546,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094
|
|
|
|
/* moved from the next block */
|
|
|
|
/* moved from the next block */
|
|
|
|
movq %mm0, %mm1
|
|
|
|
movq %mm0, %mm1
|
|
|
|
movq %mm4, 8*15(%esi) /* out15 */
|
|
|
|
movq %mm4, 8*15(%esi) /* out15 */
|
|
|
|
@@ -491,15 +497,15 @@ _dv_idct_block_mmx:
|
|
|
|
@@ -490,15 +496,15 @@ _dv_idct_block_mmx:
|
|
|
|
paddsw %mm4, %mm3 /* V113 ; free mm4 */
|
|
|
|
paddsw %mm4, %mm3 /* V113 ; free mm4 */
|
|
|
|
movq %mm0, %mm4 /* duplicate V110 */
|
|
|
|
movq %mm0, %mm4 /* duplicate V110 */
|
|
|
|
paddsw %mm1, %mm2 /* V111 */
|
|
|
|
paddsw %mm1, %mm2 /* V111 */
|
|
|
@ -566,7 +566,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094
|
|
|
|
psllw $2, %mm0 /* t266 */
|
|
|
|
psllw $2, %mm0 /* t266 */
|
|
|
|
movq %mm1, (%esi) /* save V115 */
|
|
|
|
movq %mm1, (%esi) /* save V115 */
|
|
|
|
psllw $1, %mm5 /* t268 */
|
|
|
|
psllw $1, %mm5 /* t268 */
|
|
|
|
@@ -517,7 +523,7 @@ _dv_idct_block_mmx:
|
|
|
|
@@ -516,7 +522,7 @@ _dv_idct_block_mmx:
|
|
|
|
movq %mm6, %mm3 /* duplicate tmt4 */
|
|
|
|
movq %mm6, %mm3 /* duplicate tmt4 */
|
|
|
|
psubsw %mm0, %mm6 /* V100 */
|
|
|
|
psubsw %mm0, %mm6 /* V100 */
|
|
|
|
paddsw %mm0, %mm3 /* V101 ; free mm0 */
|
|
|
|
paddsw %mm0, %mm3 /* V101 ; free mm0 */
|
|
|
@ -575,7 +575,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094
|
|
|
|
movq %mm7, %mm5 /* duplicate tmt0 */
|
|
|
|
movq %mm7, %mm5 /* duplicate tmt0 */
|
|
|
|
movq 8*8(%esi), %mm1 /* tmt8 */
|
|
|
|
movq 8*8(%esi), %mm1 /* tmt8 */
|
|
|
|
paddsw %mm1, %mm7 /* V103 */
|
|
|
|
paddsw %mm1, %mm7 /* V103 */
|
|
|
|
@@ -551,10 +557,10 @@ _dv_idct_block_mmx:
|
|
|
|
@@ -550,10 +556,10 @@ _dv_idct_block_mmx:
|
|
|
|
movq 8*2(%esi), %mm3 /* V123 */
|
|
|
|
movq 8*2(%esi), %mm3 /* V123 */
|
|
|
|
paddsw %mm4, %mm7 /* out0 */
|
|
|
|
paddsw %mm4, %mm7 /* out0 */
|
|
|
|
/* moved up from next block */
|
|
|
|
/* moved up from next block */
|
|
|
@ -588,7 +588,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094
|
|
|
|
psubsw %mm4, %mm1 /* out14 ; free mm4 */
|
|
|
|
psubsw %mm4, %mm1 /* out14 ; free mm4 */
|
|
|
|
paddsw %mm3, %mm5 /* out2 */
|
|
|
|
paddsw %mm3, %mm5 /* out2 */
|
|
|
|
psraw $4, %mm1
|
|
|
|
psraw $4, %mm1
|
|
|
|
@@ -565,7 +571,7 @@ _dv_idct_block_mmx:
|
|
|
|
@@ -564,7 +570,7 @@ _dv_idct_block_mmx:
|
|
|
|
movq %mm5, 8*2(%esi) /* out2 ; free mm5 */
|
|
|
|
movq %mm5, 8*2(%esi) /* out2 ; free mm5 */
|
|
|
|
psraw $4, %mm2
|
|
|
|
psraw $4, %mm2
|
|
|
|
/* moved up to the prev block */
|
|
|
|
/* moved up to the prev block */
|
|
|
@ -597,7 +597,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094
|
|
|
|
/* moved up to the prev block */
|
|
|
|
/* moved up to the prev block */
|
|
|
|
psraw $4, %mm0
|
|
|
|
psraw $4, %mm0
|
|
|
|
movq %mm2, 8*12(%esi) /* out12 ; free mm2 */
|
|
|
|
movq %mm2, 8*12(%esi) /* out12 ; free mm2 */
|
|
|
|
@@ -579,7 +585,7 @@ _dv_idct_block_mmx:
|
|
|
|
@@ -578,7 +584,7 @@ _dv_idct_block_mmx:
|
|
|
|
* psraw $4, %mm0
|
|
|
|
* psraw $4, %mm0
|
|
|
|
* psraw $4, %mm6
|
|
|
|
* psraw $4, %mm6
|
|
|
|
*/
|
|
|
|
*/
|
|
|
@ -655,7 +655,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094
|
|
|
|
#ifdef __cplusplus
|
|
|
|
#ifdef __cplusplus
|
|
|
|
--- libdv-0.104-old/libdv/quant_x86.S
|
|
|
|
--- libdv-0.104-old/libdv/quant_x86.S
|
|
|
|
+++ libdv-0.104/libdv/quant_x86.S
|
|
|
|
+++ libdv-0.104/libdv/quant_x86.S
|
|
|
|
@@ -71,10 +73,13 @@ _dv_quant_88_inverse_x86:
|
|
|
|
@@ -73,10 +75,13 @@ _dv_quant_88_inverse_x86:
|
|
|
|
|
|
|
|
|
|
|
|
/* pq = dv_quant_shifts[qno + dv_quant_offset[class]]; */
|
|
|
|
/* pq = dv_quant_shifts[qno + dv_quant_offset[class]]; */
|
|
|
|
movl ARGn(1),%eax /* qno */
|
|
|
|
movl ARGn(1),%eax /* qno */
|
|
|
@ -671,7 +671,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094
|
|
|
|
|
|
|
|
|
|
|
|
/* extra = (class == 3); */
|
|
|
|
/* extra = (class == 3); */
|
|
|
|
/* 0 1 2 3 */
|
|
|
|
/* 0 1 2 3 */
|
|
|
|
@@ -212,11 +219,13 @@ _dv_quant_x86:
|
|
|
|
@@ -214,11 +221,13 @@ _dv_quant_x86:
|
|
|
|
|
|
|
|
|
|
|
|
/* pq = dv_quant_shifts[qno + dv_quant_offset[class]]; */
|
|
|
|
/* pq = dv_quant_shifts[qno + dv_quant_offset[class]]; */
|
|
|
|
movl ARGn(1),%eax /* qno */
|
|
|
|
movl ARGn(1),%eax /* qno */
|
|
|
@ -735,7 +735,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094
|
|
|
|
pushl %eax
|
|
|
|
pushl %eax
|
|
|
|
pushl %ebx
|
|
|
|
pushl %ebx
|
|
|
|
pushl %ecx
|
|
|
|
pushl %ecx
|
|
|
|
@@ -131,46 +132,47 @@ _dv_rgbtoycb_mmx:
|
|
|
|
@@ -133,46 +134,47 @@ _dv_rgbtoycb_mmx:
|
|
|
|
pushl %esi
|
|
|
|
pushl %esi
|
|
|
|
pushl %edi
|
|
|
|
pushl %edi
|
|
|
|
|
|
|
|
|
|
|
@ -810,7 +810,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094
|
|
|
|
rgbtoycb_mmx_loop:
|
|
|
|
rgbtoycb_mmx_loop:
|
|
|
|
movq (%eax), %mm1 #load G2R2B1G1R1B0G0R0
|
|
|
|
movq (%eax), %mm1 #load G2R2B1G1R1B0G0R0
|
|
|
|
pxor %mm6, %mm6 #0 -> mm6
|
|
|
|
pxor %mm6, %mm6 #0 -> mm6
|
|
|
|
@@ -184,29 +186,29 @@ rgbtoycb_mmx_loop:
|
|
|
|
@@ -186,29 +188,29 @@ rgbtoycb_mmx_loop:
|
|
|
|
punpcklbw %mm6, %mm1 #B1G1R1B0 -> mm1
|
|
|
|
punpcklbw %mm6, %mm1 #B1G1R1B0 -> mm1
|
|
|
|
movq %mm0, %mm2 #R1B0G0R0 -> mm2
|
|
|
|
movq %mm0, %mm2 #R1B0G0R0 -> mm2
|
|
|
|
|
|
|
|
|
|
|
@ -847,7 +847,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094
|
|
|
|
paddd %mm5, %mm4 #V1V0 -> mm4
|
|
|
|
paddd %mm5, %mm4 #V1V0 -> mm4
|
|
|
|
|
|
|
|
|
|
|
|
movq %mm1, %mm5 #B3G3R3B2 -> mm5
|
|
|
|
movq %mm1, %mm5 #B3G3R3B2 -> mm5
|
|
|
|
@@ -214,29 +216,29 @@ rgbtoycb_mmx_loop:
|
|
|
|
@@ -216,29 +218,29 @@ rgbtoycb_mmx_loop:
|
|
|
|
|
|
|
|
|
|
|
|
paddd %mm7, %mm1 #R3B200+00G2R2=R3B2G2R2->mm1
|
|
|
|
paddd %mm7, %mm1 #R3B200+00G2R2=R3B2G2R2->mm1
|
|
|
|
|
|
|
|
|
|
|
@ -885,7 +885,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094
|
|
|
|
psrad $FIXPSHIFT, %mm4 #32-bit scaled V1V0 -> mm4
|
|
|
|
psrad $FIXPSHIFT, %mm4 #32-bit scaled V1V0 -> mm4
|
|
|
|
|
|
|
|
|
|
|
|
movq 16(%eax), %mm1 #B7G7R7B6G6R6B5G5 -> mm7
|
|
|
|
movq 16(%eax), %mm1 #B7G7R7B6G6R6B5G5 -> mm7
|
|
|
|
@@ -251,58 +253,58 @@ rgbtoycb_mmx_loop:
|
|
|
|
@@ -253,58 +255,58 @@ rgbtoycb_mmx_loop:
|
|
|
|
movq %mm7, %mm5 #R7B6G6R6B5G500 -> mm5
|
|
|
|
movq %mm7, %mm5 #R7B6G6R6B5G500 -> mm5
|
|
|
|
psrad $FIXPSHIFT, %mm3 #32-bit scaled V3V2 -> mm3
|
|
|
|
psrad $FIXPSHIFT, %mm3 #32-bit scaled V3V2 -> mm3
|
|
|
|
|
|
|
|
|
|
|
@ -959,7 +959,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094
|
|
|
|
psrad $FIXPSHIFT, %mm0 #32-bit scaled U5U4 -> mm0
|
|
|
|
psrad $FIXPSHIFT, %mm0 #32-bit scaled U5U4 -> mm0
|
|
|
|
|
|
|
|
|
|
|
|
psrad $FIXPSHIFT, %mm2 #32-bit scaled Y5Y4 -> mm2
|
|
|
|
psrad $FIXPSHIFT, %mm2 #32-bit scaled Y5Y4 -> mm2
|
|
|
|
@@ -310,25 +312,25 @@ rgbtoycb_mmx_loop:
|
|
|
|
@@ -312,25 +314,25 @@ rgbtoycb_mmx_loop:
|
|
|
|
paddd %mm5, %mm6 #Y7Y6 -> mm6
|
|
|
|
paddd %mm5, %mm6 #Y7Y6 -> mm6
|
|
|
|
movq %mm7, %mm5 #R7B6G6R6 -> mm5
|
|
|
|
movq %mm7, %mm5 #R7B6G6R6 -> mm5
|
|
|
|
|
|
|
|
|
|
|
@ -991,7 +991,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094
|
|
|
|
pmaddwd %mm6, %mm0 #U7U6U5U4 averaged -> (U7U6)(U5U4)=UU3 UU2->mm0
|
|
|
|
pmaddwd %mm6, %mm0 #U7U6U5U4 averaged -> (U7U6)(U5U4)=UU3 UU2->mm0
|
|
|
|
|
|
|
|
|
|
|
|
pmaddwd %mm6, %mm4 #U3U2U1U0 averaged -> (U3U2)(U1U0)=UU1 UU0->mm4
|
|
|
|
pmaddwd %mm6, %mm4 #U3U2U1U0 averaged -> (U3U2)(U1U0)=UU1 UU0->mm4
|
|
|
|
@@ -338,8 +340,8 @@ rgbtoycb_mmx_loop:
|
|
|
|
@@ -340,8 +342,8 @@ rgbtoycb_mmx_loop:
|
|
|
|
|
|
|
|
|
|
|
|
psrad $FIXPSHIFT, %mm1 #32-bit scaled V7V6 -> mm1
|
|
|
|
psrad $FIXPSHIFT, %mm1 #32-bit scaled V7V6 -> mm1
|
|
|
|
psraw $1, %mm4 #divide UU3 UU2 UU1 UU0 by 2 -> mm4
|
|
|
|
psraw $1, %mm4 #divide UU3 UU2 UU1 UU0 by 2 -> mm4
|
|
|
@ -1002,7 +1002,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094
|
|
|
|
|
|
|
|
|
|
|
|
movq %mm4, (%ecx) # store U
|
|
|
|
movq %mm4, (%ecx) # store U
|
|
|
|
|
|
|
|
|
|
|
|
@@ -422,14 +426,15 @@ _dv_ppm_copy_y_block_mmx:
|
|
|
|
@@ -429,14 +433,15 @@ _dv_ppm_copy_y_block_mmx:
|
|
|
|
_dv_pgm_copy_y_block_mmx:
|
|
|
|
_dv_pgm_copy_y_block_mmx:
|
|
|
|
|
|
|
|
|
|
|
|
pushl %ebp
|
|
|
|
pushl %ebp
|
|
|
@ -1023,7 +1023,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094
|
|
|
|
pxor %mm6, %mm6
|
|
|
|
pxor %mm6, %mm6
|
|
|
|
|
|
|
|
|
|
|
|
movq (%esi), %mm0
|
|
|
|
movq (%esi), %mm0
|
|
|
|
@@ -564,14 +571,15 @@ _dv_pgm_copy_y_block_mmx:
|
|
|
|
@@ -571,14 +578,15 @@ _dv_pgm_copy_y_block_mmx:
|
|
|
|
_dv_video_copy_y_block_mmx:
|
|
|
|
_dv_video_copy_y_block_mmx:
|
|
|
|
|
|
|
|
|
|
|
|
pushl %ebp
|
|
|
|
pushl %ebp
|
|
|
@ -1044,7 +1044,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094
|
|
|
|
pxor %mm6, %mm6
|
|
|
|
pxor %mm6, %mm6
|
|
|
|
|
|
|
|
|
|
|
|
movq (%esi), %mm0
|
|
|
|
movq (%esi), %mm0
|
|
|
|
@@ -852,16 +864,16 @@ _dv_ppm_copy_pal_c_block_mmx:
|
|
|
|
@@ -859,16 +871,16 @@ _dv_ppm_copy_pal_c_block_mmx:
|
|
|
|
_dv_pgm_copy_pal_c_block_mmx:
|
|
|
|
_dv_pgm_copy_pal_c_block_mmx:
|
|
|
|
|
|
|
|
|
|
|
|
pushl %ebp
|
|
|
|
pushl %ebp
|
|
|
@ -1066,7 +1066,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094
|
|
|
|
pxor %mm6, %mm6
|
|
|
|
pxor %mm6, %mm6
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -1000,15 +1014,16 @@ _dv_pgm_copy_pal_c_block_mmx:
|
|
|
|
@@ -1007,15 +1021,16 @@ _dv_pgm_copy_pal_c_block_mmx:
|
|
|
|
_dv_video_copy_pal_c_block_mmx:
|
|
|
|
_dv_video_copy_pal_c_block_mmx:
|
|
|
|
|
|
|
|
|
|
|
|
pushl %ebp
|
|
|
|
pushl %ebp
|
|
|
@ -1088,7 +1088,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094
|
|
|
|
paddw %mm7, %mm7
|
|
|
|
paddw %mm7, %mm7
|
|
|
|
pxor %mm6, %mm6
|
|
|
|
pxor %mm6, %mm6
|
|
|
|
|
|
|
|
|
|
|
|
@@ -1095,18 +1112,18 @@ video_copy_pal_c_block_mmx_loop:
|
|
|
|
@@ -1102,18 +1119,18 @@ video_copy_pal_c_block_mmx_loop:
|
|
|
|
_dv_ppm_copy_ntsc_c_block_mmx:
|
|
|
|
_dv_ppm_copy_ntsc_c_block_mmx:
|
|
|
|
|
|
|
|
|
|
|
|
pushl %ebp
|
|
|
|
pushl %ebp
|
|
|
@ -1113,7 +1113,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094
|
|
|
|
ppm_copy_ntsc_c_block_mmx_loop:
|
|
|
|
ppm_copy_ntsc_c_block_mmx_loop:
|
|
|
|
|
|
|
|
|
|
|
|
movq (%esi), %mm0
|
|
|
|
movq (%esi), %mm0
|
|
|
|
@@ -1168,14 +1187,15 @@ ppm_copy_ntsc_c_block_mmx_loop:
|
|
|
|
@@ -1175,14 +1194,15 @@ ppm_copy_ntsc_c_block_mmx_loop:
|
|
|
|
_dv_pgm_copy_ntsc_c_block_mmx:
|
|
|
|
_dv_pgm_copy_ntsc_c_block_mmx:
|
|
|
|
|
|
|
|
|
|
|
|
pushl %ebp
|
|
|
|
pushl %ebp
|
|
|
@ -1134,7 +1134,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094
|
|
|
|
paddw %mm7, %mm7
|
|
|
|
paddw %mm7, %mm7
|
|
|
|
pxor %mm6, %mm6
|
|
|
|
pxor %mm6, %mm6
|
|
|
|
|
|
|
|
|
|
|
|
@@ -1325,15 +1347,16 @@ _dv_pgm_copy_ntsc_c_block_mmx:
|
|
|
|
@@ -1332,15 +1354,16 @@ _dv_pgm_copy_ntsc_c_block_mmx:
|
|
|
|
_dv_video_copy_ntsc_c_block_mmx:
|
|
|
|
_dv_video_copy_ntsc_c_block_mmx:
|
|
|
|
|
|
|
|
|
|
|
|
pushl %ebp
|
|
|
|
pushl %ebp
|
|
|
@ -1219,7 +1219,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094
|
|
|
|
movl (%edx,%ebx,4),%edx
|
|
|
|
movl (%edx,%ebx,4),%edx
|
|
|
|
|
|
|
|
|
|
|
|
/* Now %edx holds result, like this:
|
|
|
|
/* Now %edx holds result, like this:
|
|
|
|
@@ -42,7 +51,7 @@ dv_decode_vlc:
|
|
|
|
@@ -43,7 +52,7 @@ dv_decode_vlc:
|
|
|
|
movl %edx,%ecx
|
|
|
|
movl %edx,%ecx
|
|
|
|
sarl $8,%ecx
|
|
|
|
sarl $8,%ecx
|
|
|
|
andl $0xff,%ecx
|
|
|
|
andl $0xff,%ecx
|
|
|
@ -1228,7 +1228,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094
|
|
|
|
andl %ebx,%eax
|
|
|
|
andl %ebx,%eax
|
|
|
|
negl %eax
|
|
|
|
negl %eax
|
|
|
|
sarl $31,%eax
|
|
|
|
sarl $31,%eax
|
|
|
|
@@ -63,14 +72,14 @@ dv_decode_vlc:
|
|
|
|
@@ -64,14 +73,14 @@ dv_decode_vlc:
|
|
|
|
*result = broken;
|
|
|
|
*result = broken;
|
|
|
|
Note that the 'broken' pattern is all ones (i.e. 0xffffffff)
|
|
|
|
Note that the 'broken' pattern is all ones (i.e. 0xffffffff)
|
|
|
|
*/
|
|
|
|
*/
|
|
|
@ -1246,7 +1246,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094
|
|
|
|
popl %ebx
|
|
|
|
popl %ebx
|
|
|
|
ret
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
|
|
@@ -80,21 +89,28 @@ dv_decode_vlc:
|
|
|
|
@@ -81,21 +90,28 @@ dv_decode_vlc:
|
|
|
|
.type __dv_decode_vlc,@function
|
|
|
|
.type __dv_decode_vlc,@function
|
|
|
|
__dv_decode_vlc:
|
|
|
|
__dv_decode_vlc:
|
|
|
|
pushl %ebx
|
|
|
|
pushl %ebx
|
|
|
@ -1281,7 +1281,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094
|
|
|
|
movl (%edx,%ebx,4),%edx
|
|
|
|
movl (%edx,%ebx,4),%edx
|
|
|
|
|
|
|
|
|
|
|
|
/* Now %edx holds result, like this:
|
|
|
|
/* Now %edx holds result, like this:
|
|
|
|
@@ -112,7 +128,7 @@ __dv_decode_vlc:
|
|
|
|
@@ -113,7 +129,7 @@ __dv_decode_vlc:
|
|
|
|
movl %edx,%ecx
|
|
|
|
movl %edx,%ecx
|
|
|
|
sarl $8,%ecx
|
|
|
|
sarl $8,%ecx
|
|
|
|
andl $0xff,%ecx
|
|
|
|
andl $0xff,%ecx
|
|
|
@ -1290,7 +1290,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094
|
|
|
|
andl %ecx,%eax
|
|
|
|
andl %ecx,%eax
|
|
|
|
negl %eax
|
|
|
|
negl %eax
|
|
|
|
sarl $31,%eax
|
|
|
|
sarl $31,%eax
|
|
|
|
@@ -127,9 +143,9 @@ __dv_decode_vlc:
|
|
|
|
@@ -128,9 +144,9 @@ __dv_decode_vlc:
|
|
|
|
xorl %eax,%edx
|
|
|
|
xorl %eax,%edx
|
|
|
|
subl %eax,%edx
|
|
|
|
subl %eax,%edx
|
|
|
|
|
|
|
|
|
|
|
@ -1302,7 +1302,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094
|
|
|
|
popl %ebx
|
|
|
|
popl %ebx
|
|
|
|
ret
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
|
|
@@ -140,14 +156,20 @@ void dv_parse_ac_coeffs_pass0(bitstream_
|
|
|
|
@@ -141,14 +157,20 @@ void dv_parse_ac_coeffs_pass0(bitstream_
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
.text
|
|
|
|
.text
|
|
|
|
.align 4
|
|
|
|
.align 4
|
|
|
@ -1323,7 +1323,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094
|
|
|
|
#define ARGn(N) (20+(4*(N)))(%esp)
|
|
|
|
#define ARGn(N) (20+(4*(N)))(%esp)
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
/*
|
|
|
|
@@ -159,8 +182,10 @@ dv_parse_ac_coeffs_pass0:
|
|
|
|
@@ -160,8 +183,10 @@ dv_parse_ac_coeffs_pass0:
|
|
|
|
ebp bl
|
|
|
|
ebp bl
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
movl ARGn(2),%ebp
|
|
|
|
movl ARGn(2),%ebp
|
|
|
@ -1334,7 +1334,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094
|
|
|
|
movl dv_block_t_offset(%ebp),%edi
|
|
|
|
movl dv_block_t_offset(%ebp),%edi
|
|
|
|
movl dv_block_t_reorder(%ebp),%ebx
|
|
|
|
movl dv_block_t_reorder(%ebp),%ebx
|
|
|
|
|
|
|
|
|
|
|
|
@@ -170,7 +195,11 @@ dv_parse_ac_coeffs_pass0:
|
|
|
|
@@ -171,7 +196,11 @@ dv_parse_ac_coeffs_pass0:
|
|
|
|
|
|
|
|
|
|
|
|
movq dv_block_t_coeffs(%ebp),%mm1
|
|
|
|
movq dv_block_t_coeffs(%ebp),%mm1
|
|
|
|
pxor %mm0,%mm0
|
|
|
|
pxor %mm0,%mm0
|
|
|
@ -1346,7 +1346,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094
|
|
|
|
movq %mm1,dv_block_t_coeffs(%ebp)
|
|
|
|
movq %mm1,dv_block_t_coeffs(%ebp)
|
|
|
|
movq %mm0,(dv_block_t_coeffs + 8)(%ebp)
|
|
|
|
movq %mm0,(dv_block_t_coeffs + 8)(%ebp)
|
|
|
|
movq %mm0,(dv_block_t_coeffs + 16)(%ebp)
|
|
|
|
movq %mm0,(dv_block_t_coeffs + 16)(%ebp)
|
|
|
|
@@ -191,9 +220,17 @@ dv_parse_ac_coeffs_pass0:
|
|
|
|
@@ -192,9 +221,17 @@ dv_parse_ac_coeffs_pass0:
|
|
|
|
readloop:
|
|
|
|
readloop:
|
|
|
|
movl %edi,%ecx
|
|
|
|
movl %edi,%ecx
|
|
|
|
shrl $3,%ecx
|
|
|
|
shrl $3,%ecx
|
|
|
@ -1364,7 +1364,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094
|
|
|
|
shll $16,%eax
|
|
|
|
shll $16,%eax
|
|
|
|
shll $8,%edx
|
|
|
|
shll $8,%edx
|
|
|
|
orl %ecx,%eax
|
|
|
|
orl %ecx,%eax
|
|
|
|
@@ -217,7 +254,11 @@ readloop:
|
|
|
|
@@ -218,7 +255,11 @@ readloop:
|
|
|
|
|
|
|
|
|
|
|
|
/* Attempt to use the shortcut first. If it hits, then
|
|
|
|
/* Attempt to use the shortcut first. If it hits, then
|
|
|
|
this vlc term has been decoded. */
|
|
|
|
this vlc term has been decoded. */
|
|
|
@ -1376,7 +1376,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094
|
|
|
|
test $0x80,%edx
|
|
|
|
test $0x80,%edx
|
|
|
|
je done_decode
|
|
|
|
je done_decode
|
|
|
|
|
|
|
|
|
|
|
|
@@ -228,12 +269,19 @@ readloop:
|
|
|
|
@@ -229,12 +270,19 @@ readloop:
|
|
|
|
movl %ebx,dv_block_t_reorder(%ebp)
|
|
|
|
movl %ebx,dv_block_t_reorder(%ebp)
|
|
|
|
|
|
|
|
|
|
|
|
/* %eax is bits */
|
|
|
|
/* %eax is bits */
|
|
|
@ -1397,7 +1397,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094
|
|
|
|
andl %eax,%ebx
|
|
|
|
andl %eax,%ebx
|
|
|
|
sarl %cl,%ebx
|
|
|
|
sarl %cl,%ebx
|
|
|
|
|
|
|
|
|
|
|
|
@@ -256,7 +304,11 @@ readloop:
|
|
|
|
@@ -257,7 +305,11 @@ readloop:
|
|
|
|
movl %edx,%ecx
|
|
|
|
movl %edx,%ecx
|
|
|
|
sarl $8,%ecx
|
|
|
|
sarl $8,%ecx
|
|
|
|
andl $0xff,%ecx
|
|
|
|
andl $0xff,%ecx
|
|
|
@ -1409,7 +1409,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094
|
|
|
|
andl %ecx,%eax
|
|
|
|
andl %ecx,%eax
|
|
|
|
negl %eax
|
|
|
|
negl %eax
|
|
|
|
sarl $31,%eax
|
|
|
|
sarl $31,%eax
|
|
|
|
@@ -326,10 +378,16 @@ alldone:
|
|
|
|
@@ -327,10 +379,16 @@ alldone:
|
|
|
|
|
|
|
|
|
|
|
|
slowpath:
|
|
|
|
slowpath:
|
|
|
|
/* slow path: use dv_decode_vlc */;
|
|
|
|
/* slow path: use dv_decode_vlc */;
|
|
|
@ -1427,7 +1427,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094
|
|
|
|
addl $12,%esp
|
|
|
|
addl $12,%esp
|
|
|
|
test $0x80,%edx /* If (vlc.run < 0) break */
|
|
|
|
test $0x80,%edx /* If (vlc.run < 0) break */
|
|
|
|
jne escape
|
|
|
|
jne escape
|
|
|
|
@@ -359,6 +417,8 @@ show16:
|
|
|
|
@@ -367,6 +425,8 @@ show16:
|
|
|
|
pushl %esi
|
|
|
|
pushl %esi
|
|
|
|
pushl %ebp
|
|
|
|
pushl %ebp
|
|
|
|
|
|
|
|
|
|
|
@ -1436,7 +1436,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094
|
|
|
|
#define ARGn(N) (20+(4*(N)))(%esp)
|
|
|
|
#define ARGn(N) (20+(4*(N)))(%esp)
|
|
|
|
|
|
|
|
|
|
|
|
movl ARGn(1),%eax /* quality */
|
|
|
|
movl ARGn(1),%eax /* quality */
|
|
|
|
@@ -373,7 +434,11 @@ dv_parse_video_segment:
|
|
|
|
@@ -374,7 +435,11 @@ dv_parse_video_segment:
|
|
|
|
jz its_mono
|
|
|
|
jz its_mono
|
|
|
|
movl $6,%ebx
|
|
|
|
movl $6,%ebx
|
|
|
|
its_mono:
|
|
|
|
its_mono:
|
|
|
@ -1448,7 +1448,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
/*
|
|
|
|
* ebx seg/b
|
|
|
|
* ebx seg/b
|
|
|
|
@@ -384,15 +449,22 @@ its_mono:
|
|
|
|
@@ -385,15 +450,22 @@ its_mono:
|
|
|
|
* ebp bl
|
|
|
|
* ebp bl
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
movl ARGn(0),%ebx
|
|
|
|
movl ARGn(0),%ebx
|
|
|
@ -1471,7 +1471,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094
|
|
|
|
|
|
|
|
|
|
|
|
movl ARGn(0),%ebx
|
|
|
|
movl ARGn(0),%ebx
|
|
|
|
|
|
|
|
|
|
|
|
@@ -400,7 +472,13 @@ macloop:
|
|
|
|
@@ -401,7 +473,13 @@ macloop:
|
|
|
|
/* mb->qno = bitstream_get(bs,4); */
|
|
|
|
/* mb->qno = bitstream_get(bs,4); */
|
|
|
|
movl %ecx,%edx
|
|
|
|
movl %ecx,%edx
|
|
|
|
shr $3,%edx
|
|
|
|
shr $3,%edx
|
|
|
@ -1485,7 +1485,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094
|
|
|
|
andl $0xf,%edx
|
|
|
|
andl $0xf,%edx
|
|
|
|
movl %edx,dv_macroblock_t_qno(%edi)
|
|
|
|
movl %edx,dv_macroblock_t_qno(%edi)
|
|
|
|
|
|
|
|
|
|
|
|
@@ -411,7 +489,11 @@ macloop:
|
|
|
|
@@ -412,7 +490,11 @@ macloop:
|
|
|
|
movl %edx,dv_macroblock_t_eob_count(%edi)
|
|
|
|
movl %edx,dv_macroblock_t_eob_count(%edi)
|
|
|
|
|
|
|
|
|
|
|
|
/* mb->i = (seg->i + dv_super_map_vertical[m]) % (seg->isPAL?12:10); */
|
|
|
|
/* mb->i = (seg->i + dv_super_map_vertical[m]) % (seg->isPAL?12:10); */
|
|
|
@ -1497,7 +1497,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094
|
|
|
|
movl dv_videosegment_t_i(%ebx),%ecx
|
|
|
|
movl dv_videosegment_t_i(%ebx),%ecx
|
|
|
|
addl %ecx,%edx
|
|
|
|
addl %ecx,%edx
|
|
|
|
|
|
|
|
|
|
|
|
@@ -422,11 +504,20 @@ skarly:
|
|
|
|
@@ -423,11 +505,20 @@ skarly:
|
|
|
|
andl $1,%ecx
|
|
|
|
andl $1,%ecx
|
|
|
|
shll $5,%ecx /* ecx = (isPAL ? 32 : 0) */
|
|
|
|
shll $5,%ecx /* ecx = (isPAL ? 32 : 0) */
|
|
|
|
|
|
|
|
|
|
|
@ -1518,7 +1518,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094
|
|
|
|
movl %edx,dv_macroblock_t_j(%edi)
|
|
|
|
movl %edx,dv_macroblock_t_j(%edi)
|
|
|
|
|
|
|
|
|
|
|
|
/* mb->k = seg->k; */
|
|
|
|
/* mb->k = seg->k; */
|
|
|
|
@@ -445,12 +536,28 @@ blkloop:
|
|
|
|
@@ -446,12 +537,28 @@ blkloop:
|
|
|
|
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
|
|
|
|
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
/* dc = bitstream_get(bs,9); */
|
|
|
|
/* dc = bitstream_get(bs,9); */
|
|
|
@ -1547,7 +1547,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094
|
|
|
|
shll $8,%eax
|
|
|
|
shll $8,%eax
|
|
|
|
orl %ecx,%eax
|
|
|
|
orl %ecx,%eax
|
|
|
|
|
|
|
|
|
|
|
|
@@ -477,7 +584,11 @@ blkloop:
|
|
|
|
@@ -478,7 +585,11 @@ blkloop:
|
|
|
|
|
|
|
|
|
|
|
|
/* bl->reorder = &dv_reorder[bl->dct_mode][1]; */
|
|
|
|
/* bl->reorder = &dv_reorder[bl->dct_mode][1]; */
|
|
|
|
shll $6,%eax
|
|
|
|
shll $6,%eax
|
|
|
@ -1559,7 +1559,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094
|
|
|
|
movl %eax,dv_block_t_reorder(%ebp)
|
|
|
|
movl %eax,dv_block_t_reorder(%ebp)
|
|
|
|
|
|
|
|
|
|
|
|
/* bl->reorder_sentinel = bl->reorder + 63; */
|
|
|
|
/* bl->reorder_sentinel = bl->reorder + 63; */
|
|
|
|
@@ -485,13 +596,22 @@ blkloop:
|
|
|
|
@@ -486,13 +597,22 @@ blkloop:
|
|
|
|
movl %eax,dv_block_t_reorder_sentinel(%ebp)
|
|
|
|
movl %eax,dv_block_t_reorder_sentinel(%ebp)
|
|
|
|
|
|
|
|
|
|
|
|
/* bl->offset= mb_start + dv_parse_bit_start[b]; */
|
|
|
|
/* bl->offset= mb_start + dv_parse_bit_start[b]; */
|
|
|
@ -1582,7 +1582,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094
|
|
|
|
addl %ecx,%eax
|
|
|
|
addl %ecx,%eax
|
|
|
|
movl %eax,dv_block_t_end(%ebp)
|
|
|
|
movl %eax,dv_block_t_end(%ebp)
|
|
|
|
|
|
|
|
|
|
|
|
@@ -503,7 +623,11 @@ blkloop:
|
|
|
|
@@ -504,7 +624,11 @@ blkloop:
|
|
|
|
/* no AC pass. Just zero out the remaining coeffs */
|
|
|
|
/* no AC pass. Just zero out the remaining coeffs */
|
|
|
|
movq dv_block_t_coeffs(%ebp),%mm1
|
|
|
|
movq dv_block_t_coeffs(%ebp),%mm1
|
|
|
|
pxor %mm0,%mm0
|
|
|
|
pxor %mm0,%mm0
|
|
|
@ -1594,7 +1594,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094
|
|
|
|
movq %mm1,dv_block_t_coeffs(%ebp)
|
|
|
|
movq %mm1,dv_block_t_coeffs(%ebp)
|
|
|
|
movq %mm0,(dv_block_t_coeffs + 8)(%ebp)
|
|
|
|
movq %mm0,(dv_block_t_coeffs + 8)(%ebp)
|
|
|
|
movq %mm0,(dv_block_t_coeffs + 16)(%ebp)
|
|
|
|
movq %mm0,(dv_block_t_coeffs + 16)(%ebp)
|
|
|
|
@@ -528,18 +652,27 @@ do_ac_pass:
|
|
|
|
@@ -529,18 +653,27 @@ do_ac_pass:
|
|
|
|
pushl %ebp
|
|
|
|
pushl %ebp
|
|
|
|
pushl %edi
|
|
|
|
pushl %edi
|
|
|
|
pushl %eax
|
|
|
|
pushl %eax
|
|
|
@ -1623,7 +1623,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094
|
|
|
|
addl $(8 * 80),%ecx
|
|
|
|
addl $(8 * 80),%ecx
|
|
|
|
addl $dv_macroblock_t_size,%edi
|
|
|
|
addl $dv_macroblock_t_size,%edi
|
|
|
|
incl %eax
|
|
|
|
incl %eax
|
|
|
|
@@ -557,7 +690,7 @@ done_ac:
|
|
|
|
@@ -558,7 +691,7 @@ done_ac:
|
|
|
|
|
|
|
|
|
|
|
|
andl $DV_QUALITY_AC_MASK,%eax
|
|
|
|
andl $DV_QUALITY_AC_MASK,%eax
|
|
|
|
cmpl $DV_QUALITY_AC_2,%eax
|
|
|
|
cmpl $DV_QUALITY_AC_2,%eax
|
|
|
|