diff --git a/libdv-0.104-no-exec-stack.patch b/libdv-0.104-no-exec-stack.patch deleted file mode 100644 index 887b416..0000000 --- a/libdv-0.104-no-exec-stack.patch +++ /dev/null @@ -1,137 +0,0 @@ -Make sure that the asm files don't incorrectly trigger an executable -stack marking in the final shared library. That's bad, mmmkay. - -Upstream has already fixed this in their cvs. - ---- libdv/dct_block_mmx.S -+++ libdv/dct_block_mmx.S -@@ -1217,3 +1217,7 @@ _dv_dct_block_mmx_postscale_248: - popl %esi - popl %ebp - ret -+ -+#ifdef __ELF__ -+.section .note.GNU-stack,"",@progbits -+#endif ---- libdv/dct_block_mmx_x86_64.S -+++ libdv/dct_block_mmx_x86_64.S -@@ -1207,3 +1207,7 @@ _dv_dct_block_mmx_x86_64_postscale_248: - pop %r12 - - ret -+ -+#ifdef __ELF__ -+.section .note.GNU-stack,"",@progbits -+#endif ---- libdv/encode_x86.S -+++ libdv/encode_x86.S -@@ -611,3 +611,6 @@ _dv_need_dct_248_mmx_rows: - - - -+#ifdef __ELF__ -+.section .note.GNU-stack,"",@progbits -+#endif ---- libdv/encode_x86_64.S -+++ libdv/encode_x86_64.S -@@ -612,3 +612,6 @@ _dv_need_dct_248_mmx_x86_64_rows: - - - -+#ifdef __ELF__ -+.section .note.GNU-stack,"",@progbits -+#endif ---- libdv/idct_block_mmx.S -+++ libdv/idct_block_mmx.S -@@ -649,3 +649,6 @@ x0: - .long 0,0 - .align 8 - -+#ifdef __ELF__ -+.section .note.GNU-stack,"",@progbits -+#endif ---- libdv/idct_block_mmx_x86_64.S -+++ libdv/idct_block_mmx_x86_64.S -@@ -654,3 +654,6 @@ x0: - .long 0,0 - .align 8 - -+#ifdef __ELF__ -+.section .note.GNU-stack,"",@progbits -+#endif ---- libdv/quant_x86.S -+++ libdv/quant_x86.S -@@ -458,3 +458,6 @@ _dv_quant_x86: - - - -+#ifdef __ELF__ -+.section .note.GNU-stack,"",@progbits -+#endif ---- libdv/quant_x86_64.S -+++ libdv/quant_x86_64.S -@@ -463,3 +463,6 @@ _dv_quant_x86_64: - - - -+#ifdef __ELF__ -+.section .note.GNU-stack,"",@progbits -+#endif ---- libdv/rgbtoyuv.S -+++ libdv/rgbtoyuv.S -@@ -1451,3 +1451,6 @@ video_copy_ntsc_c_block_mmx_loop: - - - -+#ifdef __ELF__ -+.section .note.GNU-stack,"",@progbits -+#endif ---- libdv/rgbtoyuv_x86_64.S -+++ libdv/rgbtoyuv_x86_64.S -@@ -1391,3 +1391,6 @@ video_copy_ntsc_c_block_mmx_loop: - - - -+#ifdef __ELF__ -+.section .note.GNU-stack,"",@progbits -+#endif ---- libdv/transpose_x86.S -+++ libdv/transpose_x86.S -@@ -190,3 +190,7 @@ popl %esi - popl %ebp - - ret $0 -+ -+#ifdef __ELF__ -+.section .note.GNU-stack,"",@progbits -+#endif ---- libdv/transpose_x86_64.S -+++ libdv/transpose_x86_64.S -@@ -190,3 +190,7 @@ all_done_ready_to_exit: - pop %r12 - - ret $0 -+ -+#ifdef __ELF__ -+.section .note.GNU-stack,"",@progbits -+#endif ---- libdv/vlc_x86.S -+++ libdv/vlc_x86.S -@@ -587,3 +587,7 @@ mod_12: - .align 16 - const_f_0_0_0: - .short 0xffff,0,0,0 -+ -+#ifdef __ELF__ -+.section .note.GNU-stack,"",@progbits -+#endif ---- libdv/vlc_x86_64.S -+++ libdv/vlc_x86_64.S -@@ -673,3 +673,7 @@ mod_12: - .align 16 - const_f_0_0_0: - .short 0xffff,0,0,0 -+ -+#ifdef __ELF__ -+.section .note.GNU-stack,"",@progbits -+#endif diff --git a/libdv-1.0.0-dso-linking.patch b/libdv-1.0.0-dso-linking.patch deleted file mode 100644 index c85478e..0000000 --- a/libdv-1.0.0-dso-linking.patch +++ /dev/null @@ -1,22 +0,0 @@ -We now need to explicitly link to libraries that we use because we can no -longer depend on our dependencies to pull them in for us. See -http://fedoraproject.org/wiki/UnderstandingDSOLinkChange - ---- libdv-1.0.0/playdv/#Makefile.am~ 2010-02-15 14:49:06.000000000 -0500 -+++ libdv-1.0.0/playdv/Makefile.am 2010-02-15 14:49:06.000000000 -0500 -@@ -15,4 +15,4 @@ bin_PROGRAMS= playdv - noinst_HEADERS= display.h oss.h - - playdv_SOURCES= playdv.c display.c display.h oss.c --playdv_LDADD= $(SDL_LIBS) $(GTK_LIBS) $(XV_LIB) ../libdv/libdv.la $(POPT_LIB) -+playdv_LDADD= $(SDL_LIBS) $(GTK_LIBS) $(XV_LIB) ../libdv/libdv.la $(POPT_LIB) -lX11 -lXext ---- libdv-1.0.0/Makefile.orig.am 2006-08-06 22:10:42.000000000 +0200 -+++ libdv-1.0.0/Makefile.am 2016-08-01 12:31:11.622234099 +0200 -@@ -5,6 +5,7 @@ - endif - - SUBDIRS = libdv encodedv $(gtk_subdirs) -+ACLOCAL_AMFLAGS = -I m4 - - AUX_DIST = $(ac_aux_dir)/config.guess \ - $(ac_aux_dir)/config.sub \ diff --git a/libdv-dso-linking.patch b/libdv-dso-linking.patch new file mode 100644 index 0000000..9117c58 --- /dev/null +++ b/libdv-dso-linking.patch @@ -0,0 +1,20 @@ +diff -Naur libdv-1.0.0.old/Makefile.am libdv-1.0.0/Makefile.am +--- libdv-1.0.0.old/Makefile.am 2022-03-24 20:11:25.269668921 +0100 ++++ libdv-1.0.0/Makefile.am 2022-03-24 20:14:29.849878099 +0100 +@@ -5,6 +5,7 @@ + endif + + SUBDIRS = libdv encodedv $(gtk_subdirs) ++ACLOCAL_AMFLAGS = -I m4 + + AUX_DIST = $(ac_aux_dir)/config.guess \ + $(ac_aux_dir)/config.sub \ +diff -Naur libdv-1.0.0.old/playdv/Makefile.am libdv-1.0.0/playdv/Makefile.am +--- libdv-1.0.0.old/playdv/Makefile.am 2022-03-24 20:11:25.274669008 +0100 ++++ libdv-1.0.0/playdv/Makefile.am 2022-03-24 20:14:29.815877508 +0100 +@@ -15,4 +15,4 @@ + noinst_HEADERS= display.h oss.h + + playdv_SOURCES= playdv.c display.c display.h oss.c +-playdv_LDADD= $(SDL_LIBS) $(GTK_LIBS) $(XV_LIB) ../libdv/libdv.la $(POPT_LIB) ++playdv_LDADD= $(SDL_LIBS) $(GTK_LIBS) $(XV_LIB) ../libdv/libdv.la $(POPT_LIB) -lX11 -lXext diff --git a/libdv-1.0.0-gtk2.patch b/libdv-gtk2.patch similarity index 75% rename from libdv-1.0.0-gtk2.patch rename to libdv-gtk2.patch index ae93da3..da10646 100644 --- a/libdv-1.0.0-gtk2.patch +++ b/libdv-gtk2.patch @@ -1,5 +1,6 @@ ---- libdv-1.0.0/configure.ac.orig 2007-01-19 15:48:43.000000000 -0500 -+++ libdv-1.0.0/configure.ac 2007-01-19 15:50:08.000000000 -0500 +diff -Naur libdv-1.0.0.old/configure.ac libdv-1.0.0/configure.ac +--- libdv-1.0.0.old/configure.ac 2022-03-24 20:11:25.268668903 +0100 ++++ libdv-1.0.0/configure.ac 2022-03-24 20:14:11.568560254 +0100 @@ -1,12 +1,14 @@ dnl Process this file with autoconf to produce a configure script. -AC_INIT(libdv/parse.c) @@ -17,7 +18,7 @@ AM_MAINTAINER_MODE AC_LIBTOOL_PICMODE(no) -@@ -164,7 +164,7 @@ +@@ -162,7 +164,7 @@ dnl Checks for libraries. have_gtk="false" if $use_gtk; then diff --git a/libdv-no-exec-stack.patch b/libdv-no-exec-stack.patch new file mode 100644 index 0000000..af4bff6 --- /dev/null +++ b/libdv-no-exec-stack.patch @@ -0,0 +1,146 @@ +diff -Naur libdv-1.0.0.old/libdv/dct_block_mmx.S libdv-1.0.0/libdv/dct_block_mmx.S +--- libdv-1.0.0.old/libdv/dct_block_mmx.S 2022-03-24 20:11:25.273668990 +0100 ++++ libdv-1.0.0/libdv/dct_block_mmx.S 2022-03-24 20:12:54.495220228 +0100 +@@ -1217,3 +1217,7 @@ + popl %esi + popl %ebp + ret ++ ++#ifdef __ELF__ ++.section .note.GNU-stack,"",@progbits ++#endif +diff -Naur libdv-1.0.0.old/libdv/dct_block_mmx_x86_64.S libdv-1.0.0/libdv/dct_block_mmx_x86_64.S +--- libdv-1.0.0.old/libdv/dct_block_mmx_x86_64.S 2022-03-24 20:11:25.273668990 +0100 ++++ libdv-1.0.0/libdv/dct_block_mmx_x86_64.S 2022-03-24 20:12:54.507220437 +0100 +@@ -1207,3 +1207,7 @@ + pop %r12 + + ret ++ ++#ifdef __ELF__ ++.section .note.GNU-stack,"",@progbits ++#endif +diff -Naur libdv-1.0.0.old/libdv/encode_x86_64.S libdv-1.0.0/libdv/encode_x86_64.S +--- libdv-1.0.0.old/libdv/encode_x86_64.S 2022-03-24 20:11:25.273668990 +0100 ++++ libdv-1.0.0/libdv/encode_x86_64.S 2022-03-24 20:12:54.508220455 +0100 +@@ -612,3 +612,6 @@ + + + ++#ifdef __ELF__ ++.section .note.GNU-stack,"",@progbits ++#endif +diff -Naur libdv-1.0.0.old/libdv/encode_x86.S libdv-1.0.0/libdv/encode_x86.S +--- libdv-1.0.0.old/libdv/encode_x86.S 2022-03-24 20:11:25.273668990 +0100 ++++ libdv-1.0.0/libdv/encode_x86.S 2022-03-24 20:12:54.508220455 +0100 +@@ -611,3 +611,6 @@ + + + ++#ifdef __ELF__ ++.section .note.GNU-stack,"",@progbits ++#endif +diff -Naur libdv-1.0.0.old/libdv/idct_block_mmx.S libdv-1.0.0/libdv/idct_block_mmx.S +--- libdv-1.0.0.old/libdv/idct_block_mmx.S 2022-03-24 20:11:25.273668990 +0100 ++++ libdv-1.0.0/libdv/idct_block_mmx.S 2022-03-24 20:12:54.508220455 +0100 +@@ -649,3 +649,6 @@ + .long 0,0 + .align 8 + ++#ifdef __ELF__ ++.section .note.GNU-stack,"",@progbits ++#endif +diff -Naur libdv-1.0.0.old/libdv/idct_block_mmx_x86_64.S libdv-1.0.0/libdv/idct_block_mmx_x86_64.S +--- libdv-1.0.0.old/libdv/idct_block_mmx_x86_64.S 2022-03-24 20:11:25.272668973 +0100 ++++ libdv-1.0.0/libdv/idct_block_mmx_x86_64.S 2022-03-24 20:12:54.508220455 +0100 +@@ -654,3 +654,6 @@ + .long 0,0 + .align 8 + ++#ifdef __ELF__ ++.section .note.GNU-stack,"",@progbits ++#endif +diff -Naur libdv-1.0.0.old/libdv/quant_x86_64.S libdv-1.0.0/libdv/quant_x86_64.S +--- libdv-1.0.0.old/libdv/quant_x86_64.S 2022-03-24 20:11:25.272668973 +0100 ++++ libdv-1.0.0/libdv/quant_x86_64.S 2022-03-24 20:12:54.509220472 +0100 +@@ -463,3 +463,6 @@ + + + ++#ifdef __ELF__ ++.section .note.GNU-stack,"",@progbits ++#endif +diff -Naur libdv-1.0.0.old/libdv/quant_x86.S libdv-1.0.0/libdv/quant_x86.S +--- libdv-1.0.0.old/libdv/quant_x86.S 2022-03-24 20:11:25.273668990 +0100 ++++ libdv-1.0.0/libdv/quant_x86.S 2022-03-24 20:12:54.509220472 +0100 +@@ -458,3 +458,6 @@ + + + ++#ifdef __ELF__ ++.section .note.GNU-stack,"",@progbits ++#endif +diff -Naur libdv-1.0.0.old/libdv/rgbtoyuv.S libdv-1.0.0/libdv/rgbtoyuv.S +--- libdv-1.0.0.old/libdv/rgbtoyuv.S 2022-03-24 20:11:25.273668990 +0100 ++++ libdv-1.0.0/libdv/rgbtoyuv.S 2022-03-24 20:12:54.509220472 +0100 +@@ -1451,3 +1451,6 @@ + + + ++#ifdef __ELF__ ++.section .note.GNU-stack,"",@progbits ++#endif +diff -Naur libdv-1.0.0.old/libdv/rgbtoyuv_x86_64.S libdv-1.0.0/libdv/rgbtoyuv_x86_64.S +--- libdv-1.0.0.old/libdv/rgbtoyuv_x86_64.S 2022-03-24 20:11:25.273668990 +0100 ++++ libdv-1.0.0/libdv/rgbtoyuv_x86_64.S 2022-03-24 20:12:54.509220472 +0100 +@@ -1391,3 +1391,6 @@ + + + ++#ifdef __ELF__ ++.section .note.GNU-stack,"",@progbits ++#endif +diff -Naur libdv-1.0.0.old/libdv/transpose_x86_64.S libdv-1.0.0/libdv/transpose_x86_64.S +--- libdv-1.0.0.old/libdv/transpose_x86_64.S 2022-03-24 20:11:25.273668990 +0100 ++++ libdv-1.0.0/libdv/transpose_x86_64.S 2022-03-24 20:12:54.509220472 +0100 +@@ -190,3 +190,7 @@ + pop %r12 + + ret $0 ++ ++#ifdef __ELF__ ++.section .note.GNU-stack,"",@progbits ++#endif +diff -Naur libdv-1.0.0.old/libdv/transpose_x86.S libdv-1.0.0/libdv/transpose_x86.S +--- libdv-1.0.0.old/libdv/transpose_x86.S 2022-03-24 20:11:25.273668990 +0100 ++++ libdv-1.0.0/libdv/transpose_x86.S 2022-03-24 20:12:54.509220472 +0100 +@@ -190,3 +190,7 @@ + popl %ebp + + ret $0 ++ ++#ifdef __ELF__ ++.section .note.GNU-stack,"",@progbits ++#endif +diff -Naur libdv-1.0.0.old/libdv/vlc_x86_64.S libdv-1.0.0/libdv/vlc_x86_64.S +--- libdv-1.0.0.old/libdv/vlc_x86_64.S 2022-03-24 20:11:25.272668973 +0100 ++++ libdv-1.0.0/libdv/vlc_x86_64.S 2022-03-24 20:12:54.510220489 +0100 +@@ -673,3 +673,7 @@ + .align 16 + const_f_0_0_0: + .short 0xffff,0,0,0 ++ ++#ifdef __ELF__ ++.section .note.GNU-stack,"",@progbits ++#endif +diff -Naur libdv-1.0.0.old/libdv/vlc_x86.S libdv-1.0.0/libdv/vlc_x86.S +--- libdv-1.0.0.old/libdv/vlc_x86.S 2022-03-24 20:11:25.273668990 +0100 ++++ libdv-1.0.0/libdv/vlc_x86.S 2022-03-24 20:12:54.510220489 +0100 +@@ -587,3 +587,7 @@ + .align 16 + const_f_0_0_0: + .short 0xffff,0,0,0 ++ ++#ifdef __ELF__ ++.section .note.GNU-stack,"",@progbits ++#endif diff --git a/libdv-1.0.0-pic.patch b/libdv-pic.patch similarity index 89% rename from libdv-1.0.0-pic.patch rename to libdv-pic.patch index 34a5180..92973f4 100644 --- a/libdv-1.0.0-pic.patch +++ b/libdv-pic.patch @@ -1,9 +1,6 @@ -Patch downloaded from -http://bugs.gentoo.org/show_bug.cgi?id=121871 -http://bugs.gentoo.org/attachment.cgi?id=98094 - ---- libdv-0.104-old/libdv/asm_common.S -+++ libdv-0.104/libdv/asm_common.S +diff -Naur libdv-1.0.0.old/libdv/asm_common.S libdv-1.0.0/libdv/asm_common.S +--- libdv-1.0.0.old/libdv/asm_common.S 1970-01-01 01:00:00.000000000 +0100 ++++ libdv-1.0.0/libdv/asm_common.S 2022-03-24 20:13:32.551881896 +0100 @@ -0,0 +1,29 @@ +/* public domain, do what you want */ + @@ -34,9 +31,10 @@ http://bugs.gentoo.org/attachment.cgi?id=98094 +#else +# define LOAD_PIC_REG(reg) +#endif ---- libdv-0.104-old/libdv/dct_block_mmx.S -+++ libdv-0.104/libdv/dct_block_mmx.S -@@ -55,19 +55,22 @@ scratch2: .quad 0 +diff -Naur libdv-1.0.0.old/libdv/dct_block_mmx.S libdv-1.0.0/libdv/dct_block_mmx.S +--- libdv-1.0.0.old/libdv/dct_block_mmx.S 2022-03-24 20:13:23.543725277 +0100 ++++ libdv-1.0.0/libdv/dct_block_mmx.S 2022-03-24 20:13:32.551881896 +0100 +@@ -55,6 +55,8 @@ .section .note.GNU-stack, "", @progbits @@ -45,9 +43,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094 .text .align 8 - .global _dv_dct_88_block_mmx - .hidden _dv_dct_88_block_mmx - .type _dv_dct_88_block_mmx,@function +@@ -64,10 +66,11 @@ _dv_dct_88_block_mmx: pushl %ebp @@ -61,7 +57,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094 # column 0 movq 16*0(%esi), %mm0 # v0 -@@ -88,22 +93,22 @@ _dv_dct_88_block_mmx: +@@ -90,22 +93,22 @@ movq 16*3(%esi), %mm5 # v3 movq 16*4(%esi), %mm7 # v4 @@ -94,7 +90,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094 movq %mm0, %mm6 # duplicate v10 paddw %mm1, %mm0 # v10+v11 -@@ -113,10 +118,10 @@ _dv_dct_88_block_mmx: +@@ -115,10 +118,10 @@ movq %mm6, 16*4(%esi) # out4: v10-v11 movq %mm4, %mm0 # mm0: v06 @@ -107,7 +103,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094 psllw $1, %mm4 # v35: compensate the coeefient scale movq %mm4, %mm6 # duplicate v35 -@@ -125,7 +130,7 @@ _dv_dct_88_block_mmx: +@@ -127,7 +130,7 @@ paddw %mm5, %mm3 # v22: v12+v13 @@ -116,7 +112,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094 psllw $16-NSHIFT, %mm3 # v32: compensate the coeefient scale movq %mm5, %mm6 # duplicate v13 -@@ -136,13 +141,13 @@ _dv_dct_88_block_mmx: +@@ -138,13 +141,13 @@ movq %mm6, 16*6(%esi) # out6: v13-v32 @@ -134,7 +130,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094 psllw $16-WA4_SHIFT, %mm5 # v36: compensate the coeefient scale psllw $16-NSHIFT, %mm7 # v34: compensate the coeefient scale -@@ -190,22 +195,22 @@ _dv_dct_88_block_mmx: +@@ -192,22 +195,22 @@ movq 16*3(%esi), %mm5 # v3 movq 16*4(%esi), %mm7 # v4 @@ -167,7 +163,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094 movq %mm0, %mm6 # duplicate v10 paddw %mm1, %mm0 # v10+v11 -@@ -215,10 +220,10 @@ _dv_dct_88_block_mmx: +@@ -217,10 +220,10 @@ movq %mm6, 16*4(%esi) # out4: v10-v11 movq %mm4, %mm0 # mm0: v06 @@ -180,7 +176,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094 psllw $16-NSHIFT, %mm4 # v35: compensate the coeefient scale movq %mm4, %mm6 # duplicate v35 -@@ -227,7 +232,7 @@ _dv_dct_88_block_mmx: +@@ -229,7 +232,7 @@ paddw %mm5, %mm3 # v22: v12+v13 @@ -189,7 +185,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094 psllw $16-NSHIFT, %mm3 # v32: compensate the coeefient scale movq %mm5, %mm6 # duplicate v13 -@@ -237,13 +242,13 @@ _dv_dct_88_block_mmx: +@@ -239,13 +242,13 @@ movq %mm5, 16*2(%esi) # out2: v13+v32 movq %mm6, 16*6(%esi) # out6: v13-v32 @@ -207,7 +203,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094 psllw $16-NSHIFT, %mm7 psllw $16-WA4_SHIFT, %mm5 # v36: compensate the coeffient # scale note that WA4 is shifted 1 bit less than the others -@@ -755,11 +762,12 @@ _dv_dct_block_mmx_postscale_88: +@@ -759,11 +762,12 @@ _dv_dct_248_block_mmx: pushl %ebp @@ -222,7 +218,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094 # column 0 -@@ -781,7 +791,7 @@ _dv_dct_248_block_mmx: +@@ -787,7 +791,7 @@ paddw %mm1, %mm0 # v20: v10+v11 psubw %mm1, %mm3 # v21: v10-v11 @@ -231,7 +227,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094 movq %mm4, %mm2 psllw $16-NSHIFT, %mm5 # v32: compensate the coeffient scale -@@ -820,7 +830,7 @@ _dv_dct_248_block_mmx: +@@ -826,7 +830,7 @@ paddw %mm1, %mm0 # v20: v10+v11 psubw %mm1, %mm3 # v21: v10-v11 @@ -240,7 +236,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094 movq %mm4, %mm2 psllw $16-NSHIFT, %mm5 # v32: compensate the coeffient scale -@@ -857,7 +867,7 @@ _dv_dct_248_block_mmx: +@@ -863,7 +867,7 @@ paddw %mm1, %mm0 # v20: v10+v11 psubw %mm1, %mm3 # v21: v10-v11 @@ -249,7 +245,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094 movq %mm4, %mm2 psllw $16-NSHIFT, %mm5 # v32: compensate the coeffient scale -@@ -894,7 +904,7 @@ _dv_dct_248_block_mmx: +@@ -900,7 +904,7 @@ paddw %mm1, %mm0 # v20: v10+v11 psubw %mm1, %mm3 # v21: v10-v11 @@ -258,9 +254,10 @@ http://bugs.gentoo.org/attachment.cgi?id=98094 movq %mm4, %mm2 psllw $16-NSHIFT, %mm5 # v32: compensate the coeffient scale ---- libdv-0.104-old/libdv/dv.c -+++ libdv-0.104/libdv/dv.c -@@ -205,6 +205,9 @@ dv_reconfigure(int clamp_luma, int clamp +diff -Naur libdv-1.0.0.old/libdv/dv.c libdv-1.0.0/libdv/dv.c +--- libdv-1.0.0.old/libdv/dv.c 2022-03-24 20:11:25.271668956 +0100 ++++ libdv-1.0.0/libdv/dv.c 2022-03-24 20:13:32.551881896 +0100 +@@ -205,6 +205,9 @@ } /* dv_reconfigure */ @@ -270,7 +267,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094 static inline void dv_decode_macroblock(dv_decoder_t *dv, dv_macroblock_t *mb, unsigned int quality) { int i; -@@ -218,7 +221,7 @@ dv_decode_macroblock(dv_decoder_t *dv, d +@@ -218,7 +221,7 @@ dv_idct_248 (co248, mb->b[i].coeffs); } else { #if ARCH_X86 @@ -279,7 +276,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094 _dv_idct_88(mb->b[i].coeffs); #elif ARCH_X86_64 _dv_quant_88_inverse_x86_64(mb->b[i].coeffs,mb->qno,mb->b[i].class_no); -@@ -250,7 +253,7 @@ dv_decode_video_segment(dv_decoder_t *dv +@@ -250,7 +253,7 @@ dv_idct_248 (co248, mb->b[b].coeffs); } else { #if ARCH_X86 @@ -288,9 +285,10 @@ http://bugs.gentoo.org/attachment.cgi?id=98094 _dv_weight_88_inverse(bl->coeffs); _dv_idct_88(bl->coeffs); #elif ARCH_X86_64 ---- libdv-0.104-old/libdv/encode.c -+++ libdv-0.104/libdv/encode.c -@@ -521,7 +521,8 @@ static void reorder_block(dv_block_t *bl +diff -Naur libdv-1.0.0.old/libdv/encode.c libdv-1.0.0/libdv/encode.c +--- libdv-1.0.0.old/libdv/encode.c 2022-03-24 20:11:25.272668973 +0100 ++++ libdv-1.0.0/libdv/encode.c 2022-03-24 20:13:32.596882678 +0100 +@@ -521,7 +521,8 @@ } extern unsigned long _dv_vlc_encode_block_mmx(dv_coeff_t* coeffs, @@ -300,7 +298,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094 extern unsigned long _dv_vlc_encode_block_mmx_x86_64(dv_coeff_t* coeffs, dv_vlc_entry_t ** out); -@@ -558,7 +559,7 @@ static unsigned long vlc_encode_block(dv +@@ -558,7 +559,7 @@ #elif ARCH_X86 int num_bits; @@ -309,7 +307,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094 emms(); #else int num_bits; -@@ -574,7 +575,7 @@ static unsigned long vlc_encode_block(dv +@@ -574,7 +575,7 @@ return num_bits; } @@ -318,7 +316,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094 extern unsigned long _dv_vlc_num_bits_block_x86_64(dv_coeff_t* coeffs); extern unsigned long _dv_vlc_num_bits_block(dv_coeff_t* coeffs) -@@ -600,7 +601,7 @@ extern unsigned long _dv_vlc_num_bits_bl +@@ -600,7 +601,7 @@ #elif ARCH_X86_64 return _dv_vlc_num_bits_block_x86_64(coeffs); #else @@ -327,8 +325,9 @@ http://bugs.gentoo.org/attachment.cgi?id=98094 #endif } ---- libdv-0.104-old/libdv/encode_x86.S -+++ libdv-0.104/libdv/encode_x86.S +diff -Naur libdv-1.0.0.old/libdv/encode_x86.S libdv-1.0.0/libdv/encode_x86.S +--- libdv-1.0.0.old/libdv/encode_x86.S 2022-03-24 20:13:23.544725294 +0100 ++++ libdv-1.0.0/libdv/encode_x86.S 2022-03-24 20:13:32.596882678 +0100 @@ -23,9 +23,6 @@ * The libdv homepage is http://libdv.sourceforge.net/. */ @@ -339,7 +338,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094 .section .note.GNU-stack, "", @progbits -@@ -49,11 +47,14 @@ _dv_vlc_encode_block_mmx: +@@ -50,11 +47,14 @@ movl $63, %ecx @@ -356,7 +355,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094 xorl %ebp, %ebp subl $8, %edx vlc_encode_block_mmx_loop: -@@ -125,7 +128,7 @@ _dv_vlc_num_bits_block_x86: +@@ -128,7 +128,7 @@ addl $2, %edi movl $63, %ecx @@ -365,7 +364,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094 vlc_num_bits_block_x86_loop: movw (%edi), %ax -@@ -583,8 +594,11 @@ _dv_need_dct_248_mmx_rows: +@@ -594,8 +594,11 @@ paddw %mm5, %mm1 paddw %mm1, %mm0 @@ -379,9 +378,10 @@ http://bugs.gentoo.org/attachment.cgi?id=98094 movq %mm0, %mm1 psrlq $32, %mm1 paddd %mm1, %mm0 ---- libdv-0.104-old/libdv/idct_block_mmx.S -+++ libdv-0.104/libdv/idct_block_mmx.S -@@ -8,17 +8,21 @@ +diff -Naur libdv-1.0.0.old/libdv/idct_block_mmx.S libdv-1.0.0/libdv/idct_block_mmx.S +--- libdv-1.0.0.old/libdv/idct_block_mmx.S 2022-03-24 20:13:23.544725294 +0100 ++++ libdv-1.0.0/libdv/idct_block_mmx.S 2022-03-24 20:13:32.597882695 +0100 +@@ -8,6 +8,8 @@ .section .note.GNU-stack, "", @progbits @@ -390,7 +390,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094 .text .align 4 .global _dv_idct_block_mmx - .hidden _dv_idct_block_mmx +@@ -15,10 +17,12 @@ .type _dv_idct_block_mmx,@function _dv_idct_block_mmx: pushl %ebp @@ -406,7 +406,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094 /* * column 0: even part -@@ -34,7 +40,7 @@ _dv_idct_block_mmx: +@@ -36,7 +40,7 @@ movq %mm1, %mm2 /* added 11/1/96 */ pmulhw 8*8(%esi),%mm5 /* V8 */ psubsw %mm0, %mm1 /* V16 */ @@ -415,7 +415,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094 paddsw %mm0, %mm2 /* V17 */ movq %mm2, %mm0 /* duplicate V17 */ psraw $1, %mm2 /* t75=t82 */ -@@ -75,7 +81,7 @@ _dv_idct_block_mmx: +@@ -77,7 +81,7 @@ paddsw %mm0, %mm3 /* V29 ; free mm0 */ movq %mm7, %mm1 /* duplicate V26 */ psraw $1, %mm3 /* t91=t94 */ @@ -424,7 +424,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094 psraw $1, %mm1 /* t96 */ movq %mm5, %mm0 /* duplicate V2 */ psraw $2, %mm4 /* t85=t87 */ -@@ -83,15 +89,15 @@ _dv_idct_block_mmx: +@@ -85,15 +89,15 @@ psubsw %mm4, %mm0 /* V28 ; free mm4 */ movq %mm0, %mm2 /* duplicate V28 */ psraw $1, %mm5 /* t90=t93 */ @@ -443,7 +443,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094 nop psubsw %mm1, %mm0 /* V38 */ psubsw %mm7, %mm1 /* V37 ; free mm7 */ -@@ -158,7 +164,7 @@ _dv_idct_block_mmx: +@@ -160,7 +164,7 @@ psubsw %mm7, %mm1 /* V50 */ pmulhw 8*9(%esi), %mm5 /* V9 */ paddsw %mm7, %mm2 /* V51 */ @@ -452,7 +452,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094 movq %mm2, %mm6 /* duplicate V51 */ psraw $1, %mm2 /* t138=t144 */ movq %mm3, %mm4 /* duplicate V1 */ -@@ -199,11 +205,11 @@ _dv_idct_block_mmx: +@@ -201,11 +205,11 @@ * even more by doing the correction step in a later stage when the number * is actually multiplied by 16 */ @@ -466,7 +466,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094 movq %mm5, %mm6 /* duplicate V3 */ psraw $2, %mm4 /* t148=t150 */ paddsw %mm4, %mm5 /* V61 */ -@@ -212,13 +218,13 @@ _dv_idct_block_mmx: +@@ -214,13 +218,13 @@ psllw $1, %mm1 /* t169 */ paddsw %mm0, %mm5 /* V65 -> result */ psubsw %mm0, %mm4 /* V64 ; free mm0 */ @@ -483,7 +483,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094 psraw $1, %mm2 /* t172 */ /* moved from next block */ movq 8*5(%esi), %mm0 /* V56 */ -@@ -343,7 +349,7 @@ _dv_idct_block_mmx: +@@ -345,7 +349,7 @@ * movq 8*13(%esi), %mm4 tmt13 */ psubsw %mm4, %mm3 /* V134 */ @@ -492,7 +492,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094 movq 8*9(%esi), %mm6 /* tmt9 */ paddsw %mm4, %mm5 /* V135 ; mm4 free */ movq %mm0, %mm4 /* duplicate tmt1 */ -@@ -372,17 +378,17 @@ _dv_idct_block_mmx: +@@ -374,17 +378,17 @@ psubsw %mm7, %mm0 /* V144 */ movq %mm0, %mm3 /* duplicate V144 */ paddsw %mm7, %mm2 /* V147 ; free mm7 */ @@ -514,7 +514,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094 paddsw %mm2, %mm7 /* V149 ; free mm2 */ psllw $1, %mm1 /* t313 */ nop /* without the nop - freeze here for one clock */ -@@ -408,7 +414,7 @@ _dv_idct_block_mmx: +@@ -410,7 +414,7 @@ paddsw %mm3, %mm6 /* V164 ; free mm3 */ movq %mm4, %mm3 /* duplicate V142 */ psubsw %mm5, %mm4 /* V165 ; free mm5 */ @@ -523,7 +523,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094 psraw $4, %mm6 psraw $4, %mm4 paddsw %mm5, %mm3 /* V162 */ -@@ -419,11 +425,11 @@ _dv_idct_block_mmx: +@@ -421,11 +425,11 @@ */ movq %mm6, 8*9(%esi) /* out9 */ paddsw %mm1, %mm0 /* V161 */ @@ -537,7 +537,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094 movq %mm2, %mm4 /* duplicate V140 */ movq %mm5, 8*13(%esi) /* out13 */ paddsw %mm7, %mm2 /* V160 */ -@@ -433,7 +439,7 @@ _dv_idct_block_mmx: +@@ -435,7 +439,7 @@ /* moved from the next block */ movq 8*3(%esi), %mm7 psraw $4, %mm4 @@ -546,7 +546,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094 /* moved from the next block */ movq %mm0, %mm1 movq %mm4, 8*15(%esi) /* out15 */ -@@ -490,15 +496,15 @@ _dv_idct_block_mmx: +@@ -492,15 +496,15 @@ paddsw %mm4, %mm3 /* V113 ; free mm4 */ movq %mm0, %mm4 /* duplicate V110 */ paddsw %mm1, %mm2 /* V111 */ @@ -566,7 +566,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094 psllw $2, %mm0 /* t266 */ movq %mm1, (%esi) /* save V115 */ psllw $1, %mm5 /* t268 */ -@@ -516,7 +522,7 @@ _dv_idct_block_mmx: +@@ -518,7 +522,7 @@ movq %mm6, %mm3 /* duplicate tmt4 */ psubsw %mm0, %mm6 /* V100 */ paddsw %mm0, %mm3 /* V101 ; free mm0 */ @@ -575,7 +575,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094 movq %mm7, %mm5 /* duplicate tmt0 */ movq 8*8(%esi), %mm1 /* tmt8 */ paddsw %mm1, %mm7 /* V103 */ -@@ -550,10 +556,10 @@ _dv_idct_block_mmx: +@@ -552,10 +556,10 @@ movq 8*2(%esi), %mm3 /* V123 */ paddsw %mm4, %mm7 /* out0 */ /* moved up from next block */ @@ -588,7 +588,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094 psubsw %mm4, %mm1 /* out14 ; free mm4 */ paddsw %mm3, %mm5 /* out2 */ psraw $4, %mm1 -@@ -564,7 +570,7 @@ _dv_idct_block_mmx: +@@ -566,7 +570,7 @@ movq %mm5, 8*2(%esi) /* out2 ; free mm5 */ psraw $4, %mm2 /* moved up to the prev block */ @@ -597,7 +597,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094 /* moved up to the prev block */ psraw $4, %mm0 movq %mm2, 8*12(%esi) /* out12 ; free mm2 */ -@@ -578,7 +584,7 @@ _dv_idct_block_mmx: +@@ -580,7 +584,7 @@ * psraw $4, %mm0 * psraw $4, %mm6 */ @@ -606,9 +606,10 @@ http://bugs.gentoo.org/attachment.cgi?id=98094 psraw $4, %mm4 movq %mm0, 8*3(%esi) /* out3 */ psraw $4, %mm1 ---- libdv-0.104-old/libdv/parse.c -+++ libdv-0.104/libdv/parse.c -@@ -477,6 +477,13 @@ dv_parse_ac_coeffs(dv_videosegment_t *se +diff -Naur libdv-1.0.0.old/libdv/parse.c libdv-1.0.0/libdv/parse.c +--- libdv-1.0.0.old/libdv/parse.c 2022-03-24 20:11:25.272668973 +0100 ++++ libdv-1.0.0/libdv/parse.c 2022-03-24 20:13:32.597882695 +0100 +@@ -477,6 +477,13 @@ exit(0); #endif } /* dv_parse_ac_coeffs */ @@ -622,9 +623,10 @@ http://bugs.gentoo.org/attachment.cgi?id=98094 /* --------------------------------------------------------------------------- */ ---- libdv-0.104-old/libdv/quant.c -+++ libdv-0.104/libdv/quant.c -@@ -144,7 +144,7 @@ uint8_t dv_quant_offset[4] = { 6,3,0,1 +diff -Naur libdv-1.0.0.old/libdv/quant.c libdv-1.0.0/libdv/quant.c +--- libdv-1.0.0.old/libdv/quant.c 2022-03-24 20:11:25.272668973 +0100 ++++ libdv-1.0.0/libdv/quant.c 2022-03-24 20:13:32.597882695 +0100 +@@ -144,7 +144,7 @@ uint32_t dv_quant_248_mul_tab [2] [22] [64]; uint32_t dv_quant_88_mul_tab [2] [22] [64]; @@ -633,7 +635,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094 extern void _dv_quant_x86_64(dv_coeff_t *block,int qno,int klass); static void quant_248_inverse_std(dv_coeff_t *block,int qno,int klass,dv_248_coeff_t *co); static void quant_248_inverse_mmx(dv_coeff_t *block,int qno,int klass,dv_248_coeff_t *co); -@@ -210,7 +210,7 @@ void _dv_quant(dv_coeff_t *block,int qno +@@ -210,7 +210,7 @@ _dv_quant_x86_64(block, qno, klass); emms(); #else @@ -642,9 +644,10 @@ http://bugs.gentoo.org/attachment.cgi?id=98094 emms(); #endif } ---- libdv-0.104-old/libdv/quant.h -+++ libdv-0.104/libdv/quant.h -@@ -27,7 +27,7 @@ extern void _dv_quant(dv_coeff_t *block, +diff -Naur libdv-1.0.0.old/libdv/quant.h libdv-1.0.0/libdv/quant.h +--- libdv-1.0.0.old/libdv/quant.h 2022-03-24 20:11:25.271668956 +0100 ++++ libdv-1.0.0/libdv/quant.h 2022-03-24 20:13:32.597882695 +0100 +@@ -27,7 +27,7 @@ extern void _dv_quant_88_inverse(dv_coeff_t *block,int qno,int klass); extern void (*_dv_quant_248_inverse) (dv_coeff_t *block,int qno,int klass, dv_248_coeff_t *co); @@ -653,9 +656,10 @@ http://bugs.gentoo.org/attachment.cgi?id=98094 extern void _dv_quant_88_inverse_x86_64(dv_coeff_t *block,int qno,int klass); extern void dv_quant_init (void); #ifdef __cplusplus ---- libdv-0.104-old/libdv/quant_x86.S -+++ libdv-0.104/libdv/quant_x86.S -@@ -73,10 +75,13 @@ _dv_quant_88_inverse_x86: +diff -Naur libdv-1.0.0.old/libdv/quant_x86.S libdv-1.0.0/libdv/quant_x86.S +--- libdv-1.0.0.old/libdv/quant_x86.S 2022-03-24 20:13:23.545725311 +0100 ++++ libdv-1.0.0/libdv/quant_x86.S 2022-03-24 20:13:32.598882713 +0100 +@@ -75,10 +75,13 @@ /* pq = dv_quant_shifts[qno + dv_quant_offset[class]]; */ movl ARGn(1),%eax /* qno */ @@ -671,7 +675,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094 /* extra = (class == 3); */ /* 0 1 2 3 */ -@@ -214,11 +221,13 @@ _dv_quant_x86: +@@ -218,11 +221,13 @@ /* pq = dv_quant_shifts[qno + dv_quant_offset[class]]; */ movl ARGn(1),%eax /* qno */ @@ -688,8 +692,9 @@ http://bugs.gentoo.org/attachment.cgi?id=98094 /* extra = (class == 3); */ /* 0 1 2 3 */ ---- libdv-0.104-old/libdv/rgbtoyuv.S -+++ libdv-0.104/libdv/rgbtoyuv.S +diff -Naur libdv-1.0.0.old/libdv/rgbtoyuv.S libdv-1.0.0/libdv/rgbtoyuv.S +--- libdv-1.0.0.old/libdv/rgbtoyuv.S 2022-03-24 20:13:23.545725311 +0100 ++++ libdv-1.0.0/libdv/rgbtoyuv.S 2022-03-24 20:13:32.598882713 +0100 @@ -41,9 +41,6 @@ #define DV_WIDTH_SHORT_HALF 720 #define DV_WIDTH_BYTE_HALF 360 @@ -700,7 +705,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094 .data .align 8 -@@ -110,25 +107,26 @@ VR0GR: .long 0,0 +@@ -110,17 +107,19 @@ VBG0B: .long 0,0 #endif @@ -727,7 +732,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094 .global _dv_rgbtoycb_mmx .hidden _dv_rgbtoycb_mmx - .type _dv_rgbtoycb_mmx,@function +@@ -128,7 +127,6 @@ _dv_rgbtoycb_mmx: pushl %ebp @@ -735,7 +740,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094 pushl %eax pushl %ebx pushl %ecx -@@ -133,46 +134,47 @@ _dv_rgbtoycb_mmx: +@@ -136,46 +134,47 @@ pushl %esi pushl %edi @@ -810,7 +815,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094 rgbtoycb_mmx_loop: movq (%eax), %mm1 #load G2R2B1G1R1B0G0R0 pxor %mm6, %mm6 #0 -> mm6 -@@ -186,29 +188,29 @@ rgbtoycb_mmx_loop: +@@ -189,29 +188,29 @@ punpcklbw %mm6, %mm1 #B1G1R1B0 -> mm1 movq %mm0, %mm2 #R1B0G0R0 -> mm2 @@ -847,7 +852,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094 paddd %mm5, %mm4 #V1V0 -> mm4 movq %mm1, %mm5 #B3G3R3B2 -> mm5 -@@ -216,29 +218,29 @@ rgbtoycb_mmx_loop: +@@ -219,29 +218,29 @@ paddd %mm7, %mm1 #R3B200+00G2R2=R3B2G2R2->mm1 @@ -885,7 +890,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094 psrad $FIXPSHIFT, %mm4 #32-bit scaled V1V0 -> mm4 movq 16(%eax), %mm1 #B7G7R7B6G6R6B5G5 -> mm7 -@@ -253,58 +255,58 @@ rgbtoycb_mmx_loop: +@@ -256,58 +255,58 @@ movq %mm7, %mm5 #R7B6G6R6B5G500 -> mm5 psrad $FIXPSHIFT, %mm3 #32-bit scaled V3V2 -> mm3 @@ -959,7 +964,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094 psrad $FIXPSHIFT, %mm0 #32-bit scaled U5U4 -> mm0 psrad $FIXPSHIFT, %mm2 #32-bit scaled Y5Y4 -> mm2 -@@ -312,25 +314,25 @@ rgbtoycb_mmx_loop: +@@ -315,25 +314,25 @@ paddd %mm5, %mm6 #Y7Y6 -> mm6 movq %mm7, %mm5 #R7B6G6R6 -> mm5 @@ -991,7 +996,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094 pmaddwd %mm6, %mm0 #U7U6U5U4 averaged -> (U7U6)(U5U4)=UU3 UU2->mm0 pmaddwd %mm6, %mm4 #U3U2U1U0 averaged -> (U3U2)(U1U0)=UU1 UU0->mm4 -@@ -340,8 +342,8 @@ rgbtoycb_mmx_loop: +@@ -343,8 +342,8 @@ psrad $FIXPSHIFT, %mm1 #32-bit scaled V7V6 -> mm1 psraw $1, %mm4 #divide UU3 UU2 UU1 UU0 by 2 -> mm4 @@ -1002,7 +1007,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094 movq %mm4, (%ecx) # store U -@@ -429,14 +433,15 @@ _dv_ppm_copy_y_block_mmx: +@@ -434,14 +433,15 @@ _dv_pgm_copy_y_block_mmx: pushl %ebp @@ -1023,7 +1028,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094 pxor %mm6, %mm6 movq (%esi), %mm0 -@@ -571,14 +578,15 @@ _dv_pgm_copy_y_block_mmx: +@@ -578,14 +578,15 @@ _dv_video_copy_y_block_mmx: pushl %ebp @@ -1044,7 +1049,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094 pxor %mm6, %mm6 movq (%esi), %mm0 -@@ -859,16 +871,16 @@ _dv_ppm_copy_pal_c_block_mmx: +@@ -870,16 +871,16 @@ _dv_pgm_copy_pal_c_block_mmx: pushl %ebp @@ -1066,7 +1071,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094 pxor %mm6, %mm6 -@@ -1007,15 +1021,16 @@ _dv_pgm_copy_pal_c_block_mmx: +@@ -1020,15 +1021,16 @@ _dv_video_copy_pal_c_block_mmx: pushl %ebp @@ -1088,7 +1093,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094 paddw %mm7, %mm7 pxor %mm6, %mm6 -@@ -1102,18 +1119,18 @@ video_copy_pal_c_block_mmx_loop: +@@ -1117,18 +1119,18 @@ _dv_ppm_copy_ntsc_c_block_mmx: pushl %ebp @@ -1113,7 +1118,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094 ppm_copy_ntsc_c_block_mmx_loop: movq (%esi), %mm0 -@@ -1175,14 +1194,15 @@ ppm_copy_ntsc_c_block_mmx_loop: +@@ -1192,14 +1194,15 @@ _dv_pgm_copy_ntsc_c_block_mmx: pushl %ebp @@ -1134,7 +1139,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094 paddw %mm7, %mm7 pxor %mm6, %mm6 -@@ -1332,15 +1354,16 @@ _dv_pgm_copy_ntsc_c_block_mmx: +@@ -1351,15 +1354,16 @@ _dv_video_copy_ntsc_c_block_mmx: pushl %ebp @@ -1156,8 +1161,9 @@ http://bugs.gentoo.org/attachment.cgi?id=98094 paddw %mm7, %mm7 pxor %mm6, %mm6 ---- libdv-0.104-old/libdv/rgbtoyuv_x86_64.S -+++ libdv-0.104/libdv/rgbtoyuv_x86_64.S +diff -Naur libdv-1.0.0.old/libdv/rgbtoyuv_x86_64.S libdv-1.0.0/libdv/rgbtoyuv_x86_64.S +--- libdv-1.0.0.old/libdv/rgbtoyuv_x86_64.S 2022-03-24 20:13:23.546725329 +0100 ++++ libdv-1.0.0/libdv/rgbtoyuv_x86_64.S 2022-03-24 20:13:32.598882713 +0100 @@ -41,9 +41,6 @@ #define DV_WIDTH_SHORT_HALF 720 #define DV_WIDTH_BYTE_HALF 360 @@ -1168,8 +1174,9 @@ http://bugs.gentoo.org/attachment.cgi?id=98094 .data .align 8 ---- libdv-0.104-old/libdv/vlc_x86.S -+++ libdv-0.104/libdv/vlc_x86.S +diff -Naur libdv-1.0.0.old/libdv/vlc_x86.S libdv-1.0.0/libdv/vlc_x86.S +--- libdv-1.0.0.old/libdv/vlc_x86.S 2022-03-24 20:13:23.547725346 +0100 ++++ libdv-1.0.0/libdv/vlc_x86.S 2022-03-24 20:13:32.599882730 +0100 @@ -1,31 +1,39 @@ #include "asmoff.h" .section .note.GNU-stack, "", @progbits @@ -1219,7 +1226,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094 movl (%edx,%ebx,4),%edx /* Now %edx holds result, like this: -@@ -43,7 +52,7 @@ dv_decode_vlc: +@@ -44,7 +52,7 @@ movl %edx,%ecx sarl $8,%ecx andl $0xff,%ecx @@ -1228,7 +1235,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094 andl %ebx,%eax negl %eax sarl $31,%eax -@@ -64,14 +73,14 @@ dv_decode_vlc: +@@ -65,14 +73,14 @@ *result = broken; Note that the 'broken' pattern is all ones (i.e. 0xffffffff) */ @@ -1246,7 +1253,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094 popl %ebx ret -@@ -81,21 +90,28 @@ dv_decode_vlc: +@@ -82,21 +90,28 @@ .type __dv_decode_vlc,@function __dv_decode_vlc: pushl %ebx @@ -1281,7 +1288,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094 movl (%edx,%ebx,4),%edx /* Now %edx holds result, like this: -@@ -113,7 +129,7 @@ __dv_decode_vlc: +@@ -114,7 +129,7 @@ movl %edx,%ecx sarl $8,%ecx andl $0xff,%ecx @@ -1290,7 +1297,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094 andl %ecx,%eax negl %eax sarl $31,%eax -@@ -128,9 +144,9 @@ __dv_decode_vlc: +@@ -129,9 +144,9 @@ xorl %eax,%edx subl %eax,%edx @@ -1302,7 +1309,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094 popl %ebx ret -@@ -141,14 +157,20 @@ void dv_parse_ac_coeffs_pass0(bitstream_ +@@ -142,6 +157,10 @@ */ .text .align 4 @@ -1313,8 +1320,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094 .globl dv_parse_ac_coeffs_pass0 .type dv_parse_ac_coeffs_pass0,@function dv_parse_ac_coeffs_pass0: - pushl %ebx - pushl %edi +@@ -150,6 +169,8 @@ pushl %esi pushl %ebp @@ -1323,7 +1329,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094 #define ARGn(N) (20+(4*(N)))(%esp) /* -@@ -160,8 +183,10 @@ dv_parse_ac_coeffs_pass0: +@@ -162,8 +183,10 @@ ebp bl */ movl ARGn(2),%ebp @@ -1334,7 +1340,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094 movl dv_block_t_offset(%ebp),%edi movl dv_block_t_reorder(%ebp),%ebx -@@ -171,7 +196,11 @@ dv_parse_ac_coeffs_pass0: +@@ -173,7 +196,11 @@ movq dv_block_t_coeffs(%ebp),%mm1 pxor %mm0,%mm0 @@ -1346,7 +1352,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094 movq %mm1,dv_block_t_coeffs(%ebp) movq %mm0,(dv_block_t_coeffs + 8)(%ebp) movq %mm0,(dv_block_t_coeffs + 16)(%ebp) -@@ -192,9 +221,17 @@ dv_parse_ac_coeffs_pass0: +@@ -194,9 +221,17 @@ readloop: movl %edi,%ecx shrl $3,%ecx @@ -1364,7 +1370,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094 shll $16,%eax shll $8,%edx orl %ecx,%eax -@@ -218,7 +255,11 @@ readloop: +@@ -220,7 +255,11 @@ /* Attempt to use the shortcut first. If it hits, then this vlc term has been decoded. */ @@ -1376,7 +1382,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094 test $0x80,%edx je done_decode -@@ -229,12 +270,19 @@ readloop: +@@ -231,12 +270,19 @@ movl %ebx,dv_block_t_reorder(%ebp) /* %eax is bits */ @@ -1397,7 +1403,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094 andl %eax,%ebx sarl %cl,%ebx -@@ -257,7 +305,11 @@ readloop: +@@ -259,7 +305,11 @@ movl %edx,%ecx sarl $8,%ecx andl $0xff,%ecx @@ -1409,7 +1415,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094 andl %ecx,%eax negl %eax sarl $31,%eax -@@ -327,10 +379,16 @@ alldone: +@@ -329,10 +379,16 @@ slowpath: /* slow path: use dv_decode_vlc */; @@ -1427,7 +1433,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094 addl $12,%esp test $0x80,%edx /* If (vlc.run < 0) break */ jne escape -@@ -367,6 +425,8 @@ show16: +@@ -369,6 +425,8 @@ pushl %esi pushl %ebp @@ -1436,7 +1442,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094 #define ARGn(N) (20+(4*(N)))(%esp) movl ARGn(1),%eax /* quality */ -@@ -374,7 +435,11 @@ dv_parse_video_segment: +@@ -377,7 +435,11 @@ jz its_mono movl $6,%ebx its_mono: @@ -1448,7 +1454,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094 /* * ebx seg/b -@@ -385,15 +450,22 @@ its_mono: +@@ -388,15 +450,22 @@ * ebp bl */ movl ARGn(0),%ebx @@ -1471,7 +1477,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094 movl ARGn(0),%ebx -@@ -401,7 +473,13 @@ macloop: +@@ -404,7 +473,13 @@ /* mb->qno = bitstream_get(bs,4); */ movl %ecx,%edx shr $3,%edx @@ -1485,7 +1491,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094 andl $0xf,%edx movl %edx,dv_macroblock_t_qno(%edi) -@@ -412,7 +490,11 @@ macloop: +@@ -415,7 +490,11 @@ movl %edx,dv_macroblock_t_eob_count(%edi) /* mb->i = (seg->i + dv_super_map_vertical[m]) % (seg->isPAL?12:10); */ @@ -1497,7 +1503,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094 movl dv_videosegment_t_i(%ebx),%ecx addl %ecx,%edx -@@ -423,11 +505,20 @@ skarly: +@@ -426,11 +505,20 @@ andl $1,%ecx shll $5,%ecx /* ecx = (isPAL ? 32 : 0) */ @@ -1518,7 +1524,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094 movl %edx,dv_macroblock_t_j(%edi) /* mb->k = seg->k; */ -@@ -446,12 +537,28 @@ blkloop: +@@ -449,12 +537,28 @@ +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ */ /* dc = bitstream_get(bs,9); */ @@ -1547,7 +1553,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094 shll $8,%eax orl %ecx,%eax -@@ -478,7 +585,11 @@ blkloop: +@@ -481,7 +585,11 @@ /* bl->reorder = &dv_reorder[bl->dct_mode][1]; */ shll $6,%eax @@ -1559,7 +1565,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094 movl %eax,dv_block_t_reorder(%ebp) /* bl->reorder_sentinel = bl->reorder + 63; */ -@@ -486,13 +597,22 @@ blkloop: +@@ -489,13 +597,22 @@ movl %eax,dv_block_t_reorder_sentinel(%ebp) /* bl->offset= mb_start + dv_parse_bit_start[b]; */ @@ -1582,7 +1588,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094 addl %ecx,%eax movl %eax,dv_block_t_end(%ebp) -@@ -504,7 +624,11 @@ blkloop: +@@ -507,7 +624,11 @@ /* no AC pass. Just zero out the remaining coeffs */ movq dv_block_t_coeffs(%ebp),%mm1 pxor %mm0,%mm0 @@ -1594,7 +1600,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094 movq %mm1,dv_block_t_coeffs(%ebp) movq %mm0,(dv_block_t_coeffs + 8)(%ebp) movq %mm0,(dv_block_t_coeffs + 16)(%ebp) -@@ -529,18 +653,27 @@ do_ac_pass: +@@ -532,18 +653,27 @@ pushl %ebp pushl %edi pushl %eax @@ -1623,7 +1629,7 @@ http://bugs.gentoo.org/attachment.cgi?id=98094 addl $(8 * 80),%ecx addl $dv_macroblock_t_size,%edi incl %eax -@@ -558,7 +691,7 @@ done_ac: +@@ -561,7 +691,7 @@ andl $DV_QUALITY_AC_MASK,%eax cmpl $DV_QUALITY_AC_2,%eax diff --git a/libdv.spec b/libdv.spec index 6cb613f..3ec1ba9 100644 --- a/libdv.spec +++ b/libdv.spec @@ -7,10 +7,10 @@ URL: http://libdv.sourceforge.net/ Source: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz -Patch1: %{name}-0.104-no-exec-stack.patch -Patch2: %{name}-1.0.0-pic.patch -Patch3: %{name}-1.0.0-gtk2.patch -Patch4: %{name}-1.0.0-dso-linking.patch +Patch1: %{name}-no-exec-stack.patch +Patch2: %{name}-pic.patch +Patch3: %{name}-gtk2.patch +Patch4: %{name}-dso-linking.patch BuildRequires: autoconf BuildRequires: automake