diff options
author | Patrick McLean <chutzpah@gentoo.org> | 2013-04-16 20:41:29 +0000 |
---|---|---|
committer | Patrick McLean <chutzpah@gentoo.org> | 2013-04-16 20:41:29 +0000 |
commit | 58f61205401bfa6518e16ca54b11e8aa1d4e8dfd (patch) | |
tree | 1e764cfa3c255c83524d5e1759e8ad6dcabdfc85 /media-libs/x264 | |
parent | Stable for ppc64, wrt bug #456568 (diff) | |
download | historical-58f61205401bfa6518e16ca54b11e8aa1d4e8dfd.tar.gz historical-58f61205401bfa6518e16ca54b11e8aa1d4e8dfd.tar.bz2 historical-58f61205401bfa6518e16ca54b11e8aa1d4e8dfd.zip |
Add patch from upstream to fix crashes when compiled with gcc 4.8
Package-Manager: portage-2.1.11.62/cvs/Linux x86_64
Manifest-Sign-Key: 0x5C350883
Diffstat (limited to 'media-libs/x264')
-rw-r--r-- | media-libs/x264/ChangeLog | 6 | ||||
-rw-r--r-- | media-libs/x264/Manifest | 25 | ||||
-rw-r--r-- | media-libs/x264/files/x264-0.0.20120707-gcc48.patch | 138 | ||||
-rw-r--r-- | media-libs/x264/x264-0.0.20120707.ebuild | 5 |
4 files changed, 170 insertions, 4 deletions
diff --git a/media-libs/x264/ChangeLog b/media-libs/x264/ChangeLog index 1388a91184ea..ee050fdc2a37 100644 --- a/media-libs/x264/ChangeLog +++ b/media-libs/x264/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for media-libs/x264 # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/media-libs/x264/ChangeLog,v 1.85 2013/02/04 13:05:08 ago Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-libs/x264/ChangeLog,v 1.86 2013/04/16 20:41:17 chutzpah Exp $ + + 16 Apr 2013; Patrick McLean <chutz@gentoo.org> x264-0.0.20120707.ebuild, + +files/x264-0.0.20120707-gcc48.patch: + Add patch from upstream to fix crashes when compiled with gcc 4.8 04 Feb 2013; Agostino Sarubbo <ago@gentoo.org> x264-0.0.20120707.ebuild: revert to ~arm, it was stabilized for a mistake diff --git a/media-libs/x264/Manifest b/media-libs/x264/Manifest index a8d389a3865e..e7c263d94cba 100644 --- a/media-libs/x264/Manifest +++ b/media-libs/x264/Manifest @@ -1,3 +1,7 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA256 + +AUX x264-0.0.20120707-gcc48.patch 5240 SHA256 24631c7c429099958366c172df6467264a894c13ff64e3979414715fec4d28bc SHA512 561b0f37ffd2b2116d35d33cdccaf098983904b501b71f928d93cdbe3028f462662cbb468000ff5a9eac3acf344919244aa9994641f9136325515b0d8cbf5859 WHIRLPOOL 2f3f17cdb125678e02d1134065eae2b17e6b6f0fef88ba51112b17f945eb37e6e77a959ab0d8ea009824126def2c934f3800a05e63afe642f6364334b4cdf75f AUX x264-nostrip.patch 433 SHA256 1210914cc52de908b840775ab8e4a107d95aeced690c2f115320d31e587a2ffa SHA512 4103c43f54aebc814f4c5aecac0f115ff9f25fef352ce5945b37eb9d7a191fc21c1f608f81b6fb3d534a0a72b8bc4e49c6ed7e1e0d86fe39d18ad4d55241d6dd WHIRLPOOL ae648a2a61d2fcd3c35f5fe16b110249b7acbe2b2bac497b980c557bb3e95f8975296361f7482b5419ca88a1cf25258da60be53805feb6fa426b865dcd0ff4e3 AUX x264-onlylib-20110425.patch 1120 SHA256 a0bdcfe1a86fdde9f56d7842f203d90eefcc4080664653ea42a8a4cc6231dbbe SHA512 a94d93b4a9f1243b41db4c82b8483767a5da4b69dcbd0ad9414ae4dbb7caa4dee6bb10b2b9f8325d9cda2341e78d9aa89d79f24844ea405cfddbe8d857f43457 WHIRLPOOL 4aa9ba6e18e1b9de1ad6a8e8c90635a399bfa0ae64be89c0b0383a844022fb474686774a5887903b0a639406c5e7165ec862dc03fa7710f1714d03bdeb8aa8df AUX x264-x32.patch 1224 SHA256 1daaa89caef24923d703528f438918496360bfbf3e2b56334a4edb5e7659a000 SHA512 ad1ff51b086b7f11adff73ea997feee1d9dfec47bbb457cfd47e0681c11d6bde1b62b5b896d032707a7cb70c9f739cffe500c4c9c5be2e19fe4ccc3463b314db WHIRLPOOL 17d1a51fad912ab5b728335c629f73b00572f033fa52ba7154604664e92fbf91ae192c9e3ab61048e48e5517f829e1582aba2c95b905aca35c21f920490d13e6 @@ -8,7 +12,24 @@ DIST x264-snapshot-20120707-2245.tar.bz2 554243 SHA256 52fdc8b558fa7dcb6419fef73 EBUILD x264-0.0.20110426.ebuild 1519 SHA256 20405a5c868e308166ae2126427fe948afcd60e82c7b7537ec28a35b98a4da61 SHA512 d38cc20294c33839898cbd0431ba19f9f54d6dbbc7a9c6c8d79b58722e9893ba266657e36e4f17ca2570fda7fadf75ba9581e0e9ee2d5f6281332f82f2303733 WHIRLPOOL 2d4a72b6801e1b311709c1579ca2f16bedf7861fc475990acaee6c25e75ea60dab4f6fccfd24f4678702def90daf4620b29ccbf2415ba4659667c93f8507aafa EBUILD x264-0.0.20111220.ebuild 2289 SHA256 edf89ceda65eab31f55d66385245eee6481ffb6d9cb0bf39eaf275e1540359c7 SHA512 2783dcb8babb4972de713f68f544974c463e2e1250485afc5ad9513087b3067d630adddfcd07f79ccb19bc5b6b1ae7f0ddeaa27babfb156aac45873e6768bad5 WHIRLPOOL cf521d2495ca285bb0090b457273717ce8cbeae6718f4b9bc08c229837f4fc04dfe284278fa11eef6131053aa3fbb5ecaada8b65063fd380735796928c99472d EBUILD x264-0.0.20120327.ebuild 2369 SHA256 652c96142181d3339fb820c0add88ebc21646daf74b24c3bb9b1eaa88737dfc1 SHA512 f90c9af66c75d4f445f1a7443180b8bc4885b0b6be5c64d2c13633ee2094a76dbc74dc33241fd03bba5dcba293df130d45aeb918d8d0b131e8912918583b06de WHIRLPOOL 029fd0b95c4b29e36b6e3cd01671dee797a999631b4a0c086606718295a41ee1c92f667a75d29b1556e2d62a69fd542c323461350f32ff3537ad5706f43fa71a -EBUILD x264-0.0.20120707.ebuild 2799 SHA256 4342470935541f124913c88ff21d27c1dd08886fdc4e2f643950697595436d0f SHA512 3689e619cec346887aaedfa2bed0cc1ae826cee65bb32481bb2582b1827d96eef9b2caab6ec346f07b8fdc301034cf52917debd63b97e8e9f64e628d2199733a WHIRLPOOL 8f51b933bfcf891e3e60144a6252acc2913142f75c8b91bf040fa34b60fcef6226f3b7f71d7f52e52a5474e78c25bfe800644f7671b250eb1636d041af7c930d +EBUILD x264-0.0.20120707.ebuild 2886 SHA256 4054b29ea3f2ce394f90f0c4f036e9bc7eab0b4924e815dc11d3836e88328d8b SHA512 05bcc6e83e50e699e68c7dab47798dca3e61392bd6ec76122de4363cfa1244e019839850e56a2ab6ed781a04f3cec62c7ea1c8b55f45d3207a0004fcfe725302 WHIRLPOOL 8cdf241263db4efdd7da473d14c5566acaffbb741122a776fc4e7f0c76fc190f7fe320432324dbcd8fa5672fc34cc20c819e3996e634d25709c8ad7af86c3eb3 EBUILD x264-9999.ebuild 1836 SHA256 d3f07e2c159433bc1d3fde98f7ae82517ce7c7e7be1d9cf28a1ccf71b893f03c SHA512 d49e99e93e6c2da527f8217d4b2ba388ba8d7064c5d0974cbca3b42854dd921232b19126db91c19079b17272c38759b84c660fd0435866aa5869486db9ad11e3 WHIRLPOOL 96dd2fa8d0c4eb2c7873ec266ba2188bf4f51157969284ddec513fd485abe4e7e56c418d9fb64569a37f6890c72f67fb29a517bda43632a244fb9f05168e00df -MISC ChangeLog 12542 SHA256 a67d54f5fa706a7ad64dbdc81a1644ec33d1cfedc919982e334c2042939e8fc6 SHA512 9910a07f7271f31deea4157cf81033a277c9f2dc48af8493b515a3650c495ebbec820b2c6165dafafaf603c29e6a8a5099180d0219a11529121965c35d21e232 WHIRLPOOL 6814c558e7bd88ddc457f635920585dc9c3c87e63ec30060ca55b009a8457949e861b16f18bbbd748c03744b77238880af06c7417bb4e9832d9637c42afdfeb3 +MISC ChangeLog 12731 SHA256 547e3c5288125313a606b2a360cc2ba76fb89a134db8b853c02d9e7134f63cd4 SHA512 6d28f8cf2c0a85404c8a94c5de7323d37675e4ca9efea4820c517af5b59eb62547e0a3369084d9fc774dca9208786419959b7f68bf7c37d99eeeb7651e659509 WHIRLPOOL 918084f5a5f40e7dfe7b7f371ac478276b88fed640d5b1fbd73d16b7be6119046bdc3ee7c2d5dbde1180a5d12c441ef41b1881edc93b349218856728565a0d92 MISC metadata.xml 554 SHA256 1e4bcd3b571c5401aa3dc2f1e07801153596a4437d6309d1c7b6366e6cc552e5 SHA512 9a23212939b2e396b94d9716b97c141386147c378a85cfa1e7b7fa3c828ebe0bf6cb4cc16a35e98ed5290f0c4a8480340dcec67aaf39af6101de1acebc114430 WHIRLPOOL 2a1cd7188f168635eb9c6cb59f4fb13956312068566464838f7c1aefd9aba59baed4f1d62187efaa8e4a8390e21c74ebe3490328f23e5815bf0da30ec98b7357 +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2.0.19 (GNU/Linux) + +iQIcBAEBCAAGBQJRbbduAAoJEHy/RO9cNQiDaq4QAMn2E73FtTDELdfNTlp2tf+u +h+dQocfwLgNPScMe0vN9zx87fOA/3FkEqjqDfFwJ2sSW29JH4Ezlt8OvYOiUcaqf +X31JSlV62cpeyYwuuwClHln82jAi+AmW42z14rlYQ3ZcdCPabnFI9fdX7QpkVkst +/veYrRRyDkREKlPs+yUdA1fiI0sw57c8kdzeYJTqp5o76OARvVNtX56ulayVIbpK ++i/W3RVOzhMETfcawBAB4PnmBRLtW0w1uiFF5nxyYuOU/pW2j+WrvRUSDMObahvL +6CBcn5d3wLxiO9yk9ngm9ObUWmkCETL+lg8y5RN6/hVhmeQjyjt8u9BzjwXaz8+g +vamk2a9TQrNtc/gQdDw2dVxXcQdVDBFRKpkICs2eJ/r+hsd61TlfuJOA604P+w4L +ZqZu2lCL6nvjaFowPybjKrEbPHAY6k4Ek8xlJrGTfAkUzT49iv1xpgTx/Msek6Cv +qBADGXuYXvVIw5YwBFLKPxQ4rShfn/wV/rRgvIf+a4udQAwTWSfbD4Eb4CXhRYMN +ao4RCdkixsyp1w0O7nXwMnLl1O3imNnLjHI4klEO8e/4O+yqtWFZxuhohzdp6gF9 +EfluGIreGG1g2rGkbskfCy01PwmRR9m0HPMntaY/xe2aoPWt4A79p4kEFjocxG8k +YBy9/As4CJ2ArfsEM0ZQ +=BVMt +-----END PGP SIGNATURE----- diff --git a/media-libs/x264/files/x264-0.0.20120707-gcc48.patch b/media-libs/x264/files/x264-0.0.20120707-gcc48.patch new file mode 100644 index 000000000000..16cb4bff0018 --- /dev/null +++ b/media-libs/x264/files/x264-0.0.20120707-gcc48.patch @@ -0,0 +1,138 @@ +From 6129dbe86484393a2ea520be94ef9b550b0bd113 Mon Sep 17 00:00:00 2001 +From: Jason Garrett-Glaser <jason@x264.com> +Date: Wed, 27 Feb 2013 13:30:22 -0800 +Subject: [PATCH] Fix array overreads that caused miscompilation in gcc 4.8 + +--- + common/common.h | 1 + + common/set.c | 78 +++++++++++++++++++++++++++++++------------------------- + tools/checkasm.c | 2 +- + 3 files changed, 45 insertions(+), 36 deletions(-) + +diff --git a/common/common.h b/common/common.h +index 39ad5cb..0da1d43 100644 +--- a/common/common.h ++++ b/common/common.h +@@ -40,6 +40,7 @@ + #define IS_DISPOSABLE(type) ( type == X264_TYPE_B ) + #define FIX8(f) ((int)(f*(1<<8)+.5)) + #define ALIGN(x,a) (((x)+((a)-1))&~((a)-1)) ++#define ARRAY_ELEMS(a) ((sizeof(a))/(sizeof(a[0]))) + + #define CHECKED_MALLOC( var, size )\ + do {\ +diff --git a/common/set.c b/common/set.c +index 4c72125..fa8b158 100644 +--- a/common/set.c ++++ b/common/set.c +@@ -85,44 +85,49 @@ int x264_cqm_init( x264_t *h ) + int max_qp_err = -1; + int max_chroma_qp_err = -1; + int min_qp_err = QP_MAX+1; +- int num_8x8_lists = h->sps->i_chroma_format_idc == CHROMA_444 ? 4 : 2; /* Checkasm may segfault if optimized out by --chroma-format */ ++ int num_8x8_lists = h->sps->i_chroma_format_idc == CHROMA_444 ? 4 ++ : h->param.analyse.b_transform_8x8 ? 2 : 0; /* Checkasm may segfault if optimized out by --chroma-format */ + +- for( int i = 0; i < 4 + num_8x8_lists; i++ ) +- { +- int size = i<4 ? 16 : 64; +- int j; +- for( j = (i<4 ? 0 : 4); j < i; j++ ) +- if( !memcmp( h->pps->scaling_list[i], h->pps->scaling_list[j], size*sizeof(uint8_t) ) ) +- break; +- if( j < i ) +- { +- h-> quant4_mf[i] = h-> quant4_mf[j]; +- h->dequant4_mf[i] = h->dequant4_mf[j]; +- h->unquant4_mf[i] = h->unquant4_mf[j]; +- } +- else +- { +- CHECKED_MALLOC( h-> quant4_mf[i], (QP_MAX+1)*size*sizeof(udctcoef) ); +- CHECKED_MALLOC( h->dequant4_mf[i], 6*size*sizeof(int) ); +- CHECKED_MALLOC( h->unquant4_mf[i], (QP_MAX+1)*size*sizeof(int) ); +- } +- +- for( j = (i<4 ? 0 : 4); j < i; j++ ) +- if( deadzone[j&3] == deadzone[i&3] && +- !memcmp( h->pps->scaling_list[i], h->pps->scaling_list[j], size*sizeof(uint8_t) ) ) +- break; +- if( j < i ) +- { +- h->quant4_bias[i] = h->quant4_bias[j]; +- h->quant4_bias0[i] = h->quant4_bias0[j]; +- } +- else +- { +- CHECKED_MALLOC( h->quant4_bias[i], (QP_MAX+1)*size*sizeof(udctcoef) ); +- CHECKED_MALLOC( h->quant4_bias0[i], (QP_MAX+1)*size*sizeof(udctcoef) ); +- } ++#define CQM_ALLOC( w, count )\ ++ for( int i = 0; i < count; i++ )\ ++ {\ ++ int size = w*w;\ ++ int start = w == 8 ? 4 : 0;\ ++ int j;\ ++ for( j = 0; j < i; j++ )\ ++ if( !memcmp( h->pps->scaling_list[i+start], h->pps->scaling_list[j+start], size*sizeof(uint8_t) ) )\ ++ break;\ ++ if( j < i )\ ++ {\ ++ h-> quant##w##_mf[i] = h-> quant##w##_mf[j];\ ++ h->dequant##w##_mf[i] = h->dequant##w##_mf[j];\ ++ h->unquant##w##_mf[i] = h->unquant##w##_mf[j];\ ++ }\ ++ else\ ++ {\ ++ CHECKED_MALLOC( h-> quant##w##_mf[i], (QP_MAX+1)*size*sizeof(udctcoef) );\ ++ CHECKED_MALLOC( h->dequant##w##_mf[i], 6*size*sizeof(int) );\ ++ CHECKED_MALLOC( h->unquant##w##_mf[i], (QP_MAX+1)*size*sizeof(int) );\ ++ }\ ++ for( j = 0; j < i; j++ )\ ++ if( deadzone[j] == deadzone[i] &&\ ++ !memcmp( h->pps->scaling_list[i+start], h->pps->scaling_list[j+start], size*sizeof(uint8_t) ) )\ ++ break;\ ++ if( j < i )\ ++ {\ ++ h->quant##w##_bias[i] = h->quant##w##_bias[j];\ ++ h->quant##w##_bias0[i] = h->quant##w##_bias0[j];\ ++ }\ ++ else\ ++ {\ ++ CHECKED_MALLOC( h->quant##w##_bias[i], (QP_MAX+1)*size*sizeof(udctcoef) );\ ++ CHECKED_MALLOC( h->quant##w##_bias0[i], (QP_MAX+1)*size*sizeof(udctcoef) );\ ++ }\ + } + ++ CQM_ALLOC( 4, 4 ) ++ CQM_ALLOC( 8, num_8x8_lists ) ++ + for( int q = 0; q < 6; q++ ) + { + for( int i = 0; i < 16; i++ ) +@@ -204,6 +209,9 @@ int x264_cqm_init( x264_t *h ) + for( int cat = 0; cat < 3 + CHROMA444; cat++ ) + { + int dct8x8 = cat&1; ++ if( !h->param.analyse.b_transform_8x8 && dct8x8 ) ++ continue; ++ + int size = dct8x8 ? 64 : 16; + udctcoef *nr_offset = h->nr_offset_emergency[q][cat]; + /* Denoise chroma first (due to h264's chroma QP offset), then luma, then DC. */ +diff --git a/tools/checkasm.c b/tools/checkasm.c +index 9135b70..441687b 100644 +--- a/tools/checkasm.c ++++ b/tools/checkasm.c +@@ -309,7 +309,7 @@ static int check_pixel( int cpu_ref, int cpu_new ) + + #define TEST_PIXEL( name, align ) \ + ok = 1, used_asm = 0; \ +- for( int i = 0; i < 8; i++ ) \ ++ for( int i = 0; i < ARRAY_ELEMS(pixel_c.name); i++ ) \ + { \ + int res_c, res_asm; \ + if( pixel_asm.name[i] != pixel_ref.name[i] ) \ +-- +1.8.1.5 + diff --git a/media-libs/x264/x264-0.0.20120707.ebuild b/media-libs/x264/x264-0.0.20120707.ebuild index 25c84f783841..24ab805aa1fa 100644 --- a/media-libs/x264/x264-0.0.20120707.ebuild +++ b/media-libs/x264/x264-0.0.20120707.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/media-libs/x264/x264-0.0.20120707.ebuild,v 1.10 2013/02/04 13:05:08 ago Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-libs/x264/x264-0.0.20120707.ebuild,v 1.11 2013/04/16 20:41:17 chutzpah Exp $ EAPI=4 @@ -55,6 +55,9 @@ src_prepare() { # for OSX sed -i -e "s|-arch x86_64||g" configure || die epatch "${FILESDIR}"/x264-x32.patch #420241 + + # fix crashes when compiled with gcc 4.8 + epatch "${FILESDIR}"/${P}-gcc48.patch } src_configure() { |