summaryrefslogtreecommitdiff
path: root/media-video
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2025-03-29 00:32:16 +0000
committerV3n3RiX <venerix@koprulu.sector>2025-03-29 00:32:16 +0000
commitad108e7b751d67723534624b94eb0e04250dd1af (patch)
treeb2c2e47b9c23ac5a70d7170b3ba364b32da31944 /media-video
parentc44ae5c03130467400468d0e9a7f83e723c99f35 (diff)
gentoo auto-resync : 29:03:2025 - 00:32:15
Diffstat (limited to 'media-video')
-rw-r--r--media-video/Manifest.gzbin23220 -> 23222 bytes
-rw-r--r--media-video/ffmpeg/Manifest29
-rw-r--r--media-video/ffmpeg/ffmpeg-4.4.5-r1.ebuild609
-rw-r--r--media-video/ffmpeg/ffmpeg-4.4.5-r2.ebuild2
-rw-r--r--media-video/ffmpeg/ffmpeg-6.1.2-r1.ebuild2
-rw-r--r--media-video/ffmpeg/ffmpeg-6.1.2.ebuild617
-rw-r--r--media-video/ffmpeg/files/chromium-r1.patch42
-rw-r--r--media-video/ffmpeg/files/chromium-r2.patch41
-rw-r--r--media-video/ffmpeg/files/chromium.c8
-rw-r--r--media-video/ffmpeg/files/ffmpeg-4.4.3-get_cabac_inline_x86-32-bit.patch24
-rw-r--r--media-video/ffmpeg/files/ffmpeg-4.4.4-amd-av1-vaapi.patch257
-rw-r--r--media-video/ffmpeg/files/ffmpeg-4.4.4-glslang.patch25
-rw-r--r--media-video/ffmpeg/files/ffmpeg-4.4.4-opencl-parallel-gmake-fix.patch12
-rw-r--r--media-video/ffmpeg/files/ffmpeg-4.4.4-wint-conversion-vulkan.patch30
-rw-r--r--media-video/ffmpeg/files/ffmpeg-4.4.5-binutils-2.43-arm.patch60
-rw-r--r--media-video/ffmpeg/files/ffmpeg-4.4.5-incmptbl-pntr-types.patch15
-rw-r--r--media-video/ffmpeg/files/ffmpeg-4.4.5-wint-inconversion-libgcrypt.patch69
-rw-r--r--media-video/ffmpeg/files/ffmpeg-5.0-backport-ranlib-build-fix.patch59
-rw-r--r--media-video/ffmpeg/files/ffmpeg-6.0-fix-lto-type-mismatch.patch41
-rw-r--r--media-video/ffmpeg/files/ffmpeg-6.0.1-alignment.patch114
-rw-r--r--media-video/ffmpeg/files/ffmpeg-6.1-gcc-14.patch13
-rw-r--r--media-video/ffmpeg/files/ffmpeg-6.1-wint-conversion.patch88
-rw-r--r--media-video/ffmpeg/files/ffmpeg-6.1.1-amd-av1-vaapi.patch254
-rw-r--r--media-video/ffmpeg/files/ffmpeg-6.1.1-incmptbl-pntr-types.patch50
-rw-r--r--media-video/ffmpeg/files/ffmpeg-6.1.1-wint-inconversion-libgcrypt.patch68
-rw-r--r--media-video/ffmpeg/files/ffmpeg-6.1.1-wint-inconversion-vulkan.patch35
-rw-r--r--media-video/ffmpeg/files/vmaf-models-default-path.patch13
-rw-r--r--media-video/ffmpeg/metadata.xml21
28 files changed, 5 insertions, 2593 deletions
diff --git a/media-video/Manifest.gz b/media-video/Manifest.gz
index 8900926f823a..31bab7d7eafb 100644
--- a/media-video/Manifest.gz
+++ b/media-video/Manifest.gz
Binary files differ
diff --git a/media-video/ffmpeg/Manifest b/media-video/ffmpeg/Manifest
index f83524ccfb5b..d1285bc10ca0 100644
--- a/media-video/ffmpeg/Manifest
+++ b/media-video/ffmpeg/Manifest
@@ -1,27 +1,6 @@
-AUX chromium-r1.patch 1582 BLAKE2B 48547a7d53fd1f0f44b682c7e2306e79f007f8e96b36253f76775c4a3ced54ffaaf403dfaae94e81aa26c60887677b2dabdd2c5cef9fc4553e203f8259453910 SHA512 808daad5afed13a6d3926c9f9ab5cb58f80e16969533022c7ee959147908bb2c12d066d2125a6b6975ef9304d9b8d49c39aeb0a047009adabb4529e3cf54498f
-AUX chromium-r2.patch 1602 BLAKE2B e3f5441dfb3b8b6975da9dc6c1283c814fae24d0c373b86a2b6b8706d7169a63504f258fcef57c28f738aa7dba0b1f3186afebe45e13e1ab14b7538bdeb1b86e SHA512 31ff29d8fdf91cb4151a6a32902aaac55bb0062383619a655db20351582a88c487da528c6cf319717e4f39a140e3721de9d499c3e96ca0ea231aa4651f41ed9d
AUX chromium-r3.patch 1878 BLAKE2B fc3b2344c8819f66f94b75911854193a1a6e8760a7767ab1e3deb966ab1587f426b14076705dae5dc76916bce07301747fe9c8c1d7268eed408594b1dad0b615 SHA512 e685946343bc0f0384b612ca1b009f1c5f03de03b4ac4e029e16ef720e28eaa59af6d692fb1d70822c191501e9c6cc374533f90581564aa8830122ab511db727
-AUX chromium.c 215 BLAKE2B 2b5149d401433a362149cd4ff020cdc2217388e3ecac4aef86e7a46c7abb0d13a050eb61eab859578ecb9682e075451e2ccf7c2bda5c7ec397f71b9d06c1cf48 SHA512 552ef0a6316e743be717bdb8f49b69ab0b2acda828ff87f581aaf816d403ff59d5153a57f0bfd3b64e37a4fb8d261f0449b520b7e26feb7fd444cb480dc895b5
-AUX ffmpeg-4.4.3-get_cabac_inline_x86-32-bit.patch 1068 BLAKE2B b547cd925bfd506e08d44395c67916fe20b30f397a36adf53fcf277660c45aef9d3d8c014b2bbfcf038539618affb9dd8ff5d93f2fe622e4282c61c4d1b26861 SHA512 779e921e783b800e6bf9bc95af73d44a170287676d17bc22f2b7cd91e393f410ec3f6c7bfa173497443a65496047f39f37cac1d56507271411893c5bdcb37d8b
-AUX ffmpeg-4.4.4-amd-av1-vaapi.patch 11092 BLAKE2B d3561619dd226102116c729475691a4d10382abbe09be3ca79beed61c4b785e76e01d13ef956fce5233a8d525d84b27cb191bb91bc1b9538e72794b98ac31c6a SHA512 3ef47e1f6ab0eacc7a17ee31fcf0ccd6e90812689cd94cbfd4763db57aadff09eafb6dca7a20931bc95208109c6fd00370d6b9a6b3cb9d1bfe55b2436fd5eda8
-AUX ffmpeg-4.4.4-glslang.patch 1526 BLAKE2B d64d95f089c3d3aeafb7cc3fb08700641b6252c3cdbfac2e9b16431819007a8fa7b52ae156a1c9727671f00c9281024596183b85f7f74864ef997f660aa47296 SHA512 2bca3ca62bece6696dd6bd30c8cf57e31b9da551ee1f698a09d0a00ecdc96da51b519a8a42c85d1f572d26db92bec72a717d75c1a6e3c8f59a4a0066e6a332b8
-AUX ffmpeg-4.4.4-opencl-parallel-gmake-fix.patch 362 BLAKE2B 709a5a79aea781258998f295e539620651dce08820db345ab3d1d8996b076907db5157bfc7cd1fe15b8ce86bd1f6d073f79a2343f74a2548e9a699b92b4efe6f SHA512 0a5ecb29c19505564b4d3d6f362b8885d055c5a93688f3671509764194fb851aaf51483a956b8a150ec6ea17cc7ca2e5e0cca25d5f476f26c3bbdcb3ebd8ce05
-AUX ffmpeg-4.4.4-wint-conversion-vulkan.patch 1066 BLAKE2B 1409c97a31ae59500df944ced7efc064486e325e1658ac8f30d74ac926c63de51b610eebb5be9951adcd8ad02c8c143429c6eff57ce789a1c187e0b24221aa6d SHA512 58e33b2f0e94e75ef7acebb221332dc4d618846f8a968011da370743ce80a4ab688112411d3f2a5320d144c25db567780c870a0eb4045152b73957e2d7fe747e
-AUX ffmpeg-4.4.5-binutils-2.43-arm.patch 1999 BLAKE2B 89d9ed274ea6e637424b4e83e5029b6a90140bcebf577e2b9eab5e2a7c803f5a78a06f0d794ef797733c0bc3c50c9446a38f783b6a7ca84b23e117c71b792e4e SHA512 33eff894a68fe46d2440f3ada9f1d016949119028d3e9b2f8b2ec428fa255a31d4f2b72a5fc9dd91abe06d20728d58221bd9b9e3f921f5b5b43d286ebe4c0f65
-AUX ffmpeg-4.4.5-incmptbl-pntr-types.patch 502 BLAKE2B 2c4d4416b112d1b4b0c985be7765e18e5d52586252834dd47052e13caa8554fd28dcbc88b37013f36134d5dba06b0c917f485f42a8e12d5cda37a6b13dd48827 SHA512 d3e9730467d52cb75999fa2494996e2b1515cdfb22d134be50240308f2c1167569033c7aaa821efe10dc0ee252863ff3c8826b58fbf2a727639c1bee652edc14
-AUX ffmpeg-4.4.5-wint-inconversion-libgcrypt.patch 3472 BLAKE2B 7ba84ccd12c4c661a09ad0843ad53d863d3fe60cdba32c9ac2c05c4f2b5167a2315f24ac387d5ec612cf7d05fe6abd4cf00c7facc1c30bcf4f247ed316f716b7 SHA512 8951addd67a6720a45411f28fb3bccfd0707f35c1861969ea5e19c4e71c553116704f18c403c9032ae2443f065fae81c08d029d3a1d44de7c22a959b5e9835a1
-AUX ffmpeg-5.0-backport-ranlib-build-fix.patch 2224 BLAKE2B 1af6c5eee3f2c69c0630a73ec3885b9302cb045a03623ff138939348d6ba7e7deef1bb07c33c5bef5834040c4f6abcd7d22af8b0b849b28efde3d5753b776108 SHA512 e82cd400488ba86e5d039f088e3798b5a66245a8753d275d608284081f4b260fb7a4d8d1310f43acdf81258cc507943c8f07e431c497411744a62ba98c88c5bb
-AUX ffmpeg-6.0-fix-lto-type-mismatch.patch 1782 BLAKE2B 4cafd0244136c645e8da072b21c906fba97579f667e57f678b450410759fddc834e5a2428b7d0f078130cfc7ab267cad82a46d369951efddcfc5853dd2118837 SHA512 170114d57af0a0b5fc5da71ae76f4725b8cf1a604b5eca10e60761ef22fb0cdb35a166d1dd5ebc4ef990c383e1d1331f8ef2ceccb8dc7bf4adcc7e9ebb2ba899
-AUX ffmpeg-6.0.1-alignment.patch 5048 BLAKE2B 9a9345b84b68442c97258a71b49ed773e40d985ea8f2525a8749a7562d787634ff0b0e5e1d257e94f7cf68fab81790ca2f0b64cfcb27453e1e6912de30c560e9 SHA512 575b71b2d69b0c7b4e0498b9375dad55945adc7178c72ed5fd12addeae3ffb0081ab59d743a2a6da1a3b67d84642c7dd3d04e2fdb9ae2d992968ba52aa1aee41
-AUX ffmpeg-6.1-gcc-14.patch 523 BLAKE2B b82fc06a7eee0c7ab68ef78f3ac205f45a68a7799dc241f0a574afa48e4dbd477c0d67f7c5a7ff46971adc821ef1507f4957156200167a2c59f8c7f7867ac048 SHA512 092cd9bad652ab82c3b160a37c0c92b561577d56b33776e30b79b7abf487fffeb1ef1273b950c4d4eff62d3cd7fec2a6dc2c294285b0b32eda364e47834a4ff9
AUX ffmpeg-6.1-opencl-parallel-gmake-fix.patch 370 BLAKE2B 46afba747d26105e5520389016aa8cc73ebc1425095e7818e0c2e23ff66b822a5428fec8253a6b545456bd94d0e746ed24bc014a7fa25d97b6fc4acf753341d4 SHA512 82b16798e63736dc67ad03e62eb31c7d3653d2e53a775a0a4456e01985da2336ebde587d3acd2272065c5ce82be528ebc051cd6c121832829d7cd0ed2aba3fdd
-AUX ffmpeg-6.1-wint-conversion.patch 3514 BLAKE2B fcb65b882af964a8f45f71ea3f885fc016e3f89c3d6f0bd6d661d489715c0f746e763a86c6ade1515e212b01559d90ea9c2a97c965e0c0f9087b8396cdd58414 SHA512 7e09fc1a811a21aee9eef0370e57a37817652229a6b0e58cd2e8723e8336124396fe40f6a7c6c5f860046410596027d27d900371ff86609b86ef94dd0633977f
-AUX ffmpeg-6.1.1-amd-av1-vaapi.patch 11069 BLAKE2B f30d00fd00215b8753ba720bde8b040f03fadb9ae6d1e3ebf98ae20564104a55aa220ac91ab082e3086943677a9be6d8b709170765605ecb681458ad215e44d9 SHA512 cf8127f3e50c28824367ca489568eb1e8ff11207291b2354d4bf8027a2bc4a884e24e76bad4fd023cf80268c04e0893f3d6d1fbd8ccf4b9c5e69b74ae41775d4
-AUX ffmpeg-6.1.1-incmptbl-pntr-types.patch 2314 BLAKE2B cfd05bdec613ec3c7c7a57f294b2d56959bb062eb2bfac8f799784bf913601b7a455d7e8d706054b32ac94c894773edc37417ac022cbbd64f5faca53c0193118 SHA512 c3b4abca88d831ddfefd9639fb26df636ba0fb0f5a502c30fe26d0672b8a3e0168af098647c0204c56857b46fa22add3c880bef737592a6c35f85f191eabafd4
-AUX ffmpeg-6.1.1-wint-inconversion-libgcrypt.patch 3442 BLAKE2B 21d441dd39595c13b7be7407c774a9e3a9d4ae8b2334aeed79d2fa5b88f4c637665b782b0705fabe6283062549138453fb01d1c1d4bbcd799474a7590e59ed75 SHA512 aa8c0c259e7ab98afd608e4c2167eebe4e373000713c84a2052b9836cd04a029d6123bc1ce27a84589048ee3634ab8b30a8e501ff48394d3fccf9f13c85273af
-AUX ffmpeg-6.1.1-wint-inconversion-vulkan.patch 1565 BLAKE2B 275132b55cdd9b6e1671dc2db5cf5aea1b6198d0942f2ecda5078902ad62172742bf29e17ba63847133b7eb3ff93ccb832ad92e7a7c42ab8c8cc917e964be888 SHA512 fef857daa13fe2b146d22764ede340ccf348d21beda5db4635273c37e22acb054e9d000466fd06b057c97187ba406e5fb08b929808b49e64d67ffcfa0e459a9e
AUX ffmpeg-7.1.1-svt-av1-3.patch 522 BLAKE2B d5a4fccee8ba6c90e3bf606c21deff17f58303aa244d44279d09225608af6cc213169deda3e16b160af4a912c2eb30ab9f45459811ae77b0297f05a3851af98b SHA512 9affc7f64ceb77e3da0679e6721572a9c638a4d99e06976f989562bd7babc3ad3090c2729f009a84de5e19d5aeeb6056d977aeb6bff381675f4ec3efdcb3e9bc
-AUX vmaf-models-default-path.patch 1126 BLAKE2B 71f83765dc89b85e929af393f9d1415d119e71a91aaf45e8a32fd4fff270a129ca797c3b383a6074bea32fb582816660022a59d33bb6f557514df038baaf0271 SHA512 4d21f4b1622d8e47d2821ecac6b893847ada74d75db7d8aaac70efc7e6e7a6607c011b6fb2d015cb0c5e05f6a56e4feed43eca7d35b0f686a68261e6d9981b6a
DIST ffmpeg-4.4-patchset-1.tar.xz 9916 BLAKE2B 9b41de6b048601f2af41864c3262b3348330f792eea71df4cfab5e740626ee6c633ac5569e6e91d953143f6ad0fac15c840ef0643925e91261f8b4a32e2d386c SHA512 b11d9e182ddb0a48f50d63f5e0bd7fd99f4b8fa7dd17179a3bfbc9419dabb76401408a81ae2d5f118fbf67f28dcfdc3bfb5b7ac70f740259e3ebad8d1ba049bb
DIST ffmpeg-4.4.5.tar.xz 9575596 BLAKE2B 546df09f7731d22e532a18d9ba9be184283f62b7a2e9470e745e536802bc2263a00f11ed6ab0aee8fc60c5f728826311cbf3542084ba3a64b65a61d76295cd64 SHA512 70df4e63ef507a7ec76da34438142499139769728fd5130d9cf48d56c110ec82c3d6a7e6d1622da03c70167fa861d901d016bbe52c21d2b284b8a0d9f30811dc
DIST ffmpeg-4.4.5.tar.xz.asc 520 BLAKE2B 505987208ed58b548f910299adb1324e6eba655cc37e6f03cac32c8623e16a4a884e822c745fb72b1934129a8c0a2706bb8bfb785715e6a68e43f737cb8ed365 SHA512 bcfee8986681dfbefd3add741fcbbc5e223bb06c9800797e68fde968c114055ac3fc02ce8731ed269bf30c92d6c990c7f636f82d42379920012e8a0ace8d527e
@@ -34,10 +13,8 @@ DIST ffmpeg-rpi-6.1-r3.patch 800738 BLAKE2B b7e449ee5eec8b50a3b3bba233c5269f3b68
DIST ffmpeg-rpi-6.1-r3.patch.asc 833 BLAKE2B 31fd5823c06d5884f7b0980de9072c35bbf4e1d6c0ed20b089439325d50956127238ca29469b003dba623b888a5aae3c4d8ad177862534e77b8e51f29cbed96c SHA512 3d8943b7151e20f73e9c14b121c501847bd7e01f2cf57ff135fc8c223653ec9d433bfe4012fa564f70c0471980b66d7ec3d9b5b1b14865187187719ba110cb5f
DIST ffmpeg-rpi-7.1.1.patch 847869 BLAKE2B efc3fef1810034b40eee1f637499171529fc6027c4fc0ef66da587c704a7742b454903aa060b21305e1d9a714eb31d96cd93f93d7cadb5815a0de22ac040b9e1 SHA512 a3f9013aec9b17e0fc1689d946e57e251a88eac3f9e7856d46fe9614fea29211feaf106d32a31f97c0e8c83c1685ca454c31f9bcb5dafb669a0933d683e581c8
DIST ffmpeg-rpi-7.1.1.patch.asc 833 BLAKE2B a30e8d0216325ac86a3b7f8ac132a61a1d3eb97eff5e758cdad5af89e74ecfb577bda6438b263651d772b265a38f8ac6bf5056598f6f707411236245f939045a SHA512 a75547b38ab1445b94fea2d38f60c93092a70ecd45ec6ec0830084280d684c631a49ccbf46327ac4052ade3e7934b257f8d2c3aa107950ec9da0e66873f3e5be
-EBUILD ffmpeg-4.4.5-r1.ebuild 19956 BLAKE2B b7ca0c144bc5250f4455e55d78954dab2f07adb7fedbc5171d56d26a38c831e841535a5a3e1055220f0b50b327205bf569a7ac40747cd095a5f2f5138c5a5de0 SHA512 6e8807befe505591f79ccafaca9aae56d08b0ab10c151ec0d743727514c9c3c84368c8cf0e56441d9b20379c24d4e01a48f7264b11a1da1e3a4954f18306f196
-EBUILD ffmpeg-4.4.5-r2.ebuild 14664 BLAKE2B 72559d3d555c925ae9dd1c9ff0df13aec982583806fcf83d8185b5ce4d39779929789d03c64ce9aa00680b218dcd919783867d443d4373ef80d472de6ca18a89 SHA512 d279e967e9fd3e44ddda06d33b5b1b74d9a08dc052c7f8f625f78312ecee7fcdccec42aa218c5221c0129dff50b0934f204e435f40cdf5da85b707a31d3f4ff3
-EBUILD ffmpeg-6.1.2-r1.ebuild 16793 BLAKE2B 2ffe7c7eb3d3b602a11094c8ecd5b807543cff581b980ba43b2e74ab521e652168385ce5fa8cf517f6af0105d9e5727a818a936b83c61bdc94c2d8bebcde61f2 SHA512 31b10067beb08a04986fa3fc23d71aa3a5bdfd62e6827004424564ada70b7f47eb0954d0affbee0199fffb5869fd375025bd258f636ce4af9e97ca035e8381fe
-EBUILD ffmpeg-6.1.2.ebuild 20422 BLAKE2B e97868eb815439d994a4a80018eaeca23e9e25a18b58cb841710e560ed0467bc54ffeeba7a18257d8f91a6e948f52a382519cd7f7caf34b467d1a8d6c56bde4e SHA512 40dec5943ce7641360d6500df8f5843f863064b75d074b0b2e948449c592f761634c9c2064ec7b6b2854ec07b1e4d003b0c6c11fcee729ec6c3e5ea9a0e4ee81
+EBUILD ffmpeg-4.4.5-r2.ebuild 14657 BLAKE2B e5563e14a0624d009c952eac45289651b9b03880461a2e1465ec3fd7824f51e3bf6d02cac65c72c6a7c8892c1bf1244cd3738aac3c3b30b861b478ba9062591e SHA512 acecaffd8b416ba6f6564e4c404bda4a96cbb8fb8374d6b418b6aaa289a30464d554fb1476900f8b8897e347d6459ef50a52b7c559b652ea4e151dbafe839d92
+EBUILD ffmpeg-6.1.2-r1.ebuild 16786 BLAKE2B 424d4dc872bc517299ca54e46fd30f537799640895e1ce7a59bce1c518a7c6788cb1b253c9861f923cbe31ed479736539898e7c9c653e8ecd2c92cd22e761419 SHA512 1404a0ec32ae11a0e92ff54e8129a432f426b7e91360e6f77a9e4f75673356ea17cef2eec2ad0037ae9d13e8387c7ec97cc5e288a9a653dcb122ec229fae245e
EBUILD ffmpeg-7.1.1.ebuild 17230 BLAKE2B 158bffe6b9c71941b6e0aabde7ff2b3e8054cb1516c3a98840627f9d4ea668e01650cffc48d75429c8bfaf86c0602eb8349ac193010705db70ff6cee73c8be2a SHA512 234115773b41e016b015053bd8625962f8c834c0ad688b2d24fd76a89fc0c124e4e55295f06bff356dc351d6f940a63218447b81e99ec2100b7b46a217f51cdc
EBUILD ffmpeg-9999.ebuild 17192 BLAKE2B 72d4238d102e7a78d686f002a67b4a3937d466b1768d6c4d7cfd492abc258a2c9c38ed75f3cc2e416486373ccdeaca19af51d72f179874207c575a24859323d5 SHA512 c33912f86a413fd3a222396be9f06865a215d7265fa62648e1e708973c3b0da98321798f791f989425cd8038f56bd05b010f29a55fca69cde2093c6e94217da1
-MISC metadata.xml 9814 BLAKE2B fa834051d2c63e0175e397e0ab861aca6f069a717791882d95abb37c1e94ed452660b6529d0882f339e0370ff6e9108ad6a3f16d776fc0794b9a9e3529dbbfa6 SHA512 75cc92b385425524791ff1591716b2f0417c741c955d1ca4d6d2c3e05adfe4aa934e0399cc244636a314522e542e0f3f172b016dbe6fb97e9ad96968b7d64852
+MISC metadata.xml 8057 BLAKE2B 1acd5f3b8df2c2ef798e3f3cde26e093ed94c09be4edeaa81cba5d99c5d2295090912006f9570eff94b9025f09aeb02c49462e0e4087b58adc8dde4bd7936e62 SHA512 985d262f99959827daed0317719fe16ad7df9db9eec0bd385a6b6d5f6ea3027fd68bc8346c5f3be74ba382d9f53ae0ff2ad4ca371c4d38dcc1f885436e0b88ca
diff --git a/media-video/ffmpeg/ffmpeg-4.4.5-r1.ebuild b/media-video/ffmpeg/ffmpeg-4.4.5-r1.ebuild
deleted file mode 100644
index bc08f88f2901..000000000000
--- a/media-video/ffmpeg/ffmpeg-4.4.5-r1.ebuild
+++ /dev/null
@@ -1,609 +0,0 @@
-# Copyright 1999-2025 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-# Subslot: libavutil major.libavcodec major.libavformat major
-# Since FFmpeg ships several libraries, subslot is kind of limited here.
-# Most consumers will use those three libraries, if a "less used" library
-# changes its soname, consumers will have to be rebuilt the old way
-# (preserve-libs).
-# If, for example, a package does not link to libavformat and only libavformat
-# changes its ABI then this package will be rebuilt needlessly. Hence, such a
-# package is free _not_ to := depend on FFmpeg but I would strongly encourage
-# doing so since such a case is unlikely.
-FFMPEG_SUBSLOT=56.58.58
-
-SCM=""
-if [ "${PV#9999}" != "${PV}" ] ; then
- SCM="git-r3"
- EGIT_MIN_CLONE_TYPE="single"
- EGIT_REPO_URI="https://git.ffmpeg.org/ffmpeg.git"
-fi
-
-inherit flag-o-matic multilib multilib-minimal toolchain-funcs ${SCM}
-
-DESCRIPTION="Complete solution to record/convert/stream audio and video. Includes libavcodec"
-HOMEPAGE="https://ffmpeg.org/"
-if [ "${PV#9999}" != "${PV}" ] ; then
- SRC_URI=""
-elif [ "${PV%_p*}" != "${PV}" ] ; then # Snapshot
- SRC_URI="mirror://gentoo/${P}.tar.xz"
-else # Release
- VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/ffmpeg.asc
- inherit verify-sig
- SRC_URI="https://ffmpeg.org/releases/${P/_/-}.tar.xz"
- SRC_URI+=" verify-sig? ( https://ffmpeg.org/releases/${P/_/-}.tar.xz.asc )"
-
- BDEPEND=" verify-sig? ( sec-keys/openpgp-keys-ffmpeg )"
-fi
-FFMPEG_REVISION="${PV#*_p}"
-
-SLOT="0/${FFMPEG_SUBSLOT}"
-LICENSE="
- !gpl? ( LGPL-2.1 )
- gpl? ( GPL-2 )
- amr? (
- gpl? ( GPL-3 )
- !gpl? ( LGPL-3 )
- )
- gmp? (
- gpl? ( GPL-3 )
- !gpl? ( LGPL-3 )
- )
- libaribb24? (
- gpl? ( GPL-3 )
- !gpl? ( LGPL-3 )
- )
- encode? (
- amrenc? (
- gpl? ( GPL-3 )
- !gpl? ( LGPL-3 )
- )
- )
- samba? ( GPL-3 )
-"
-if [ "${PV#9999}" = "${PV}" ] ; then
- KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~mips ppc ppc64 ~riscv sparc x86 ~amd64-linux ~x86-linux ~x64-macos"
-fi
-
-# Options to use as use_enable in the foo[:bar] form.
-# This will feed configure with $(use_enable foo bar)
-# or $(use_enable foo foo) if no :bar is set.
-# foo is added to IUSE.
-FFMPEG_FLAG_MAP=(
- +bzip2:bzlib cpudetection:runtime-cpudetect debug gcrypt +gnutls gmp
- +gpl hardcoded-tables +iconv libxml2 lzma +network opencl
- openssl +postproc samba:libsmbclient sdl:ffplay sdl:sdl2 vaapi vdpau vulkan
- X:xlib X:libxcb X:libxcb-shm X:libxcb-xfixes +zlib
- # libavdevice options
- cdio:libcdio iec61883:libiec61883 ieee1394:libdc1394 libcaca openal
- opengl
- # indevs
- libv4l:libv4l2 pulseaudio:libpulse libdrm jack:libjack
- # decoders
- amr:libopencore-amrwb amr:libopencore-amrnb codec2:libcodec2 +dav1d:libdav1d fdk:libfdk-aac
- jpeg2k:libopenjpeg bluray:libbluray gme:libgme gsm:libgsm
- libaribb24 mmal modplug:libmodplug opus:libopus qsv:libmfx libilbc librtmp ssh:libssh
- speex:libspeex srt:libsrt svg:librsvg nvenc:ffnvcodec
- vorbis:libvorbis vpx:libvpx zvbi:libzvbi
- # libavfilter options
- appkit
- bs2b:libbs2b chromaprint cuda:cuda-llvm flite:libflite frei0r fribidi:libfribidi
- fontconfig glslang:libglslang ladspa libass libtesseract lv2 truetype:libfreetype
- vidstab:libvidstab vmaf:libvmaf rubberband:librubberband zeromq:libzmq zimg:libzimg
- # libswresample options
- libsoxr
- # Threads; we only support pthread for now but ffmpeg supports more
- +threads:pthreads
-)
-
-# Same as above but for encoders, i.e. they do something only with USE=encode.
-FFMPEG_ENCODER_FLAG_MAP=(
- amf amrenc:libvo-amrwbenc kvazaar:libkvazaar libaom mp3:libmp3lame
- openh264:libopenh264 rav1e:librav1e snappy:libsnappy svt-av1:libsvtav1
- theora:libtheora twolame:libtwolame webp:libwebp x264:libx264
- x265:libx265 xvid:libxvid
-)
-
-IUSE="
- alsa chromium doc +encode oss +pic sndio static-libs test v4l
- ${FFMPEG_FLAG_MAP[@]%:*}
- ${FFMPEG_ENCODER_FLAG_MAP[@]%:*}
-"
-
-# Strings for CPU features in the useflag[:configure_option] form
-# if :configure_option isn't set, it will use 'useflag' as configure option
-ARM_CPU_FEATURES=(
- cpu_flags_arm_thumb:armv5te
- cpu_flags_arm_v6:armv6
- cpu_flags_arm_thumb2:armv6t2
- cpu_flags_arm_neon:neon
- cpu_flags_arm_vfp:vfp
- cpu_flags_arm_vfpv3:vfpv3
- cpu_flags_arm_v8:armv8
-)
-ARM_CPU_REQUIRED_USE="
- arm64? ( cpu_flags_arm_v8 )
- cpu_flags_arm_v8? ( cpu_flags_arm_vfpv3 cpu_flags_arm_neon )
- cpu_flags_arm_neon? (
- cpu_flags_arm_vfp
- arm? ( cpu_flags_arm_thumb2 )
- )
- cpu_flags_arm_vfpv3? ( cpu_flags_arm_vfp )
- cpu_flags_arm_thumb2? ( cpu_flags_arm_v6 )
- cpu_flags_arm_v6? (
- arm? ( cpu_flags_arm_thumb )
- )
-"
-MIPS_CPU_FEATURES=( mipsdspr1:mipsdsp mipsdspr2 mipsfpu )
-PPC_CPU_FEATURES=( cpu_flags_ppc_altivec:altivec cpu_flags_ppc_vsx:vsx cpu_flags_ppc_vsx2:power8 )
-PPC_CPU_REQUIRED_USE="
- cpu_flags_ppc_vsx? ( cpu_flags_ppc_altivec )
- cpu_flags_ppc_vsx2? ( cpu_flags_ppc_vsx )
-"
-X86_CPU_FEATURES_RAW=( 3dnow:amd3dnow 3dnowext:amd3dnowext aes:aesni avx:avx avx2:avx2 fma3:fma3 fma4:fma4 mmx:mmx
- mmxext:mmxext sse:sse sse2:sse2 sse3:sse3 ssse3:ssse3 sse4_1:sse4 sse4_2:sse42 xop:xop )
-X86_CPU_FEATURES=( ${X86_CPU_FEATURES_RAW[@]/#/cpu_flags_x86_} )
-X86_CPU_REQUIRED_USE="
- cpu_flags_x86_avx2? ( cpu_flags_x86_avx )
- cpu_flags_x86_fma4? ( cpu_flags_x86_avx )
- cpu_flags_x86_fma3? ( cpu_flags_x86_avx )
- cpu_flags_x86_xop? ( cpu_flags_x86_avx )
- cpu_flags_x86_avx? ( cpu_flags_x86_sse4_2 )
- cpu_flags_x86_aes? ( cpu_flags_x86_sse4_2 )
- cpu_flags_x86_sse4_2? ( cpu_flags_x86_sse4_1 )
- cpu_flags_x86_sse4_1? ( cpu_flags_x86_ssse3 )
- cpu_flags_x86_ssse3? ( cpu_flags_x86_sse3 )
- cpu_flags_x86_sse3? ( cpu_flags_x86_sse2 )
- cpu_flags_x86_sse2? ( cpu_flags_x86_sse )
- cpu_flags_x86_sse? ( cpu_flags_x86_mmxext )
- cpu_flags_x86_mmxext? ( cpu_flags_x86_mmx )
- cpu_flags_x86_3dnowext? ( cpu_flags_x86_3dnow )
- cpu_flags_x86_3dnow? ( cpu_flags_x86_mmx )
-"
-
-CPU_FEATURES_MAP=(
- ${ARM_CPU_FEATURES[@]}
- ${MIPS_CPU_FEATURES[@]}
- ${PPC_CPU_FEATURES[@]}
- ${X86_CPU_FEATURES[@]}
-)
-IUSE="${IUSE}
- ${CPU_FEATURES_MAP[@]%:*}"
-
-CPU_REQUIRED_USE="
- ${ARM_CPU_REQUIRED_USE}
- ${PPC_CPU_REQUIRED_USE}
- ${X86_CPU_REQUIRED_USE}
-"
-
-FFTOOLS=( aviocat cws2fws ffescape ffeval ffhash fourcc2pixfmt
- graph2dot ismindex pktdumper qt-faststart sidxindex trasher )
-IUSE="${IUSE} ${FFTOOLS[@]/#/+fftools_}"
-
-RDEPEND="
- alsa? ( >=media-libs/alsa-lib-1.0.27.2[${MULTILIB_USEDEP}] )
- amf? ( media-video/amdgpu-pro-amf )
- amr? ( >=media-libs/opencore-amr-0.1.3-r1[${MULTILIB_USEDEP}] )
- bluray? ( >=media-libs/libbluray-0.3.0-r1:=[${MULTILIB_USEDEP}] )
- bs2b? ( >=media-libs/libbs2b-3.1.0-r1[${MULTILIB_USEDEP}] )
- bzip2? ( >=app-arch/bzip2-1.0.6-r4[${MULTILIB_USEDEP}] )
- cdio? ( >=dev-libs/libcdio-paranoia-0.90_p1-r1[${MULTILIB_USEDEP}] )
- chromaprint? ( >=media-libs/chromaprint-1.2-r1[${MULTILIB_USEDEP}] )
- codec2? ( media-libs/codec2[${MULTILIB_USEDEP}] )
- dav1d? ( >=media-libs/dav1d-0.4.0:0=[${MULTILIB_USEDEP}] )
- encode? (
- amrenc? ( >=media-libs/vo-amrwbenc-0.1.2-r1[${MULTILIB_USEDEP}] )
- kvazaar? ( >=media-libs/kvazaar-1.2.0[${MULTILIB_USEDEP}] )
- mp3? ( >=media-sound/lame-3.99.5-r1[${MULTILIB_USEDEP}] )
- openh264? ( >=media-libs/openh264-1.4.0-r1:=[${MULTILIB_USEDEP}] )
- rav1e? ( >=media-video/rav1e-0.4:=[capi] )
- snappy? ( >=app-arch/snappy-1.1.2-r1:=[${MULTILIB_USEDEP}] )
- theora? (
- >=media-libs/libogg-1.3.0[${MULTILIB_USEDEP}]
- >=media-libs/libtheora-1.1.1[encode,${MULTILIB_USEDEP}]
- )
- twolame? ( >=media-sound/twolame-0.3.13-r1[${MULTILIB_USEDEP}] )
- webp? ( >=media-libs/libwebp-0.3.0:=[${MULTILIB_USEDEP}] )
- x264? ( >=media-libs/x264-0.0.20130506:=[${MULTILIB_USEDEP}] )
- x265? ( >=media-libs/x265-1.6:=[${MULTILIB_USEDEP}] )
- xvid? ( >=media-libs/xvid-1.3.2-r1[${MULTILIB_USEDEP}] )
- )
- fdk? ( >=media-libs/fdk-aac-0.1.3:=[${MULTILIB_USEDEP}] )
- flite? ( >=app-accessibility/flite-1.4-r4[${MULTILIB_USEDEP}] )
- fontconfig? ( >=media-libs/fontconfig-2.10.92[${MULTILIB_USEDEP}] )
- frei0r? ( media-plugins/frei0r-plugins[${MULTILIB_USEDEP}] )
- fribidi? ( >=dev-libs/fribidi-0.19.6[${MULTILIB_USEDEP}] )
- gcrypt? ( >=dev-libs/libgcrypt-1.6:0=[${MULTILIB_USEDEP}] )
- glslang? ( dev-util/glslang:=[${MULTILIB_USEDEP}] )
- gme? ( >=media-libs/game-music-emu-0.6.0[${MULTILIB_USEDEP}] )
- gmp? ( >=dev-libs/gmp-6:0=[${MULTILIB_USEDEP}] )
- gsm? ( >=media-sound/gsm-1.0.13-r1[${MULTILIB_USEDEP}] )
- iconv? ( >=virtual/libiconv-0-r1[${MULTILIB_USEDEP}] )
- iec61883? (
- >=media-libs/libiec61883-1.2.0-r1[${MULTILIB_USEDEP}]
- >=sys-libs/libraw1394-2.1.0-r1[${MULTILIB_USEDEP}]
- >=sys-libs/libavc1394-0.5.4-r1[${MULTILIB_USEDEP}]
- )
- ieee1394? (
- >=media-libs/libdc1394-2.2.1:2=[${MULTILIB_USEDEP}]
- >=sys-libs/libraw1394-2.1.0-r1[${MULTILIB_USEDEP}]
- )
- jack? ( virtual/jack[${MULTILIB_USEDEP}] )
- jpeg2k? ( >=media-libs/openjpeg-2:2[${MULTILIB_USEDEP}] )
- libaom? ( >=media-libs/libaom-1.0.0-r1:=[${MULTILIB_USEDEP}] )
- libaribb24? ( >=media-libs/aribb24-1.0.3-r2[${MULTILIB_USEDEP}] )
- libass? ( >=media-libs/libass-0.10.2:=[${MULTILIB_USEDEP}] )
- libcaca? ( >=media-libs/libcaca-0.99_beta18-r1[${MULTILIB_USEDEP}] )
- libdrm? ( x11-libs/libdrm[${MULTILIB_USEDEP}] )
- libilbc? ( >=media-libs/libilbc-2[${MULTILIB_USEDEP}] )
- librtmp? ( >=media-video/rtmpdump-2.4_p20131018[${MULTILIB_USEDEP}] )
- libsoxr? ( >=media-libs/soxr-0.1.0[${MULTILIB_USEDEP}] )
- libtesseract? ( >=app-text/tesseract-4.1.0-r1[${MULTILIB_USEDEP}] )
- libv4l? ( >=media-libs/libv4l-0.9.5[${MULTILIB_USEDEP}] )
- libxml2? ( dev-libs/libxml2:=[${MULTILIB_USEDEP}] )
- lv2? ( media-libs/lv2[${MULTILIB_USEDEP}] media-libs/lilv[${MULTILIB_USEDEP}] )
- lzma? ( >=app-arch/xz-utils-5.0.5-r1[${MULTILIB_USEDEP}] )
- mmal? ( media-libs/raspberrypi-userland )
- modplug? ( >=media-libs/libmodplug-0.8.8.4-r1[${MULTILIB_USEDEP}] )
- openal? ( >=media-libs/openal-1.15.1[${MULTILIB_USEDEP}] )
- opencl? ( virtual/opencl[${MULTILIB_USEDEP}] )
- opengl? ( >=virtual/opengl-7.0-r1[${MULTILIB_USEDEP}] )
- opus? ( >=media-libs/opus-1.0.2-r2[${MULTILIB_USEDEP}] )
- pulseaudio? ( >=media-sound/pulseaudio-2.1-r1[${MULTILIB_USEDEP}] )
- qsv? ( media-libs/intel-mediasdk[${MULTILIB_USEDEP}] )
- rubberband? ( >=media-libs/rubberband-1.8.1-r1[${MULTILIB_USEDEP}] )
- samba? ( >=net-fs/samba-3.6.23-r1[client,${MULTILIB_USEDEP}] )
- sdl? ( media-libs/libsdl2[sound,video,${MULTILIB_USEDEP}] )
- sndio? ( media-sound/sndio:=[${MULTILIB_USEDEP}] )
- speex? ( >=media-libs/speex-1.2_rc1-r1[${MULTILIB_USEDEP}] )
- srt? ( >=net-libs/srt-1.3.0:=[${MULTILIB_USEDEP}] )
- ssh? ( >=net-libs/libssh-0.5.5:=[sftp,${MULTILIB_USEDEP}] )
- svg? (
- gnome-base/librsvg:2=[${MULTILIB_USEDEP}]
- x11-libs/cairo[${MULTILIB_USEDEP}]
- )
- nvenc? ( <media-libs/nv-codec-headers-12 )
- svt-av1? ( >=media-libs/svt-av1-0.8.4[${MULTILIB_USEDEP}] )
- truetype? ( >=media-libs/freetype-2.5.0.1:2[${MULTILIB_USEDEP}] )
- vaapi? ( >=media-libs/libva-1.2.1-r1:0=[${MULTILIB_USEDEP}] )
- vdpau? ( >=x11-libs/libvdpau-0.7[${MULTILIB_USEDEP}] )
- vidstab? ( >=media-libs/vidstab-1.1.0[${MULTILIB_USEDEP}] )
- vmaf? ( media-libs/libvmaf:=[${MULTILIB_USEDEP}] )
- vorbis? (
- >=media-libs/libvorbis-1.3.3-r1[${MULTILIB_USEDEP}]
- >=media-libs/libogg-1.3.0[${MULTILIB_USEDEP}]
- )
- vpx? ( >=media-libs/libvpx-1.4.0:=[${MULTILIB_USEDEP}] )
- vulkan? ( >=media-libs/vulkan-loader-1.1.97:=[${MULTILIB_USEDEP}] )
- X? (
- >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
- >=x11-libs/libXext-1.3.2[${MULTILIB_USEDEP}]
- >=x11-libs/libXv-1.0.10[${MULTILIB_USEDEP}]
- >=x11-libs/libxcb-1.4:=[${MULTILIB_USEDEP}]
- )
- zeromq? ( >=net-libs/zeromq-4.1.6 )
- zimg? ( >=media-libs/zimg-2.7.4:=[${MULTILIB_USEDEP}] )
- zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] )
- zvbi? ( >=media-libs/zvbi-0.2.35[${MULTILIB_USEDEP}] )
-"
-
-RDEPEND="${RDEPEND}
- openssl? ( >=dev-libs/openssl-1.0.1h-r2:0=[${MULTILIB_USEDEP}] )
- !openssl? ( gnutls? ( >=net-libs/gnutls-2.12.23-r6:=[${MULTILIB_USEDEP}] ) )
-"
-
-DEPEND="${RDEPEND}
- amf? ( media-libs/amf-headers )
- ladspa? ( >=media-libs/ladspa-sdk-1.13-r2[${MULTILIB_USEDEP}] )
- v4l? ( sys-kernel/linux-headers )
-"
-
-# += for verify-sig above
-BDEPEND+="
- >=dev-build/make-3.81
- virtual/pkgconfig
- cpu_flags_x86_mmx? ( || ( >=dev-lang/nasm-2.13 >=dev-lang/yasm-1.3 ) )
- cuda? ( >=llvm-core/clang-7[llvm_targets_NVPTX] )
- doc? ( sys-apps/texinfo )
- test? ( net-misc/wget app-alternatives/bc )
-"
-
-# Code requiring FFmpeg to be built under gpl license
-GPL_REQUIRED_USE="
- postproc? ( gpl )
- frei0r? ( gpl )
- cdio? ( gpl )
- rubberband? ( gpl )
- vidstab? ( gpl )
- samba? ( gpl )
- encode? (
- x264? ( gpl )
- x265? ( gpl )
- xvid? ( gpl )
- )
-"
-REQUIRED_USE="
- cuda? ( nvenc )
- fftools_cws2fws? ( zlib )
- glslang? ( vulkan )
- libv4l? ( v4l )
- test? ( encode )
- ${GPL_REQUIRED_USE}
- ${CPU_REQUIRED_USE}"
-RESTRICT="
- !test? ( test )
- gpl? ( openssl? ( bindist ) fdk? ( bindist ) )
-"
-
-S=${WORKDIR}/${P/_/-}
-
-PATCHES=(
- "${FILESDIR}"/chromium-r1.patch
- "${FILESDIR}"/${PN}-5.0-backport-ranlib-build-fix.patch
- "${FILESDIR}"/${PN}-4.4.3-get_cabac_inline_x86-32-bit.patch
- "${FILESDIR}"/${PN}-4.4.4-wint-conversion-vulkan.patch
- "${FILESDIR}"/${PN}-4.4.4-opencl-parallel-gmake-fix.patch
- "${FILESDIR}"/${PN}-4.4.4-glslang.patch
- "${FILESDIR}"/${PN}-4.4.4-amd-av1-vaapi.patch
- "${FILESDIR}"/${PN}-4.4.5-incmptbl-pntr-types.patch
- "${FILESDIR}"/${PN}-4.4.5-wint-inconversion-libgcrypt.patch
- "${FILESDIR}"/${PN}-4.4.5-binutils-2.43-arm.patch
-)
-
-MULTILIB_WRAPPED_HEADERS=(
- /usr/include/libavutil/avconfig.h
-)
-
-build_separate_libffmpeg() {
- use opencl
-}
-
-pkg_setup() {
- # ffmpeg[chromaprint] depends on chromaprint, and chromaprint[tools] depends on ffmpeg.
- # May cause breakage while updating, #862996, #625210, #833821.
- if has_version media-libs/chromaprint[tools] && use chromaprint; then
- ewarn "You have media-libs/chromaprint installed with 'tools' USE flag, which "
- ewarn "links to ffmpeg, and you have enabled 'chromaprint' USE flag for ffmpeg, "
- ewarn "which links to chromaprint. This may cause issues while rebuilding ffmpeg."
- ewarn ""
- ewarn "If your build fails to 'ERROR: chromaprint not found', rebuild chromaprint "
- ewarn "without the 'tools' use flag first, then rebuild ffmpeg, and then finally enable "
- ewarn "'tools' USE flag for chromaprint. See #862996."
- fi
-}
-
-src_unpack() {
- if use verify-sig ; then
- # Needed for downloaded patch (which is unsigned, which is fine)
- verify-sig_verify_detached "${DISTDIR}"/${P/_/-}.tar.xz{,.asc}
- fi
-
- default
-}
-
-src_prepare() {
- if [[ "${PV%_p*}" != "${PV}" ]] ; then # Snapshot
- export revision=git-N-${FFMPEG_REVISION}
- fi
-
- eapply "${FILESDIR}/vmaf-models-default-path.patch"
-
- default
-
- # -fdiagnostics-color=auto gets appended after user flags which
- # will ignore user's preference.
- sed -i -e '/check_cflags -fdiagnostics-color=auto/d' configure || die
-
- echo 'include $(SRC_PATH)/ffbuild/libffmpeg.mak' >> Makefile || die
-}
-
-multilib_src_configure() {
- local myconf=( )
-
- local ffuse=( "${FFMPEG_FLAG_MAP[@]}" )
- use openssl && myconf+=( --enable-nonfree )
- use samba && myconf+=( --enable-version3 )
-
- # Encoders
- if use encode ; then
- ffuse+=( "${FFMPEG_ENCODER_FLAG_MAP[@]}" )
-
- # Licensing.
- if use amrenc ; then
- myconf+=( --enable-version3 )
- fi
- else
- myconf+=( --disable-encoders )
- fi
-
- # Indevs
- use v4l || myconf+=( --disable-indev=v4l2 --disable-outdev=v4l2 )
- for i in alsa oss jack sndio ; do
- use ${i} || myconf+=( --disable-indev=${i} )
- done
-
- # Outdevs
- for i in alsa oss sndio ; do
- use ${i} || myconf+=( --disable-outdev=${i} )
- done
-
- # Decoders
- use amr && myconf+=( --enable-version3 )
- use gmp && myconf+=( --enable-version3 )
- use libaribb24 && myconf+=( --enable-version3 )
- use fdk && use gpl && myconf+=( --enable-nonfree )
-
- for i in "${ffuse[@]#+}" ; do
- myconf+=( $(use_enable ${i%:*} ${i#*:}) )
- done
-
- if use openssl ; then
- myconf+=( --disable-gnutls )
- fi
-
- # (temporarily) disable non-multilib deps
- if ! multilib_is_native_abi; then
- for i in librav1e libzmq ; do
- myconf+=( --disable-${i} )
- done
- fi
-
- # CPU features
- for i in "${CPU_FEATURES_MAP[@]}" ; do
- use ${i%:*} || myconf+=( --disable-${i#*:} )
- done
-
- if use pic ; then
- myconf+=( --enable-pic )
- # disable asm code if PIC is required
- # as the provided asm decidedly is not PIC for x86.
- [[ ${ABI} == x86 ]] && myconf+=( --disable-asm )
- fi
- [[ ${ABI} == x32 ]] && myconf+=( --disable-asm ) #427004
-
- # Try to get cpu type based on CFLAGS.
- # Bug #172723
- # We need to do this so that features of that CPU will be better used
- # If they contain an unknown CPU it will not hurt since ffmpeg's configure
- # will just ignore it.
- for i in $(get-flag mcpu) $(get-flag march) ; do
- [[ ${i} = native ]] && i="host" # bug #273421
- myconf+=( --cpu=${i} )
- break
- done
-
- # LTO support, bug #566282, bug #754654, bug #772854
- [[ ${ABI} != x86 ]] && tc-is-lto && myconf+=( "--enable-lto" )
- filter-lto
-
- # Mandatory configuration
- myconf=(
- --enable-avfilter
- --enable-avresample
- --disable-stripping
- # This is only for hardcoded cflags; those are used in configure checks that may
- # interfere with proper detections, bug #671746 and bug #645778
- # We use optflags, so that overrides them anyway.
- --disable-optimizations
- --disable-libcelt # bug #664158
- "${myconf[@]}"
- )
-
- # cross compile support
- if tc-is-cross-compiler ; then
- myconf+=( --enable-cross-compile --arch=$(tc-arch-kernel) --cross-prefix=${CHOST}- --host-cc="$(tc-getBUILD_CC)" )
- case ${CHOST} in
- *mingw32*)
- myconf+=( --target-os=mingw32 )
- ;;
- *linux*)
- myconf+=( --target-os=linux )
- ;;
- esac
- fi
-
- # doc
- myconf+=(
- $(multilib_native_use_enable doc)
- $(multilib_native_use_enable doc htmlpages)
- $(multilib_native_enable manpages)
- )
-
- # Use --extra-libs if needed for LIBS
- set -- "${S}/configure" \
- --prefix="${EPREFIX}/usr" \
- --libdir="${EPREFIX}/usr/$(get_libdir)" \
- --shlibdir="${EPREFIX}/usr/$(get_libdir)" \
- --docdir="${EPREFIX}/usr/share/doc/${PF}/html" \
- --mandir="${EPREFIX}/usr/share/man" \
- --enable-shared \
- --cc="$(tc-getCC)" \
- --cxx="$(tc-getCXX)" \
- --ar="$(tc-getAR)" \
- --nm="$(tc-getNM)" \
- --strip="$(tc-getSTRIP)" \
- --ranlib="$(tc-getRANLIB)" \
- --pkg-config="$(tc-getPKG_CONFIG)" \
- --optflags="${CFLAGS}" \
- $(use_enable static-libs static) \
- "${myconf[@]}" \
- ${EXTRA_FFMPEG_CONF}
- echo "${@}"
- "${@}" || die
-
- if multilib_is_native_abi && use chromium && build_separate_libffmpeg; then
- einfo "Configuring for Chromium"
- mkdir -p ../chromium || die
- pushd ../chromium >/dev/null || die
- set -- "${@}" \
- --disable-shared \
- --enable-static \
- --enable-pic \
- --disable-opencl
- echo "${@}"
- "${@}" || die
- popd >/dev/null || die
- fi
-}
-
-multilib_src_compile() {
- emake V=1
-
- if multilib_is_native_abi; then
- for i in "${FFTOOLS[@]}" ; do
- if use fftools_${i} ; then
- emake V=1 tools/${i}$(get_exeext)
- fi
- done
-
- if use chromium; then
- if build_separate_libffmpeg; then
- einfo "Compiling for Chromium"
- pushd ../chromium >/dev/null || die
- emake V=1 libffmpeg
- popd >/dev/null || die
- else
- emake V=1 libffmpeg
- fi
- fi
- fi
-}
-
-multilib_src_test() {
- LD_LIBRARY_PATH="${BUILD_DIR}/libpostproc:${BUILD_DIR}/libswscale:${BUILD_DIR}/libswresample:${BUILD_DIR}/libavcodec:${BUILD_DIR}/libavdevice:${BUILD_DIR}/libavfilter:${BUILD_DIR}/libavformat:${BUILD_DIR}/libavutil:${BUILD_DIR}/libavresample" \
- emake V=1 fate -k
-}
-
-multilib_src_install() {
- emake V=1 DESTDIR="${D}" install install-doc
-
- if multilib_is_native_abi; then
- for i in "${FFTOOLS[@]}" ; do
- if use fftools_${i} ; then
- dobin tools/${i}$(get_exeext)
- fi
- done
-
- if use chromium; then
- if build_separate_libffmpeg; then
- einfo "Installing for Chromium"
- pushd ../chromium >/dev/null || die
- emake V=1 DESTDIR="${D}" install-libffmpeg
- popd >/dev/null || die
- else
- emake V=1 DESTDIR="${D}" install-libffmpeg
-
- # When not built separately, libffmpeg has no code of
- # its own so this QA check raises a false positive.
- QA_FLAGS_IGNORED+=" usr/$(get_libdir)/chromium/.*"
- fi
- fi
- fi
-}
-
-multilib_src_install_all() {
- dodoc Changelog README.md CREDITS doc/*.txt doc/APIchanges
- [ -f "RELEASE_NOTES" ] && dodoc "RELEASE_NOTES"
-}
diff --git a/media-video/ffmpeg/ffmpeg-4.4.5-r2.ebuild b/media-video/ffmpeg/ffmpeg-4.4.5-r2.ebuild
index a2fd08971972..c7bee8fbe8a4 100644
--- a/media-video/ffmpeg/ffmpeg-4.4.5-r2.ebuild
+++ b/media-video/ffmpeg/ffmpeg-4.4.5-r2.ebuild
@@ -21,7 +21,7 @@ else
https://dev.gentoo.org/~ionen/distfiles/ffmpeg-$(ver_cut 1-2)-patchset-1.tar.xz
"
S=${WORKDIR}/ffmpeg-${PV} # avoid ${P}
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~x64-macos"
+ KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~mips ppc ppc64 ~riscv sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~x64-macos"
fi
DESCRIPTION="Complete solution to record/convert/stream audio and video"
diff --git a/media-video/ffmpeg/ffmpeg-6.1.2-r1.ebuild b/media-video/ffmpeg/ffmpeg-6.1.2-r1.ebuild
index c903f77209f9..8c6fe47c26b1 100644
--- a/media-video/ffmpeg/ffmpeg-6.1.2-r1.ebuild
+++ b/media-video/ffmpeg/ffmpeg-6.1.2-r1.ebuild
@@ -28,7 +28,7 @@ else
https://dev.gentoo.org/~ionen/distfiles/ffmpeg-$(ver_cut 1-2)-patchset-1.tar.xz
"
S=${WORKDIR}/ffmpeg-${PV} # avoid ${P}
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~x64-macos"
+ KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~mips ppc ppc64 ~riscv sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~x64-macos"
fi
DESCRIPTION="Complete solution to record/convert/stream audio and video"
diff --git a/media-video/ffmpeg/ffmpeg-6.1.2.ebuild b/media-video/ffmpeg/ffmpeg-6.1.2.ebuild
deleted file mode 100644
index 2b00c267bb23..000000000000
--- a/media-video/ffmpeg/ffmpeg-6.1.2.ebuild
+++ /dev/null
@@ -1,617 +0,0 @@
-# Copyright 1999-2025 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-# Subslot: libavutil major.libavcodec major.libavformat major
-# Since FFmpeg ships several libraries, subslot is kind of limited here.
-# Most consumers will use those three libraries, if a "less used" library
-# changes its soname, consumers will have to be rebuilt the old way
-# (preserve-libs).
-# If, for example, a package does not link to libavformat and only libavformat
-# changes its ABI then this package will be rebuilt needlessly. Hence, such a
-# package is free _not_ to := depend on FFmpeg but I would strongly encourage
-# doing so since such a case is unlikely.
-FFMPEG_SUBSLOT=58.60.60
-
-SOC_PATCH="ffmpeg-rpi-6.1-r3.patch"
-
-SCM=""
-if [ "${PV#9999}" != "${PV}" ] ; then
- SCM="git-r3"
- EGIT_MIN_CLONE_TYPE="single"
- EGIT_REPO_URI="https://git.ffmpeg.org/ffmpeg.git"
-fi
-
-inherit flag-o-matic multilib multilib-minimal toolchain-funcs ${SCM}
-
-DESCRIPTION="Complete solution to record/convert/stream audio and video. Includes libavcodec"
-HOMEPAGE="https://ffmpeg.org/"
-SRC_URI="soc? ( https://dev.gentoo.org/~chewi/distfiles/${SOC_PATCH} )"
-if [ "${PV#9999}" != "${PV}" ] ; then
- :
-elif [ "${PV%_p*}" != "${PV}" ] ; then # Snapshot
- SRC_URI+=" mirror://gentoo/${P}.tar.xz"
-else # Release
- inherit verify-sig
-
- SRC_URI+="
- https://ffmpeg.org/releases/${P/_/-}.tar.xz
- verify-sig? (
- https://ffmpeg.org/releases/${P/_/-}.tar.xz.asc
- soc? ( https://dev.gentoo.org/~chewi/distfiles/${SOC_PATCH}.asc )
- )
- "
-
- BDEPEND="
- verify-sig? (
- sec-keys/openpgp-keys-ffmpeg
- soc? ( sec-keys/openpgp-keys-gentoo-developers )
- )
- "
-
- src_unpack() {
- if use verify-sig; then
- verify-sig_verify_detached "${DISTDIR}"/${P/_/-}.tar.xz{,.asc} /usr/share/openpgp-keys/ffmpeg.asc
- use soc && verify-sig_verify_detached "${DISTDIR}"/${SOC_PATCH}{,.asc} /usr/share/openpgp-keys/gentoo-developers.asc
- fi
- default
- }
-fi
-FFMPEG_REVISION="${PV#*_p}"
-
-SLOT="0/${FFMPEG_SUBSLOT}"
-LICENSE="
- !gpl? ( LGPL-2.1 )
- gpl? ( GPL-2 )
- amr? (
- gpl? ( GPL-3 )
- !gpl? ( LGPL-3 )
- )
- gmp? (
- gpl? ( GPL-3 )
- !gpl? ( LGPL-3 )
- )
- libaribb24? (
- gpl? ( GPL-3 )
- !gpl? ( LGPL-3 )
- )
- encode? (
- amrenc? (
- gpl? ( GPL-3 )
- !gpl? ( LGPL-3 )
- )
- )
- samba? ( GPL-3 )
-"
-if [ "${PV#9999}" = "${PV}" ] ; then
- KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~mips ppc ppc64 ~riscv sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~x64-macos"
-fi
-
-# Options to use as use_enable in the foo[:bar] form.
-# This will feed configure with $(use_enable foo bar)
-# or $(use_enable foo foo) if no :bar is set.
-# foo is added to IUSE.
-FFMPEG_FLAG_MAP=(
- +bzip2:bzlib cpudetection:runtime-cpudetect debug gcrypt +gnutls gmp
- +gpl hardcoded-tables +iconv libxml2 lzma +network opencl
- openssl +postproc samba:libsmbclient sdl:ffplay sdl:sdl2 vaapi vdpau vulkan
- X:xlib X:libxcb X:libxcb-shm X:libxcb-xfixes +zlib
- # libavdevice options
- cdio:libcdio iec61883:libiec61883 ieee1394:libdc1394 libcaca openal
- opengl
- # indevs
- libv4l:libv4l2 pulseaudio:libpulse libdrm jack:libjack
- # decoders
- amr:libopencore-amrwb amr:libopencore-amrnb codec2:libcodec2 +dav1d:libdav1d fdk:libfdk-aac
- jpeg2k:libopenjpeg jpegxl:libjxl bluray:libbluray gme:libgme gsm:libgsm
- libaribb24 modplug:libmodplug opus:libopus qsv:libvpl libilbc librtmp ssh:libssh
- speex:libspeex srt:libsrt svg:librsvg nvenc:ffnvcodec
- vorbis:libvorbis vpx:libvpx zvbi:libzvbi
- # libavfilter options
- appkit
- bs2b:libbs2b chromaprint cuda:cuda-llvm flite:libflite fontconfig frei0r
- fribidi:libfribidi glslang:libglslang ladspa lcms:lcms2 libass libplacebo
- libtesseract lv2 rubberband:librubberband shaderc:libshaderc truetype:libfreetype
- truetype:libharfbuzz vidstab:libvidstab vmaf:libvmaf zeromq:libzmq zimg:libzimg
- # libswresample options
- libsoxr
- # Threads; we only support pthread for now but ffmpeg supports more
- +threads:pthreads
-)
-
-# Same as above but for encoders, i.e. they do something only with USE=encode.
-FFMPEG_ENCODER_FLAG_MAP=(
- amf amrenc:libvo-amrwbenc kvazaar:libkvazaar libaom mp3:libmp3lame
- openh264:libopenh264 rav1e:librav1e snappy:libsnappy svt-av1:libsvtav1
- theora:libtheora twolame:libtwolame webp:libwebp x264:libx264
- x265:libx265 xvid:libxvid
-)
-
-IUSE="
- alsa chromium doc +encode oss +pic sndio static-libs test v4l soc
- ${FFMPEG_FLAG_MAP[@]%:*}
- ${FFMPEG_ENCODER_FLAG_MAP[@]%:*}
-"
-
-# Strings for CPU features in the useflag[:configure_option] form
-# if :configure_option isn't set, it will use 'useflag' as configure option
-ARM_CPU_FEATURES=(
- cpu_flags_arm_thumb:armv5te
- cpu_flags_arm_v6:armv6
- cpu_flags_arm_thumb2:armv6t2
- cpu_flags_arm_neon:neon
- cpu_flags_arm_vfp:vfp
- cpu_flags_arm_vfpv3:vfpv3
- cpu_flags_arm_v8:armv8
- cpu_flags_arm_asimddp:dotprod
- cpu_flags_arm_i8mm:i8mm
-)
-ARM_CPU_REQUIRED_USE="
- arm64? ( cpu_flags_arm_v8 )
- cpu_flags_arm_v8? ( cpu_flags_arm_vfpv3 cpu_flags_arm_neon )
- cpu_flags_arm_neon? (
- cpu_flags_arm_vfp
- arm? ( cpu_flags_arm_thumb2 )
- )
- cpu_flags_arm_vfpv3? ( cpu_flags_arm_vfp )
- cpu_flags_arm_thumb2? ( cpu_flags_arm_v6 )
- cpu_flags_arm_v6? (
- arm? ( cpu_flags_arm_thumb )
- )
-"
-MIPS_CPU_FEATURES=( mipsdspr1:mipsdsp mipsdspr2 mipsfpu )
-PPC_CPU_FEATURES=( cpu_flags_ppc_altivec:altivec cpu_flags_ppc_vsx:vsx cpu_flags_ppc_vsx2:power8 )
-PPC_CPU_REQUIRED_USE="
- cpu_flags_ppc_vsx? ( cpu_flags_ppc_altivec )
- cpu_flags_ppc_vsx2? ( cpu_flags_ppc_vsx )
-"
-X86_CPU_FEATURES_RAW=( 3dnow:amd3dnow 3dnowext:amd3dnowext aes:aesni avx:avx avx2:avx2 fma3:fma3 fma4:fma4 mmx:mmx
- mmxext:mmxext sse:sse sse2:sse2 sse3:sse3 ssse3:ssse3 sse4_1:sse4 sse4_2:sse42 xop:xop )
-X86_CPU_FEATURES=( ${X86_CPU_FEATURES_RAW[@]/#/cpu_flags_x86_} )
-X86_CPU_REQUIRED_USE="
- cpu_flags_x86_avx2? ( cpu_flags_x86_avx )
- cpu_flags_x86_fma4? ( cpu_flags_x86_avx )
- cpu_flags_x86_fma3? ( cpu_flags_x86_avx )
- cpu_flags_x86_xop? ( cpu_flags_x86_avx )
- cpu_flags_x86_avx? ( cpu_flags_x86_sse4_2 )
- cpu_flags_x86_aes? ( cpu_flags_x86_sse4_2 )
- cpu_flags_x86_sse4_2? ( cpu_flags_x86_sse4_1 )
- cpu_flags_x86_sse4_1? ( cpu_flags_x86_ssse3 )
- cpu_flags_x86_ssse3? ( cpu_flags_x86_sse3 )
- cpu_flags_x86_sse3? ( cpu_flags_x86_sse2 )
- cpu_flags_x86_sse2? ( cpu_flags_x86_sse )
- cpu_flags_x86_sse? ( cpu_flags_x86_mmxext )
- cpu_flags_x86_mmxext? ( cpu_flags_x86_mmx )
- cpu_flags_x86_3dnowext? ( cpu_flags_x86_3dnow )
- cpu_flags_x86_3dnow? ( cpu_flags_x86_mmx )
-"
-
-CPU_FEATURES_MAP=(
- ${ARM_CPU_FEATURES[@]}
- ${MIPS_CPU_FEATURES[@]}
- ${PPC_CPU_FEATURES[@]}
- ${X86_CPU_FEATURES[@]}
-)
-IUSE="${IUSE}
- ${CPU_FEATURES_MAP[@]%:*}"
-
-CPU_REQUIRED_USE="
- ${ARM_CPU_REQUIRED_USE}
- ${PPC_CPU_REQUIRED_USE}
- ${X86_CPU_REQUIRED_USE}
-"
-
-FFTOOLS=( aviocat cws2fws ffescape ffeval ffhash fourcc2pixfmt
- graph2dot ismindex pktdumper qt-faststart sidxindex trasher )
-IUSE="${IUSE} ${FFTOOLS[@]/#/+fftools_}"
-
-RDEPEND="
- alsa? ( >=media-libs/alsa-lib-1.0.27.2[${MULTILIB_USEDEP}] )
- amf? ( media-video/amdgpu-pro-amf )
- amr? ( >=media-libs/opencore-amr-0.1.3-r1[${MULTILIB_USEDEP}] )
- bluray? ( >=media-libs/libbluray-0.3.0-r1:=[${MULTILIB_USEDEP}] )
- bs2b? ( >=media-libs/libbs2b-3.1.0-r1[${MULTILIB_USEDEP}] )
- bzip2? ( >=app-arch/bzip2-1.0.6-r4[${MULTILIB_USEDEP}] )
- cdio? ( >=dev-libs/libcdio-paranoia-0.90_p1-r1[${MULTILIB_USEDEP}] )
- chromaprint? ( >=media-libs/chromaprint-1.2-r1[${MULTILIB_USEDEP}] )
- codec2? ( media-libs/codec2[${MULTILIB_USEDEP}] )
- dav1d? ( >=media-libs/dav1d-0.5.0:0=[${MULTILIB_USEDEP}] )
- encode? (
- amrenc? ( >=media-libs/vo-amrwbenc-0.1.2-r1[${MULTILIB_USEDEP}] )
- kvazaar? ( >=media-libs/kvazaar-2.0.0[${MULTILIB_USEDEP}] )
- mp3? ( >=media-sound/lame-3.99.5-r1[${MULTILIB_USEDEP}] )
- openh264? ( >=media-libs/openh264-1.4.0-r1:=[${MULTILIB_USEDEP}] )
- rav1e? ( >=media-video/rav1e-0.5:=[capi] )
- snappy? ( >=app-arch/snappy-1.1.2-r1:=[${MULTILIB_USEDEP}] )
- theora? (
- >=media-libs/libogg-1.3.0[${MULTILIB_USEDEP}]
- >=media-libs/libtheora-1.1.1[encode,${MULTILIB_USEDEP}]
- )
- twolame? ( >=media-sound/twolame-0.3.13-r1[${MULTILIB_USEDEP}] )
- webp? ( >=media-libs/libwebp-0.3.0:=[${MULTILIB_USEDEP}] )
- x264? ( >=media-libs/x264-0.0.20130506:=[${MULTILIB_USEDEP}] )
- x265? ( >=media-libs/x265-1.6:=[${MULTILIB_USEDEP}] )
- xvid? ( >=media-libs/xvid-1.3.2-r1[${MULTILIB_USEDEP}] )
- )
- fdk? ( >=media-libs/fdk-aac-0.1.3:=[${MULTILIB_USEDEP}] )
- flite? ( >=app-accessibility/flite-1.4-r4[${MULTILIB_USEDEP}] )
- fontconfig? ( >=media-libs/fontconfig-2.10.92[${MULTILIB_USEDEP}] )
- frei0r? ( media-plugins/frei0r-plugins[${MULTILIB_USEDEP}] )
- fribidi? ( >=dev-libs/fribidi-0.19.6[${MULTILIB_USEDEP}] )
- gcrypt? ( >=dev-libs/libgcrypt-1.6:0=[${MULTILIB_USEDEP}] )
- glslang? ( dev-util/glslang:=[${MULTILIB_USEDEP}] )
- gme? ( >=media-libs/game-music-emu-0.6.0[${MULTILIB_USEDEP}] )
- gmp? ( >=dev-libs/gmp-6:0=[${MULTILIB_USEDEP}] )
- gsm? ( >=media-sound/gsm-1.0.13-r1[${MULTILIB_USEDEP}] )
- iconv? ( >=virtual/libiconv-0-r1[${MULTILIB_USEDEP}] )
- iec61883? (
- >=media-libs/libiec61883-1.2.0-r1[${MULTILIB_USEDEP}]
- >=sys-libs/libraw1394-2.1.0-r1[${MULTILIB_USEDEP}]
- >=sys-libs/libavc1394-0.5.4-r1[${MULTILIB_USEDEP}]
- )
- ieee1394? (
- >=media-libs/libdc1394-2.2.1:2=[${MULTILIB_USEDEP}]
- >=sys-libs/libraw1394-2.1.0-r1[${MULTILIB_USEDEP}]
- )
- jack? ( virtual/jack[${MULTILIB_USEDEP}] )
- jpeg2k? ( >=media-libs/openjpeg-2.1:2=[${MULTILIB_USEDEP}] )
- jpegxl? ( >=media-libs/libjxl-0.7.0:=[$MULTILIB_USEDEP] )
- lcms? ( >=media-libs/lcms-2.13:2[$MULTILIB_USEDEP] )
- libaom? ( >=media-libs/libaom-1.0.0-r1:=[${MULTILIB_USEDEP}] )
- libaribb24? ( >=media-libs/aribb24-1.0.3-r2[${MULTILIB_USEDEP}] )
- libass? ( >=media-libs/libass-0.11.0:=[${MULTILIB_USEDEP}] )
- libcaca? ( >=media-libs/libcaca-0.99_beta18-r1[${MULTILIB_USEDEP}] )
- libdrm? ( x11-libs/libdrm[${MULTILIB_USEDEP}] )
- libilbc? ( >=media-libs/libilbc-2[${MULTILIB_USEDEP}] )
- libplacebo? ( >=media-libs/libplacebo-4.192.0:=[$MULTILIB_USEDEP] )
- librtmp? ( >=media-video/rtmpdump-2.4_p20131018[${MULTILIB_USEDEP}] )
- libsoxr? ( >=media-libs/soxr-0.1.0[${MULTILIB_USEDEP}] )
- libtesseract? ( >=app-text/tesseract-4.1.0-r1[${MULTILIB_USEDEP}] )
- libv4l? ( >=media-libs/libv4l-0.9.5[${MULTILIB_USEDEP}] )
- libxml2? ( dev-libs/libxml2:=[${MULTILIB_USEDEP}] )
- lv2? ( media-libs/lv2[${MULTILIB_USEDEP}] media-libs/lilv[${MULTILIB_USEDEP}] )
- lzma? ( >=app-arch/xz-utils-5.0.5-r1[${MULTILIB_USEDEP}] )
- modplug? ( >=media-libs/libmodplug-0.8.8.4-r1[${MULTILIB_USEDEP}] )
- openal? ( >=media-libs/openal-1.15.1[${MULTILIB_USEDEP}] )
- opencl? ( virtual/opencl[${MULTILIB_USEDEP}] )
- opengl? ( media-libs/libglvnd[X,${MULTILIB_USEDEP}] )
- opus? ( >=media-libs/opus-1.0.2-r2[${MULTILIB_USEDEP}] )
- pulseaudio? ( media-libs/libpulse[${MULTILIB_USEDEP}] )
- qsv? ( media-libs/libvpl[${MULTILIB_USEDEP}] )
- rubberband? ( >=media-libs/rubberband-1.8.1-r1[${MULTILIB_USEDEP}] )
- samba? ( >=net-fs/samba-3.6.23-r1[client,${MULTILIB_USEDEP}] )
- sdl? ( media-libs/libsdl2[sound,video,${MULTILIB_USEDEP}] )
- shaderc? ( media-libs/shaderc[${MULTILIB_USEDEP}] )
- sndio? ( media-sound/sndio:=[${MULTILIB_USEDEP}] )
- soc? ( virtual/libudev:=[${MULTILIB_USEDEP}] )
- speex? ( >=media-libs/speex-1.2_rc1-r1[${MULTILIB_USEDEP}] )
- srt? ( >=net-libs/srt-1.3.0:=[${MULTILIB_USEDEP}] )
- ssh? ( >=net-libs/libssh-0.6.0:=[sftp,${MULTILIB_USEDEP}] )
- svg? (
- gnome-base/librsvg:2=[${MULTILIB_USEDEP}]
- x11-libs/cairo[${MULTILIB_USEDEP}]
- )
- nvenc? ( >=media-libs/nv-codec-headers-11.1.5.3 )
- svt-av1? ( >=media-libs/svt-av1-0.9.0:=[${MULTILIB_USEDEP}] )
- truetype? (
- >=media-libs/freetype-2.5.0.1:2[${MULTILIB_USEDEP}]
- media-libs/harfbuzz:=[${MULTILIB_USEDEP}]
- )
- vaapi? ( >=media-libs/libva-1.2.1-r1:0=[${MULTILIB_USEDEP}] )
- vdpau? ( >=x11-libs/libvdpau-0.7[${MULTILIB_USEDEP}] )
- vidstab? ( >=media-libs/vidstab-1.1.0[${MULTILIB_USEDEP}] )
- vmaf? ( >=media-libs/libvmaf-2.0.0:=[${MULTILIB_USEDEP}] )
- vorbis? (
- >=media-libs/libvorbis-1.3.3-r1[${MULTILIB_USEDEP}]
- >=media-libs/libogg-1.3.0[${MULTILIB_USEDEP}]
- )
- vpx? ( >=media-libs/libvpx-1.4.0:=[${MULTILIB_USEDEP}] )
- vulkan? ( >=media-libs/vulkan-loader-1.3.255:=[${MULTILIB_USEDEP}] )
- X? (
- >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
- >=x11-libs/libXext-1.3.2[${MULTILIB_USEDEP}]
- >=x11-libs/libXv-1.0.10[${MULTILIB_USEDEP}]
- >=x11-libs/libxcb-1.4:=[${MULTILIB_USEDEP}]
- )
- zeromq? ( >=net-libs/zeromq-4.2.1:= )
- zimg? ( >=media-libs/zimg-2.7.4:=[${MULTILIB_USEDEP}] )
- zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] )
- zvbi? ( >=media-libs/zvbi-0.2.35[${MULTILIB_USEDEP}] )
-"
-
-RDEPEND="${RDEPEND}
- openssl? ( >=dev-libs/openssl-1.0.1h-r2:0=[${MULTILIB_USEDEP}] )
- !openssl? ( gnutls? ( >=net-libs/gnutls-2.12.23-r6:=[${MULTILIB_USEDEP}] ) )
-"
-
-DEPEND="${RDEPEND}
- amf? ( media-libs/amf-headers )
- ladspa? ( >=media-libs/ladspa-sdk-1.13-r2[${MULTILIB_USEDEP}] )
- v4l? ( sys-kernel/linux-headers )
- vulkan? ( >=dev-util/vulkan-headers-1.3.255 )
-"
-
-# += for verify-sig above
-BDEPEND+="
- >=dev-build/make-3.81
- virtual/pkgconfig
- cpu_flags_x86_mmx? ( || ( >=dev-lang/nasm-2.13 >=dev-lang/yasm-1.3 ) )
- cuda? ( >=llvm-core/clang-7[llvm_targets_NVPTX] )
- doc? ( sys-apps/texinfo )
- test? ( net-misc/wget app-alternatives/bc )
-"
-
-# Code requiring FFmpeg to be built under gpl license
-GPL_REQUIRED_USE="
- postproc? ( gpl )
- frei0r? ( gpl )
- cdio? ( gpl )
- rubberband? ( gpl )
- vidstab? ( gpl )
- samba? ( gpl )
- encode? (
- x264? ( gpl )
- x265? ( gpl )
- xvid? ( gpl )
- )
-"
-REQUIRED_USE="
- chromium? ( opus )
- cuda? ( nvenc )
- fftools_cws2fws? ( zlib )
- glslang? ( vulkan !shaderc )
- libv4l? ( v4l )
- shaderc? ( vulkan !glslang )
- soc? ( libdrm )
- test? ( encode )
- ${GPL_REQUIRED_USE}
- ${CPU_REQUIRED_USE}"
-RESTRICT="
- !test? ( test )
- gpl? ( openssl? ( bindist ) fdk? ( bindist ) )
-"
-
-S=${WORKDIR}/${P/_/-}
-
-PATCHES=(
- "${FILESDIR}"/chromium-r2.patch
- "${FILESDIR}"/${PN}-6.1-wint-conversion.patch
- "${FILESDIR}"/${PN}-6.0-fix-lto-type-mismatch.patch
- "${FILESDIR}"/${PN}-6.1-opencl-parallel-gmake-fix.patch
- "${FILESDIR}"/${PN}-6.1-gcc-14.patch
- "${FILESDIR}"/${PN}-6.0.1-alignment.patch
- "${FILESDIR}"/${PN}-6.1.1-wint-inconversion-libgcrypt.patch
- "${FILESDIR}"/${PN}-6.1.1-amd-av1-vaapi.patch
- "${FILESDIR}"/${PN}-6.1.1-wint-inconversion-vulkan.patch
- "${FILESDIR}"/${PN}-6.1.1-incmptbl-pntr-types.patch
- "${FILESDIR}"/${PN}-4.4.5-binutils-2.43-arm.patch
-)
-
-MULTILIB_WRAPPED_HEADERS=(
- /usr/include/libavutil/avconfig.h
-)
-
-pkg_setup() {
- # ffmpeg[chromaprint] depends on chromaprint, and chromaprint[tools] depends on ffmpeg.
- # May cause breakage while updating, #862996, #625210, #833821.
- if has_version media-libs/chromaprint[tools] && use chromaprint; then
- ewarn "You have media-libs/chromaprint installed with 'tools' USE flag, which "
- ewarn "links to ffmpeg, and you have enabled 'chromaprint' USE flag for ffmpeg, "
- ewarn "which links to chromaprint. This may cause issues while rebuilding ffmpeg."
- ewarn ""
- ewarn "If your build fails to 'ERROR: chromaprint not found', rebuild chromaprint "
- ewarn "without the 'tools' use flag first, then rebuild ffmpeg, and then finally enable "
- ewarn "'tools' USE flag for chromaprint. See #862996."
- fi
-}
-
-src_prepare() {
- if [[ "${PV%_p*}" != "${PV}" ]] ; then # Snapshot
- export revision=git-N-${FFMPEG_REVISION}
- fi
-
- use soc &&
- eapply "${DISTDIR}"/${SOC_PATCH}
-
- default
-
- # -fdiagnostics-color=auto gets appended after user flags which
- # will ignore user's preference.
- sed -i -e '/check_cflags -fdiagnostics-color=auto/d' configure || die
-
- ln -snf "${FILESDIR}"/chromium.c chromium.c || die
- echo 'include $(SRC_PATH)/ffbuild/libffmpeg.mak' >> Makefile || die
-
- # We need to detect LTO usage before multilib stuff and filter-lto is called (bug #923491)
- if tc-is-lto ; then
- # Respect -flto value, e.g -flto=thin
- local v="$(get-flag flto)"
- [[ ${v} != -flto ]] && LTO_FLAG="--enable-lto=${v}" || LTO_FLAG="--enable-lto"
- fi
- filter-lto
-}
-
-multilib_src_configure() {
- local myconf=( )
-
- # Conditional patch options
- use soc && myconf+=( --enable-v4l2-request --enable-libudev --enable-sand )
-
- local ffuse=( "${FFMPEG_FLAG_MAP[@]}" )
- use openssl && myconf+=( --enable-nonfree )
- use samba && myconf+=( --enable-version3 )
-
- # Encoders
- if use encode ; then
- ffuse+=( "${FFMPEG_ENCODER_FLAG_MAP[@]}" )
-
- # Licensing.
- if use amrenc ; then
- myconf+=( --enable-version3 )
- fi
- else
- myconf+=( --disable-encoders )
- fi
-
- # Indevs
- use v4l || myconf+=( --disable-indev=v4l2 --disable-outdev=v4l2 )
- for i in alsa oss jack sndio ; do
- use ${i} || myconf+=( --disable-indev=${i} )
- done
-
- # Outdevs
- for i in alsa oss sndio ; do
- use ${i} || myconf+=( --disable-outdev=${i} )
- done
-
- # Decoders
- use amr && myconf+=( --enable-version3 )
- use gmp && myconf+=( --enable-version3 )
- use libaribb24 && myconf+=( --enable-version3 )
- use fdk && use gpl && myconf+=( --enable-nonfree )
-
- for i in "${ffuse[@]#+}" ; do
- myconf+=( $(use_enable ${i%:*} ${i#*:}) )
- done
-
- if use openssl ; then
- myconf+=( --disable-gnutls )
- has_version dev-libs/openssl:0/3 && myconf+=( --enable-version3 )
- fi
-
- # (temporarily) disable non-multilib deps
- if ! multilib_is_native_abi; then
- for i in librav1e libzmq ; do
- myconf+=( --disable-${i} )
- done
- fi
-
- # CPU features
- for i in "${CPU_FEATURES_MAP[@]}" ; do
- use ${i%:*} || myconf+=( --disable-${i#*:} )
- done
-
- if use pic ; then
- myconf+=( --enable-pic )
- # disable asm code if PIC is required
- # as the provided asm decidedly is not PIC for x86.
- [[ ${ABI} == x86 ]] && myconf+=( --disable-asm )
- fi
- [[ ${ABI} == x32 ]] && myconf+=( --disable-asm ) #427004
-
- # Try to get cpu type based on CFLAGS.
- # Bug #172723
- # We need to do this so that features of that CPU will be better used
- # If they contain an unknown CPU it will not hurt since ffmpeg's configure
- # will just ignore it.
- for i in $(get-flag mcpu) $(get-flag march) ; do
- [[ ${i} = native ]] && i="host" # bug #273421
- myconf+=( --cpu=${i} )
- break
- done
-
- # LTO support, bug #566282, bug #754654, bug #772854
- if [[ ${ABI} != x86 && ! -z ${LTO_FLAG} ]]; then
- myconf+=( ${LTO_FLAG} )
- fi
-
- # Mandatory configuration
- myconf=(
- --disable-libaribcaption # libaribcaption is not packaged (yet?)
- --enable-avfilter
- --disable-stripping
- # This is only for hardcoded cflags; those are used in configure checks that may
- # interfere with proper detections, bug #671746 and bug #645778
- # We use optflags, so that overrides them anyway.
- --disable-optimizations
- --disable-libcelt # bug #664158
- "${myconf[@]}"
- )
-
- # cross compile support
- if tc-is-cross-compiler ; then
- myconf+=( --enable-cross-compile --arch=$(tc-arch-kernel) --cross-prefix=${CHOST}- --host-cc="$(tc-getBUILD_CC)" )
- case ${CHOST} in
- *mingw32*)
- myconf+=( --target-os=mingw32 )
- ;;
- *linux*)
- myconf+=( --target-os=linux )
- ;;
- esac
- fi
-
- # doc
- myconf+=(
- $(multilib_native_use_enable doc)
- $(multilib_native_use_enable doc htmlpages)
- $(multilib_native_enable manpages)
- )
-
- if use elibc_musl ; then
- append-cflags -D__musl__
- fi
-
- # Use --extra-libs if needed for LIBS
- set -- "${S}/configure" \
- --prefix="${EPREFIX}/usr" \
- --libdir="${EPREFIX}/usr/$(get_libdir)" \
- --shlibdir="${EPREFIX}/usr/$(get_libdir)" \
- --docdir="${EPREFIX}/usr/share/doc/${PF}/html" \
- --mandir="${EPREFIX}/usr/share/man" \
- --enable-shared \
- --cc="$(tc-getCC)" \
- --cxx="$(tc-getCXX)" \
- --ar="$(tc-getAR)" \
- --nm="$(tc-getNM)" \
- --strip="$(tc-getSTRIP)" \
- --ranlib="$(tc-getRANLIB)" \
- --pkg-config="$(tc-getPKG_CONFIG)" \
- --optflags="${CFLAGS}" \
- $(use_enable static-libs static) \
- "${myconf[@]}" \
- ${EXTRA_FFMPEG_CONF}
- echo "${@}"
- "${@}" || die
-}
-
-multilib_src_compile() {
- emake V=1
-
- if multilib_is_native_abi; then
- for i in "${FFTOOLS[@]}" ; do
- if use fftools_${i} ; then
- emake V=1 tools/${i}$(get_exeext)
- fi
- done
-
- use chromium &&
- emake V=1 libffmpeg
- fi
-}
-
-multilib_src_test() {
- LD_LIBRARY_PATH="${BUILD_DIR}/libpostproc:${BUILD_DIR}/libswscale:${BUILD_DIR}/libswresample:${BUILD_DIR}/libavcodec:${BUILD_DIR}/libavdevice:${BUILD_DIR}/libavfilter:${BUILD_DIR}/libavformat:${BUILD_DIR}/libavutil" \
- emake V=1 fate -k
-}
-
-multilib_src_install() {
- emake V=1 DESTDIR="${D}" install install-doc
-
- if multilib_is_native_abi; then
- for i in "${FFTOOLS[@]}" ; do
- if use fftools_${i} ; then
- dobin tools/${i}$(get_exeext)
- fi
- done
-
- use chromium &&
- emake V=1 DESTDIR="${D}" install-libffmpeg
- fi
-}
-
-multilib_src_install_all() {
- dodoc Changelog README.md CREDITS doc/*.txt doc/APIchanges
- [ -f "RELEASE_NOTES" ] && dodoc "RELEASE_NOTES"
-}
diff --git a/media-video/ffmpeg/files/chromium-r1.patch b/media-video/ffmpeg/files/chromium-r1.patch
deleted file mode 100644
index 514780035bc0..000000000000
--- a/media-video/ffmpeg/files/chromium-r1.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-Allow libffmpeg to be built for Chromium-based browsers
-https://patchwork.ffmpeg.org/patch/4500/
-
-NOTE: This patch lacks the Makefile include line. We append it
-manually instead to make patching across different versions easier.
-
-diff --git a/ffbuild/libffmpeg.mak b/ffbuild/libffmpeg.mak
-new file mode 100644
-index 0000000..992cf3c
---- /dev/null
-+++ b/ffbuild/libffmpeg.mak
-@@ -0,0 +1,27 @@
-+LIBFFMPEG = $(SLIBPREF)ffmpeg$(SLIBSUF)
-+LIBFFMPEG_LINK = $(LD) -shared -Wl,-soname,$(LIBFFMPEG) -Wl,-Bsymbolic -Wl,-z,now -Wl,-z,relro -Wl,-z,defs -Wl,--gc-sections $(LDFLAGS) $(LDLIBFLAGS) -o $(LIBFFMPEG)
-+
-+ifeq ($(CONFIG_SHARED),yes)
-+LIBFFMPEG_DEPS = libavcodec/$(SLIBPREF)avcodec$(SLIBSUF) libavformat/$(SLIBPREF)avformat$(SLIBSUF) libavutil/$(SLIBPREF)avutil$(SLIBSUF)
-+else
-+LIBFFMPEG_DEPS = libavcodec/$(LIBPREF)avcodec$(LIBSUF) libavformat/$(LIBPREF)avformat$(LIBSUF) libavutil/$(LIBPREF)avutil$(LIBSUF) libswresample/$(LIBPREF)swresample$(LIBSUF)
-+endif
-+
-+$(LIBFFMPEG): $(LIBFFMPEG_DEPS)
-+ifeq ($(CONFIG_SHARED),yes)
-+ $(LIBFFMPEG_LINK) -Wl,--no-as-needed -lavcodec -lavformat -lavutil
-+else
-+ $(LIBFFMPEG_LINK) -Wl,--whole-archive $^ -Wl,--no-whole-archive $(EXTRALIBS-avcodec) $(EXTRALIBS-avformat) $(EXTRALIBS-avutil) $(EXTRALIBS-swresample)
-+endif
-+
-+libffmpeg: $(LIBFFMPEG)
-+
-+install-libffmpeg: $(LIBFFMPEG)
-+ $(Q)mkdir -p "$(SHLIBDIR)/chromium"
-+ $(INSTALL) -m 755 $< "$(SHLIBDIR)/chromium/$<"
-+ $(STRIP) "$(SHLIBDIR)/chromium/$<"
-+
-+uninstall-libffmpeg:
-+ $(RM) "$(SHLIBDIR)/chromium/$(LIBFFMPEG)"
-+
-+.PHONY: libffmpeg install-libffmpeg uninstall-libffmpeg
---
-2.13.1
-
diff --git a/media-video/ffmpeg/files/chromium-r2.patch b/media-video/ffmpeg/files/chromium-r2.patch
deleted file mode 100644
index 1de86fe09a1e..000000000000
--- a/media-video/ffmpeg/files/chromium-r2.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-Allow libffmpeg to be built for Chromium-based browsers
-https://patchwork.ffmpeg.org/patch/4500/
-
-NOTE: This patch lacks the Makefile include line. We append it
-manually instead to make patching across different versions easier.
-
-diff --git a/ffbuild/libffmpeg.mak b/ffbuild/libffmpeg.mak
-new file mode 100644
-index 0000000..992cf3c
---- /dev/null
-+++ b/ffbuild/libffmpeg.mak
-@@ -0,0 +1,27 @@
-+LIBFFMPEG = $(SLIBPREF)ffmpeg$(SLIBSUF)
-+LIBFFMPEG_LINK = $(LD) -shared -Wl,-soname,$(LIBFFMPEG) -Wl,-Bsymbolic -Wl,-z,now -Wl,-z,relro -Wl,-z,defs -Wl,--gc-sections $(LDFLAGS) $(LDLIBFLAGS) -o $(LIBFFMPEG)
-+
-+ifeq ($(CONFIG_SHARED),yes)
-+LIBFFMPEG_DEPS = libavcodec/$(SLIBPREF)avcodec$(SLIBSUF) libavformat/$(SLIBPREF)avformat$(SLIBSUF) libavutil/$(SLIBPREF)avutil$(SLIBSUF)
-+else
-+LIBFFMPEG_DEPS = libavcodec/$(LIBPREF)avcodec$(LIBSUF) libavformat/$(LIBPREF)avformat$(LIBSUF) libavutil/$(LIBPREF)avutil$(LIBSUF) libswresample/$(LIBPREF)swresample$(LIBSUF)
-+endif
-+
-+$(LIBFFMPEG): $(LIBFFMPEG_DEPS) chromium.o
-+ifeq ($(CONFIG_SHARED),yes)
-+ $(LIBFFMPEG_LINK) -Wl,--no-as-needed chromium.o -lavcodec -lavformat -lavutil
-+else
-+ $(LIBFFMPEG_LINK) -Wl,--whole-archive $^ -Wl,--no-whole-archive $(EXTRALIBS-avcodec) $(EXTRALIBS-avformat) $(EXTRALIBS-avutil) $(EXTRALIBS-swresample)
-+endif
-+
-+libffmpeg: $(LIBFFMPEG)
-+
-+install-libffmpeg: $(LIBFFMPEG)
-+ $(Q)mkdir -p "$(SHLIBDIR)/chromium"
-+ $(INSTALL) -m 755 $< "$(SHLIBDIR)/chromium/$<"
-+ $(STRIP) "$(SHLIBDIR)/chromium/$<"
-+
-+uninstall-libffmpeg:
-+ $(RM) "$(SHLIBDIR)/chromium/$(LIBFFMPEG)"
-+
-+.PHONY: libffmpeg install-libffmpeg uninstall-libffmpeg
---
-2.13.1
diff --git a/media-video/ffmpeg/files/chromium.c b/media-video/ffmpeg/files/chromium.c
deleted file mode 100644
index 66c2e9f6614f..000000000000
--- a/media-video/ffmpeg/files/chromium.c
+++ /dev/null
@@ -1,8 +0,0 @@
-#include "libavformat/avformat.h"
-#include "libavformat/internal.h"
-
-int64_t av_stream_get_first_dts(const AVStream *st);
-int64_t av_stream_get_first_dts(const AVStream *st)
-{
- return cffstream(st)->first_dts;
-}
diff --git a/media-video/ffmpeg/files/ffmpeg-4.4.3-get_cabac_inline_x86-32-bit.patch b/media-video/ffmpeg/files/ffmpeg-4.4.3-get_cabac_inline_x86-32-bit.patch
deleted file mode 100644
index ed273975452d..000000000000
--- a/media-video/ffmpeg/files/ffmpeg-4.4.3-get_cabac_inline_x86-32-bit.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-https://bugs.gentoo.org/901099 and partly https://bugs.gentoo.org/900937.
-
-Newer compilers may optimise such that < 7 registers are free on 32-bit x86
-and then we get an "invalid asm" error. This is https://bugs.gentoo.org/901099
-and https://trac.ffmpeg.org/ticket/8903.
-
-Making matters worse, GCC sometimes hangs on invalid asm, so this also
-mitigates a hang with e.g. -O3 -march=znver1. See https://bugs.gentoo.org/900937
-and https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109137.
-
-In future, we may want to adjust the definition of HAVE_7REGS to just exclude
-32-bit x86, but that's a big sledgehammer, so let's avoid it for now until we have
-a reply on the upstream ffmpeg bug.
---- a/libavcodec/x86/cabac.h
-+++ b/libavcodec/x86/cabac.h
-@@ -175,7 +175,7 @@
-
- #endif /* BROKEN_RELOCATIONS */
-
--#if HAVE_7REGS && !BROKEN_COMPILER
-+#if HAVE_7REGS && !BROKEN_COMPILER && !ARCH_X86_32
- #define get_cabac_inline get_cabac_inline_x86
- static av_always_inline int get_cabac_inline_x86(CABACContext *c,
- uint8_t *const state)
diff --git a/media-video/ffmpeg/files/ffmpeg-4.4.4-amd-av1-vaapi.patch b/media-video/ffmpeg/files/ffmpeg-4.4.4-amd-av1-vaapi.patch
deleted file mode 100644
index 5f13edf68fca..000000000000
--- a/media-video/ffmpeg/files/ffmpeg-4.4.4-amd-av1-vaapi.patch
+++ /dev/null
@@ -1,257 +0,0 @@
-https://bugs.gentoo.org/936310
-https://github.com/getsolus/packages/commit/50b029f7801c2c73da655e7dd5ae826244f9ae2c
-https://gitlab.freedesktop.org/mesa/mesa/-/issues/11533#note_2495206
-
-The backport here is from Solus who resolved a conflict for 4.4.x as it
-doesn't apply cleanly there.
-
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: David Rosca <nowrep@gmail.com>
-Date: Wed, 8 May 2024 09:11:11 +0200
-Subject: [PATCH 1/2] lavc/vaapi_decode: Make it possible to send multiple
- slice params buffers
-
-Reviewed-by: Neal Gompa <ngompa13@gmail.com>
-Signed-off-by: David Rosca <nowrep@gmail.com>
-Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
---- a/libavcodec/vaapi_av1.c
-+++ b/libavcodec/vaapi_av1.c
-@@ -419,7 +419,7 @@ static int vaapi_av1_decode_slice(AVCodecContext *avctx,
- .tg_end = s->tg_end,
- };
-
-- err = ff_vaapi_decode_make_slice_buffer(avctx, pic, &slice_param,
-+ err = ff_vaapi_decode_make_slice_buffer(avctx, pic, &slice_param, 1,
- sizeof(VASliceParameterBufferAV1),
- buffer,
- size);
---- a/libavcodec/vaapi_decode.c
-+++ b/libavcodec/vaapi_decode.c
-@@ -59,6 +59,7 @@ int ff_vaapi_decode_make_param_buffer(AVCodecContext *avctx,
- int ff_vaapi_decode_make_slice_buffer(AVCodecContext *avctx,
- VAAPIDecodePicture *pic,
- const void *params_data,
-+ int nb_params,
- size_t params_size,
- const void *slice_data,
- size_t slice_size)
-@@ -87,7 +88,7 @@ int ff_vaapi_decode_make_slice_buffer(AVCodecContext *avctx,
-
- vas = vaCreateBuffer(ctx->hwctx->display, ctx->va_context,
- VASliceParameterBufferType,
-- params_size, 1, (void*)params_data,
-+ params_size, nb_params, (void*)params_data,
- &pic->slice_buffers[index]);
- if (vas != VA_STATUS_SUCCESS) {
- av_log(avctx, AV_LOG_ERROR, "Failed to create slice "
---- a/libavcodec/vaapi_decode.h
-+++ b/libavcodec/vaapi_decode.h
-@@ -86,6 +86,7 @@ int ff_vaapi_decode_make_param_buffer(AVCodecContext *avctx,
- int ff_vaapi_decode_make_slice_buffer(AVCodecContext *avctx,
- VAAPIDecodePicture *pic,
- const void *params_data,
-+ int nb_params,
- size_t params_size,
- const void *slice_data,
- size_t slice_size);
---- a/libavcodec/vaapi_h264.c
-+++ b/libavcodec/vaapi_h264.c
-@@ -375,7 +375,7 @@ static int vaapi_h264_decode_slice(AVCodecContext *avctx,
- slice_param.chroma_offset_l1);
-
- err = ff_vaapi_decode_make_slice_buffer(avctx, pic,
-- &slice_param, sizeof(slice_param),
-+ &slice_param, 1, sizeof(slice_param),
- buffer, size);
- if (err) {
- ff_vaapi_decode_cancel(avctx, pic);
---- a/libavcodec/vaapi_hevc.c
-+++ b/libavcodec/vaapi_hevc.c
-@@ -305,7 +305,7 @@ static int vaapi_hevc_end_frame(AVCodecContext *avctx)
- if (pic->last_size) {
- last_slice_param->LongSliceFlags.fields.LastSliceOfPic = 1;
- ret = ff_vaapi_decode_make_slice_buffer(avctx, &pic->pic,
-- &pic->last_slice_param, slice_param_size,
-+ &pic->last_slice_param, 1, slice_param_size,
- pic->last_buffer, pic->last_size);
- if (ret < 0)
- goto fail;
-@@ -410,7 +410,7 @@ static int vaapi_hevc_decode_slice(AVCodecContext *avctx,
-
- if (!sh->first_slice_in_pic_flag) {
- err = ff_vaapi_decode_make_slice_buffer(avctx, &pic->pic,
-- &pic->last_slice_param, slice_param_size,
-+ &pic->last_slice_param, 1, slice_param_size,
- pic->last_buffer, pic->last_size);
- pic->last_buffer = NULL;
- pic->last_size = 0;
---- a/libavcodec/vaapi_mjpeg.c
-+++ b/libavcodec/vaapi_mjpeg.c
-@@ -131,7 +131,7 @@ static int vaapi_mjpeg_decode_slice(AVCodecContext *avctx,
- sp.components[i].ac_table_selector = s->ac_index[i];
- }
-
-- err = ff_vaapi_decode_make_slice_buffer(avctx, pic, &sp, sizeof(sp), buffer, size);
-+ err = ff_vaapi_decode_make_slice_buffer(avctx, pic, &sp, 1, sizeof(sp), buffer, size);
- if (err)
- goto fail;
-
---- a/libavcodec/vaapi_mpeg2.c
-+++ b/libavcodec/vaapi_mpeg2.c
-@@ -162,7 +162,7 @@ static int vaapi_mpeg2_decode_slice(AVCodecContext *avctx, const uint8_t *buffer
- };
-
- err = ff_vaapi_decode_make_slice_buffer(avctx, pic,
-- &slice_param, sizeof(slice_param),
-+ &slice_param, 1, sizeof(slice_param),
- buffer, size);
- if (err < 0) {
- ff_vaapi_decode_cancel(avctx, pic);
---- a/libavcodec/vaapi_mpeg4.c
-+++ b/libavcodec/vaapi_mpeg4.c
-@@ -167,7 +167,7 @@ static int vaapi_mpeg4_decode_slice(AVCodecContext *avctx, const uint8_t *buffer
- };
-
- err = ff_vaapi_decode_make_slice_buffer(avctx, pic,
-- &slice_param, sizeof(slice_param),
-+ &slice_param, 1, sizeof(slice_param),
- buffer, size);
- if (err < 0) {
- ff_vaapi_decode_cancel(avctx, pic);
---- a/libavcodec/vaapi_vc1.c
-+++ b/libavcodec/vaapi_vc1.c
-@@ -490,7 +490,7 @@ static int vaapi_vc1_decode_slice(AVCodecContext *avctx, const uint8_t *buffer,
- };
-
- err = ff_vaapi_decode_make_slice_buffer(avctx, pic,
-- &slice_param, sizeof(slice_param),
-+ &slice_param, 1, sizeof(slice_param),
- buffer, size);
- if (err < 0) {
- ff_vaapi_decode_cancel(avctx, pic);
---- a/libavcodec/vaapi_vp8.c
-+++ b/libavcodec/vaapi_vp8.c
-@@ -209,7 +209,7 @@ static int vaapi_vp8_decode_slice(AVCodecContext *avctx,
- for (i = 0; i < 8; i++)
- sp.partition_size[i+1] = s->coeff_partition_size[i];
-
-- err = ff_vaapi_decode_make_slice_buffer(avctx, pic, &sp, sizeof(sp), data, data_size);
-+ err = ff_vaapi_decode_make_slice_buffer(avctx, pic, &sp, 1, sizeof(sp), data, data_size);
- if (err)
- goto fail;
-
---- a/libavcodec/vaapi_vp9.c
-+++ b/libavcodec/vaapi_vp9.c
-@@ -158,7 +158,7 @@ static int vaapi_vp9_decode_slice(AVCodecContext *avctx,
- }
-
- err = ff_vaapi_decode_make_slice_buffer(avctx, pic,
-- &slice_param, sizeof(slice_param),
-+ &slice_param, 1, sizeof(slice_param),
- buffer, size);
- if (err) {
- ff_vaapi_decode_cancel(avctx, pic);
-
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: David Rosca <nowrep@gmail.com>
-Date: Wed, 8 May 2024 09:11:13 +0200
-Subject: [PATCH 2/2] lavc/vaapi_av1: Avoid sending the same slice buffer
- multiple times
-
-When there are multiple tiles in one slice buffer, use multiple slice
-params to avoid sending the same slice buffer multiple times and thus
-increasing the bitstream size the driver will need to upload to hw.
-
-Reviewed-by: Neal Gompa <ngompa13@gmail.com>
-Signed-off-by: David Rosca <nowrep@gmail.com>
-Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
---- a/libavcodec/vaapi_av1.c
-+++ b/libavcodec/vaapi_av1.c
-@@ -19,6 +19,8 @@
- */
-
- #include "libavutil/pixdesc.h"
-+#include "libavutil/frame.h"
-+#include "libavutil/mem.h"
- #include "hwconfig.h"
- #include "vaapi_decode.h"
- #include "internal.h"
-@@ -41,6 +43,9 @@ typedef struct VAAPIAV1DecContext {
- */
- VAAPIAV1FrameRef ref_tab[AV1_NUM_REF_FRAMES];
- ThreadFrame tmp_frame;
-+
-+ int nb_slice_params;
-+ VASliceParameterBufferAV1 *slice_params;
- } VAAPIAV1DecContext;
-
- static VASurfaceID vaapi_av1_surface_id(AV1Frame *vf)
-@@ -107,6 +112,8 @@ static int vaapi_av1_decode_uninit(AVCodecContext *avctx)
- av_frame_free(&ctx->ref_tab[i].frame.f);
- }
-
-+ av_freep(&ctx->slice_params);
-+
- return ff_vaapi_decode_uninit(avctx);
- }
-
-@@ -403,13 +410,24 @@ static int vaapi_av1_decode_slice(AVCodecContext *avctx,
- {
- const AV1DecContext *s = avctx->priv_data;
- VAAPIDecodePicture *pic = s->cur_frame.hwaccel_picture_private;
-- VASliceParameterBufferAV1 slice_param;
-- int err = 0;
-+ VAAPIAV1DecContext *ctx = avctx->internal->hwaccel_priv_data;
-+ int err, nb_params;
-+
-+ nb_params = s->tg_end - s->tg_start + 1;
-+ if (ctx->nb_slice_params < nb_params) {
-+ ctx->slice_params = av_realloc_array(ctx->slice_params,
-+ nb_params,
-+ sizeof(*ctx->slice_params));
-+ if (!ctx->slice_params) {
-+ ctx->nb_slice_params = 0;
-+ err = AVERROR(ENOMEM);
-+ goto fail;
-+ }
-+ ctx->nb_slice_params = nb_params;
-+ }
-
- for (int i = s->tg_start; i <= s->tg_end; i++) {
-- memset(&slice_param, 0, sizeof(VASliceParameterBufferAV1));
--
-- slice_param = (VASliceParameterBufferAV1) {
-+ ctx->slice_params[i - s->tg_start] = (VASliceParameterBufferAV1) {
- .slice_data_size = s->tile_group_info[i].tile_size,
- .slice_data_offset = s->tile_group_info[i].tile_offset,
- .slice_data_flag = VA_SLICE_DATA_FLAG_ALL,
-@@ -418,18 +436,20 @@ static int vaapi_av1_decode_slice(AVCodecContext *avctx,
- .tg_start = s->tg_start,
- .tg_end = s->tg_end,
- };
--
-- err = ff_vaapi_decode_make_slice_buffer(avctx, pic, &slice_param, 1,
-- sizeof(VASliceParameterBufferAV1),
-- buffer,
-- size);
-- if (err) {
-- ff_vaapi_decode_cancel(avctx, pic);
-- return err;
-- }
- }
-
-+ err = ff_vaapi_decode_make_slice_buffer(avctx, pic, ctx->slice_params, nb_params,
-+ sizeof(VASliceParameterBufferAV1),
-+ buffer,
-+ size);
-+ if (err)
-+ goto fail;
-+
- return 0;
-+
-+fail:
-+ ff_vaapi_decode_cancel(avctx, pic);
-+ return err;
- }
-
- const AVHWAccel ff_av1_vaapi_hwaccel = {
diff --git a/media-video/ffmpeg/files/ffmpeg-4.4.4-glslang.patch b/media-video/ffmpeg/files/ffmpeg-4.4.4-glslang.patch
deleted file mode 100644
index f19bf8e47a42..000000000000
--- a/media-video/ffmpeg/files/ffmpeg-4.4.4-glslang.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-Bug: https://bugs.gentoo.org/926551
-
-diff -Naur a/configure b/configure
---- a/configure 2024-03-09 22:07:52.005888104 +0000
-+++ b/configure 2024-03-09 22:08:18.634656978 +0000
-@@ -6374,7 +6374,7 @@
- enabled libfontconfig && require_pkg_config libfontconfig fontconfig "fontconfig/fontconfig.h" FcInit
- enabled libfreetype && require_pkg_config libfreetype freetype2 "ft2build.h FT_FREETYPE_H" FT_Init_FreeType
- enabled libfribidi && require_pkg_config libfribidi fribidi fribidi.h fribidi_version_info
--enabled libglslang && require_cpp libglslang glslang/SPIRV/GlslangToSpv.h "glslang::TIntermediate*" -lglslang -lMachineIndependent -lOSDependent -lHLSL -lOGLCompiler -lGenericCodeGen -lSPVRemapper -lSPIRV -lSPIRV-Tools-opt -lSPIRV-Tools -lpthread -lstdc++
-+enabled libglslang && require_cpp libglslang glslang/SPIRV/GlslangToSpv.h "glslang::TIntermediate*" -lglslang -lSPVRemapper -lSPIRV -lSPIRV-Tools-opt -lSPIRV-Tools -lpthread -lstdc++
- enabled libgme && { check_pkg_config libgme libgme gme/gme.h gme_new_emu ||
- require libgme gme/gme.h gme_new_emu -lgme -lstdc++; }
- enabled libgsm && { for gsm_hdr in "gsm.h" "gsm/gsm.h"; do
-diff -Naur a/libavfilter/glslang.cpp b/libavfilter/glslang.cpp
---- a/libavfilter/glslang.cpp 2023-04-12 19:01:50.000000000 +0100
-+++ b/libavfilter/glslang.cpp 2024-03-09 22:08:36.210161783 +0000
-@@ -17,6 +17,7 @@
- */
-
- #include <pthread.h>
-+#include <cassert>
-
- extern "C" {
- #include "libavutil/mem.h"
diff --git a/media-video/ffmpeg/files/ffmpeg-4.4.4-opencl-parallel-gmake-fix.patch b/media-video/ffmpeg/files/ffmpeg-4.4.4-opencl-parallel-gmake-fix.patch
deleted file mode 100644
index 9ac8ec79cf2e..000000000000
--- a/media-video/ffmpeg/files/ffmpeg-4.4.4-opencl-parallel-gmake-fix.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-Bug: https://bugs.gentoo.org/782553
-
---- ffmpeg-4.4.4/tools/cl2c.orig 2024-03-14 04:53:45.468507151 +0300
-+++ ffmpeg-4.4.4/tools/cl2c 2024-03-14 04:54:53.503086088 +0300
-@@ -24,6 +24,7 @@
-
- name=$(basename "$input" | sed 's/.cl$//')
-
-+mkdir -p "$(dirname "$output")"
- cat >$output <<EOF
- // Generated from $input
- const char *ff_opencl_source_$name =
diff --git a/media-video/ffmpeg/files/ffmpeg-4.4.4-wint-conversion-vulkan.patch b/media-video/ffmpeg/files/ffmpeg-4.4.4-wint-conversion-vulkan.patch
deleted file mode 100644
index f3766bb69f50..000000000000
--- a/media-video/ffmpeg/files/ffmpeg-4.4.4-wint-conversion-vulkan.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-https://bugs.gentoo.org/903752
-https://git.videolan.org/?p=ffmpeg.git;a=commit;h=cc76e8340d28438c1ac56ee7dfd774d25e944264
-
-(Dropped second bit for vulkan.h as has changed significantly in >4.4.)
-
-From cc76e8340d28438c1ac56ee7dfd774d25e944264 Mon Sep 17 00:00:00 2001
-From: =?utf8?q?Kacper=20Michaj=C5=82ow?= <kasper93@gmail.com>
-Date: Thu, 2 Mar 2023 17:27:30 +0100
-Subject: [PATCH] lavu/vulkan: fix handle type for 32-bit targets
-MIME-Version: 1.0
-Content-Type: text/plain; charset=utf8
-Content-Transfer-Encoding: 8bit
-
-Fixes compilation with clang which errors out on Wint-conversion.
-
-Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
-Signed-off-by: Martin Storsjö <martin@martin.st>
---- a/libavutil/hwcontext_vulkan.c
-+++ b/libavutil/hwcontext_vulkan.c
-@@ -1149,7 +1149,7 @@ static void free_exec_ctx(AVHWFramesContext *hwfc, VulkanExecCtx *cmd)
-
- av_freep(&cmd->queues);
- av_freep(&cmd->bufs);
-- cmd->pool = NULL;
-+ cmd->pool = VK_NULL_HANDLE;
- }
-
- static VkCommandBuffer get_buf_exec_ctx(AVHWFramesContext *hwfc, VulkanExecCtx *cmd)
-
-
diff --git a/media-video/ffmpeg/files/ffmpeg-4.4.5-binutils-2.43-arm.patch b/media-video/ffmpeg/files/ffmpeg-4.4.5-binutils-2.43-arm.patch
deleted file mode 100644
index 7ce8e0a038be..000000000000
--- a/media-video/ffmpeg/files/ffmpeg-4.4.5-binutils-2.43-arm.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-https://bugs.gentoo.org/942790
-https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/654bd47716c4f36719fb0f3f7fd8386d5ed0b916
-
-From 654bd47716c4f36719fb0f3f7fd8386d5ed0b916 Mon Sep 17 00:00:00 2001
-From: Ross Burton <ross.burton@arm.com>
-Date: Fri, 9 Aug 2024 11:32:00 +0100
-Subject: [PATCH] libavcodec/arm/mlpdsp_armv5te: fix label format to work with
- binutils 2.43
-MIME-Version: 1.0
-Content-Type: text/plain; charset=utf8
-Content-Transfer-Encoding: 8bit
-
-binutils 2.43 has stricter validation for labels[1] and results in errors
-when building ffmpeg for armv5:
-
-src/libavcodec/arm/mlpdsp_armv5te.S:232: Error: junk at end of line, first unrecognized character is `0'
-
-Remove the leading zero in the "01" label to resolve this error.
-
-[1] https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=226749d5a6ff0d5c607d6428d6c81e1e7e7a994b
-
-Signed-off-by: Ross Burton <ross.burton@arm.com>
-Signed-off-by: Martin Storsjö <martin@martin.st>
----
- libavcodec/arm/mlpdsp_armv5te.S | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/libavcodec/arm/mlpdsp_armv5te.S b/libavcodec/arm/mlpdsp_armv5te.S
-index 4f9aa485fd..d31568611c 100644
---- a/libavcodec/arm/mlpdsp_armv5te.S
-+++ b/libavcodec/arm/mlpdsp_armv5te.S
-@@ -229,7 +229,7 @@ A .endif
- .endif
-
- // Begin loop
--01:
-+1:
- .if TOTAL_TAPS == 0
- // Things simplify a lot in this case
- // In fact this could be pipelined further if it's worth it...
-@@ -241,7 +241,7 @@ A .endif
- str ST0, [PST, #-4]!
- str ST0, [PST, #4 * (MAX_BLOCKSIZE + MAX_FIR_ORDER)]
- str ST0, [PSAMP], #4 * MAX_CHANNELS
-- bne 01b
-+ bne 1b
- .else
- .if \fir_taps & 1
- .set LOAD_REG, 1
-@@ -333,7 +333,7 @@ T orr AC0, AC0, AC1
- str ST3, [PST, #-4]!
- str ST2, [PST, #4 * (MAX_BLOCKSIZE + MAX_FIR_ORDER)]
- str ST3, [PSAMP], #4 * MAX_CHANNELS
-- bne 01b
-+ bne 1b
- .endif
- b 99f
-
---
-2.25.1
diff --git a/media-video/ffmpeg/files/ffmpeg-4.4.5-incmptbl-pntr-types.patch b/media-video/ffmpeg/files/ffmpeg-4.4.5-incmptbl-pntr-types.patch
deleted file mode 100644
index a47a62917a29..000000000000
--- a/media-video/ffmpeg/files/ffmpeg-4.4.5-incmptbl-pntr-types.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-https://bugs.gentoo.org/936433
-
-diff --git a/libavutil/hwcontext_vaapi.c b/libavutil/hwcontext_vaapi.c
-index 4b81bd1..4e7f49f 100644
---- a/libavutil/hwcontext_vaapi.c
-+++ b/libavutil/hwcontext_vaapi.c
-@@ -1032,7 +1032,7 @@ static int vaapi_map_from_drm(AVHWFramesContext *src_fc, AVFrame *dst,
- uint32_t va_fourcc;
- int err, i, j, k;
-
-- unsigned long buffer_handle;
-+ uintptr_t buffer_handle;
- VASurfaceAttribExternalBuffers buffer_desc;
- VASurfaceAttrib attrs[2] = {
- {
diff --git a/media-video/ffmpeg/files/ffmpeg-4.4.5-wint-inconversion-libgcrypt.patch b/media-video/ffmpeg/files/ffmpeg-4.4.5-wint-inconversion-libgcrypt.patch
deleted file mode 100644
index a9c4fb2ab437..000000000000
--- a/media-video/ffmpeg/files/ffmpeg-4.4.5-wint-inconversion-libgcrypt.patch
+++ /dev/null
@@ -1,69 +0,0 @@
-https://bugs.gentoo.org/944785
-https://bugs.gentoo.org/935377
-https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/42982b5a5d461530a792e69b3e8abdd9d6d67052
-
-From 42982b5a5d461530a792e69b3e8abdd9d6d67052 Mon Sep 17 00:00:00 2001
-From: Frank Plowman <post@frankplowman.com>
-Date: Fri, 22 Dec 2023 12:00:01 +0000
-Subject: [PATCH 1/1] avformat/ffrtmpcrypt: Fix int-conversion warning
-MIME-Version: 1.0
-Content-Type: text/plain; charset=utf8
-Content-Transfer-Encoding: 8bit
-
-The gcrypt definition of `bn_new` used to use the return statement
-on errors, with an AVERROR return value, regardless of the signature
-of the function where the macro is used - it is called in
-`dh_generate_key` and `ff_dh_init` which return pointers. As a result,
-compiling with gcrypt and the ffrtmpcrypt protocol resulted in an
-int-conversion warning. GCC 14 may upgrade these to errors [1].
-
-This patch fixes the problem by changing the macro to remove `AVERROR`
-and instead set `bn` to null if the allocation fails. This is the
-behaviour of all the other `bn_new` implementations and so the result is
-already checked at all the callsites. AFAICT, this should be the only
-change needed to get ffmpeg off Fedora's naughty list of projects with
-warnings which may be upgraded to errors in GCC 14 [2].
-
-[1]: https://gcc.gnu.org/pipermail/gcc/2023-May/241264.html
-[2]: https://www.mail-archive.com/devel@lists.fedoraproject.org/msg196024.html
-
-Signed-off-by: Frank Plowman <post@frankplowman.com>
-Signed-off-by: Martin Storsjö <martin@martin.st>
----
- libavformat/rtmpdh.c | 21 ++++++++++++---------
- 1 file changed, 12 insertions(+), 9 deletions(-)
-
-diff --git a/libavformat/rtmpdh.c b/libavformat/rtmpdh.c
-index 5ddae537a1..6a6c2ccd87 100644
---- a/libavformat/rtmpdh.c
-+++ b/libavformat/rtmpdh.c
-@@ -113,15 +113,18 @@ static int bn_modexp(FFBigNum bn, FFBigNum y, FFBigNum q, FFBigNum p)
- return 0;
- }
- #elif CONFIG_GCRYPT
--#define bn_new(bn) \
-- do { \
-- if (!gcry_control(GCRYCTL_INITIALIZATION_FINISHED_P)) { \
-- if (!gcry_check_version("1.5.4")) \
-- return AVERROR(EINVAL); \
-- gcry_control(GCRYCTL_DISABLE_SECMEM, 0); \
-- gcry_control(GCRYCTL_INITIALIZATION_FINISHED, 0); \
-- } \
-- bn = gcry_mpi_new(1); \
-+#define bn_new(bn) \
-+ do { \
-+ if (!gcry_control(GCRYCTL_INITIALIZATION_FINISHED_P)) { \
-+ if (gcry_check_version("1.5.4")) { \
-+ gcry_control(GCRYCTL_DISABLE_SECMEM, 0); \
-+ gcry_control(GCRYCTL_INITIALIZATION_FINISHED, 0); \
-+ } \
-+ } \
-+ if (gcry_control(GCRYCTL_INITIALIZATION_FINISHED_P)) \
-+ bn = gcry_mpi_new(1); \
-+ else \
-+ bn = NULL; \
- } while (0)
- #define bn_free(bn) gcry_mpi_release(bn)
- #define bn_set_word(bn, w) gcry_mpi_set_ui(bn, w)
---
-2.25.1
diff --git a/media-video/ffmpeg/files/ffmpeg-5.0-backport-ranlib-build-fix.patch b/media-video/ffmpeg/files/ffmpeg-5.0-backport-ranlib-build-fix.patch
deleted file mode 100644
index 1c264f752099..000000000000
--- a/media-video/ffmpeg/files/ffmpeg-5.0-backport-ranlib-build-fix.patch
+++ /dev/null
@@ -1,59 +0,0 @@
-From bc5ccea3b9d2c71929af6271bd8afe9b6cfab436 Mon Sep 17 00:00:00 2001
-From: Adrian Ratiu <adrian.ratiu@collabora.com>
-Date: Mon, 14 Feb 2022 15:00:07 +0200
-Subject: [PATCH] configure: move ranlib -D test after setting defaults
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Upstream-Status: Backport [from master bc5ccea3b9d2c7]
-
-In Gentoo and ChromeOS we want to allow pure LLVM builds without
-using GNU tools, so we block any unwanted mixed GNU/LLVM usages
-(GNU tools are still kept around in our chroots for projects
-like glibc which cannot yet be built otherwise).
-
-The default ${cross_prefix}${ranlib_default} points to GNU and
-fails, so move the test a bit later - after the defaults are
-set and the proper values get overriden - such that ffmpeg
-configure calls the llvm-ranlib we desire. [1]
-
-[1] https://gitweb.gentoo.org/repo/gentoo.git/tree/media-video/ffmpeg/ffmpeg-4.4.1-r1.ebuild?id=7a34377e3277a6a0e2eedd40e90452a44c55f1e6#n477
-
-Signed-off-by: Adrian Ratiu <adrian.ratiu@collabora.com>
-Signed-off-by: Martin Storsjö <martin@martin.st>
----
- configure | 10 +++++-----
- 1 file changed, 5 insertions(+), 5 deletions(-)
-
-diff --git a/configure b/configure
-index 7d22c2a345..82642deabe 100755
---- a/configure
-+++ b/configure
-@@ -4403,11 +4403,7 @@ cc_default="${cross_prefix}${cc_default}"
- cxx_default="${cross_prefix}${cxx_default}"
- nm_default="${cross_prefix}${nm_default}"
- pkg_config_default="${cross_prefix}${pkg_config_default}"
--if ${cross_prefix}${ranlib_default} 2>&1 | grep -q "\-D "; then
-- ranlib_default="${cross_prefix}${ranlib_default} -D"
--else
-- ranlib_default="${cross_prefix}${ranlib_default}"
--fi
-+ranlib_default="${cross_prefix}${ranlib_default}"
- strip_default="${cross_prefix}${strip_default}"
- windres_default="${cross_prefix}${windres_default}"
-
-@@ -4440,6 +4436,10 @@ set_default arch cc cxx doxygen pkg_config ranlib strip sysinclude \
- enabled cross_compile || host_cc_default=$cc
- set_default host_cc
-
-+if ${ranlib} 2>&1 | grep -q "\-D "; then
-+ ranlib="${ranlib} -D"
-+fi
-+
- pkg_config_fail_message=""
- if ! $pkg_config --version >/dev/null 2>&1; then
- warn "$pkg_config not found, library detection may fail."
---
-2.35.1
-
diff --git a/media-video/ffmpeg/files/ffmpeg-6.0-fix-lto-type-mismatch.patch b/media-video/ffmpeg/files/ffmpeg-6.0-fix-lto-type-mismatch.patch
deleted file mode 100644
index 9cc2dd732016..000000000000
--- a/media-video/ffmpeg/files/ffmpeg-6.0-fix-lto-type-mismatch.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-https://ffmpeg.org//pipermail/ffmpeg-devel/2023-November/317055.html
-https://bugs.gentoo.org/907484
-
-From 408882a387f75ae57524073385b47d68339ec486 Mon Sep 17 00:00:00 2001
-From: Alfred Wingate <parona@protonmail.com>
-Date: Tue, 14 Nov 2023 13:26:47 +0000
-Subject: [PATCH 1/1] swscale/x86/rgb_2_rgb: Add opaque pointer to missed
- definitions of ff_nv12ToUV
-
-Opaque parameters were previously added to the original definition of
-ff_nv12ToUV, leading to gcc noticing a type mismatch with -Wlto-type-mismatch.
-
-https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/f2de911818fbd7e73343803626b697fd0c968121
-https://bugs.gentoo.org/907484
-
-Signed-off-by: Alfred Wingate <parona@protonmail.com>
-Signed-off-by: Anton Khirnov <anton@khirnov.net>
---- a/libswscale/x86/rgb2rgb_template.c
-+++ b/libswscale/x86/rgb2rgb_template.c
-@@ -1823,7 +1823,8 @@ void RENAME(ff_nv12ToUV)(uint8_t *dstU, uint8_t *dstV,
- const uint8_t *src1,
- const uint8_t *src2,
- int w,
-- uint32_t *unused2);
-+ uint32_t *unused2,
-+ void *opq);
- static void RENAME(deinterleaveBytes)(const uint8_t *src, uint8_t *dst1, uint8_t *dst2,
- int width, int height, int srcStride,
- int dst1Stride, int dst2Stride)
-@@ -1831,7 +1832,7 @@ static void RENAME(deinterleaveBytes)(const uint8_t *src, uint8_t *dst1, uint8_t
- int h;
-
- for (h = 0; h < height; h++) {
-- RENAME(ff_nv12ToUV)(dst1, dst2, NULL, src, NULL, width, NULL);
-+ RENAME(ff_nv12ToUV)(dst1, dst2, NULL, src, NULL, width, NULL, NULL);
- src += srcStride;
- dst1 += dst1Stride;
- dst2 += dst2Stride;
---
-2.43.0
-
diff --git a/media-video/ffmpeg/files/ffmpeg-6.0.1-alignment.patch b/media-video/ffmpeg/files/ffmpeg-6.0.1-alignment.patch
deleted file mode 100644
index 256feab8aea2..000000000000
--- a/media-video/ffmpeg/files/ffmpeg-6.0.1-alignment.patch
+++ /dev/null
@@ -1,114 +0,0 @@
-https://trac.ffmpeg.org/ticket/10549
-https://bugs.gentoo.org/915384
-https://git.videolan.org/?p=ffmpeg.git;a=patch;h=7945d30e91b96d2f4f5b612048169087d214d41e
-
-From 7945d30e91b96d2f4f5b612048169087d214d41e Mon Sep 17 00:00:00 2001
-From: Timo Rothenpieler <timo@rothenpieler.org>
-Date: Sun, 3 Dec 2023 21:01:50 +0100
-Subject: [PATCH] avutil/mem: limit alignment to maximum simd align
-
-FFmpeg has instances of DECLARE_ALIGNED(32, ...) in a lot of structs,
-which then end up heap-allocated.
-By declaring any variable in a struct, or tree of structs, to be 32 byte
-aligned, it allows the compiler to safely assume the entire struct
-itself is also 32 byte aligned.
-
-This might make the compiler emit code which straight up crashes or
-misbehaves in other ways, and at least in one instances is now
-documented to actually do (see ticket 10549 on trac).
-The issue there is that an unrelated variable in SingleChannelElement is
-declared to have an alignment of 32 bytes. So if the compiler does a copy
-in decode_cpe() with avx instructions, but ffmpeg is built with
---disable-avx, this results in a crash, since the memory is only 16 byte
-aligned.
-
-Mind you, even if the compiler does not emit avx instructions, the code
-is still invalid and could misbehave. It just happens not to. Declaring
-any variable in a struct with a 32 byte alignment promises 32 byte
-alignment of the whole struct to the compiler.
-
-This patch limits the maximum alignment to the maximum possible simd
-alignment according to configure.
-While not perfect, it at the very least gets rid of a lot of UB, by
-matching up the maximum DECLARE_ALIGNED value with the alignment of heap
-allocations done by lavu.
----
- libavutil/mem.c | 2 +-
- libavutil/mem_internal.h | 33 ++++++++++++++++++++++++++++-----
- 2 files changed, 29 insertions(+), 6 deletions(-)
-
-diff --git a/libavutil/mem.c b/libavutil/mem.c
-index 36b8940a0c..62163b4cb3 100644
---- a/libavutil/mem.c
-+++ b/libavutil/mem.c
-@@ -62,7 +62,7 @@ void free(void *ptr);
-
- #endif /* MALLOC_PREFIX */
-
--#define ALIGN (HAVE_AVX512 ? 64 : (HAVE_AVX ? 32 : 16))
-+#define ALIGN (HAVE_SIMD_ALIGN_64 ? 64 : (HAVE_SIMD_ALIGN_32 ? 32 : 16))
-
- /* NOTE: if you want to override these functions with your own
- * implementations (not recommended) you have to link libav* as
-diff --git a/libavutil/mem_internal.h b/libavutil/mem_internal.h
-index 2448c606f1..b1d89a0605 100644
---- a/libavutil/mem_internal.h
-+++ b/libavutil/mem_internal.h
-@@ -76,27 +76,50 @@
- */
-
- #if defined(__INTEL_COMPILER) && __INTEL_COMPILER < 1110 || defined(__SUNPRO_C)
-- #define DECLARE_ALIGNED(n,t,v) t __attribute__ ((aligned (n))) v
-+ #define DECLARE_ALIGNED_T(n,t,v) t __attribute__ ((aligned (n))) v
- #define DECLARE_ASM_ALIGNED(n,t,v) t __attribute__ ((aligned (n))) v
- #define DECLARE_ASM_CONST(n,t,v) const t __attribute__ ((aligned (n))) v
- #elif defined(__DJGPP__)
-- #define DECLARE_ALIGNED(n,t,v) t __attribute__ ((aligned (FFMIN(n, 16)))) v
-+ #define DECLARE_ALIGNED_T(n,t,v) t __attribute__ ((aligned (FFMIN(n, 16)))) v
- #define DECLARE_ASM_ALIGNED(n,t,v) t av_used __attribute__ ((aligned (FFMIN(n, 16)))) v
- #define DECLARE_ASM_CONST(n,t,v) static const t av_used __attribute__ ((aligned (FFMIN(n, 16)))) v
- #elif defined(__GNUC__) || defined(__clang__)
-- #define DECLARE_ALIGNED(n,t,v) t __attribute__ ((aligned (n))) v
-+ #define DECLARE_ALIGNED_T(n,t,v) t __attribute__ ((aligned (n))) v
- #define DECLARE_ASM_ALIGNED(n,t,v) t av_used __attribute__ ((aligned (n))) v
- #define DECLARE_ASM_CONST(n,t,v) static const t av_used __attribute__ ((aligned (n))) v
- #elif defined(_MSC_VER)
-- #define DECLARE_ALIGNED(n,t,v) __declspec(align(n)) t v
-+ #define DECLARE_ALIGNED_T(n,t,v) __declspec(align(n)) t v
- #define DECLARE_ASM_ALIGNED(n,t,v) __declspec(align(n)) t v
- #define DECLARE_ASM_CONST(n,t,v) __declspec(align(n)) static const t v
- #else
-- #define DECLARE_ALIGNED(n,t,v) t v
-+ #define DECLARE_ALIGNED_T(n,t,v) t v
- #define DECLARE_ASM_ALIGNED(n,t,v) t v
- #define DECLARE_ASM_CONST(n,t,v) static const t v
- #endif
-
-+#if HAVE_SIMD_ALIGN_64
-+ #define ALIGN_64 64
-+ #define ALIGN_32 32
-+#elif HAVE_SIMD_ALIGN_32
-+ #define ALIGN_64 32
-+ #define ALIGN_32 32
-+#else
-+ #define ALIGN_64 16
-+ #define ALIGN_32 16
-+#endif
-+
-+#define DECLARE_ALIGNED(n,t,v) DECLARE_ALIGNED_V(n,t,v)
-+
-+// Macro needs to be double-wrapped in order to expand
-+// possible other macros being passed for n.
-+#define DECLARE_ALIGNED_V(n,t,v) DECLARE_ALIGNED_##n(t,v)
-+
-+#define DECLARE_ALIGNED_4(t,v) DECLARE_ALIGNED_T( 4, t, v)
-+#define DECLARE_ALIGNED_8(t,v) DECLARE_ALIGNED_T( 8, t, v)
-+#define DECLARE_ALIGNED_16(t,v) DECLARE_ALIGNED_T( 16, t, v)
-+#define DECLARE_ALIGNED_32(t,v) DECLARE_ALIGNED_T(ALIGN_32, t, v)
-+#define DECLARE_ALIGNED_64(t,v) DECLARE_ALIGNED_T(ALIGN_64, t, v)
-+
- // Some broken preprocessors need a second expansion
- // to be forced to tokenize __VA_ARGS__
- #define E1(x) x
---
-2.30.2
diff --git a/media-video/ffmpeg/files/ffmpeg-6.1-gcc-14.patch b/media-video/ffmpeg/files/ffmpeg-6.1-gcc-14.patch
deleted file mode 100644
index 0db7301f18d9..000000000000
--- a/media-video/ffmpeg/files/ffmpeg-6.1-gcc-14.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/libavutil/hwcontext_vaapi.c b/libavutil/hwcontext_vaapi.c
-index 29fc8bd648..1f85fac7f4 100644
---- a/libavutil/hwcontext_vaapi.c
-+++ b/libavutil/hwcontext_vaapi.c
-@@ -1203,7 +1203,7 @@ static int vaapi_map_from_drm(AVHWFramesContext *src_fc, AVFrame *dst,
-
- if (!use_prime2 || vas != VA_STATUS_SUCCESS) {
- int k;
-- unsigned long buffer_handle;
-+ uintptr_t buffer_handle;
- VASurfaceAttribExternalBuffers buffer_desc;
- VASurfaceAttrib buffer_attrs[2] = {
- {
diff --git a/media-video/ffmpeg/files/ffmpeg-6.1-wint-conversion.patch b/media-video/ffmpeg/files/ffmpeg-6.1-wint-conversion.patch
deleted file mode 100644
index c95566117903..000000000000
--- a/media-video/ffmpeg/files/ffmpeg-6.1-wint-conversion.patch
+++ /dev/null
@@ -1,88 +0,0 @@
-Sent upstream to the mailing list but stuck in moderation queue / not yet on archive.
-
-From 50f34826bcff90f393dfbc6c4e0c908556831d4d Mon Sep 17 00:00:00 2001
-From: Sam James <sam@gentoo.org>
-Date: Wed, 13 Dec 2023 04:25:54 +0000
-Subject: [PATCH] libavcodec: fix -Wint-conversion in vulkan
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-FIx warnings (soon to be errors in GCC 14, already so in Clang 15):
-```
-src/libavcodec/vulkan_av1.c: In function ‘vk_av1_create_params’:
-src/libavcodec/vulkan_av1.c:183:43: error: initialization of ‘long long unsigned int’ from ‘void *’ makes integer from pointer without a cast [-Wint-conversion]
- 183 | .videoSessionParametersTemplate = NULL,
- | ^~~~
-src/libavcodec/vulkan_av1.c:183:43: note: (near initialization for ‘(anonymous).videoSessionParametersTemplate’)
-```
-
-Use Vulkan's VK_NULL_HANDLE instead of bare NULL.
-
-Fix Trac ticket #10724.
-
-Was reported downstream in Gentoo at https://bugs.gentoo.org/919067.
-
-Signed-off-by: Sam James <sam@gentoo.org>
---- a/libavcodec/vulkan_av1.c
-+++ b/libavcodec/vulkan_av1.c
-@@ -180,7 +180,7 @@ static int vk_av1_create_params(AVCodecContext *avctx, AVBufferRef **buf)
- .sType = VK_STRUCTURE_TYPE_VIDEO_SESSION_PARAMETERS_CREATE_INFO_KHR,
- .pNext = &av1_params,
- .videoSession = ctx->common.session,
-- .videoSessionParametersTemplate = NULL,
-+ .videoSessionParametersTemplate = VK_NULL_HANDLE,
- };
-
- err = ff_vk_decode_create_params(buf, avctx, ctx, &session_params_create);
---- a/libavcodec/vulkan_decode.c
-+++ b/libavcodec/vulkan_decode.c
-@@ -188,9 +188,9 @@ int ff_vk_decode_prepare_frame(FFVulkanDecodeContext *dec, AVFrame *pic,
- return 0;
-
- vkpic->dpb_frame = NULL;
-- vkpic->img_view_ref = NULL;
-- vkpic->img_view_out = NULL;
-- vkpic->img_view_dest = NULL;
-+ vkpic->img_view_ref = VK_NULL_HANDLE;
-+ vkpic->img_view_out = VK_NULL_HANDLE;
-+ vkpic->img_view_dest = VK_NULL_HANDLE;
-
- vkpic->destroy_image_view = vk->DestroyImageView;
- vkpic->wait_semaphores = vk->WaitSemaphores;
---- a/libavcodec/vulkan_h264.c
-+++ b/libavcodec/vulkan_h264.c
-@@ -315,7 +315,7 @@ static int vk_h264_create_params(AVCodecContext *avctx, AVBufferRef **buf)
- .sType = VK_STRUCTURE_TYPE_VIDEO_SESSION_PARAMETERS_CREATE_INFO_KHR,
- .pNext = &h264_params,
- .videoSession = ctx->common.session,
-- .videoSessionParametersTemplate = NULL,
-+ .videoSessionParametersTemplate = VK_NULL_HANDLE,
- };
-
- /* SPS list */
---- a/libavcodec/vulkan_hevc.c
-+++ b/libavcodec/vulkan_hevc.c
-@@ -653,7 +653,7 @@ static int vk_hevc_create_params(AVCodecContext *avctx, AVBufferRef **buf)
- .sType = VK_STRUCTURE_TYPE_VIDEO_SESSION_PARAMETERS_CREATE_INFO_KHR,
- .pNext = &h265_params,
- .videoSession = ctx->common.session,
-- .videoSessionParametersTemplate = NULL,
-+ .videoSessionParametersTemplate = VK_NULL_HANDLE,
- };
-
- HEVCHeaderSet *hdr;
---- a/libavcodec/vulkan_video.c
-+++ b/libavcodec/vulkan_video.c
-@@ -287,7 +287,7 @@ av_cold void ff_vk_video_common_uninit(FFVulkanContext *s,
- if (common->session) {
- vk->DestroyVideoSessionKHR(s->hwctx->act_dev, common->session,
- s->hwctx->alloc);
-- common->session = NULL;
-+ common->session = VK_NULL_HANDLE;
- }
-
- if (common->nb_mem && common->mem)
---
-2.43.0
-
diff --git a/media-video/ffmpeg/files/ffmpeg-6.1.1-amd-av1-vaapi.patch b/media-video/ffmpeg/files/ffmpeg-6.1.1-amd-av1-vaapi.patch
deleted file mode 100644
index 41dc17353510..000000000000
--- a/media-video/ffmpeg/files/ffmpeg-6.1.1-amd-av1-vaapi.patch
+++ /dev/null
@@ -1,254 +0,0 @@
-https://bugs.gentoo.org/936310
-https://gitlab.freedesktop.org/mesa/mesa/-/issues/11533
-https://github.com/FFmpeg/FFmpeg/commit/fe9d889dcd79ea18d4dfaa39df4ddbd4c8c3b15c
-https://github.com/FFmpeg/FFmpeg/commit/d2d911eb9a2fc6eb8d86b3ae025a56c1a2692fba
-
-From fe9d889dcd79ea18d4dfaa39df4ddbd4c8c3b15c Mon Sep 17 00:00:00 2001
-From: David Rosca <nowrep@gmail.com>
-Date: Wed, 8 May 2024 09:11:11 +0200
-Subject: [PATCH] lavc/vaapi_decode: Make it possible to send multiple slice
- params buffers
-
-Reviewed-by: Neal Gompa <ngompa13@gmail.com>
-Signed-off-by: David Rosca <nowrep@gmail.com>
-Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
---- a/libavcodec/vaapi_av1.c
-+++ b/libavcodec/vaapi_av1.c
-@@ -409,7 +409,7 @@ static int vaapi_av1_decode_slice(AVCodecContext *avctx,
- .tg_end = s->tg_end,
- };
-
-- err = ff_vaapi_decode_make_slice_buffer(avctx, pic, &slice_param,
-+ err = ff_vaapi_decode_make_slice_buffer(avctx, pic, &slice_param, 1,
- sizeof(VASliceParameterBufferAV1),
- buffer,
- size);
---- a/libavcodec/vaapi_decode.c
-+++ b/libavcodec/vaapi_decode.c
-@@ -63,6 +63,7 @@ int ff_vaapi_decode_make_param_buffer(AVCodecContext *avctx,
- int ff_vaapi_decode_make_slice_buffer(AVCodecContext *avctx,
- VAAPIDecodePicture *pic,
- const void *params_data,
-+ int nb_params,
- size_t params_size,
- const void *slice_data,
- size_t slice_size)
-@@ -88,7 +89,7 @@ int ff_vaapi_decode_make_slice_buffer(AVCodecContext *avctx,
-
- vas = vaCreateBuffer(ctx->hwctx->display, ctx->va_context,
- VASliceParameterBufferType,
-- params_size, 1, (void*)params_data,
-+ params_size, nb_params, (void*)params_data,
- &pic->slice_buffers[index]);
- if (vas != VA_STATUS_SUCCESS) {
- av_log(avctx, AV_LOG_ERROR, "Failed to create slice "
---- a/libavcodec/vaapi_decode.h
-+++ b/libavcodec/vaapi_decode.h
-@@ -73,6 +73,7 @@ int ff_vaapi_decode_make_param_buffer(AVCodecContext *avctx,
- int ff_vaapi_decode_make_slice_buffer(AVCodecContext *avctx,
- VAAPIDecodePicture *pic,
- const void *params_data,
-+ int nb_params,
- size_t params_size,
- const void *slice_data,
- size_t slice_size);
---- a/libavcodec/vaapi_h264.c
-+++ b/libavcodec/vaapi_h264.c
-@@ -375,7 +375,7 @@ static int vaapi_h264_decode_slice(AVCodecContext *avctx,
- slice_param.chroma_offset_l1);
-
- err = ff_vaapi_decode_make_slice_buffer(avctx, pic,
-- &slice_param, sizeof(slice_param),
-+ &slice_param, 1, sizeof(slice_param),
- buffer, size);
- if (err) {
- ff_vaapi_decode_cancel(avctx, pic);
---- a/libavcodec/vaapi_hevc.c
-+++ b/libavcodec/vaapi_hevc.c
-@@ -353,7 +353,7 @@ static int vaapi_hevc_end_frame(AVCodecContext *avctx)
- if (pic->last_size) {
- last_slice_param->LongSliceFlags.fields.LastSliceOfPic = 1;
- ret = ff_vaapi_decode_make_slice_buffer(avctx, &pic->pic,
-- &pic->last_slice_param, slice_param_size,
-+ &pic->last_slice_param, 1, slice_param_size,
- pic->last_buffer, pic->last_size);
- if (ret < 0)
- goto fail;
-@@ -471,7 +471,7 @@ static int vaapi_hevc_decode_slice(AVCodecContext *avctx,
-
- if (!sh->first_slice_in_pic_flag) {
- err = ff_vaapi_decode_make_slice_buffer(avctx, &pic->pic,
-- &pic->last_slice_param, slice_param_size,
-+ &pic->last_slice_param, 1, slice_param_size,
- pic->last_buffer, pic->last_size);
- pic->last_buffer = NULL;
- pic->last_size = 0;
---- a/libavcodec/vaapi_mjpeg.c
-+++ b/libavcodec/vaapi_mjpeg.c
-@@ -131,7 +131,7 @@ static int vaapi_mjpeg_decode_slice(AVCodecContext *avctx,
- sp.components[i].ac_table_selector = s->ac_index[i];
- }
-
-- err = ff_vaapi_decode_make_slice_buffer(avctx, pic, &sp, sizeof(sp), buffer, size);
-+ err = ff_vaapi_decode_make_slice_buffer(avctx, pic, &sp, 1, sizeof(sp), buffer, size);
- if (err)
- goto fail;
-
---- a/libavcodec/vaapi_mpeg2.c
-+++ b/libavcodec/vaapi_mpeg2.c
-@@ -162,7 +162,7 @@ static int vaapi_mpeg2_decode_slice(AVCodecContext *avctx, const uint8_t *buffer
- };
-
- err = ff_vaapi_decode_make_slice_buffer(avctx, pic,
-- &slice_param, sizeof(slice_param),
-+ &slice_param, 1, sizeof(slice_param),
- buffer, size);
- if (err < 0) {
- ff_vaapi_decode_cancel(avctx, pic);
---- a/libavcodec/vaapi_mpeg4.c
-+++ b/libavcodec/vaapi_mpeg4.c
-@@ -169,7 +169,7 @@ static int vaapi_mpeg4_decode_slice(AVCodecContext *avctx, const uint8_t *buffer
- };
-
- err = ff_vaapi_decode_make_slice_buffer(avctx, pic,
-- &slice_param, sizeof(slice_param),
-+ &slice_param, 1, sizeof(slice_param),
- buffer, size);
- if (err < 0) {
- ff_vaapi_decode_cancel(avctx, pic);
---- a/libavcodec/vaapi_vc1.c
-+++ b/libavcodec/vaapi_vc1.c
-@@ -490,7 +490,7 @@ static int vaapi_vc1_decode_slice(AVCodecContext *avctx, const uint8_t *buffer,
- };
-
- err = ff_vaapi_decode_make_slice_buffer(avctx, pic,
-- &slice_param, sizeof(slice_param),
-+ &slice_param, 1, sizeof(slice_param),
- buffer, size);
- if (err < 0) {
- ff_vaapi_decode_cancel(avctx, pic);
---- a/libavcodec/vaapi_vp8.c
-+++ b/libavcodec/vaapi_vp8.c
-@@ -209,7 +209,7 @@ static int vaapi_vp8_decode_slice(AVCodecContext *avctx,
- for (i = 0; i < 8; i++)
- sp.partition_size[i+1] = s->coeff_partition_size[i];
-
-- err = ff_vaapi_decode_make_slice_buffer(avctx, pic, &sp, sizeof(sp), data, data_size);
-+ err = ff_vaapi_decode_make_slice_buffer(avctx, pic, &sp, 1, sizeof(sp), data, data_size);
- if (err)
- goto fail;
-
---- a/libavcodec/vaapi_vp9.c
-+++ b/libavcodec/vaapi_vp9.c
-@@ -158,7 +158,7 @@ static int vaapi_vp9_decode_slice(AVCodecContext *avctx,
- }
-
- err = ff_vaapi_decode_make_slice_buffer(avctx, pic,
-- &slice_param, sizeof(slice_param),
-+ &slice_param, 1, sizeof(slice_param),
- buffer, size);
- if (err) {
- ff_vaapi_decode_cancel(avctx, pic);
-
-From d2d911eb9a2fc6eb8d86b3ae025a56c1a2692fba Mon Sep 17 00:00:00 2001
-From: David Rosca <nowrep@gmail.com>
-Date: Wed, 8 May 2024 09:11:13 +0200
-Subject: [PATCH] lavc/vaapi_av1: Avoid sending the same slice buffer multiple
- times
-
-When there are multiple tiles in one slice buffer, use multiple slice
-params to avoid sending the same slice buffer multiple times and thus
-increasing the bitstream size the driver will need to upload to hw.
-
-Reviewed-by: Neal Gompa <ngompa13@gmail.com>
-Signed-off-by: David Rosca <nowrep@gmail.com>
-Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
---- a/libavcodec/vaapi_av1.c
-+++ b/libavcodec/vaapi_av1.c
-@@ -19,6 +19,7 @@
- */
-
- #include "libavutil/frame.h"
-+#include "libavutil/mem.h"
- #include "hwaccel_internal.h"
- #include "vaapi_decode.h"
- #include "internal.h"
-@@ -42,6 +43,9 @@ typedef struct VAAPIAV1DecContext {
- */
- VAAPIAV1FrameRef ref_tab[AV1_NUM_REF_FRAMES];
- AVFrame *tmp_frame;
-+
-+ int nb_slice_params;
-+ VASliceParameterBufferAV1 *slice_params;
- } VAAPIAV1DecContext;
-
- static VASurfaceID vaapi_av1_surface_id(AV1Frame *vf)
-@@ -97,6 +101,8 @@ static int vaapi_av1_decode_uninit(AVCodecContext *avctx)
- for (int i = 0; i < FF_ARRAY_ELEMS(ctx->ref_tab); i++)
- av_frame_free(&ctx->ref_tab[i].frame);
-
-+ av_freep(&ctx->slice_params);
-+
- return ff_vaapi_decode_uninit(avctx);
- }
-
-@@ -393,13 +399,24 @@ static int vaapi_av1_decode_slice(AVCodecContext *avctx,
- {
- const AV1DecContext *s = avctx->priv_data;
- VAAPIDecodePicture *pic = s->cur_frame.hwaccel_picture_private;
-- VASliceParameterBufferAV1 slice_param;
-- int err = 0;
-+ VAAPIAV1DecContext *ctx = avctx->internal->hwaccel_priv_data;
-+ int err, nb_params;
-+
-+ nb_params = s->tg_end - s->tg_start + 1;
-+ if (ctx->nb_slice_params < nb_params) {
-+ ctx->slice_params = av_realloc_array(ctx->slice_params,
-+ nb_params,
-+ sizeof(*ctx->slice_params));
-+ if (!ctx->slice_params) {
-+ ctx->nb_slice_params = 0;
-+ err = AVERROR(ENOMEM);
-+ goto fail;
-+ }
-+ ctx->nb_slice_params = nb_params;
-+ }
-
- for (int i = s->tg_start; i <= s->tg_end; i++) {
-- memset(&slice_param, 0, sizeof(VASliceParameterBufferAV1));
--
-- slice_param = (VASliceParameterBufferAV1) {
-+ ctx->slice_params[i - s->tg_start] = (VASliceParameterBufferAV1) {
- .slice_data_size = s->tile_group_info[i].tile_size,
- .slice_data_offset = s->tile_group_info[i].tile_offset,
- .slice_data_flag = VA_SLICE_DATA_FLAG_ALL,
-@@ -408,18 +425,20 @@ static int vaapi_av1_decode_slice(AVCodecContext *avctx,
- .tg_start = s->tg_start,
- .tg_end = s->tg_end,
- };
--
-- err = ff_vaapi_decode_make_slice_buffer(avctx, pic, &slice_param, 1,
-- sizeof(VASliceParameterBufferAV1),
-- buffer,
-- size);
-- if (err) {
-- ff_vaapi_decode_cancel(avctx, pic);
-- return err;
-- }
- }
-
-+ err = ff_vaapi_decode_make_slice_buffer(avctx, pic, ctx->slice_params, nb_params,
-+ sizeof(VASliceParameterBufferAV1),
-+ buffer,
-+ size);
-+ if (err)
-+ goto fail;
-+
- return 0;
-+
-+fail:
-+ ff_vaapi_decode_cancel(avctx, pic);
-+ return err;
- }
-
- const FFHWAccel ff_av1_vaapi_hwaccel = {
diff --git a/media-video/ffmpeg/files/ffmpeg-6.1.1-incmptbl-pntr-types.patch b/media-video/ffmpeg/files/ffmpeg-6.1.1-incmptbl-pntr-types.patch
deleted file mode 100644
index a65828e468e1..000000000000
--- a/media-video/ffmpeg/files/ffmpeg-6.1.1-incmptbl-pntr-types.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/347a70f101be28f8d78e8fd62ffc3a78324f49e9
-https://bugs.gentoo.org/922621
-
-From 347a70f101be28f8d78e8fd62ffc3a78324f49e9 Mon Sep 17 00:00:00 2001
-From: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-Date: Thu, 28 Mar 2024 05:35:36 +0100
-Subject: [PATCH] avcodec/pcm-bluray/dvd: Use correct pointer types on BE
-
-Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
----
- libavcodec/pcm-bluray.c | 5 +++--
- libavcodec/pcm-dvd.c | 2 +-
- 2 files changed, 4 insertions(+), 3 deletions(-)
-
-diff --git a/libavcodec/pcm-bluray.c b/libavcodec/pcm-bluray.c
-index f65609514a1c1..235020d78f0cf 100644
---- a/libavcodec/pcm-bluray.c
-+++ b/libavcodec/pcm-bluray.c
-@@ -167,7 +167,7 @@ static int pcm_bluray_decode_frame(AVCodecContext *avctx, AVFrame *frame,
- samples *= num_source_channels;
- if (AV_SAMPLE_FMT_S16 == avctx->sample_fmt) {
- #if HAVE_BIGENDIAN
-- bytestream2_get_buffer(&gb, dst16, buf_size);
-+ bytestream2_get_buffer(&gb, (uint8_t*)dst16, buf_size);
- #else
- do {
- *dst16++ = bytestream2_get_be16u(&gb);
-@@ -187,7 +187,8 @@ static int pcm_bluray_decode_frame(AVCodecContext *avctx, AVFrame *frame,
- if (AV_SAMPLE_FMT_S16 == avctx->sample_fmt) {
- do {
- #if HAVE_BIGENDIAN
-- bytestream2_get_buffer(&gb, dst16, avctx->ch_layout.nb_channels * 2);
-+ bytestream2_get_buffer(&gb, (uint8_t*)dst16,
-+ avctx->ch_layout.nb_channels * 2);
- dst16 += avctx->ch_layout.nb_channels;
- #else
- channel = avctx->ch_layout.nb_channels;
-diff --git a/libavcodec/pcm-dvd.c b/libavcodec/pcm-dvd.c
-index 419b2a138f887..319746c62e2dc 100644
---- a/libavcodec/pcm-dvd.c
-+++ b/libavcodec/pcm-dvd.c
-@@ -157,7 +157,7 @@ static void *pcm_dvd_decode_samples(AVCodecContext *avctx, const uint8_t *src,
- switch (avctx->bits_per_coded_sample) {
- case 16: {
- #if HAVE_BIGENDIAN
-- bytestream2_get_buffer(&gb, dst16, blocks * s->block_size);
-+ bytestream2_get_buffer(&gb, (uint8_t*)dst16, blocks * s->block_size);
- dst16 += blocks * s->block_size / 2;
- #else
- int samples = blocks * avctx->ch_layout.nb_channels;
diff --git a/media-video/ffmpeg/files/ffmpeg-6.1.1-wint-inconversion-libgcrypt.patch b/media-video/ffmpeg/files/ffmpeg-6.1.1-wint-inconversion-libgcrypt.patch
deleted file mode 100644
index d27240ffc557..000000000000
--- a/media-video/ffmpeg/files/ffmpeg-6.1.1-wint-inconversion-libgcrypt.patch
+++ /dev/null
@@ -1,68 +0,0 @@
-https://bugs.gentoo.org/935377
-https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/42982b5a5d461530a792e69b3e8abdd9d6d67052
-
-From 42982b5a5d461530a792e69b3e8abdd9d6d67052 Mon Sep 17 00:00:00 2001
-From: Frank Plowman <post@frankplowman.com>
-Date: Fri, 22 Dec 2023 12:00:01 +0000
-Subject: [PATCH 1/1] avformat/ffrtmpcrypt: Fix int-conversion warning
-MIME-Version: 1.0
-Content-Type: text/plain; charset=utf8
-Content-Transfer-Encoding: 8bit
-
-The gcrypt definition of `bn_new` used to use the return statement
-on errors, with an AVERROR return value, regardless of the signature
-of the function where the macro is used - it is called in
-`dh_generate_key` and `ff_dh_init` which return pointers. As a result,
-compiling with gcrypt and the ffrtmpcrypt protocol resulted in an
-int-conversion warning. GCC 14 may upgrade these to errors [1].
-
-This patch fixes the problem by changing the macro to remove `AVERROR`
-and instead set `bn` to null if the allocation fails. This is the
-behaviour of all the other `bn_new` implementations and so the result is
-already checked at all the callsites. AFAICT, this should be the only
-change needed to get ffmpeg off Fedora's naughty list of projects with
-warnings which may be upgraded to errors in GCC 14 [2].
-
-[1]: https://gcc.gnu.org/pipermail/gcc/2023-May/241264.html
-[2]: https://www.mail-archive.com/devel@lists.fedoraproject.org/msg196024.html
-
-Signed-off-by: Frank Plowman <post@frankplowman.com>
-Signed-off-by: Martin Storsjö <martin@martin.st>
----
- libavformat/rtmpdh.c | 21 ++++++++++++---------
- 1 file changed, 12 insertions(+), 9 deletions(-)
-
-diff --git a/libavformat/rtmpdh.c b/libavformat/rtmpdh.c
-index 5ddae537a1..6a6c2ccd87 100644
---- a/libavformat/rtmpdh.c
-+++ b/libavformat/rtmpdh.c
-@@ -113,15 +113,18 @@ static int bn_modexp(FFBigNum bn, FFBigNum y, FFBigNum q, FFBigNum p)
- return 0;
- }
- #elif CONFIG_GCRYPT
--#define bn_new(bn) \
-- do { \
-- if (!gcry_control(GCRYCTL_INITIALIZATION_FINISHED_P)) { \
-- if (!gcry_check_version("1.5.4")) \
-- return AVERROR(EINVAL); \
-- gcry_control(GCRYCTL_DISABLE_SECMEM, 0); \
-- gcry_control(GCRYCTL_INITIALIZATION_FINISHED, 0); \
-- } \
-- bn = gcry_mpi_new(1); \
-+#define bn_new(bn) \
-+ do { \
-+ if (!gcry_control(GCRYCTL_INITIALIZATION_FINISHED_P)) { \
-+ if (gcry_check_version("1.5.4")) { \
-+ gcry_control(GCRYCTL_DISABLE_SECMEM, 0); \
-+ gcry_control(GCRYCTL_INITIALIZATION_FINISHED, 0); \
-+ } \
-+ } \
-+ if (gcry_control(GCRYCTL_INITIALIZATION_FINISHED_P)) \
-+ bn = gcry_mpi_new(1); \
-+ else \
-+ bn = NULL; \
- } while (0)
- #define bn_free(bn) gcry_mpi_release(bn)
- #define bn_set_word(bn, w) gcry_mpi_set_ui(bn, w)
---
-2.25.1
diff --git a/media-video/ffmpeg/files/ffmpeg-6.1.1-wint-inconversion-vulkan.patch b/media-video/ffmpeg/files/ffmpeg-6.1.1-wint-inconversion-vulkan.patch
deleted file mode 100644
index 56c2d11efcd1..000000000000
--- a/media-video/ffmpeg/files/ffmpeg-6.1.1-wint-inconversion-vulkan.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 5860a966d2fffbbda1af0014f0a4d37a21c4f2ca Mon Sep 17 00:00:00 2001
-From: Lynne <dev@lynne.ee>
-Date: Wed, 31 Jan 2024 14:15:04 +0100
-Subject: [PATCH] lavfi/vsrc_testsrc_vulkan: fix -Wint-conversion
-
-While VK_NULL_HANDLE is equivalent to NULL on 64-bit platforms, the same is not
-true across all platforms.
-
-Fixes building with gcc-14.
----
- libavfilter/vsrc_testsrc_vulkan.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/libavfilter/vsrc_testsrc_vulkan.c b/libavfilter/vsrc_testsrc_vulkan.c
-index 8761c21dfd1ed..1720bfac5e3a2 100644
---- a/libavfilter/vsrc_testsrc_vulkan.c
-+++ b/libavfilter/vsrc_testsrc_vulkan.c
-@@ -231,7 +231,7 @@ static int testsrc_vulkan_activate(AVFilterContext *ctx)
- return AVERROR(ENOMEM);
-
- err = ff_vk_filter_process_simple(&s->vkctx, &s->e, &s->pl, s->picref, NULL,
-- NULL, &s->opts, sizeof(s->opts));
-+ VK_NULL_HANDLE, &s->opts, sizeof(s->opts));
- if (err < 0)
- return err;
- }
-@@ -250,7 +250,7 @@ static int testsrc_vulkan_activate(AVFilterContext *ctx)
- frame->sample_aspect_ratio = s->sar;
- if (!s->draw_once) {
- err = ff_vk_filter_process_simple(&s->vkctx, &s->e, &s->pl, frame, NULL,
-- NULL, &s->opts, sizeof(s->opts));
-+ VK_NULL_HANDLE, &s->opts, sizeof(s->opts));
- if (err < 0) {
- av_frame_free(&frame);
- return err;
diff --git a/media-video/ffmpeg/files/vmaf-models-default-path.patch b/media-video/ffmpeg/files/vmaf-models-default-path.patch
deleted file mode 100644
index a9777e94b7aa..000000000000
--- a/media-video/ffmpeg/files/vmaf-models-default-path.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-Put default path of models to /usr/share/vmaf/model
-
---- a/libavfilter/vf_libvmaf.c
-+++ b/libavfilter/vf_libvmaf.c
-@@ -72,7 +72,7 @@ typedef struct LIBVMAFContext {
- #define FLAGS AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM
-
- static const AVOption libvmaf_options[] = {
-- {"model_path", "Set the model to be used for computing vmaf.", OFFSET(model_path), AV_OPT_TYPE_STRING, {.str="/usr/local/share/model/vmaf_v0.6.1.pkl"}, 0, 1, FLAGS},
-+ {"model_path", "Set the model to be used for computing vmaf.", OFFSET(model_path), AV_OPT_TYPE_STRING, {.str="/usr/share/vmaf/model/vmaf_v0.6.1.json"}, 0, 1, FLAGS},
- {"log_path", "Set the file path to be used to store logs.", OFFSET(log_path), AV_OPT_TYPE_STRING, {.str=NULL}, 0, 1, FLAGS},
- {"log_fmt", "Set the format of the log (xml or json).", OFFSET(log_fmt), AV_OPT_TYPE_STRING, {.str=NULL}, 0, 1, FLAGS},
- {"enable_transform", "Enables transform for computing vmaf.", OFFSET(enable_transform), AV_OPT_TYPE_BOOL, {.i64=0}, 0, 1, FLAGS},
diff --git a/media-video/ffmpeg/metadata.xml b/media-video/ffmpeg/metadata.xml
index 7b259a548f9b..16ef48fc6446 100644
--- a/media-video/ffmpeg/metadata.xml
+++ b/media-video/ffmpeg/metadata.xml
@@ -21,7 +21,6 @@
<flag name="chromaprint">Enable audio fingerprinting support via <pkg>media-libs/chromaprint</pkg></flag>
<flag name="chromium">Builds libffmpeg.so to enable media playback in Chromium-based browsers like Opera and Vivaldi.</flag>
<flag name="codec2">Enable codec2 low bit rate speech codec support via <pkg>media-libs/codec2</pkg></flag>
- <flag name="cpudetection">Enables runtime CPU detection (useful for bindist, compatibility on other CPUs)</flag>
<flag name="cuda">Enable support for various GPU-accelerated filters using NVIDIA PTX compiled with <pkg>llvm-core/clang</pkg></flag>
<flag name="dav1d">Enable AV1 decoding support via <pkg>media-libs/dav1d</pkg></flag>
<flag name="drm">
@@ -46,18 +45,7 @@
Enable using <pkg>net-libs/gnutls</pkg> for TLS/HTTPS support
and other minor functions (has no effect if USE=openssl is set)
</flag>
- <flag name="glslang">Use <pkg>dev-util/glslang</pkg> to compile GLSL</flag>
<flag name="gpl">Enable use of GPL licensed code, should be kept enabled unless LGPL binaries are needed</flag>
- <flag name="hardcoded-tables">
- Use pre-calculated tables rather than calculating them on the fly.
-
- It results in an increase of approximately 15% in the size of libavcodec, the main library impacted by this change.
- It enables savings in table generation time, done once at codec initialization, since by hardcoding the tables,
- they do not need to be computed at runtime. However, the savings are often negligible (~100k cycles is a typical number) especially when amortized
- over the entire encoding/decoding operation.
-
- Improvements are being made to the runtime initialization, and so over time, this option will have an impact on fewer and fewer codecs.
- </flag>
<flag name="iec61883">Enable FireWire DV/HDV input device support via <pkg>media-libs/libiec61883</pkg></flag>
<flag name="kvazaar">Enable H.265/HEVC encoding support via <pkg>media-libs/kvazaar</pkg></flag>
<flag name="lcms">Enable ICC profile support via <pkg>media-libs/lcms</pkg></flag>
@@ -66,7 +54,6 @@
is the reference implementation and is slower than the alternatives)
</flag>
<flag name="libaribb24">Enable ARIB text and caption decoding via <pkg>media-libs/aribb24</pkg></flag>
- <flag name="libdrm">Enables <pkg>x11-libs/libdrm</pkg> support for better screen grabbing and hardware accelerated codecs.</flag>
<flag name="libilbc">Enable internet Low Bitrate Codec de/encoding support via <pkg>media-libs/libilbc</pkg></flag>
<flag name="liblc3">Enable Low Complexity Communication Codec de/encoding support via <pkg>media-sound/liblc3</pkg></flag>
<flag name="libplacebo">Enable use of GPU-accelerated filters from <pkg>media-libs/libplacebo</pkg></flag>
@@ -76,14 +63,7 @@
</flag>
<flag name="libsoxr">Enable use of the audio resampler from <pkg>media-libs/soxr</pkg></flag>
<flag name="libtesseract">Enable Optical Character Recognition (OCR) filter support via <pkg>app-text/tesseract</pkg></flag>
- <flag name="libv4l">Uses <pkg>media-libs/libv4l</pkg> for video4linux instead of direct calls. Adds support for more devices via the userspace library.</flag>
- <flag name="libxml2">Uses <pkg>dev-libs/libxml2</pkg> to enable dash demuxing support.</flag>
<flag name="lv2">Enable use of filters through <pkg>media-libs/lv2</pkg></flag>
- <flag name="mipsdspr1">Enables MIPS DSP ASE R1 optimizations.</flag>
- <flag name="mipsdspr2">Enables MIPS DSP ASE R2 optimizations.</flag>
- <flag name="mipsfpu">Enables floating point MIPS optimizations.</flag>
- <flag name="mmal">Enables Multi-Media Abstraction Layer (MMAL) decoding support: Available e.g. on the Raspberry Pi.</flag>
- <flag name="network">Enables network streaming support</flag>
<flag name="npp">
Enable Nvidia Performance Primitives-based filters via
<pkg>dev-util/nvidia-cuda-toolkit</pkg> (warning: if USE=gpl
@@ -95,7 +75,6 @@
Enable using <pkg>dev-libs/openssl</pkg> for TLS/HTTPS support
and other minor functions (USE=gnutls has no effect if set)
</flag>
- <flag name="pic">Force shared libraries to be built as PIC (this is safer)</flag>
<flag name="postproc">
Enable libpostproc video post processing library support
(should not disable this unless need to disable USE=gpl)