diff --git a/projects/RPi/patches/xbmc/xbmc-001-newclock3.patch b/projects/RPi/patches/xbmc/xbmc-001-newclock3.patch index 480127d3f9..891ba8908b 100644 --- a/projects/RPi/patches/xbmc/xbmc-001-newclock3.patch +++ b/projects/RPi/patches/xbmc/xbmc-001-newclock3.patch @@ -1,7 +1,7 @@ -From c1d1853f2676fe21620c425b31154f76328c0a62 Mon Sep 17 00:00:00 2001 +From d2121ba28b7f06885d5a8533188656039b28e5d5 Mon Sep 17 00:00:00 2001 From: Ben Avison Date: Wed, 11 Dec 2013 17:21:54 +0000 -Subject: [PATCH 01/99] Move the reference-counting of Begin and End calls from +Subject: [PATCH 01/96] Move the reference-counting of Begin and End calls from DX and GL source files into GUIFontTTF.cpp. --- @@ -392,10 +392,10 @@ index c0bb53a..735fb3a 100644 1.9.3 -From 336187530dddcb9c84e4f004b7bca154c39ce19d Mon Sep 17 00:00:00 2001 +From ee2943f3681f2a2023c9383ce5a30a26987d4d7a Mon Sep 17 00:00:00 2001 From: Ben Avison Date: Wed, 11 Dec 2013 18:47:54 +0000 -Subject: [PATCH 02/99] Convert CGUIFontTTFBase::m_vertex to be managed as a +Subject: [PATCH 02/96] Convert CGUIFontTTFBase::m_vertex to be managed as a std::vector. Also retired CGUIFontTTFBase::m_vertex_count and @@ -578,10 +578,10 @@ index 97853fd..b76c6a5 100644 1.9.3 -From 55ce8a11c8aa11ad253dbf8e5583a8af377a2131 Mon Sep 17 00:00:00 2001 +From c54cb2e96f30c0d79420a9ff652ccc33fce71ccf Mon Sep 17 00:00:00 2001 From: Ben Avison Date: Mon, 16 Dec 2013 18:58:12 +0000 -Subject: [PATCH 03/99] CGUIFontTTFBase::RenderCharacter can now append to +Subject: [PATCH 03/96] CGUIFontTTFBase::RenderCharacter can now append to arbitrary vectors of vertices rather than only CGUIFontTTFBase::m_vertex --- @@ -657,10 +657,10 @@ index 10a7060..dde0350 100644 1.9.3 -From ba19fcf5df448324fc403267638b65207a04bce4 Mon Sep 17 00:00:00 2001 +From 4917717ce68ca276c9f9aff2f23f7b8a68a1a927 Mon Sep 17 00:00:00 2001 From: Ben Avison Date: Wed, 15 Jan 2014 17:18:38 +0000 -Subject: [PATCH 04/99] Add a cache of font glyph bounding box vertices. +Subject: [PATCH 04/96] Add a cache of font glyph bounding box vertices. This is implemented as a template because ultimately we will key on different parameters and store values of different types, depending upon whether we @@ -739,7 +739,7 @@ index 137a8cd..15aa46d 100644 E4991321174E5DAD00741B6D /* imagefactory.cpp in Sources */, E4991322174E5DAD00741B6D /* IWindowManagerCallback.cpp in Sources */, diff --git a/project/VS2010Express/XBMC.vcxproj b/project/VS2010Express/XBMC.vcxproj -index 9ee2694..7208542 100644 +index 41af74d..6f50def 100644 --- a/project/VS2010Express/XBMC.vcxproj +++ b/project/VS2010Express/XBMC.vcxproj @@ -426,6 +426,7 @@ @@ -1430,10 +1430,10 @@ index f351c99..9036ba9 100644 1.9.3 -From d58c6b187e77401f46855f6185d198b00e39a488 Mon Sep 17 00:00:00 2001 +From 6b2133e143b65a3014bacc40b4fb7f89c7769678 Mon Sep 17 00:00:00 2001 From: Ben Avison Date: Thu, 23 Jan 2014 22:24:17 +0000 -Subject: [PATCH 05/99] Lay the groundwork for hardware clipping. +Subject: [PATCH 05/96] Lay the groundwork for hardware clipping. For glScissor() to replace CGraphicContext::ClipRect, a necessary condition is that no shear or rotation is introduced between the coordinate systems @@ -1698,10 +1698,10 @@ index 98e398a..81ee49e 100644 1.9.3 -From 3424a50db35b53cf86a67734a923cda2b2faad0b Mon Sep 17 00:00:00 2001 +From 90e76c57ce1799ecfadf188ba83b99b19269fc18 Mon Sep 17 00:00:00 2001 From: Ben Avison Date: Thu, 23 Jan 2014 16:42:22 +0000 -Subject: [PATCH 06/99] Increase font cache hit rate by keying on the +Subject: [PATCH 06/96] Increase font cache hit rate by keying on the fractional part of m_originX and m_originY *after* they have been through the graphics context's transformation matrix, plus the scale/rotation elements of the matrix, rather than the origin in the original frame of reference plus @@ -1905,10 +1905,10 @@ index 77111bc..39bfa52 100644 1.9.3 -From cd59927bb82659956650f9d8b929f4587a776133 Mon Sep 17 00:00:00 2001 +From eb873d30d3539bed1f08e9119a642044f8c7daed Mon Sep 17 00:00:00 2001 From: Ben Avison Date: Wed, 8 Jan 2014 12:16:33 +0000 -Subject: [PATCH 07/99] Rewrite of scrolling text code. +Subject: [PATCH 07/96] Rewrite of scrolling text code. No longer shuffles the string round to minimise the number of characters before the clipping rectangle; this doesn't save much on rendering time but @@ -2198,7 +2198,7 @@ index 8d985cf..a8e20fc 100644 } CGUIControl::Render(); diff --git a/xbmc/utils/RssReader.cpp b/xbmc/utils/RssReader.cpp -index 3636c3e..ac066ee 100644 +index 5383156..41f9bc2 100644 --- a/xbmc/utils/RssReader.cpp +++ b/xbmc/utils/RssReader.cpp @@ -55,7 +55,7 @@ CRssReader::CRssReader() : CThread("RSSReader") @@ -2227,10 +2227,10 @@ index 2cda726..fbc579e 100644 1.9.3 -From 05ce888df8828b2dd3ca2459dcf83e84d94777b6 Mon Sep 17 00:00:00 2001 +From 4eb928a95b0801dfd3bfaf9e87cd8f84fcf943ca Mon Sep 17 00:00:00 2001 From: Ben Avison Date: Mon, 27 Jan 2014 23:21:10 +0000 -Subject: [PATCH 08/99] Move the application of the translation offsets into +Subject: [PATCH 08/96] Move the application of the translation offsets into the GLES code. Still all pure software at this stage. Main change is in the data types at @@ -2427,10 +2427,10 @@ index 9935ea4..18c9358 100644 1.9.3 -From 1a5fc663da29146c6e11764aff1c99e0fb0c3fd4 Mon Sep 17 00:00:00 2001 +From 47cd619aade93c148853fd462a7ce93958306656 Mon Sep 17 00:00:00 2001 From: Ben Avison Date: Wed, 15 Jan 2014 15:28:06 +0000 -Subject: [PATCH 09/99] Rather than applying the translation offsets to the +Subject: [PATCH 09/96] Rather than applying the translation offsets to the vertices, now applies them to the model view matrix from the top of the matrix stack and pushes it over to OpenGL. The vertices themselves are still all held client-side. @@ -2577,10 +2577,10 @@ index 81ee49e..d2f9cd1 100644 1.9.3 -From 851167c3a56064b82e0b431fd326af7ca5d0b88f Mon Sep 17 00:00:00 2001 +From 4b35b86a4c8cc116af48aca9656930b463338e3f Mon Sep 17 00:00:00 2001 From: Ben Avison Date: Wed, 29 Jan 2014 13:21:19 +0000 -Subject: [PATCH 10/99] Enable hardware clipping. +Subject: [PATCH 10/96] Enable hardware clipping. --- xbmc/guilib/GUIFontTTF.cpp | 4 ++-- @@ -2656,10 +2656,10 @@ index ea08bf4..b63e337 100644 1.9.3 -From 7a0931a8e33a9386ab2e2a0beacf2c939d64a0e2 Mon Sep 17 00:00:00 2001 +From f75e7707f0d49ec2d07cbaa05a4f1c2ea2e05a2d Mon Sep 17 00:00:00 2001 From: Ben Avison Date: Wed, 15 Jan 2014 15:32:51 +0000 -Subject: [PATCH 11/99] Move the vertex data across to a vertex buffer object +Subject: [PATCH 11/96] Move the vertex data across to a vertex buffer object just prior to drawing. --- @@ -2713,10 +2713,10 @@ index b63e337..b00055d 100644 1.9.3 -From 8366fd3f6c9169c6c7de4f0a25a26fe2d40bf476 Mon Sep 17 00:00:00 2001 +From 74aa9f01cd0e8aeebe55cb445371f72969558a0b Mon Sep 17 00:00:00 2001 From: Ben Avison Date: Wed, 15 Jan 2014 16:04:04 +0000 -Subject: [PATCH 12/99] Move vertex data into an OpenGL VBO when the font cache +Subject: [PATCH 12/96] Move vertex data into an OpenGL VBO when the font cache entry is populated. The font cache now stores the "name" (handle) of the VBO, rather than a vector @@ -2992,10 +2992,10 @@ index 735fb3a..6102c90 100644 1.9.3 -From 3155d94b6163e8f9b5158721ae78e9af40b92ed0 Mon Sep 17 00:00:00 2001 +From c8c065a5da2d01cfe374d3332d03525d5ad837fa Mon Sep 17 00:00:00 2001 From: Ben Avison Date: Thu, 16 Jan 2014 16:29:42 +0000 -Subject: [PATCH 13/99] Switch from glDrawArrays() to glDrawElements(). +Subject: [PATCH 13/96] Switch from glDrawArrays() to glDrawElements(). This involves setting up a static VBO containing the indexes necessary to convert from quads to triangles on the fly in the GPU. @@ -3219,10 +3219,10 @@ index 6de3532..258a293 100644 1.9.3 -From 5c5d8889a0feb1914a4dfb7435df56a81e2ac887 Mon Sep 17 00:00:00 2001 +From c83be3bd099526f034b0f494fbf8e9531a324d1d Mon Sep 17 00:00:00 2001 From: popcornmix Date: Fri, 10 Jan 2014 12:10:43 +0000 -Subject: [PATCH 14/99] [rbp] Don't override dvdplayer with omxplayer. +Subject: [PATCH 14/96] [rbp] Don't override dvdplayer with omxplayer. Using dvdplayer can be useful on the Pi. We can actually play sd (up to 640x480 MPEG-4 video) video in real time. This is useful for codec variants like DivX3 which we don't currently play. @@ -3255,10 +3255,10 @@ index 9524f94..2789bd8 100644 1.9.3 -From 0f194812cc12c1ef74845f2512174ca138cf4674 Mon Sep 17 00:00:00 2001 +From cb93e3b0da270e0969ec4638df42d3dbd1fdd0c1 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Fri, 10 Jan 2014 15:37:41 +0000 -Subject: [PATCH 15/99] [players] Use default players rather than hard coded +Subject: [PATCH 15/96] [players] Use default players rather than hard coded DVDPlayer/PAPlayer --- @@ -3317,10 +3317,10 @@ index 57dfcdd..7be9799 100644 1.9.3 -From 49897fff3b04a7ac092e874a55c26476bf915143 Mon Sep 17 00:00:00 2001 +From ef23e3a4e9cc8cd3a3828aa25dbef283729eae1e Mon Sep 17 00:00:00 2001 From: popcornmix Date: Sat, 11 Jan 2014 18:23:42 +0000 -Subject: [PATCH 16/99] [rbp] Don't force dvdplayer for airplay +Subject: [PATCH 16/96] [rbp] Don't force dvdplayer for airplay --- xbmc/network/AirPlayServer.cpp | 2 ++ @@ -3346,10 +3346,10 @@ index 80ea552..497898f 100644 1.9.3 -From 9e7232aeed1265d898b016dee2ec1198c1d12c1a Mon Sep 17 00:00:00 2001 +From 2b72d4c88abdb60a57fa12c852a2b1ce6a77314a Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 13 Jan 2014 13:11:06 +0000 -Subject: [PATCH 17/99] [rbp] Give plugins omxplayer when they request +Subject: [PATCH 17/96] [rbp] Give plugins omxplayer when they request dvdplayer on pi --- @@ -3376,10 +3376,10 @@ index dfdca99..2a819ef 100644 1.9.3 -From 66715e35594eb121f33df1e4793ed7497ed53284 Mon Sep 17 00:00:00 2001 +From e4e11daf26a79a9b74b393ae3c4b8c40933b60b8 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 14 Jan 2014 18:04:07 +0000 -Subject: [PATCH 18/99] [rbp] Allow ALSA to be chosen in addition to Pi sink +Subject: [PATCH 18/96] [rbp] Allow ALSA to be chosen in addition to Pi sink Needs --enable-alsa in ./configure step and alsa support on platform --- @@ -3389,10 +3389,10 @@ Needs --enable-alsa in ./configure step and alsa support on platform 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/configure.in b/configure.in -index 83687bb..43e1f82 100644 +index ce82cd4..02306df 100644 --- a/configure.in +++ b/configure.in -@@ -693,7 +693,6 @@ case $use_platform in +@@ -695,7 +695,6 @@ case $use_platform in use_arch="arm" use_cpu=arm1176jzf-s use_hardcoded_tables="yes" @@ -3470,10 +3470,10 @@ index e42d973..715b4f1 100644 1.9.3 -From 0999497d6452e83ab5e708d871b5ee2d4866a68a Mon Sep 17 00:00:00 2001 +From 6e44fa59c000735643fa40c038bac2016a367b87 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Thu, 16 Jan 2014 01:39:29 +0000 -Subject: [PATCH 19/99] [omxcodec] Add hardware decode to dvdplayer for Pi +Subject: [PATCH 19/96] [omxcodec] Add hardware decode to dvdplayer for Pi Hijack the abandoned OpenMaxVideo codec --- @@ -3495,10 +3495,10 @@ Hijack the abandoned OpenMaxVideo codec 15 files changed, 894 insertions(+), 1099 deletions(-) diff --git a/configure.in b/configure.in -index 43e1f82..fb73c5f 100644 +index 02306df..00abb63 100644 --- a/configure.in +++ b/configure.in -@@ -1925,9 +1925,24 @@ if test "$host_vendor" = "apple" ; then +@@ -1929,9 +1929,24 @@ if test "$host_vendor" = "apple" ; then USE_OPENMAX=0 AC_MSG_NOTICE($openmax_disabled) elif test "$target_platform" = "target_raspberry_pi"; then @@ -5953,7 +5953,7 @@ index e06c41d..9079c13 100644 // defined(HAVE_LIBOPENMAX) diff --git a/xbmc/cores/dvdplayer/DVDPlayer.cpp b/xbmc/cores/dvdplayer/DVDPlayer.cpp -index 4f85e2a..adbc312 100644 +index 93df78c..49d5948 100644 --- a/xbmc/cores/dvdplayer/DVDPlayer.cpp +++ b/xbmc/cores/dvdplayer/DVDPlayer.cpp @@ -2968,7 +2968,9 @@ bool CDVDPlayer::OpenVideoStream(CDVDStreamInfo& hint, bool reset) @@ -6128,10 +6128,10 @@ index 1efb313..b4c8626 100644 1.9.3 -From c95085d8a9875edb51081787641fb3abb56d7b0e Mon Sep 17 00:00:00 2001 +From a74bceb3415ba76292e90e031d6f3b9078baf0ef Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 20 Jan 2014 16:03:40 +0000 -Subject: [PATCH 20/99] [omxcodec] Enable for dvd menus +Subject: [PATCH 20/96] [omxcodec] Enable for dvd menus --- xbmc/cores/dvdplayer/DVDCodecs/DVDFactoryCodec.cpp | 4 ++++ @@ -6156,10 +6156,10 @@ index d58067c..f3fd3e2 100644 1.9.3 -From 70e31ee44d902739bd25f31c25c4f6211932ad68 Mon Sep 17 00:00:00 2001 +From 42b3309edcfffdbd8e2cf23c54637b7be1aa3a72 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 3 Feb 2014 22:27:44 +0000 -Subject: [PATCH 21/99] [omxcodec] Add omx specific texture +Subject: [PATCH 21/96] [omxcodec] Add omx specific texture create/upload/delete functions --- @@ -6237,10 +6237,10 @@ index 5a6a2be..52df291 100644 1.9.3 -From 6e0a43ebc430fe18fc0f0956aa9703792db5e425 Mon Sep 17 00:00:00 2001 +From 4895cd2d4cec2c04db9ff98683a3e9fcb1447a20 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 3 Feb 2014 22:50:43 +0000 -Subject: [PATCH 22/99] [omxcodec] Add shared pointer to delay shutdown of +Subject: [PATCH 22/96] [omxcodec] Add shared pointer to delay shutdown of codec until buffers are returned --- @@ -6421,10 +6421,10 @@ index 9079c13..0975e8a 100644 1.9.3 -From fd4617eec60aedd955a92de9f10bff68d85ec730 Mon Sep 17 00:00:00 2001 +From 4df98c1fe2d2f67429aeda29e0dd844fe68e271d Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 3 Feb 2014 23:11:31 +0000 -Subject: [PATCH 23/99] [omxcodec] Fix for aspect ratio in non-square pixel +Subject: [PATCH 23/96] [omxcodec] Fix for aspect ratio in non-square pixel modes --- @@ -6513,10 +6513,10 @@ index 0975e8a..9138a20 100644 1.9.3 -From 958aa93e74eaddb4a36a090febd53ef11ac1530e Mon Sep 17 00:00:00 2001 +From 16e71dce7ab7e54d0737da0f0476ac0aedd4aaa6 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 3 Feb 2014 23:19:22 +0000 -Subject: [PATCH 24/99] [omxcodec] Report error when codec not enabled +Subject: [PATCH 24/96] [omxcodec] Report error when codec not enabled --- xbmc/cores/dvdplayer/DVDCodecs/Video/OpenMaxVideo.cpp | 10 +++++++++- @@ -6561,10 +6561,10 @@ index 7e23c87..2ae722b 100644 1.9.3 -From cb0c54b0740722ecb04170b4dd5cf4979e45cd68 Mon Sep 17 00:00:00 2001 +From 9b5eb28227cf9392bedee48c7fbf05544386086b Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 4 Feb 2014 17:29:37 +0000 -Subject: [PATCH 25/99] [omxcodec] Add deinterlace support +Subject: [PATCH 25/96] [omxcodec] Add deinterlace support --- xbmc/cores/VideoRenderers/LinuxRendererGLES.cpp | 2 +- @@ -6801,10 +6801,10 @@ index 9138a20..c8ad4d8 100644 1.9.3 -From e6cc3100344927e13a5be2050d59f675636542ef Mon Sep 17 00:00:00 2001 +From b9496c96d6edb6a0d5fad13db0076ade3ec52c8e Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 5 Feb 2014 11:46:33 +0000 -Subject: [PATCH 26/99] [rbp/settings] Allow av sync type to be enabled +Subject: [PATCH 26/96] [rbp/settings] Allow av sync type to be enabled It works for dvdplayer --- @@ -6833,10 +6833,10 @@ index 2b7d0a6..1429256 100644 1.9.3 -From f327c953cc9d77c4f02a01bca3d5e7ad9e2c041e Mon Sep 17 00:00:00 2001 +From 5f3c1cdf6d1c20648a699cd80da8c09d88169a52 Mon Sep 17 00:00:00 2001 From: Ben Avison Date: Thu, 1 May 2014 16:28:39 +0100 -Subject: [PATCH 27/99] Improved file buffering in CArchive +Subject: [PATCH 27/96] Improved file buffering in CArchive Even though memcpy is typically inlined by the compiler into byte/word loads and stores (at least for release builds), the frequency with which 1, 2 and 4 @@ -6899,10 +6899,10 @@ index 6ed0f8f..8506d95 100644 1.9.3 -From 673af4509532521db5b4dc739906d03e849d984e Mon Sep 17 00:00:00 2001 +From cd0056264da4ea5ff2dcdc6f1675585c96d20d0e Mon Sep 17 00:00:00 2001 From: popcornmix Date: Sun, 16 Feb 2014 17:38:05 +0000 -Subject: [PATCH 28/99] [omxcodec] Only do essential calls in texture thread +Subject: [PATCH 28/96] [omxcodec] Only do essential calls in texture thread [omxcodec] Fix for files with no valid pts values. [omxcodec] Fix stall on seek/trickplay - need to reset start flag [omxcodec] Make sure we have a valid context when video decode starts before first fanart is decoded @@ -7252,10 +7252,10 @@ index c8ad4d8..f234f6d 100644 1.9.3 -From b31370c5583dcee46d5fd5fae1abfcd1c88036a6 Mon Sep 17 00:00:00 2001 +From dc94f76254be42735ab2fad0ba3df6cb2896c0e4 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Sat, 8 Mar 2014 15:36:06 +0000 -Subject: [PATCH 29/99] [hifiberry] Hack: force it to be recognised as IEC958 +Subject: [PATCH 29/96] [hifiberry] Hack: force it to be recognised as IEC958 capable to enable passthrough options --- @@ -7281,17 +7281,17 @@ index 8dee4bc..cc79e80 100644 1.9.3 -From 4f93a32a7c009500cfaa33c4c1591047418c61d0 Mon Sep 17 00:00:00 2001 +From 6c9a339a4c67356d3f740c3183ecbf5201219758 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 11 Mar 2014 18:50:23 +0000 -Subject: [PATCH 30/99] [dvdplayer] Use inexact seeking like omxplayer +Subject: [PATCH 30/96] [dvdplayer] Use inexact seeking like omxplayer --- xbmc/cores/dvdplayer/DVDPlayer.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/xbmc/cores/dvdplayer/DVDPlayer.cpp b/xbmc/cores/dvdplayer/DVDPlayer.cpp -index adbc312..dc0d6b2 100644 +index 49d5948..6198498 100644 --- a/xbmc/cores/dvdplayer/DVDPlayer.cpp +++ b/xbmc/cores/dvdplayer/DVDPlayer.cpp @@ -1887,7 +1887,11 @@ void CDVDPlayer::CheckAutoSceneSkip() @@ -7335,10 +7335,10 @@ index adbc312..dc0d6b2 100644 1.9.3 -From d5e9b2aa6486c6f15aae439bcdb74b54d114c3d5 Mon Sep 17 00:00:00 2001 +From c6a8c45f2e33c4796ba01a11332db1f7729560c5 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 7 Apr 2014 18:19:32 +0100 -Subject: [PATCH 31/99] [rbp/omxplayer] When opening a stream don't try to +Subject: [PATCH 31/96] [rbp/omxplayer] When opening a stream don't try to update gui so often --- @@ -7365,10 +7365,10 @@ index e9ba7d3..0fdc3c2 100644 1.9.3 -From 543cb5fce2846f4822160189d792d09edff8fffa Mon Sep 17 00:00:00 2001 +From 3751b328369eccad9b1a744ea0e779b3c9949eb8 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 7 Apr 2014 15:28:57 +0100 -Subject: [PATCH 32/99] [omxcodec] Clamp video texture at edges to avoid image +Subject: [PATCH 32/96] [omxcodec] Clamp video texture at edges to avoid image wrapping --- @@ -7392,10 +7392,10 @@ index 51f56aa..2929a37 100644 1.9.3 -From 3aaea5bd52ed3554771f6f14efbd8ddbebf6d845 Mon Sep 17 00:00:00 2001 +From 40cdfc39a5978dce7923d6039a74e9eb8e0d8c34 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Sun, 30 Mar 2014 15:54:34 +0100 -Subject: [PATCH 33/99] [omxplayer] Make the sharpness control act as a +Subject: [PATCH 33/96] [omxplayer] Make the sharpness control act as a sharpness control. This fixes scaling kernel as Mitchell Netravali, and varies sharpness over range B=[5/3,0] C=[-1/3,1/2] @@ -7404,7 +7404,7 @@ This fixes scaling kernel as Mitchell Netravali, and varies sharpness over range 1 file changed, 338 insertions(+) diff --git a/xbmc/cores/omxplayer/OMXPlayer.cpp b/xbmc/cores/omxplayer/OMXPlayer.cpp -index ab651b9..9fcfa23 100644 +index 29ea4ae..49c82e4 100644 --- a/xbmc/cores/omxplayer/OMXPlayer.cpp +++ b/xbmc/cores/omxplayer/OMXPlayer.cpp @@ -1042,6 +1042,334 @@ bool COMXPlayer::IsBetterStream(COMXCurrentStream& current, CDemuxStream* stream @@ -7765,7 +7765,7 @@ index ab651b9..9fcfa23 100644 m_video_fifo = (int)(100.0*(m_omxPlayerVideo.GetDecoderBufferSize()-m_omxPlayerVideo.GetDecoderFreeSpace())/m_omxPlayerVideo.GetDecoderBufferSize()); m_audio_fifo = (int)(100.0*audio_fifo/m_omxPlayerAudio.GetCacheTotal()); -@@ -4553,6 +4890,7 @@ void COMXPlayer::GetRenderFeatures(std::vector &renderFeatures) +@@ -4552,6 +4889,7 @@ void COMXPlayer::GetRenderFeatures(std::vector &renderFeatures) renderFeatures.push_back(RENDERFEATURE_CROP); renderFeatures.push_back(RENDERFEATURE_PIXEL_RATIO); renderFeatures.push_back(RENDERFEATURE_ZOOM); @@ -7777,10 +7777,10 @@ index ab651b9..9fcfa23 100644 1.9.3 -From 0d430b13c0052b9409c6de656667000d1011feba Mon Sep 17 00:00:00 2001 +From d1bd1f1e75e7ab45cfddfabf55fdc6ea774c484d Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 16 Apr 2014 21:18:06 +0100 -Subject: [PATCH 34/99] [omxplayer] Don't propagate 3d flags based on supported +Subject: [PATCH 34/96] [omxplayer] Don't propagate 3d flags based on supported 3d modes --- @@ -7836,10 +7836,10 @@ index af439e7..77dad37 100644 1.9.3 -From 1e9ed1c6954c05d18da107fc8c500a0e685cb4b1 Mon Sep 17 00:00:00 2001 +From 5326864f88b3ab1140987681d68efa10a2d02930 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Thu, 17 Apr 2014 13:00:52 +0100 -Subject: [PATCH 35/99] [graphics] Don't set stereo mode based on resolution +Subject: [PATCH 35/96] [graphics] Don't set stereo mode based on resolution The resolution change should follow stereo mode --- @@ -7883,10 +7883,10 @@ index 5bffdf5..7e4fdd4 100644 1.9.3 -From 293fc1887aa64325e7cf8a6dc3a8c8444ddedcfe Mon Sep 17 00:00:00 2001 +From ea1869e7f4fcdba26dddafad47ecbe3dd5ad0f68 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Thu, 17 Apr 2014 13:01:51 +0100 -Subject: [PATCH 36/99] [graphics] Allow switching to a more suitable 3D +Subject: [PATCH 36/96] [graphics] Allow switching to a more suitable 3D resolution --- @@ -7976,10 +7976,10 @@ index 0a27643..df55e92 100644 1.9.3 -From 084fc70894c4da7fb38a67c7be84faa04570102e Mon Sep 17 00:00:00 2001 +From 5f1fdb44ba52842a1e91dd42ae98c0d435beea53 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Thu, 17 Apr 2014 13:38:55 +0100 -Subject: [PATCH 37/99] [3D] Support switching to 3D resolutions +Subject: [PATCH 37/96] [3D] Support switching to 3D resolutions Include matching 3D flags (SBS/TAB) in the score of a resolution to switch to, to enable switching to 3d modes. Also remove the old code that treated 3D modes differently when assigning a score. @@ -8064,10 +8064,10 @@ index 83c3adb..8076e76 100644 1.9.3 -From d4bde73fbf844088d448dcd067e656e12267c6e3 Mon Sep 17 00:00:00 2001 +From e076e8dee1a9fa9267de264ec80abc35ed1a84e8 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 23 Apr 2014 00:05:07 +0100 -Subject: [PATCH 38/99] [graphics] Make pixel ratio for 3d modes consistent +Subject: [PATCH 38/96] [graphics] Make pixel ratio for 3d modes consistent Note: Use the stored stereo flags from lists of resolutions. Use current stereo mode for current resolution. @@ -8216,7 +8216,7 @@ index df55e92..c77f2ff 100644 /* \brief Get UI scaling information from a given resolution to the screen resolution. Takes account of overscan and UI zooming. diff --git a/xbmc/windowing/egl/EGLNativeTypeRaspberryPI.cpp b/xbmc/windowing/egl/EGLNativeTypeRaspberryPI.cpp -index 90b57e1..5b26b20 100644 +index a9c51ca..a3edf0e 100644 --- a/xbmc/windowing/egl/EGLNativeTypeRaspberryPI.cpp +++ b/xbmc/windowing/egl/EGLNativeTypeRaspberryPI.cpp @@ -448,15 +448,9 @@ bool CEGLNativeTypeRaspberryPI::ProbeResolutions(std::vector &r @@ -8235,30 +8235,30 @@ index 90b57e1..5b26b20 100644 HDMI_PROPERTY_PARAM_T property; property.property = HDMI_PROPERTY_PIXEL_CLOCK_TYPE; vc_tv_hdmi_get_property(&property); -@@ -602,7 +596,6 @@ void CEGLNativeTypeRaspberryPI::GetSupportedModes(HDMI_RES_GROUP_T group, std::v +@@ -599,7 +593,6 @@ void CEGLNativeTypeRaspberryPI::GetSupportedModes(HDMI_RES_GROUP_T group, std::v RESOLUTION_INFO res2 = res; res2.dwFlags |= D3DPRESENTFLAG_MODE3DSBS; res2.fPixelRatio = get_display_aspect_ratio((HDMI_ASPECT_T)tv->aspect_ratio) / ((float)res2.iScreenWidth / (float)res2.iScreenHeight); - res2.fPixelRatio *= 2.0f; - CLog::Log(LOGDEBUG, "EGL mode %d: %s (%.2f)\n", i, res2.strMode.c_str(), res2.fPixelRatio); - res2.iSubtitles = (int)(0.965 * res2.iHeight); -@@ -619,7 +612,6 @@ void CEGLNativeTypeRaspberryPI::GetSupportedModes(HDMI_RES_GROUP_T group, std::v + + AddUniqueResolution(res2, resolutions); +@@ -615,7 +608,6 @@ void CEGLNativeTypeRaspberryPI::GetSupportedModes(HDMI_RES_GROUP_T group, std::v RESOLUTION_INFO res2 = res; res2.dwFlags |= D3DPRESENTFLAG_MODE3DTB; res2.fPixelRatio = get_display_aspect_ratio((HDMI_ASPECT_T)tv->aspect_ratio) / ((float)res2.iScreenWidth / (float)res2.iScreenHeight); - res2.fPixelRatio *= 0.5f; - CLog::Log(LOGDEBUG, "EGL mode %d: %s (%.2f)\n", i, res2.strMode.c_str(), res2.fPixelRatio); - res2.iSubtitles = (int)(0.965 * res2.iHeight); + + AddUniqueResolution(res2, resolutions); -- 1.9.3 -From e75402b7fdbdc4c7037f4fdfd542bba048501350 Mon Sep 17 00:00:00 2001 +From 20d7fdefdce70b52bb3bc46416240dc98225c2a7 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 23 Apr 2014 21:07:51 +0100 -Subject: [PATCH 39/99] [PiSink] More attempts to reduce underrun audio +Subject: [PATCH 39/96] [PiSink] More attempts to reduce underrun audio glitches with multichannl and high samplerate --- @@ -8381,10 +8381,10 @@ index 19a9411..0a09275 100644 1.9.3 -From ec1b483946a1d269ba36933b62aa8e61318d987c Mon Sep 17 00:00:00 2001 +From 26cbc10ebc45ee423eafd305ba9dea7f2cade657 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 22 Apr 2014 12:23:23 +0100 -Subject: [PATCH 40/99] [omxplayer] Make dvdplayer the default for dvd images +Subject: [PATCH 40/96] [omxplayer] Make dvdplayer the default for dvd images --- xbmc/cores/omxplayer/omxplayer_advancedsettings.xml | 2 +- @@ -8406,10 +8406,10 @@ index 77c6a15..51c0daf 100644 1.9.3 -From 8b8c3a1f2fb66b2b849c75492d117513106aaa9c Mon Sep 17 00:00:00 2001 +From 8cd7839f381229d205d038a1e0a421787dd63ad3 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Sat, 26 Apr 2014 17:27:52 +0100 -Subject: [PATCH 41/99] [cec] Don't suspend pi on tv switch off - it can't wake +Subject: [PATCH 41/96] [cec] Don't suspend pi on tv switch off - it can't wake up --- @@ -8433,10 +8433,10 @@ index a906628..9b5271a 100644 1.9.3 -From c5b85f1ce7154626cff40645f813e77e2b547fab Mon Sep 17 00:00:00 2001 +From 7f24214a6d87592f00a4e79eb28e8776b01f4d6f Mon Sep 17 00:00:00 2001 From: popcornmix Date: Thu, 27 Jun 2013 01:25:57 +0100 -Subject: [PATCH 43/99] [rbp/omxplayer] Do we need discontinuity handling? +Subject: [PATCH 43/96] [rbp/omxplayer] Do we need discontinuity handling? So far I've not seen what this is needed for and it does cause problems for some files. --- @@ -8444,7 +8444,7 @@ So far I've not seen what this is needed for and it does cause problems for some 1 file changed, 1 insertion(+) diff --git a/xbmc/cores/omxplayer/OMXPlayer.cpp b/xbmc/cores/omxplayer/OMXPlayer.cpp -index 9fcfa23..030d7b6 100644 +index 49c82e4..13284d1 100644 --- a/xbmc/cores/omxplayer/OMXPlayer.cpp +++ b/xbmc/cores/omxplayer/OMXPlayer.cpp @@ -2382,6 +2382,7 @@ static void UpdateLimits(double& minimum, double& maximum, double dts) @@ -8459,10 +8459,10 @@ index 9fcfa23..030d7b6 100644 1.9.3 -From 7cfce548f1e59cbace180692e4dec5f19214801e Mon Sep 17 00:00:00 2001 +From 72c21756bd6ddbc68238f8afe5560a525686fad6 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Thu, 24 Oct 2013 00:53:26 +0100 -Subject: [PATCH 44/99] [rbp/omxplayer] Avoid marking non-monotonic timestamps +Subject: [PATCH 44/96] [rbp/omxplayer] Avoid marking non-monotonic timestamps as unknown Following a single spurious timestamp that is in the future, @@ -8504,11 +8504,10 @@ index 77731a9..5f9d028 100644 1.9.3 - -From a503852a52721d5cc0dac3a4f5dffd4886087294 Mon Sep 17 00:00:00 2001 +From c7047bcd2ae474576f11a8e44481497aa81d5cd0 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Fri, 13 Dec 2013 16:25:23 +0000 -Subject: [PATCH 46/99] Add time taken to resample to log +Subject: [PATCH 46/96] Add time taken to resample to log --- xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp | 7 +++++++ @@ -8516,10 +8515,10 @@ Subject: [PATCH 46/99] Add time taken to resample to log 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp -index d6a18f5..65a0756 100644 +index fe5e893..08346d2 100644 --- a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp +++ b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp -@@ -2647,7 +2647,14 @@ void CActiveAE::ResampleSounds() +@@ -2648,7 +2648,14 @@ void CActiveAE::ResampleSounds() { if (!(*it)->IsConverted()) { @@ -8552,10 +8551,10 @@ index 01aafe3..5ab83a2 100644 1.9.3 -From 789d5b5fa3f90d4a0b477cf8cba81473734107d1 Mon Sep 17 00:00:00 2001 +From f26442e9d58dd8d4c32d93416ae028c9e4099afa Mon Sep 17 00:00:00 2001 From: popcornmix Date: Sat, 14 Dec 2013 16:55:05 +0000 -Subject: [PATCH 47/99] logging: Add microsecond timer to log messages +Subject: [PATCH 47/96] logging: Add microsecond timer to log messages --- xbmc/utils/log.cpp | 12 +++++++++--- @@ -8616,10 +8615,10 @@ index dd6ef26..8edf2fd 100644 1.9.3 -From 6f03e6732cf7a560dd342ead48ea81363817f99d Mon Sep 17 00:00:00 2001 +From 3c92b7531b5194a284f3a528c46fc69d8aff12ef Mon Sep 17 00:00:00 2001 From: Jonathan Marshall Date: Sat, 2 Nov 2013 23:49:17 +1300 -Subject: [PATCH 48/99] adds GetTvShowSeasons +Subject: [PATCH 48/96] adds GetTvShowSeasons --- xbmc/video/VideoDatabase.cpp | 30 ++++++++++++++++++++++++------ @@ -8698,10 +8697,10 @@ index 492eebb..f6026c2 100644 1.9.3 -From 0daa19069981aa0fa60cc03cad74465b120ca152 Mon Sep 17 00:00:00 2001 +From c86fb34c7cc34de9c68e3d7f9fb8be0acdfcb922 Mon Sep 17 00:00:00 2001 From: Jonathan Marshall Date: Sat, 2 Nov 2013 23:50:10 +1300 -Subject: [PATCH 49/99] move AddSeason() public. +Subject: [PATCH 49/96] move AddSeason() public. --- xbmc/video/VideoDatabase.h | 2 +- @@ -8731,10 +8730,10 @@ index f6026c2..a7acea3 100644 1.9.3 -From 295a279646f63c880570a6edd282e29b099f1c95 Mon Sep 17 00:00:00 2001 +From 3151599efa7da405564ff0d20f607e7f980363bc Mon Sep 17 00:00:00 2001 From: Jonathan Marshall Date: Sat, 2 Nov 2013 23:48:24 +1300 -Subject: [PATCH 50/99] adds GetArt function to (video) scraper, allowing art +Subject: [PATCH 50/96] adds GetArt function to (video) scraper, allowing art to be fetched given the video identifier. --- @@ -8852,10 +8851,10 @@ index 22ac229..75bc341 100644 1.9.3 -From 36c7b7aee6007665a45667839c0857a69f4c23dd Mon Sep 17 00:00:00 2001 +From 7a91a4dee427c37265bd8ef2d0ecc800b498631a Mon Sep 17 00:00:00 2001 From: Jonathan Marshall Date: Sat, 2 Nov 2013 23:53:14 +1300 -Subject: [PATCH 51/99] refresh season art if a new season is found that isn't +Subject: [PATCH 51/96] refresh season art if a new season is found that isn't recorded in the database yet. Fixes #14339 --- @@ -8962,10 +8961,10 @@ index 7da1bf2..c764e20 100644 1.9.3 -From 7023dcb9c045af7916b7ddf11cab9ff5f11d262c Mon Sep 17 00:00:00 2001 +From 506acd133473c2266aa80d9b6fd5edcd2431e9e9 Mon Sep 17 00:00:00 2001 From: Jonathan Marshall Date: Sat, 2 Nov 2013 23:53:34 +1300 -Subject: [PATCH 52/99] REMOVEME: updated thetvdb.com scraper to support art +Subject: [PATCH 52/96] REMOVEME: updated thetvdb.com scraper to support art updates --- @@ -9076,10 +9075,10 @@ index 39e604d..60a0e96 100644 1.9.3 -From 9a8011041d2b0b17aac4b23155136daaeb4a684b Mon Sep 17 00:00:00 2001 +From 14a9a98eacad9fff8413e654ff1d0b4443cb6302 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Sat, 22 Mar 2014 16:40:01 +0000 -Subject: [PATCH 53/99] Enable PYTHONOPTIMIZE for Pi +Subject: [PATCH 53/96] Enable PYTHONOPTIMIZE for Pi --- xbmc/interfaces/python/XBPython.cpp | 4 ++++ @@ -9104,10 +9103,10 @@ index 099c042..95caaa0 100644 1.9.3 -From 8c41eb9ed90a3959021d8f9e5da5f88f873f3ab4 Mon Sep 17 00:00:00 2001 +From ea3009d7804821c13400944b0292aa939dd7a80b Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 28 Apr 2014 18:07:45 +0100 -Subject: [PATCH 54/99] [rpi] Make ActiveAE thread higher priority to make +Subject: [PATCH 54/96] [rpi] Make ActiveAE thread higher priority to make audio underrun less likely --- @@ -9115,10 +9114,10 @@ Subject: [PATCH 54/99] [rpi] Make ActiveAE thread higher priority to make 1 file changed, 6 insertions(+) diff --git a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp -index 65a0756..c022b5c 100644 +index 08346d2..e302098 100644 --- a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp +++ b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp -@@ -2168,6 +2168,12 @@ void CActiveAE::LoadSettings() +@@ -2169,6 +2169,12 @@ void CActiveAE::LoadSettings() bool CActiveAE::Initialize() { Create(); @@ -9135,46 +9134,999 @@ index 65a0756..c022b5c 100644 1.9.3 -From ce6b738cc6adcb7c1ad3afdb424e2bb9030c36a4 Mon Sep 17 00:00:00 2001 +From 2868b25ce52b71614d5d8019dd91e9362b8dc9c5 Mon Sep 17 00:00:00 2001 From: popcornmix -Date: Sun, 11 May 2014 16:13:45 +0100 -Subject: [PATCH 57/99] [rbp] Add config.txt settings to log file +Date: Tue, 29 Apr 2014 15:23:22 +0100 +Subject: [PATCH 55/96] [ffmpeg] Speed up wtv index creation +The index creation is O(N^2) with number of entries (typically thousands). +On a Pi this can take more than 60 seconds to execute for a recording of a few hours. + +By replacing with an O(N) loop, this takes virtually zero time --- - xbmc/linux/RBP.cpp | 8 +++++++- - 1 file changed, 7 insertions(+), 1 deletion(-) + tools/depends/target/ffmpeg/Makefile | 3 +- + .../ffmpeg_Speed_up_wtv_index_creation.patch | 47 ++++++++++++++++++++++ + 2 files changed, 49 insertions(+), 1 deletion(-) + create mode 100644 tools/depends/target/ffmpeg/ffmpeg_Speed_up_wtv_index_creation.patch -diff --git a/xbmc/linux/RBP.cpp b/xbmc/linux/RBP.cpp -index 49dcbb8..9a5e9cb 100644 ---- a/xbmc/linux/RBP.cpp -+++ b/xbmc/linux/RBP.cpp -@@ -79,11 +79,17 @@ bool CRBP::Initialize() +diff --git a/tools/depends/target/ffmpeg/Makefile b/tools/depends/target/ffmpeg/Makefile +index 0e08dcf..7ce982c 100644 +--- a/tools/depends/target/ffmpeg/Makefile ++++ b/tools/depends/target/ffmpeg/Makefile +@@ -1,6 +1,6 @@ + include ../../Makefile.include + include FFMPEG-VERSION +-DEPS= ../../Makefile.include FFMPEG-VERSION Makefile ++DEPS= ../../Makefile.include FFMPEG-VERSION Makefile ffmpeg_Speed_up_wtv_index_creation.patch - void CRBP::LogFirmwareVerison() - { -- char response[160]; -+ char response[1024]; - m_DllBcmHost->vc_gencmd(response, sizeof response, "version"); - response[sizeof(response) - 1] = '\0'; - CLog::Log(LOGNOTICE, "Raspberry PI firmware version: %s", response); - CLog::Log(LOGNOTICE, "ARM mem: %dMB GPU mem: %dMB MPG2:%d WVC1:%d", m_arm_mem, m_gpu_mem, m_codec_mpg2_enabled, m_codec_wvc1_enabled); -+ m_DllBcmHost->vc_gencmd(response, sizeof response, "get_config int"); -+ response[sizeof(response) - 1] = '\0'; -+ CLog::Log(LOGNOTICE, "Config:\n%s", response); -+ m_DllBcmHost->vc_gencmd(response, sizeof response, "get_config str"); -+ response[sizeof(response) - 1] = '\0'; -+ CLog::Log(LOGNOTICE, "Config:\n%s", response); - } - - void CRBP::GetDisplaySize(int &width, int &height) + # set to "yes" to enable patching + # we don't apply patches until we move to a vanilla ffmpeg tarball +@@ -63,6 +63,7 @@ $(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS) + rm -rf $(PLATFORM); mkdir -p $(PLATFORM) + cd $(PLATFORM); $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE) + cd $(PLATFORM); sed -i".bak" -e "s%pkg_config_default=pkg-config%export PKG_CONFIG_LIBDIR=$(PREFIX)/lib/pkgconfig \&\& pkg_config_default=$(NATIVEPREFIX)/bin/pkg-config%" configure ++ cd $(PLATFORM); patch -p3 < ../ffmpeg_Speed_up_wtv_index_creation.patch + cd $(PLATFORM);\ + CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" \ + ./configure $(ffmpg_config) +diff --git a/tools/depends/target/ffmpeg/ffmpeg_Speed_up_wtv_index_creation.patch b/tools/depends/target/ffmpeg/ffmpeg_Speed_up_wtv_index_creation.patch +new file mode 100644 +index 0000000..8f5f989 +--- /dev/null ++++ b/tools/depends/target/ffmpeg/ffmpeg_Speed_up_wtv_index_creation.patch +@@ -0,0 +1,47 @@ ++commit 0e7427498cb1131671f6fe9d054245ae7e5a36f5 ++Author: popcornmix ++Date: Tue Mar 25 19:43:07 2014 +0000 ++ ++ [ffmpeg] Speed up wtv index creation ++ ++ The index creation is O(N^2) with number of entries (typically thousands). ++ On a Pi this can take more than 60 seconds to execute for a recording of a few hours. ++ ++ By replacing with an O(N) loop, this takes virtually zero time ++ ++diff --git a/lib/ffmpeg/libavformat/wtvdec.c b/lib/ffmpeg/libavformat/wtvdec.c ++index e423370..70898bd 100644 ++--- a/lib/ffmpeg/libavformat/wtvdec.c +++++ b/lib/ffmpeg/libavformat/wtvdec.c ++@@ -980,21 +980,23 @@ static int read_header(AVFormatContext *s) ++ pb = wtvfile_open(s, root, root_size, ff_timeline_table_0_entries_Events_le16); ++ if (pb) { ++ int i; +++ AVIndexEntry *e = wtv->index_entries; +++ AVIndexEntry *e_end = wtv->index_entries + wtv->nb_index_entries - 1; +++ uint64_t last_position = 0; ++ while (1) { ++ uint64_t frame_nb = avio_rl64(pb); ++ uint64_t position = avio_rl64(pb); +++ while (frame_nb > e->size && e <= e_end) { +++ e->pos = last_position; +++ e++; +++ } ++ if (url_feof(pb)) ++ break; ++- for (i = wtv->nb_index_entries - 1; i >= 0; i--) { ++- AVIndexEntry *e = wtv->index_entries + i; ++- if (frame_nb > e->size) ++- break; ++- if (position > e->pos) ++- e->pos = position; ++- } +++ last_position = position; ++ } +++ e_end->pos = last_position; ++ wtvfile_close(pb); ++- st->duration = wtv->index_entries[wtv->nb_index_entries - 1].timestamp; +++ st->duration = e_end->timestamp; ++ } ++ } ++ } -- 1.9.3 -From 7d9bf62df3890f417e124d7c9acb913a47a937b1 Mon Sep 17 00:00:00 2001 +From ccd0b93b852fb15f5ec08a4836e68c24df34ab58 Mon Sep 17 00:00:00 2001 +From: popcornmix +Date: Tue, 8 Jul 2014 15:18:47 +0100 +Subject: [PATCH 56/96] ffmpeg: Add armv6 acceleration for imdct/fft used by + ac3/aac + +armv6: Accelerate ff_imdct_half for general case (mdct_bits != 6) + +The previous implementation targeted DTS Coherent Acoustics, which only +requires mdct_bits == 6. This relatively small size lent itself to +unrolling the loops a small number of times, and encoding offsets +calculated at assembly time within the load/store instructions of each +iteration. + +In the more general case (codecs such as AAC and AC3) much larger arrays +are used - mdct_bits == [8, 9, 11]. The old method does not scale for +these cases, so more integer registers are used with non-unrolled versions +of the loops (and with some stack spillage). The postrotation filter loop +is still unrolled by a factor of 2 to permit the double-buffering of some +VFP registers to facilitate overlap of neighbouring iterations. + +I benchmarked the result by measuring the number of gperftools samples +that hit anywhere in the AAC decoder (starting from aac_decode_frame()) +or specifically in ff_imdct_half_c / ff_imdct_half_vfp, for the same +example AAC stream: + + Before After + Mean StdDev Mean StdDev Confidence Change +aac_decode_frame 2368.1 35.8 2117.2 35.3 100.0% +11.8% +ff_imdct_half_* 457.5 22.4 251.2 16.2 100.0% +82.1% + +armv6: Accelerate ff_fft_calc for general case (nbits != 4) + +The previous implementation targeted DTS Coherent Acoustics, which only +requires nbits == 4 (fft16()). This case was (and still is) linked directly +rather than being indirected through ff_fft_calc_vfp(), but now the full +range from radix-4 up to radix-65536 is available. This benefits other codecs +such as AAC and AC3. + +The implementaion is based upon the C version, with each routine larger than +radix-16 calling a hierarchy of smaller FFT functions, then performing a +post-processing pass. This pass benefits a lot from loop unrolling to +counter the long pipelines in the VFP. A relaxed calling standard also +reduces the overhead of the call hierarchy, and avoiding the excessive +inlining performed by GCC probably helps with I-cache utilisation too. + +I benchmarked the result by measuring the number of gperftools samples that +hit anywhere in the AAC decoder (starting from aac_decode_frame()) or +specifically in the FFT routines (fft4() to fft512() and pass()) for the +same sample AAC stream: + + Before After + Mean StdDev Mean StdDev Confidence Change +Audio decode 2245.5 53.1 1599.6 43.8 100.0% +40.4% +FFT routines 940.6 22.0 348.1 20.8 100.0% +170.2% +--- + tools/depends/target/ffmpeg/Makefile | 8 +- + .../armv6-Accelerate-butterflies-float.patch | 165 ++++++++++ + ...6-Accelerate-ff_fft_calc-for-general-case.patch | 361 +++++++++++++++++++++ + .../armv6-Accelerate-vector-fmul-window.patch | 259 +++++++++++++++ + 4 files changed, 792 insertions(+), 1 deletion(-) + create mode 100644 tools/depends/target/ffmpeg/armv6-Accelerate-butterflies-float.patch + create mode 100644 tools/depends/target/ffmpeg/armv6-Accelerate-ff_fft_calc-for-general-case.patch + create mode 100644 tools/depends/target/ffmpeg/armv6-Accelerate-vector-fmul-window.patch + +diff --git a/tools/depends/target/ffmpeg/Makefile b/tools/depends/target/ffmpeg/Makefile +index 7ce982c..f205f70 100644 +--- a/tools/depends/target/ffmpeg/Makefile ++++ b/tools/depends/target/ffmpeg/Makefile +@@ -1,6 +1,8 @@ + include ../../Makefile.include + include FFMPEG-VERSION +-DEPS= ../../Makefile.include FFMPEG-VERSION Makefile ffmpeg_Speed_up_wtv_index_creation.patch ++DEPS= ../../Makefile.include FFMPEG-VERSION Makefile ffmpeg_Speed_up_wtv_index_creation.patch \ ++ armv6-Accelerate-ff_fft_calc-for-general-case.patch \ ++ armv6-Accelerate-vector-fmul-window.patch armv6-Accelerate-butterflies-float.patch + + # set to "yes" to enable patching + # we don't apply patches until we move to a vanilla ffmpeg tarball +@@ -64,6 +66,10 @@ $(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS) + cd $(PLATFORM); $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE) + cd $(PLATFORM); sed -i".bak" -e "s%pkg_config_default=pkg-config%export PKG_CONFIG_LIBDIR=$(PREFIX)/lib/pkgconfig \&\& pkg_config_default=$(NATIVEPREFIX)/bin/pkg-config%" configure + cd $(PLATFORM); patch -p3 < ../ffmpeg_Speed_up_wtv_index_creation.patch ++ cd $(PLATFORM); patch -p1 < ../armv6-Accelerate-ff_fft_calc-for-general-case.patch ++ cd $(PLATFORM); patch -p1 < ../armv6-Accelerate-vector-fmul-window.patch ++ cd $(PLATFORM); patch -p1 < ../armv6-Accelerate-butterflies-float.patch ++ + cd $(PLATFORM);\ + CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" \ + ./configure $(ffmpg_config) +diff --git a/tools/depends/target/ffmpeg/armv6-Accelerate-butterflies-float.patch b/tools/depends/target/ffmpeg/armv6-Accelerate-butterflies-float.patch +new file mode 100644 +index 0000000..e1b6cd0 +--- /dev/null ++++ b/tools/depends/target/ffmpeg/armv6-Accelerate-butterflies-float.patch +@@ -0,0 +1,165 @@ ++From 46c74f06402ff196c3d35349a81423b0c2878527 Mon Sep 17 00:00:00 2001 ++From: Ben Avison ++Date: Thu, 10 Jul 2014 17:51:55 +0100 ++Subject: [PATCH] armv6: Accelerate butterflies_float ++ ++I benchmarked the result by measuring the number of gperftools samples that ++hit anywhere in the AAC decoder (starting from aac_decode_frame()) or ++specifically in butterflies_float_c() / ff_butterflies_float_vfp() for the ++same sample AAC stream: ++ ++ Before After ++ Mean StdDev Mean StdDev Confidence Change ++Audio decode 1542.8 43.7 1470.5 41.5 100.0% +4.9% ++butterflies_float 130.0 11.9 70.2 12.1 100.0% +85.2% ++--- ++ libavutil/arm/float_dsp_init_vfp.c | 4 ++ ++ libavutil/arm/float_dsp_vfp.S | 116 +++++++++++++++++++++++++++++++++++++ ++ 2 files changed, 120 insertions(+) ++ ++diff --git a/libavutil/arm/float_dsp_init_vfp.c b/libavutil/arm/float_dsp_init_vfp.c ++index f44020e..61ff2ed 100644 ++--- a/libavutil/arm/float_dsp_init_vfp.c +++++ b/libavutil/arm/float_dsp_init_vfp.c ++@@ -32,6 +32,8 @@ void ff_vector_fmul_window_vfp(float *dst, const float *src0, ++ void ff_vector_fmul_reverse_vfp(float *dst, const float *src0, ++ const float *src1, int len); ++ +++void ff_butterflies_float_vfp(float *restrict v1, float *restrict v2, int len); +++ ++ av_cold void ff_float_dsp_init_vfp(AVFloatDSPContext *fdsp, int cpu_flags) ++ { ++ if (!have_vfpv3(cpu_flags)) { ++@@ -39,4 +41,6 @@ av_cold void ff_float_dsp_init_vfp(AVFloatDSPContext *fdsp, int cpu_flags) ++ fdsp->vector_fmul_window = ff_vector_fmul_window_vfp; ++ } ++ fdsp->vector_fmul_reverse = ff_vector_fmul_reverse_vfp; +++ if (!have_vfpv3(cpu_flags)) +++ fdsp->butterflies_float = ff_butterflies_float_vfp; ++ } ++diff --git a/libavutil/arm/float_dsp_vfp.S b/libavutil/arm/float_dsp_vfp.S ++index c25588f..9f920aa 100644 ++--- a/libavutil/arm/float_dsp_vfp.S +++++ b/libavutil/arm/float_dsp_vfp.S ++@@ -339,3 +339,119 @@ function ff_vector_fmul_reverse_vfp, export=1 ++ vpop {d8-d15} ++ bx lr ++ endfunc +++ +++/** +++ * ARM VFP implementation of 'butterflies_float_c' function +++ * Assume that len is a positive non-zero number +++ */ +++@ void ff_butterflies_float_vfp(float *restrict v1, float *restrict v2, int len) +++function ff_butterflies_float_vfp, export=1 +++BASE1 .req a1 +++BASE2 .req a2 +++LEN .req a3 +++OLDFPSCR .req a4 +++ +++ vpush {s16-s31} +++ fmrx OLDFPSCR, FPSCR +++ +++ tst LEN, #7 +++ beq 4f @ common case: len is a multiple of 8 +++ +++ ldr ip, =0x03000000 @ RunFast mode, scalar mode +++ fmxr FPSCR, ip +++ +++ tst LEN, #1 +++ beq 1f +++ vldmia BASE1!, {s0} +++ vldmia BASE2!, {s8} +++ vadd.f s16, s0, s8 +++ vsub.f s24, s0, s8 +++ vstr s16, [BASE1, #0-4*1] +++ vstr s24, [BASE2, #0-4*1] +++1: +++ tst LEN, #2 +++ beq 2f +++ vldmia BASE1!, {s0-s1} +++ vldmia BASE2!, {s8-s9} +++ vadd.f s16, s0, s8 +++ vadd.f s17, s1, s9 +++ vsub.f s24, s0, s8 +++ vsub.f s25, s1, s9 +++ vstr d8, [BASE1, #0-8*1] @ s16,s17 +++ vstr d12, [BASE2, #0-8*1] @ s24,s25 +++2: +++ tst LEN, #4 +++ beq 3f +++ vldmia BASE1!, {s0-s1} +++ vldmia BASE2!, {s8-s9} +++ vldmia BASE1!, {s2-s3} +++ vldmia BASE2!, {s10-s11} +++ vadd.f s16, s0, s8 +++ vadd.f s17, s1, s9 +++ vsub.f s24, s0, s8 +++ vsub.f s25, s1, s9 +++ vadd.f s18, s2, s10 +++ vadd.f s19, s3, s11 +++ vsub.f s26, s2, s10 +++ vsub.f s27, s3, s11 +++ vstr d8, [BASE1, #0-16*1] @ s16,s17 +++ vstr d12, [BASE2, #0-16*1] @ s24,s25 +++ vstr d9, [BASE1, #8-16*1] @ s18,s19 +++ vstr d13, [BASE2, #8-16*1] @ s26,s27 +++3: +++ bics LEN, LEN, #7 +++ beq 7f +++4: +++ ldr ip, =0x03030000 @ RunFast mode, short vectors of length 4, stride 1 +++ fmxr FPSCR, ip +++ +++ vldmia BASE1!, {s0-s1} +++ vldmia BASE2!, {s8-s9} +++ vldmia BASE1!, {s2-s3} +++ vldmia BASE2!, {s10-s11} +++ vadd.f s16, s0, s8 +++ vldmia BASE1!, {s4-s5} +++ vldmia BASE2!, {s12-s13} +++ vldmia BASE1!, {s6-s7} +++ vldmia BASE2!, {s14-s15} +++ vsub.f s24, s0, s8 +++ vadd.f s20, s4, s12 +++ subs LEN, LEN, #8 +++ beq 6f +++5: vldmia BASE1!, {s0-s3} +++ vldmia BASE2!, {s8-s11} +++ vsub.f s28, s4, s12 +++ vstr d8, [BASE1, #0-16*3] @ s16,s17 +++ vstr d9, [BASE1, #8-16*3] @ s18,s19 +++ vstr d12, [BASE2, #0-16*3] @ s24,s25 +++ vstr d13, [BASE2, #8-16*3] @ s26,s27 +++ vadd.f s16, s0, s8 +++ vldmia BASE1!, {s4-s7} +++ vldmia BASE2!, {s12-s15} +++ vsub.f s24, s0, s8 +++ vstr d10, [BASE1, #0-16*3] @ s20,s21 +++ vstr d11, [BASE1, #8-16*3] @ s22,s23 +++ vstr d14, [BASE2, #0-16*3] @ s28,s29 +++ vstr d15, [BASE2, #8-16*3] @ s30,s31 +++ vadd.f s20, s4, s12 +++ subs LEN, LEN, #8 +++ bne 5b +++6: vsub.f s28, s4, s12 +++ vstr d8, [BASE1, #0-16*2] @ s16,s17 +++ vstr d9, [BASE1, #8-16*2] @ s18,s19 +++ vstr d12, [BASE2, #0-16*2] @ s24,s25 +++ vstr d13, [BASE2, #8-16*2] @ s26,s27 +++ vstr d10, [BASE1, #0-16*1] @ s20,s21 +++ vstr d11, [BASE1, #8-16*1] @ s22,s23 +++ vstr d14, [BASE2, #0-16*1] @ s28,s29 +++ vstr d15, [BASE2, #8-16*1] @ s30,s31 +++7: +++ fmxr FPSCR, OLDFPSCR +++ vpop {s16-s31} +++ bx lr +++ +++ .unreq BASE1 +++ .unreq BASE2 +++ .unreq LEN +++ .unreq OLDFPSCR +++endfunc ++-- ++1.9.3 +diff --git a/tools/depends/target/ffmpeg/armv6-Accelerate-ff_fft_calc-for-general-case.patch b/tools/depends/target/ffmpeg/armv6-Accelerate-ff_fft_calc-for-general-case.patch +new file mode 100644 +index 0000000..ccf9743 +--- /dev/null ++++ b/tools/depends/target/ffmpeg/armv6-Accelerate-ff_fft_calc-for-general-case.patch +@@ -0,0 +1,361 @@ ++From 883fb70c576181dbdf41e21872f1d0794024a6b4 Mon Sep 17 00:00:00 2001 ++From: Ben Avison ++Date: Mon, 7 Jul 2014 15:29:09 +0100 ++Subject: [PATCH] armv6: Accelerate ff_fft_calc for general case (nbits != 4) ++ ++The previous implementation targeted DTS Coherent Acoustics, which only ++requires nbits == 4 (fft16()). This case was (and still is) linked directly ++rather than being indirected through ff_fft_calc_vfp(), but now the full ++range from radix-4 up to radix-65536 is available. This benefits other codecs ++such as AAC and AC3. ++ ++The implementaion is based upon the C version, with each routine larger than ++radix-16 calling a hierarchy of smaller FFT functions, then performing a ++post-processing pass. This pass benefits a lot from loop unrolling to ++counter the long pipelines in the VFP. A relaxed calling standard also ++reduces the overhead of the call hierarchy, and avoiding the excessive ++inlining performed by GCC probably helps with I-cache utilisation too. ++ ++I benchmarked the result by measuring the number of gperftools samples that ++hit anywhere in the AAC decoder (starting from aac_decode_frame()) or ++specifically in the FFT routines (fft4() to fft512() and pass()) for the ++same sample AAC stream: ++ ++ Before After ++ Mean StdDev Mean StdDev Confidence Change ++Audio decode 2245.5 53.1 1599.6 43.8 100.0% +40.4% ++FFT routines 940.6 22.0 348.1 20.8 100.0% +170.2% ++--- ++ libavcodec/arm/fft_init_arm.c | 8 +- ++ libavcodec/arm/fft_vfp.S | 261 +++++++++++++++++++++++++++++++++++++++--- ++ 2 files changed, 252 insertions(+), 17 deletions(-) ++ ++diff --git a/libavcodec/arm/fft_init_arm.c b/libavcodec/arm/fft_init_arm.c ++index 3a3d1a7..bc143c1 100644 ++--- a/libavcodec/arm/fft_init_arm.c +++++ b/libavcodec/arm/fft_init_arm.c ++@@ -23,6 +23,8 @@ ++ #include "libavcodec/rdft.h" ++ #include "libavcodec/synth_filter.h" ++ +++void ff_fft_calc_vfp(FFTContext *s, FFTComplex *z); +++ ++ void ff_fft_permute_neon(FFTContext *s, FFTComplex *z); ++ void ff_fft_calc_neon(FFTContext *s, FFTComplex *z); ++ ++@@ -38,10 +40,10 @@ av_cold void ff_fft_init_arm(FFTContext *s) ++ { ++ int cpu_flags = av_get_cpu_flags(); ++ ++- if (have_vfp(cpu_flags)) { +++ if (have_vfp(cpu_flags) && !have_vfpv3(cpu_flags)) { +++ s->fft_calc = ff_fft_calc_vfp; ++ #if CONFIG_MDCT ++- if (!have_vfpv3(cpu_flags)) ++- s->imdct_half = ff_imdct_half_vfp; +++ s->imdct_half = ff_imdct_half_vfp; ++ #endif ++ } ++ ++diff --git a/libavcodec/arm/fft_vfp.S b/libavcodec/arm/fft_vfp.S ++index 7845ebb..186bed9 100644 ++--- a/libavcodec/arm/fft_vfp.S +++++ b/libavcodec/arm/fft_vfp.S ++@@ -21,8 +21,9 @@ ++ ++ #include "libavutil/arm/asm.S" ++ ++-@ TODO: * FFTs wider than 16 ++-@ * dispatch code +++@ The fftx_internal_vfp versions of the functions obey a modified AAPCS: +++@ VFP is in RunFast mode, vector length 4, stride 1 thoroughout, and +++@ all single-precision VFP registers may be corrupted on exit. ++ ++ function fft4_vfp ++ vldr d0, [a1, #0*2*4] @ s0,s1 = z[0] ++@@ -131,18 +132,22 @@ endfunc ++ vstr d9, [a1, #3 * 2*4] ++ .endm ++ +++function fft8_internal_vfp +++ macro_fft8_head +++ macro_fft8_tail +++ bx lr +++endfunc +++ ++ function fft8_vfp ++ ldr a3, =0x03030000 @ RunFast mode, vector length 4, stride 1 ++ fmrx a2, FPSCR ++ fmxr FPSCR, a3 ++ vpush {s16-s31} ++- ++- macro_fft8_head ++- macro_fft8_tail ++- +++ mov ip, lr +++ bl fft8_internal_vfp ++ vpop {s16-s31} ++ fmxr FPSCR, a2 ++- bx lr +++ bx ip ++ endfunc ++ ++ .align 3 ++@@ -153,12 +158,7 @@ cos1pi8: @ cos(1*pi/8) = sqrt(2+sqrt(2))/2 ++ cos3pi8: @ cos(2*pi/8) = sqrt(2-sqrt(2))/2 ++ .float 0.3826834261417388916015625 ++ ++-function ff_fft16_vfp, export=1 ++- ldr a3, =0x03030000 @ RunFast mode, vector length 4, stride 1 ++- fmrx a2, FPSCR ++- fmxr FPSCR, a3 ++- vpush {s16-s31} ++- +++function fft16_internal_vfp ++ macro_fft8_head ++ @ FFT4(z+8) ++ vldr d10, [a1, #8 * 2*4] ++@@ -292,7 +292,240 @@ function ff_fft16_vfp, export=1 ++ vstr d8, [a1, #0 * 2*4] ++ vstr d9, [a1, #4 * 2*4] ++ +++ bx lr +++endfunc +++ +++function ff_fft16_vfp, export=1 +++ ldr a3, =0x03030000 @ RunFast mode, vector length 4, stride 1 +++ fmrx a2, FPSCR +++ fmxr FPSCR, a3 +++ vpush {s16-s31} +++ mov ip, lr +++ bl fft16_internal_vfp ++ vpop {s16-s31} ++ fmxr FPSCR, a2 ++- bx lr +++ bx ip +++endfunc +++ +++.macro pass n, z0, z1, z2, z3 +++ add v6, v5, #4*2*\n +++ @ TRANSFORM_ZERO(z[0],z[o1],z[o2],z[o3]) +++ @ TRANSFORM(z[1],z[o1+1],z[o2+1],z[o3+1],wre[1],wim[-1]) +++ @ TRANSFORM(z[0],z[o1],z[o2],z[o3],wre[0],wim[0]) +++ @ TRANSFORM(z[1],z[o1+1],z[o2+1],z[o3+1],wre[1],wim[-1]) +++ vldr d8, [\z2, #8*(o2+1)] @ s16,s17 +++ vldmdb v6!, {s2} +++ vldr d9, [\z3, #8*(o3+1)] @ s18,s19 +++ vldmia v5!, {s0,s1} @ s0 is unused +++ vldr s7, [\z2, #8*o2] @ t1 +++ vmul.f s20, s16, s2 @ vector * scalar +++ vldr s0, [\z3, #8*o3] @ t5 +++ vldr s6, [\z2, #8*o2+4] @ t2 +++ vldr s3, [\z3, #8*o3+4] @ t6 +++ vmul.f s16, s16, s1 @ vector * scalar +++ ldr a4, =\n-1 +++1: add \z0, \z0, #8*2 +++ .if \n*4*2 >= 512 +++ add \z1, \z1, #8*2 +++ .endif +++ .if \n*4*2 >= 256 +++ add \z2, \z2, #8*2 +++ .endif +++ .if \n*4*2 >= 512 +++ add \z3, \z3, #8*2 +++ .endif +++ @ up to 2 stalls (VFP vector issuing / waiting for s0) +++ @ depending upon whether this is the first iteration and +++ @ how many add instructions are inserted above +++ vadd.f s4, s0, s7 @ t5 +++ vadd.f s5, s6, s3 @ t6 +++ vsub.f s6, s6, s3 @ t4 +++ vsub.f s7, s0, s7 @ t3 +++ vldr d6, [\z0, #8*0-8*2] @ s12,s13 +++ vadd.f s0, s16, s21 @ t1 +++ vldr d7, [\z1, #8*o1-8*2] @ s14,s15 +++ vsub.f s1, s18, s23 @ t5 +++ vadd.f s8, s4, s12 @ vector + vector +++ @ stall (VFP vector issuing) +++ @ stall (VFP vector issuing) +++ @ stall (VFP vector issuing) +++ vsub.f s4, s12, s4 +++ vsub.f s5, s13, s5 +++ vsub.f s6, s14, s6 +++ vsub.f s7, s15, s7 +++ vsub.f s2, s17, s20 @ t2 +++ vadd.f s3, s19, s22 @ t6 +++ vstr d4, [\z0, #8*0-8*2] @ s8,s9 +++ vstr d5, [\z1, #8*o1-8*2] @ s10,s11 +++ @ stall (waiting for s5) +++ vstr d2, [\z2, #8*o2-8*2] @ s4,s5 +++ vadd.f s4, s1, s0 @ t5 +++ vstr d3, [\z3, #8*o3-8*2] @ s6,s7 +++ vsub.f s7, s1, s0 @ t3 +++ vadd.f s5, s2, s3 @ t6 +++ vsub.f s6, s2, s3 @ t4 +++ vldr d6, [\z0, #8*1-8*2] @ s12,s13 +++ vldr d7, [\z1, #8*(o1+1)-8*2] @ s14,s15 +++ vldr d4, [\z2, #8*o2] @ s8,s9 +++ vldmdb v6!, {s2,s3} +++ vldr d5, [\z3, #8*o3] @ s10,s11 +++ vadd.f s20, s4, s12 @ vector + vector +++ vldmia v5!, {s0,s1} +++ vldr d8, [\z2, #8*(o2+1)] @ s16,s17 +++ @ stall (VFP vector issuing) +++ vsub.f s4, s12, s4 +++ vsub.f s5, s13, s5 +++ vsub.f s6, s14, s6 +++ vsub.f s7, s15, s7 +++ vmul.f s12, s8, s3 @ vector * scalar +++ vstr d10, [\z0, #8*1-8*2] @ s20,s21 +++ vldr d9, [\z3, #8*(o3+1)] @ s18,s19 +++ vstr d11, [\z1, #8*(o1+1)-8*2] @ s22,s23 +++ vmul.f s8, s8, s0 @ vector * scalar +++ vstr d2, [\z2, #8*(o2+1)-8*2] @ s4,s5 +++ @ stall (waiting for s7) +++ vstr d3, [\z3, #8*(o3+1)-8*2] @ s6,s7 +++ vmul.f s20, s16, s2 @ vector * scalar +++ @ stall (VFP vector issuing) +++ @ stall (VFP vector issuing) +++ @ stall (VFP vector issuing) +++ vadd.f s7, s8, s13 @ t1 +++ vsub.f s6, s9, s12 @ t2 +++ vsub.f s0, s10, s15 @ t5 +++ vadd.f s3, s11, s14 @ t6 +++ vmul.f s16, s16, s1 @ vector * scalar +++ subs a4, a4, #1 +++ bne 1b +++ @ What remains is identical to the first two indentations of +++ @ the above, but without the increment of z +++ vadd.f s4, s0, s7 @ t5 +++ vadd.f s5, s6, s3 @ t6 +++ vsub.f s6, s6, s3 @ t4 +++ vsub.f s7, s0, s7 @ t3 +++ vldr d6, [\z0, #8*0] @ s12,s13 +++ vadd.f s0, s16, s21 @ t1 +++ vldr d7, [\z1, #8*o1] @ s14,s15 +++ vsub.f s1, s18, s23 @ t5 +++ vadd.f s8, s4, s12 @ vector + vector +++ vsub.f s4, s12, s4 +++ vsub.f s5, s13, s5 +++ vsub.f s6, s14, s6 +++ vsub.f s7, s15, s7 +++ vsub.f s2, s17, s20 @ t2 +++ vadd.f s3, s19, s22 @ t6 +++ vstr d4, [\z0, #8*0] @ s8,s9 +++ vstr d5, [\z1, #8*o1] @ s10,s11 +++ vstr d2, [\z2, #8*o2] @ s4,s5 +++ vadd.f s4, s1, s0 @ t5 +++ vstr d3, [\z3, #8*o3] @ s6,s7 +++ vsub.f s7, s1, s0 @ t3 +++ vadd.f s5, s2, s3 @ t6 +++ vsub.f s6, s2, s3 @ t4 +++ vldr d6, [\z0, #8*1] @ s12,s13 +++ vldr d7, [\z1, #8*(o1+1)] @ s14,s15 +++ vadd.f s20, s4, s12 @ vector + vector +++ vsub.f s4, s12, s4 +++ vsub.f s5, s13, s5 +++ vsub.f s6, s14, s6 +++ vsub.f s7, s15, s7 +++ vstr d10, [\z0, #8*1] @ s20,s21 +++ vstr d11, [\z1, #8*(o1+1)] @ s22,s23 +++ vstr d2, [\z2, #8*(o2+1)] @ s4,s5 +++ vstr d3, [\z3, #8*(o3+1)] @ s6,s7 +++.endm +++ +++.macro fft_internal_vfp name, name2, name4, costable, n +++function \name +++ .if \n >= 512 +++ push {v1-v6,lr} +++ .elseif \n >= 256 +++ push {v1-v2,v5-v6,lr} +++ .else +++ push {v1,v5-v6,lr} +++ .endif +++ mov v1, a1 +++ bl \name2 +++ add a1, v1, #8*(\n/4)*2 +++ bl \name4 +++ ldr v5, =\costable +++ add a1, v1, #8*(\n/4)*3 +++ bl \name4 +++ .if \n >= 512 +++ .set o1, 0*(\n/4/2) +++ .set o2, 0*(\n/4/2) +++ .set o3, 0*(\n/4/2) +++ add v2, v1, #8*2*(\n/4/2) +++ add v3, v1, #8*4*(\n/4/2) +++ add v4, v1, #8*6*(\n/4/2) +++ pass (\n/4/2), v1, v2, v3, v4 +++ pop {v1-v6,pc} +++ .elseif \n >= 256 +++ .set o1, 2*(\n/4/2) +++ .set o2, 0*(\n/4/2) +++ .set o3, 2*(\n/4/2) +++ add v2, v1, #8*4*(\n/4/2) +++ pass (\n/4/2), v1, v1, v2, v2 +++ pop {v1-v2,v5-v6,pc} +++ .else +++ .set o1, 2*(\n/4/2) +++ .set o2, 4*(\n/4/2) +++ .set o3, 6*(\n/4/2) +++ pass (\n/4/2), v1, v1, v1, v1 +++ pop {v1,v5-v6,pc} +++ .endif +++endfunc +++.endm +++ +++#define DECL_FFT(n,n2,n4) \ +++fft_internal_vfp fft##n##_internal_vfp, fft##n2##_internal_vfp, fft##n4##_internal_vfp, ff_cos_##n, n ;\ +++ ;\ +++function fft##n##_vfp ;\ +++ ldr a3, =0x03030000 /* RunFast mode, vector length 4, stride 1 */ ;\ +++ fmrx a2, FPSCR ;\ +++ fmxr FPSCR, a3 ;\ +++ vpush {s16-s31} ;\ +++ mov ip, lr ;\ +++ bl fft##n##_internal_vfp ;\ +++ vpop {s16-s31} ;\ +++ fmxr FPSCR, a2 ;\ +++ bx ip ;\ +++endfunc ;\ +++ ;\ +++.ltorg +++ +++DECL_FFT(32,16,8) +++DECL_FFT(64,32,16) +++DECL_FFT(128,64,32) +++DECL_FFT(256,128,64) +++DECL_FFT(512,256,128) +++DECL_FFT(1024,512,256) +++DECL_FFT(2048,1024,512) +++DECL_FFT(4096,2048,1024) +++DECL_FFT(8192,4096,2048) +++DECL_FFT(16384,8192,4096) +++DECL_FFT(32768,16384,8192) +++DECL_FFT(65536,32768,16384) +++ +++function ff_fft_calc_vfp, export=1 +++ ldr ip, [a1, #0] @ nbits +++ mov a1, a2 +++ ldr ip, [pc, ip, lsl #2] +++ bx ip +++ .word 0 +++ .word 0 +++ .word fft4_vfp +++ .word fft8_vfp +++ .word ff_fft16_vfp @ this one alone is exported +++ .word fft32_vfp +++ .word fft64_vfp +++ .word fft128_vfp +++ .word fft256_vfp +++ .word fft512_vfp +++ .word fft1024_vfp +++ .word fft2048_vfp +++ .word fft4096_vfp +++ .word fft8192_vfp +++ .word fft16384_vfp +++ .word fft32768_vfp +++ .word fft65536_vfp ++ endfunc ++-- ++1.9.3 +diff --git a/tools/depends/target/ffmpeg/armv6-Accelerate-vector-fmul-window.patch b/tools/depends/target/ffmpeg/armv6-Accelerate-vector-fmul-window.patch +new file mode 100644 +index 0000000..db0118f +--- /dev/null ++++ b/tools/depends/target/ffmpeg/armv6-Accelerate-vector-fmul-window.patch +@@ -0,0 +1,259 @@ ++From 1f5c397bdd4ebd2c9ed04488fcf52d77a5db3e88 Mon Sep 17 00:00:00 2001 ++From: Ben Avison ++Date: Thu, 10 Jul 2014 13:01:47 +0100 ++Subject: [PATCH] armv6: Accelerate vector_fmul_window ++ ++I benchmarked the result by measuring the number of gperftools samples that ++hit anywhere in the AAC decoder (starting from aac_decode_frame()) or ++specifically in vector_fmul_window_c() / ff_vector_fmul_window_vfp() for the ++same sample AAC stream: ++ ++ Before After ++ Mean StdDev Mean StdDev Confidence Change ++Audio decode 1598.2 47.4 1529.2 25.4 100.0% +4.5% ++vector_fmul_window 244.0 22.1 188.9 22.3 100.0% +29.2% ++--- ++ libavutil/arm/float_dsp_init_vfp.c | 7 +- ++ libavutil/arm/float_dsp_vfp.S | 204 +++++++++++++++++++++++++++++++++++++ ++ 2 files changed, 210 insertions(+), 1 deletion(-) ++ ++diff --git a/libavutil/arm/float_dsp_init_vfp.c b/libavutil/arm/float_dsp_init_vfp.c ++index 31cb6ae..f44020e 100644 ++--- a/libavutil/arm/float_dsp_init_vfp.c +++++ b/libavutil/arm/float_dsp_init_vfp.c ++@@ -26,12 +26,17 @@ ++ void ff_vector_fmul_vfp(float *dst, const float *src0, const float *src1, ++ int len); ++ +++void ff_vector_fmul_window_vfp(float *dst, const float *src0, +++ const float *src1, const float *win, int len); +++ ++ void ff_vector_fmul_reverse_vfp(float *dst, const float *src0, ++ const float *src1, int len); ++ ++ av_cold void ff_float_dsp_init_vfp(AVFloatDSPContext *fdsp, int cpu_flags) ++ { ++- if (!have_vfpv3(cpu_flags)) +++ if (!have_vfpv3(cpu_flags)) { ++ fdsp->vector_fmul = ff_vector_fmul_vfp; +++ fdsp->vector_fmul_window = ff_vector_fmul_window_vfp; +++ } ++ fdsp->vector_fmul_reverse = ff_vector_fmul_reverse_vfp; ++ } ++diff --git a/libavutil/arm/float_dsp_vfp.S b/libavutil/arm/float_dsp_vfp.S ++index 8295280..c25588f 100644 ++--- a/libavutil/arm/float_dsp_vfp.S +++++ b/libavutil/arm/float_dsp_vfp.S ++@@ -68,6 +68,210 @@ function ff_vector_fmul_vfp, export=1 ++ endfunc ++ ++ /** +++ * ARM VFP implementation of 'vector_fmul_window_c' function +++ * Assume that len is a positive non-zero number +++ */ +++@ void ff_vector_fmul_window_vfp(float *dst, const float *src0, +++@ const float *src1, const float *win, int len) +++function ff_vector_fmul_window_vfp, export=1 +++DST0 .req a1 +++SRC0 .req a2 +++SRC1 .req a3 +++WIN0 .req a4 +++LEN .req v1 +++DST1 .req v2 +++WIN1 .req v3 +++OLDFPSCR .req ip +++ +++ push {v1-v3,lr} +++ ldr LEN, [sp, #4*4+0] +++ vpush {s16-s31} +++ fmrx OLDFPSCR, FPSCR +++ add DST1, DST0, LEN, lsl #3 +++ add SRC1, SRC1, LEN, lsl #2 +++ add WIN1, WIN0, LEN, lsl #3 +++ +++ tst LEN, #7 +++ beq 4f @ common case: len is a multiple of 8 +++ +++ ldr lr, =0x03000000 @ RunFast mode, scalar mode +++ fmxr FPSCR, lr +++ +++ tst LEN, #1 +++ beq 1f +++ vldmdb WIN1!, {s0} +++ vldmia SRC0!, {s8} +++ vldmia WIN0!, {s16} +++ vmul.f s24, s0, s8 +++ vldmdb SRC1!, {s20} +++ vmul.f s8, s16, s8 +++ vmls.f s24, s16, s20 +++ vmla.f s8, s0, s20 +++ vstmia DST0!, {s24} +++ vstmdb DST1!, {s8} +++1: +++ tst LEN, #2 +++ beq 2f +++ vldmdb WIN1!, {s0} +++ vldmdb WIN1!, {s1} +++ vldmia SRC0!, {s8-s9} +++ vldmia WIN0!, {s16-s17} +++ vmul.f s24, s0, s8 +++ vmul.f s25, s1, s9 +++ vldmdb SRC1!, {s20} +++ vldmdb SRC1!, {s21} +++ vmul.f s8, s16, s8 +++ vmul.f s9, s17, s9 +++ vmls.f s24, s16, s20 +++ vmls.f s25, s17, s21 +++ vmla.f s8, s0, s20 +++ vmla.f s9, s1, s21 +++ vstmia DST0!, {s24-s25} +++ vstmdb DST1!, {s8} +++ vstmdb DST1!, {s9} +++2: +++ tst LEN, #4 +++ beq 3f +++ vldmdb WIN1!, {s0} +++ vldmdb WIN1!, {s1} +++ vldmdb WIN1!, {s2} +++ vldmdb WIN1!, {s3} +++ vldmia SRC0!, {s8-s11} +++ vldmia WIN0!, {s16-s19} +++ vmul.f s24, s0, s8 +++ vmul.f s25, s1, s9 +++ vmul.f s26, s2, s10 +++ vmul.f s27, s3, s11 +++ vldmdb SRC1!, {s20} +++ vldmdb SRC1!, {s21} +++ vldmdb SRC1!, {s22} +++ vldmdb SRC1!, {s23} +++ vmul.f s8, s16, s8 +++ vmul.f s9, s17, s9 +++ vmul.f s10, s18, s10 +++ vmul.f s11, s19, s11 +++ vmls.f s24, s16, s20 +++ vmls.f s25, s17, s21 +++ vmls.f s26, s18, s22 +++ vmls.f s27, s19, s23 +++ vmla.f s8, s0, s20 +++ vmla.f s9, s1, s21 +++ vmla.f s10, s2, s22 +++ vmla.f s11, s3, s23 +++ vstmia DST0!, {s24-s27} +++ vstmdb DST1!, {s8} +++ vstmdb DST1!, {s9} +++ vstmdb DST1!, {s10} +++ vstmdb DST1!, {s11} +++3: +++ bics LEN, LEN, #7 +++ beq 7f +++4: +++ ldr lr, =0x03030000 @ RunFast mode, short vectors of length 4, stride 1 +++ fmxr FPSCR, lr +++ +++ vldmdb WIN1!, {s0} +++ vldmdb WIN1!, {s1} +++ vldmdb WIN1!, {s2} +++ vldmdb WIN1!, {s3} +++ vldmia SRC0!, {s8-s11} +++ vldmia WIN0!, {s16-s19} +++ vmul.f s24, s0, s8 @ vector * vector +++ vldmdb SRC1!, {s20} +++ vldmdb SRC1!, {s21} +++ vldmdb SRC1!, {s22} +++ vldmdb SRC1!, {s23} +++ vmul.f s8, s16, s8 @ vector * vector +++ vmls.f s24, s16, s20 @ vector * vector +++ vldmdb WIN1!, {s4} +++ vldmdb WIN1!, {s5} +++ vldmdb WIN1!, {s6} +++ vldmdb WIN1!, {s7} +++ vldmia SRC0!, {s12-s13} +++ vmla.f s8, s0, s20 @ vector * vector +++ vldmia SRC0!, {s14-s15} +++ subs LEN, LEN, #8 +++ beq 6f +++5: vldmia WIN0!, {s20-s23} +++ vmul.f s28, s4, s12 @ vector * vector +++ vstmia DST0!, {s24-s25} +++ vldmdb SRC1!, {s16} +++ vldmdb SRC1!, {s17} +++ vldmdb SRC1!, {s18} +++ vldmdb SRC1!, {s19} +++ vmul.f s12, s20, s12 @ vector * vector +++ vstmia DST0!, {s26-s27} +++ vstmdb DST1!, {s8} +++ vstmdb DST1!, {s9} +++ vstmdb DST1!, {s10} +++ vstmdb DST1!, {s11} +++ vmls.f s28, s20, s16 @ vector * vector +++ vldmdb WIN1!, {s0} +++ vldmdb WIN1!, {s1} +++ vldmdb WIN1!, {s2} +++ vldmdb WIN1!, {s3} +++ vldmia SRC0!, {s8-s9} +++ vmla.f s12, s4, s16 @ vector * vector +++ vldmia SRC0!, {s10-s11} +++ subs LEN, LEN, #8 +++ vldmia WIN0!, {s16-s19} +++ vmul.f s24, s0, s8 @ vector * vector +++ vstmia DST0!, {s28-s29} +++ vldmdb SRC1!, {s20} +++ vldmdb SRC1!, {s21} +++ vldmdb SRC1!, {s22} +++ vldmdb SRC1!, {s23} +++ vmul.f s8, s16, s8 @ vector * vector +++ vstmia DST0!, {s30-s31} +++ vstmdb DST1!, {s12} +++ vstmdb DST1!, {s13} +++ vstmdb DST1!, {s14} +++ vstmdb DST1!, {s15} +++ vmls.f s24, s16, s20 @ vector * vector +++ vldmdb WIN1!, {s4} +++ vldmdb WIN1!, {s5} +++ vldmdb WIN1!, {s6} +++ vldmdb WIN1!, {s7} +++ vldmia SRC0!, {s12-s13} +++ vmla.f s8, s0, s20 @ vector * vector +++ vldmia SRC0!, {s14-s15} +++ bne 5b +++6: vldmia WIN0!, {s20-s23} +++ vmul.f s28, s4, s12 @ vector * vector +++ vstmia DST0!, {s24-s25} +++ vldmdb SRC1!, {s16} +++ vldmdb SRC1!, {s17} +++ vldmdb SRC1!, {s18} +++ vldmdb SRC1!, {s19} +++ vmul.f s12, s20, s12 @ vector * vector +++ vstmia DST0!, {s26-s27} +++ vstmdb DST1!, {s8} +++ vstmdb DST1!, {s9} +++ vstmdb DST1!, {s10} +++ vstmdb DST1!, {s11} +++ vmls.f s28, s20, s16 @ vector * vector +++ vmla.f s12, s4, s16 @ vector * vector +++ vstmia DST0!, {s28-s31} +++ vstmdb DST1!, {s12} +++ vstmdb DST1!, {s13} +++ vstmdb DST1!, {s14} +++ vstmdb DST1!, {s15} +++7: +++ fmxr FPSCR, OLDFPSCR +++ vpop {s16-s31} +++ pop {v1-v3,pc} +++ +++ .unreq DST0 +++ .unreq SRC0 +++ .unreq SRC1 +++ .unreq WIN0 +++ .unreq LEN +++ .unreq OLDFPSCR +++ .unreq DST1 +++ .unreq WIN1 +++endfunc +++ +++/** ++ * ARM VFP optimized implementation of 'vector_fmul_reverse_c' function. ++ * Assume that len is a positive number and is multiple of 8 ++ */ ++-- ++1.9.3 +-- +1.9.3 + + +From 648d3c9d161483f45285e2d280faa75372f69040 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 12 May 2014 23:06:43 +0100 -Subject: [PATCH 58/99] [omxcodec] Updates to work better with dropping and +Subject: [PATCH 57/96] [omxcodec] Updates to work better with dropping and lateness detection --- @@ -9466,10 +10418,10 @@ index f234f6d..adf53b5 100644 1.9.3 -From 89a8ef38736a9bc529fd1bbad6c9bd5919a4992f Mon Sep 17 00:00:00 2001 +From 01919034acb90274adc369bbfccdad97775ae220 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Fri, 11 Apr 2014 16:12:27 +0100 -Subject: [PATCH 59/99] [omxplayer] Add ability to log more timestamp info in +Subject: [PATCH 58/96] [omxplayer] Add ability to log more timestamp info in extra debug settings --- @@ -9482,7 +10434,7 @@ Subject: [PATCH 59/99] [omxplayer] Add ability to log more timestamp info in 6 files changed, 44 insertions(+), 34 deletions(-) diff --git a/language/English/strings.po b/language/English/strings.po -index d56f687..86da213 100755 +index 3b3fdd0..65628bf 100755 --- a/language/English/strings.po +++ b/language/English/strings.po @@ -2879,6 +2879,11 @@ msgctxt "#679" @@ -9510,7 +10462,7 @@ index 4bf5d83..3fb7cc3 100644 #ifdef __GNUC__ #define ATTRIB_LOG_FORMAT __attribute__((format(printf,3,4))) diff --git a/xbmc/cores/omxplayer/OMXPlayer.cpp b/xbmc/cores/omxplayer/OMXPlayer.cpp -index 030d7b6..658b0a6 100644 +index 13284d1..ed78b09 100644 --- a/xbmc/cores/omxplayer/OMXPlayer.cpp +++ b/xbmc/cores/omxplayer/OMXPlayer.cpp @@ -1545,27 +1545,28 @@ void COMXPlayer::Process() @@ -9628,7 +10580,7 @@ index 77dad37..605ea80 100644 || m_speed < 0) { diff --git a/xbmc/settings/AdvancedSettings.cpp b/xbmc/settings/AdvancedSettings.cpp -index e41a935..90222f4 100644 +index d1797ac..9af1d5a 100644 --- a/xbmc/settings/AdvancedSettings.cpp +++ b/xbmc/settings/AdvancedSettings.cpp @@ -1386,6 +1386,9 @@ void CAdvancedSettings::SettingOptionsLoggingComponentsFiller(const CSetting *se @@ -9645,10 +10597,10 @@ index e41a935..90222f4 100644 1.9.3 -From 456412b4f28b491891c35c4ffee6e8863588a878 Mon Sep 17 00:00:00 2001 +From 651ae93d3301b9fbc54c1abe8c7a6b7a18471001 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 7 Apr 2014 23:13:55 +0100 -Subject: [PATCH 60/99] [omxplayer] Add ability to dump out audio/video data +Subject: [PATCH 59/96] [omxplayer] Add ability to dump out audio/video data for later debugging --- @@ -9660,7 +10612,7 @@ Subject: [PATCH 60/99] [omxplayer] Add ability to dump out audio/video data 5 files changed, 112 insertions(+) diff --git a/language/English/strings.po b/language/English/strings.po -index 86da213..3704baa 100755 +index 65628bf..5ef9534 100755 --- a/language/English/strings.po +++ b/language/English/strings.po @@ -2884,6 +2884,16 @@ msgctxt "#697" @@ -9875,7 +10827,7 @@ index 820ea44..6639804 100644 if (omx_err != OMX_ErrorNone) { diff --git a/xbmc/settings/AdvancedSettings.cpp b/xbmc/settings/AdvancedSettings.cpp -index 90222f4..1175eb1 100644 +index 9af1d5a..5020105 100644 --- a/xbmc/settings/AdvancedSettings.cpp +++ b/xbmc/settings/AdvancedSettings.cpp @@ -1389,6 +1389,10 @@ void CAdvancedSettings::SettingOptionsLoggingComponentsFiller(const CSetting *se @@ -9893,10 +10845,10 @@ index 90222f4..1175eb1 100644 1.9.3 -From 9172ae4fef35d1990b2f8014cd8dd2fcf7434bfa Mon Sep 17 00:00:00 2001 +From d72b8595f0c567d26017c10bb4439409b85c3d1f Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 28 May 2014 18:30:51 +0100 -Subject: [PATCH 61/99] [omxcodec] Reduce GPU memory use by 2 video frames +Subject: [PATCH 60/96] [omxcodec] Reduce GPU memory use by 2 video frames --- xbmc/cores/dvdplayer/DVDCodecs/Video/OpenMaxVideo.cpp | 14 ++++++++++++++ @@ -9931,81 +10883,10 @@ index 612ae21..494fdf5 100644 1.9.3 -From 90e783513b7b242155d18eda21b72540338a5986 Mon Sep 17 00:00:00 2001 -From: popcornmix -Date: Fri, 30 May 2014 14:15:10 +0100 -Subject: [PATCH 62/99] [pi] Fix for logged resolutions - ---- - xbmc/windowing/egl/EGLNativeTypeRaspberryPI.cpp | 15 +++++---------- - 1 file changed, 5 insertions(+), 10 deletions(-) - -diff --git a/xbmc/windowing/egl/EGLNativeTypeRaspberryPI.cpp b/xbmc/windowing/egl/EGLNativeTypeRaspberryPI.cpp -index 5b26b20..a3edf0e 100644 ---- a/xbmc/windowing/egl/EGLNativeTypeRaspberryPI.cpp -+++ b/xbmc/windowing/egl/EGLNativeTypeRaspberryPI.cpp -@@ -483,10 +483,8 @@ bool CEGLNativeTypeRaspberryPI::ProbeResolutions(std::vector &r - - if(resolutions.size() == 0) - { -- RESOLUTION_INFO res; -- CLog::Log(LOGDEBUG, "EGL probe resolution %s:%x\n", m_desktopRes.strMode.c_str(), m_desktopRes.dwFlags); -- - AddUniqueResolution(m_desktopRes, resolutions); -+ CLog::Log(LOGDEBUG, "EGL probe resolution %s:%x\n", m_desktopRes.strMode.c_str(), m_desktopRes.dwFlags); - } - - if(resolutions.size() < 2) -@@ -576,13 +574,12 @@ void CEGLNativeTypeRaspberryPI::GetSupportedModes(HDMI_RES_GROUP_T group, std::v - res.iScreenWidth = tv->width; - res.iScreenHeight = tv->height; - res.fPixelRatio = get_display_aspect_ratio((HDMI_ASPECT_T)tv->aspect_ratio) / ((float)res.iScreenWidth / (float)res.iScreenHeight); -+ res.iSubtitles = (int)(0.965 * res.iHeight); - -+ AddUniqueResolution(res, resolutions); - CLog::Log(LOGDEBUG, "EGL mode %d: %s (%.2f) %s%s:%x\n", i, res.strMode.c_str(), res.fPixelRatio, - tv->native ? "N" : "", tv->scan_mode ? "I" : "", tv->code); - -- res.iSubtitles = (int)(0.965 * res.iHeight); -- -- AddUniqueResolution(res, resolutions); - if (tv->frame_rate == 24 || tv->frame_rate == 30 || tv->frame_rate == 60) - { - RESOLUTION_INFO res2 = res; -@@ -596,11 +593,10 @@ void CEGLNativeTypeRaspberryPI::GetSupportedModes(HDMI_RES_GROUP_T group, std::v - RESOLUTION_INFO res2 = res; - res2.dwFlags |= D3DPRESENTFLAG_MODE3DSBS; - res2.fPixelRatio = get_display_aspect_ratio((HDMI_ASPECT_T)tv->aspect_ratio) / ((float)res2.iScreenWidth / (float)res2.iScreenHeight); -- CLog::Log(LOGDEBUG, "EGL mode %d: %s (%.2f)\n", i, res2.strMode.c_str(), res2.fPixelRatio); -- - res2.iSubtitles = (int)(0.965 * res2.iHeight); - - AddUniqueResolution(res2, resolutions); -+ CLog::Log(LOGDEBUG, "EGL mode %d: %s (%.2f)\n", i, res2.strMode.c_str(), res2.fPixelRatio); - if (tv->frame_rate == 24 || tv->frame_rate == 30 || tv->frame_rate == 60) - { - res2.fRefreshRate = (float)tv->frame_rate * (1000.0f/1001.0f); -@@ -612,11 +608,10 @@ void CEGLNativeTypeRaspberryPI::GetSupportedModes(HDMI_RES_GROUP_T group, std::v - RESOLUTION_INFO res2 = res; - res2.dwFlags |= D3DPRESENTFLAG_MODE3DTB; - res2.fPixelRatio = get_display_aspect_ratio((HDMI_ASPECT_T)tv->aspect_ratio) / ((float)res2.iScreenWidth / (float)res2.iScreenHeight); -- CLog::Log(LOGDEBUG, "EGL mode %d: %s (%.2f)\n", i, res2.strMode.c_str(), res2.fPixelRatio); -- - res2.iSubtitles = (int)(0.965 * res2.iHeight); - - AddUniqueResolution(res2, resolutions); -+ CLog::Log(LOGDEBUG, "EGL mode %d: %s (%.2f)\n", i, res2.strMode.c_str(), res2.fPixelRatio); - if (tv->frame_rate == 24 || tv->frame_rate == 30 || tv->frame_rate == 60) - { - res2.fRefreshRate = (float)tv->frame_rate * (1000.0f/1001.0f); --- -1.9.3 - - -From 2ad66067f303d68a976ec56ed2f5be41a3479f72 Mon Sep 17 00:00:00 2001 +From 5f36232a5172f3fd4de3b8b1197ec642dda7cdb1 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Fri, 30 May 2014 14:58:43 +0100 -Subject: [PATCH 63/99] [settings] Experiment: Report DESKTOP resolution in +Subject: [PATCH 61/96] [settings] Experiment: Report DESKTOP resolution in video settings --- @@ -10030,58 +10911,10 @@ index bb31f15..eae549b 100644 1.9.3 -From 042314a5a8336b7a4ff6789ce719ba3edb30bfee Mon Sep 17 00:00:00 2001 -From: popcornmix -Date: Sat, 7 Jun 2014 16:55:41 +0100 -Subject: [PATCH 64/99] [omx] Remove logging for texture jobs - -This causes a lot of log spam which hasn't proved useful so far. ---- - xbmc/cores/omxplayer/OMXImage.cpp | 5 ----- - 1 file changed, 5 deletions(-) - -diff --git a/xbmc/cores/omxplayer/OMXImage.cpp b/xbmc/cores/omxplayer/OMXImage.cpp -index 5889365..d2f6b21 100644 ---- a/xbmc/cores/omxplayer/OMXImage.cpp -+++ b/xbmc/cores/omxplayer/OMXImage.cpp -@@ -213,13 +213,11 @@ bool COMXImage::SendMessage(bool (*callback)(EGLDisplay egl_display, EGLContext - mess.sync.Reset(); - { - CSingleLock lock(m_texqueue_lock); -- CLog::Log(LOGDEBUG, "%s: texture job: %p:%p", __func__, &mess, mess.callback); - m_texqueue.push(&mess); - m_texqueue_cond.notifyAll(); - } - // wait for function to have finished (in texture thread) - mess.sync.Wait(); -- CLog::Log(LOGDEBUG, "%s: texture job done: %p:%p = %d", __func__, &mess, mess.callback, mess.result); - // need to ensure texture thread has returned from mess.sync.Set() before we exit and free tex - CSingleLock lock(m_texqueue_lock); - return mess.result; -@@ -432,15 +430,12 @@ void COMXImage::Process() - struct callbackinfo *mess = m_texqueue.front(); - m_texqueue.pop(); - lock.Leave(); -- CLog::Log(LOGDEBUG, "%s: texture job: %p:%p:%p", __func__, mess, mess->callback, mess->cookie); - - mess->result = mess->callback(g_Windowing.GetEGLDisplay(), GetEGLContext(), mess->cookie); -- CLog::Log(LOGDEBUG, "%s: texture job about to Set: %p:%p:%p", __func__, mess, mess->callback, mess->cookie); - { - CSingleLock lock(m_texqueue_lock); - mess->sync.Set(); - } -- CLog::Log(LOGDEBUG, "%s: texture job: %p done", __func__, mess); - } - } - } --- -1.9.3 - - -From c5d28ec1360f5507090deb8a01685dbc2e788b1b Mon Sep 17 00:00:00 2001 +From 7577000978940f083411ba820ea6a54d65caa1db Mon Sep 17 00:00:00 2001 From: Matthias Kortstiege Date: Sun, 1 Jun 2014 18:47:20 +0200 -Subject: [PATCH 65/99] changed: avoid useless filesytem io while searching for +Subject: [PATCH 62/96] changed: avoid useless filesytem io while searching for subtitles --- @@ -10089,7 +10922,7 @@ Subject: [PATCH 65/99] changed: avoid useless filesytem io while searching for 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xbmc/Util.cpp b/xbmc/Util.cpp -index 20083fd..0d23820 100644 +index 3152a0f..9afa557 100644 --- a/xbmc/Util.cpp +++ b/xbmc/Util.cpp @@ -1982,7 +1982,7 @@ void CUtil::ScanForExternalSubtitles(const std::string& strMovie, std::vector Date: Wed, 4 Jun 2014 19:10:27 +0100 -Subject: [PATCH 66/99] [pisink] Support planar formats +Subject: [PATCH 63/96] [pisink] Support planar formats --- xbmc/cores/AudioEngine/Sinks/AESinkPi.cpp | 35 ++++++++++++++++++++++++++----- @@ -10217,10 +11050,10 @@ index 0a09275..5a45653 100644 1.9.3 -From 0b99849f497bf1ee698522018347cdce4c656bdd Mon Sep 17 00:00:00 2001 +From 970e9f211b03473161cd850a17bc2bc9539cc511 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 30 Dec 2013 12:02:14 +0000 -Subject: [PATCH 67/99] [rbp] Hardware accelerated resampling +Subject: [PATCH 64/96] [rbp] Hardware accelerated resampling This replaces the format conversion, up/down mixing and resampling code from ActiveAE with a GPU accelerated version. Should significantly reduce CPU when using paplayer or dvdplayer. @@ -11053,10 +11886,10 @@ index 99e407a..8d3c86a 100644 1.9.3 -From 566bb44404b43245776fa0c97f6d4036dddb3ab4 Mon Sep 17 00:00:00 2001 +From b3f51b63f352cf3d9066e1ff55c22993d64c7dee Mon Sep 17 00:00:00 2001 From: popcornmix Date: Sun, 1 Jun 2014 12:15:17 +0100 -Subject: [PATCH 68/99] [resamplepi] Support planar formats +Subject: [PATCH 65/96] [resamplepi] Support planar formats --- .../Engines/ActiveAE/ActiveAEResamplePi.cpp | 101 ++++++++++++--------- @@ -11256,10 +12089,10 @@ index 9a1e549..1604030 100644 1.9.3 -From 550dc53b57021d6c29c8f0e0dc23789643f375cf Mon Sep 17 00:00:00 2001 +From fde445f872e70c80006dd7d5cc26b1cec2d6dd2f Mon Sep 17 00:00:00 2001 From: popcornmix Date: Sun, 15 Jun 2014 13:20:53 +0100 -Subject: [PATCH 69/99] gles: Avoid crash when capturing snapshot when using +Subject: [PATCH 66/96] gles: Avoid crash when capturing snapshot when using dvdplayer Note: snapshot will be blank, but that's better than crashing @@ -11285,10 +12118,10 @@ index 2929a37..53873f6 100644 1.9.3 -From 6b0003bb9a3c2449376a07aa3d8461f622e39af9 Mon Sep 17 00:00:00 2001 +From 0f35c1be74e71abdc5565ea579ac7d88cfd9202f Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 16 Jun 2014 19:05:14 +0100 -Subject: [PATCH 70/99] sqlite: Bump to 3080500 +Subject: [PATCH 67/96] sqlite: Bump to 3080500 --- tools/depends/target/sqlite3/Makefile | 4 +++- @@ -11313,10 +12146,10 @@ index 87f7eaa..8fe61e8 100644 1.9.3 -From dcf091e7f5eaf365ef0670fde7a0db8ea1f84ae5 Mon Sep 17 00:00:00 2001 +From 2e6615467ae671a1f21d603c7925ae6b21bd1e31 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 16 Jun 2014 19:06:00 +0100 -Subject: [PATCH 71/99] [experimental] Disable quiet-noise generation +Subject: [PATCH 68/96] [experimental] Disable quiet-noise generation --- xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAESink.cpp | 2 ++ @@ -11346,10 +12179,10 @@ index 488a0df..d9f4a43 100644 1.9.3 -From 07cc88baecc7104213d5c83dae193323744b685e Mon Sep 17 00:00:00 2001 +From 58bf7fd018f9e6807b7d24ab00034cd415ecf6cf Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 16 Jun 2014 19:07:21 +0100 -Subject: [PATCH 72/99] [omxcodec] Adjust asserts +Subject: [PATCH 69/96] [omxcodec] Adjust asserts --- xbmc/cores/dvdplayer/DVDCodecs/Video/OpenMaxVideo.cpp | 11 +++++++---- @@ -11388,10 +12221,10 @@ index 494fdf5..23aaa9f 100644 1.9.3 -From 73a4d2fb59999726c9e906cf046e7dd262cf6eaa Mon Sep 17 00:00:00 2001 +From 0e4af5404d4392c281b2313c85b905a4701c16c2 Mon Sep 17 00:00:00 2001 From: macrule Date: Thu, 11 Apr 2013 18:24:42 +0200 -Subject: [PATCH 73/99] Added some vc_tv_* functions that were missing in +Subject: [PATCH 70/96] Added some vc_tv_* functions that were missing in DllBCM. --- @@ -11429,10 +12262,10 @@ index b92fdb8..9c7e293 100644 1.9.3 -From 9760a28ec013598562927aa51cfc6957b1916712 Mon Sep 17 00:00:00 2001 +From 8fa8232eb4537f9ca362ea8d597eadd8e57907a6 Mon Sep 17 00:00:00 2001 From: macrule Date: Thu, 11 Apr 2013 18:29:03 +0200 -Subject: [PATCH 74/99] Added private utility function to map a float display +Subject: [PATCH 71/96] Added private utility function to map a float display aspect, to the respective SDTV_ASPECT_* enum value. --- @@ -11473,10 +12306,10 @@ index a3edf0e..5ae2b59 100644 1.9.3 -From aed09b5994072e7e0c6e9bacf761f9eb7f82769f Mon Sep 17 00:00:00 2001 +From 87072dd2315f748306b7c1ce6a4a7a503d2b7bc4 Mon Sep 17 00:00:00 2001 From: macrule Date: Thu, 11 Apr 2013 19:50:58 +0200 -Subject: [PATCH 75/99] Changed SDTV resolutions to be treated similarly to +Subject: [PATCH 72/96] Changed SDTV resolutions to be treated similarly to HDMI resolutions in SetNativeResolution. This means that the SDTV interface is powered up and set to the right mode. @@ -11576,10 +12409,10 @@ index 59401f5..a0acb1a 100644 1.9.3 -From c7907a1f7ade36d7d6ad7cc0b31bd00aa4af56ca Mon Sep 17 00:00:00 2001 +From d6f894a9f61304ab710da8765fca1756bf69d64c Mon Sep 17 00:00:00 2001 From: macrule Date: Thu, 11 Apr 2013 19:54:59 +0200 -Subject: [PATCH 76/99] Added methods SuspendVideoOutput() and +Subject: [PATCH 73/96] Added methods SuspendVideoOutput() and ResumeVideoOutput() to CRBP class, which can be used to power down the Raspberry PI's video interface, and restore it at a later point. @@ -11646,10 +12479,10 @@ index 712fe9c..40d303e 100644 1.9.3 -From 56fc582a96b00749ecb470e99cb3fe05834fc294 Mon Sep 17 00:00:00 2001 +From 4f8734f9fe9f455e11feb8ec979ff0870b549117 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Sun, 11 Aug 2013 15:03:36 +0100 -Subject: [PATCH 77/99] PowerManager (and its IPowerSyscall instance) now gets +Subject: [PATCH 74/96] PowerManager (and its IPowerSyscall instance) now gets called from CApplication::OnKey() and can process and suppress key presses. This is a requirement to implement a virtual sleep state. @@ -11661,7 +12494,7 @@ Subject: [PATCH 77/99] PowerManager (and its IPowerSyscall instance) now gets 4 files changed, 23 insertions(+) diff --git a/xbmc/Application.cpp b/xbmc/Application.cpp -index 749e3c0..8415123 100644 +index a25f44f..d595c86 100644 --- a/xbmc/Application.cpp +++ b/xbmc/Application.cpp @@ -2369,6 +2369,13 @@ bool CApplication::OnKey(const CKey& key) @@ -11745,10 +12578,10 @@ index 0b1f10a..e42b143 100644 1.9.3 -From a8dd2b7a35760c9d5c251bf7a1a695d81f14bed2 Mon Sep 17 00:00:00 2001 +From 6af27c90ce350d2aebf4b35951dadf94e5cf7391 Mon Sep 17 00:00:00 2001 From: macrule Date: Wed, 17 Apr 2013 13:23:01 +0200 -Subject: [PATCH 78/99] Added CPowerSyscallVirtualSleep class, which acts as a +Subject: [PATCH 75/96] Added CPowerSyscallVirtualSleep class, which acts as a base class for devices that have no native standby mode, and need to fake it in some way. @@ -11927,10 +12760,10 @@ index 0000000..ef6e682 1.9.3 -From de43b0c0c8753091d5fad478684f44ce03dc04b6 Mon Sep 17 00:00:00 2001 +From 9eba1531e9c53354d4f45398f6a5443ba209f2aa Mon Sep 17 00:00:00 2001 From: macrule Date: Wed, 17 Apr 2013 13:24:22 +0200 -Subject: [PATCH 79/99] Added power management support for the Raspberry Pi. +Subject: [PATCH 76/96] Added power management support for the Raspberry Pi. Since it doesn't support true standby, we fake it by turning video on or off, and ignoring remote inputs during the standby phase. @@ -12080,10 +12913,10 @@ index 0000000..fd1d67c 1.9.3 -From 6eb17e4018ee5a5f8fb08bbf02d9f3e4f85cb51b Mon Sep 17 00:00:00 2001 +From 6a0e568fd983187f8da76a0782839f6a79c5c2dc Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 3 Mar 2014 16:16:29 +0000 -Subject: [PATCH 80/99] [power] hack - don't kill lirc or cec +Subject: [PATCH 77/96] [power] hack - don't kill lirc or cec --- xbmc/peripherals/devices/PeripheralCecAdapter.cpp | 37 +++++++++++++++++++++++ @@ -12170,10 +13003,10 @@ index 7dd691c..17f118a 100644 1.9.3 -From dcf386bf37dd9ac82da59f2007243f195e7a54fe Mon Sep 17 00:00:00 2001 +From 841c0d0794dfaf063d4f42abaf2b1ce0e5713707 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 3 Mar 2014 16:47:54 +0000 -Subject: [PATCH 81/99] [power] hack - wake on any action +Subject: [PATCH 78/96] [power] hack - wake on any action --- xbmc/powermanagement/PowerSyscallVirtualSleep.cpp | 6 +++--- @@ -12205,10 +13038,10 @@ index 6a1e47b..a717a09 100644 1.9.3 -From c96538abd2449886b50ed185d19c6e0e3196aef3 Mon Sep 17 00:00:00 2001 +From e5165963a436e99cbe88f8ff30104febccd29c92 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 3 Mar 2014 17:30:07 +0000 -Subject: [PATCH 82/99] [power] hack - Make suspend toggle suspend state +Subject: [PATCH 79/96] [power] hack - Make suspend toggle suspend state --- xbmc/powermanagement/PowerSyscallVirtualSleep.cpp | 5 +++++ @@ -12234,10 +13067,10 @@ index a717a09..d39c3ed 100644 1.9.3 -From d76e483f4d9ba20926fe600dc0336a8a04b0e2a7 Mon Sep 17 00:00:00 2001 +From 0d2b1260fecad565f42a084e13b55d5658a5295d Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 4 Mar 2014 19:33:44 +0000 -Subject: [PATCH 83/99] [power] Add back in powerdown and reboot +Subject: [PATCH 80/96] [power] Add back in powerdown and reboot --- .../linux/RaspberryPIPowerSyscall.cpp | 34 ++++++++++++++++++++++ @@ -12318,10 +13151,10 @@ index fd1d67c..062132e 100644 1.9.3 -From 5a0fe21fd2e50f7a17eeb6f5be38699137807366 Mon Sep 17 00:00:00 2001 +From 3e0e20fbe01b34e879b161b92fa9245d7c8bb822 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 18 Jun 2014 23:11:28 +0100 -Subject: [PATCH 84/99] [rbp] Reduce GPU memory use when limited +Subject: [PATCH 81/96] [rbp] Reduce GPU memory use when limited Switching from default triple buffered output to double buffered saves 8M with 1080p GUI. This may slightly reduce framerate, but is likely to be minimal. @@ -12349,10 +13182,10 @@ index 87619e9..9f72a36 100644 1.9.3 -From 4347a199d6dbdfffd00b64edf80cd905bd5c0fff Mon Sep 17 00:00:00 2001 +From 3d2b77f125b24f69d68bd57a773b0b6aa09ba64e Mon Sep 17 00:00:00 2001 From: popcornmix Date: Fri, 27 Jun 2014 00:01:05 +0100 -Subject: [PATCH 87/99] [rbp] Resume video output on startup +Subject: [PATCH 84/96] [rbp] Resume video output on startup --- xbmc/linux/RBP.cpp | 3 +++ @@ -12376,10 +13209,10 @@ index 9f72a36..f789bf1 100644 1.9.3 -From 52d99a15f40cf0ba6ef4c7ac5a66154b2604eb71 Mon Sep 17 00:00:00 2001 +From 70d534a44d5d261290b0e463b0b71a35d241b393 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Fri, 27 Jun 2014 00:36:29 +0100 -Subject: [PATCH 88/99] [omxplayer] Experimental support for anaglyph rendering +Subject: [PATCH 85/96] [omxplayer] Experimental support for anaglyph rendering of 3d videos Requires updated firmware @@ -12392,7 +13225,7 @@ Requires updated firmware 5 files changed, 72 insertions(+), 18 deletions(-) diff --git a/xbmc/cores/omxplayer/OMXPlayer.cpp b/xbmc/cores/omxplayer/OMXPlayer.cpp -index 658b0a6..b295e91 100644 +index ed78b09..55abc65 100644 --- a/xbmc/cores/omxplayer/OMXPlayer.cpp +++ b/xbmc/cores/omxplayer/OMXPlayer.cpp @@ -1502,6 +1502,8 @@ void COMXPlayer::Process() @@ -12640,10 +13473,10 @@ index 226000e..e2e79c2 100644 ResolutionUpdateCallBackFn m_res_callback; void *m_res_ctx; diff --git a/xbmc/rendering/RenderSystem.cpp b/xbmc/rendering/RenderSystem.cpp -index e5a98f6..3ee28e0 100644 +index 16102bb..a8d59f9 100644 --- a/xbmc/rendering/RenderSystem.cpp +++ b/xbmc/rendering/RenderSystem.cpp -@@ -73,6 +73,10 @@ bool CRenderSystemBase::SupportsStereo(RENDER_STEREO_MODE mode) const +@@ -74,6 +74,10 @@ bool CRenderSystemBase::SupportsStereo(RENDER_STEREO_MODE mode) const case RENDER_STEREO_MODE_SPLIT_HORIZONTAL: case RENDER_STEREO_MODE_SPLIT_VERTICAL: case RENDER_STEREO_MODE_MONO: @@ -12658,10 +13491,10 @@ index e5a98f6..3ee28e0 100644 1.9.3 -From 6f203e648a17355451f48251837f4d281cfee04b Mon Sep 17 00:00:00 2001 +From 5e9cfd8e6b4a8876ccedc0395d9ac403fee01406 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 2 Jul 2014 12:24:01 +0100 -Subject: [PATCH 89/99] [settings] Add update flag to omx acceleration +Subject: [PATCH 86/96] [settings] Add update flag to omx acceleration --- system/settings/settings.xml | 3 +++ @@ -12669,7 +13502,7 @@ Subject: [PATCH 89/99] [settings] Add update flag to omx acceleration 2 files changed, 4 insertions(+) diff --git a/system/settings/settings.xml b/system/settings/settings.xml -index 3e8118b..9b87290 100644 +index 637ddea..88fc18f 100644 --- a/system/settings/settings.xml +++ b/system/settings/settings.xml @@ -740,6 +740,9 @@ @@ -12698,10 +13531,10 @@ index b5ed60a..84b3225 100644 1.9.3 -From f75f4a67faef560be8c1102b0f059e45b6fe0c3c Mon Sep 17 00:00:00 2001 +From 1f1de47805bc278aab6359b9be3bbca25dd18094 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 1 Jul 2014 00:38:54 +0100 -Subject: [PATCH 90/99] [omx] Avoid hang following jpegs that failed to decode +Subject: [PATCH 87/96] [omx] Avoid hang following jpegs that failed to decode There's a few instanced of xbmc hanging following a jpeg that failed to decode on GPU: http://forum.stmlabs.com/showthread.php?tid=14839 @@ -12917,10 +13750,10 @@ index 9518190..90e513a 100644 1.9.3 -From b51ea932eb3590cb06b9aefaaf001e0eab275dc6 Mon Sep 17 00:00:00 2001 +From f6de911dac602d842fed40ab29ed63c1480b6423 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 2 Jul 2014 20:41:29 +0100 -Subject: [PATCH 91/99] [pi] Reduce time textures are held for when memory is +Subject: [PATCH 88/96] [pi] Reduce time textures are held for when memory is low --- @@ -12930,7 +13763,7 @@ Subject: [PATCH 91/99] [pi] Reduce time textures are held for when memory is 3 files changed, 20 insertions(+) diff --git a/xbmc/Application.cpp b/xbmc/Application.cpp -index 8415123..bdd1390 100644 +index d595c86..4f6e44c 100644 --- a/xbmc/Application.cpp +++ b/xbmc/Application.cpp @@ -352,6 +352,10 @@ @@ -12993,10 +13826,10 @@ index f06687c..bf6dfdb 100644 1.9.3 -From 9723e98bf9a3f4387b226e8d7d0313469b4cd0c8 Mon Sep 17 00:00:00 2001 +From 36ce7c955536898171e2770eeb22bcfce168b5e9 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 2 Jul 2014 21:03:59 +0100 -Subject: [PATCH 92/99] [omx] Restrict the number of outstanding jpeg calls to +Subject: [PATCH 89/96] [omx] Restrict the number of outstanding jpeg calls to gpu Allowing more than one outstanding call to gpu for texture encode/decode can be beneficial as processing @@ -13114,10 +13947,10 @@ index 085d050..efd3343 100644 1.9.3 -From b8837ec20d7b68b2441da31bc48ab2ec2b2be2e2 Mon Sep 17 00:00:00 2001 +From e67029fd4675c39caa97ee134f77e6201424d2f2 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Sat, 5 Jul 2014 19:26:46 +0100 -Subject: [PATCH 93/99] [omxplayer] Explictly choose deinterlace method for +Subject: [PATCH 90/96] [omxplayer] Explictly choose deinterlace method for 1080i As the 1080i deinterlace doesn't require the 3 frames of context we can save ~9MB by requesting it explicitly @@ -13169,10 +14002,10 @@ index 07c4643..15b62af 100644 1.9.3 -From d8c342416463b82d1bf890a304d5c1c0253e96b3 Mon Sep 17 00:00:00 2001 +From ec10e2c17dbf469e4f91d2651fe7823fd09e7ac2 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 8 Jul 2014 21:00:44 +0100 -Subject: [PATCH 94/99] [omxcodec] Fix 3D rendering for dvdplayer +Subject: [PATCH 91/96] [omxcodec] Fix 3D rendering for dvdplayer Similar to https://github.com/xbmc/xbmc/pull/3887 --- @@ -13239,10 +14072,10 @@ index 53873f6..84a46ec 100644 1.9.3 -From 57d075ae9b88cb6d25b04095e3f9c3c3f7a95289 Mon Sep 17 00:00:00 2001 +From 257fe64e6cd941986314da84749a81f4df222e7f Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 9 Jul 2014 22:45:43 +0100 -Subject: [PATCH 95/99] [rbp] Make cachemembuffersize default depend on memory +Subject: [PATCH 92/96] [rbp] Make cachemembuffersize default depend on memory size --- @@ -13281,7 +14114,7 @@ index 65c95a3..bbf7ab5 100644 response[sizeof(response) - 1] = '\0'; CLog::Log(LOGNOTICE, "Config:\n%s", response); diff --git a/xbmc/settings/AdvancedSettings.cpp b/xbmc/settings/AdvancedSettings.cpp -index 1175eb1..fcf3fa7 100644 +index 5020105..7f2d65b 100644 --- a/xbmc/settings/AdvancedSettings.cpp +++ b/xbmc/settings/AdvancedSettings.cpp @@ -364,7 +364,12 @@ void CAdvancedSettings::Initialize() @@ -13301,10 +14134,10 @@ index 1175eb1..fcf3fa7 100644 1.9.3 -From b9b8cd6d8893e12ac3f9bc81d94e04874e3dcf13 Mon Sep 17 00:00:00 2001 +From dd4ff79f51a015a2a4e2c57726b402db0ee1e997 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 9 Jul 2014 23:31:32 +0100 -Subject: [PATCH 96/99] [rbp] Make gui limit default to 720 when memory is +Subject: [PATCH 93/96] [rbp] Make gui limit default to 720 when memory is limited --- @@ -13354,10 +14187,10 @@ index bbf7ab5..85e1f21 100644 1.9.3 -From 80f2924035713ee6094830548514b6df5d03d7c6 Mon Sep 17 00:00:00 2001 +From 7ea807a6573bdc7c07127ea3ed7349f92a54ef0a Mon Sep 17 00:00:00 2001 From: popcornmix Date: Sun, 13 Jul 2014 11:28:20 +0100 -Subject: [PATCH 97/99] [ResamplePi] Fix xbmc crash with usb audio when music +Subject: [PATCH 94/96] [ResamplePi] Fix xbmc crash with usb audio when music file switched Need to handle the case where AE requests fewer output samples that are produced. @@ -13506,1097 +14339,3 @@ index 47a9e08..b88a90b 100644 } -- 1.9.3 - - -From 10a26b5fd921c328f0c4c152caa8a348baffa4c2 Mon Sep 17 00:00:00 2001 -From: Rainer Hochecker -Date: Thu, 17 Jul 2014 08:40:22 +0200 -Subject: [PATCH 98/99] ffmpeg: bump to 2.3 - ---- - tools/depends/target/ffmpeg/FFMPEG-VERSION | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/tools/depends/target/ffmpeg/FFMPEG-VERSION b/tools/depends/target/ffmpeg/FFMPEG-VERSION -index 33f458e..d394b94 100644 ---- a/tools/depends/target/ffmpeg/FFMPEG-VERSION -+++ b/tools/depends/target/ffmpeg/FFMPEG-VERSION -@@ -1,5 +1,5 @@ - LIBNAME=ffmpeg - BASE_URL=https://github.com/xbmc/FFmpeg/archive --VERSION=2.2-Helix-alpha2 -+VERSION=2.3-Helix-alpha2 - ARCHIVE=$(LIBNAME)-$(VERSION).tar.gz - --- -1.9.3 - - -From dc0901d679e407e66274a6acbe3a1356434c7c3b Mon Sep 17 00:00:00 2001 -From: Memphiz -Date: Thu, 17 Jul 2014 09:14:45 +0200 -Subject: [PATCH 99/99] - bump gas to - https://git.libav.org/?p=gas-preprocessor.git;a=commit;h=03e23216b7e657fdf202befc129ca94cd582c253 - - needed for ffmpeg2.3 compilation on ios - ---- - .../gas-preprocessor-native/gas-preprocessor.pl | 847 ++++++++++++++++----- - 1 file changed, 654 insertions(+), 193 deletions(-) - -diff --git a/tools/depends/native/gas-preprocessor-native/gas-preprocessor.pl b/tools/depends/native/gas-preprocessor-native/gas-preprocessor.pl -index f932c60..9cc3610 100755 ---- a/tools/depends/native/gas-preprocessor-native/gas-preprocessor.pl -+++ b/tools/depends/native/gas-preprocessor-native/gas-preprocessor.pl -@@ -10,17 +10,74 @@ - # implements the subset of the gas preprocessor used by x264 and ffmpeg - # that isn't supported by Apple's gas. - --my @gcc_cmd = @ARGV; -+my %canonical_arch = ("aarch64" => "aarch64", "arm64" => "aarch64", -+ "arm" => "arm", -+ "powerpc" => "powerpc", "ppc" => "powerpc"); -+ -+my %comments = ("aarch64" => '//', -+ "arm" => '@', -+ "powerpc" => '#'); -+ -+my @gcc_cmd; - my @preprocess_c_cmd; - -+my $comm; -+my $arch; -+my $as_type = "apple-gas"; -+ - my $fix_unreq = $^O eq "darwin"; -+my $force_thumb = 0; -+ -+my $arm_cond_codes = "eq|ne|cs|cc|mi|pl|vs|vc|hi|ls|ge|lt|gt|le|al|hs|lo"; -+ -+my $usage_str = " -+$0\n -+Gas-preprocessor.pl converts assembler files using modern GNU as syntax for -+Apple's ancient gas version or clang's incompatible integrated assembler. The -+conversion is regularly tested for Libav, x264 and vlc. Other projects might -+use different features which are not correctly handled. -+ -+Options for this program needs to be separated with ' -- ' from the assembler -+command. Following options are currently supported: -+ -+ -help - this usage text -+ -arch - target architecture -+ -as-type - one value out of {{,apple-}{gas,clang},armasm} -+ -fix-unreq -+ -no-fix-unreq -+ -force-thumb - assemble as thumb regardless of the input source -+ (note, this is incomplete and only works for sources -+ it explicitly was tested with) -+"; -+ -+sub usage() { -+ print $usage_str; -+} - --if ($gcc_cmd[0] eq "-fix-unreq") { -- $fix_unreq = 1; -- shift @gcc_cmd; --} elsif ($gcc_cmd[0] eq "-no-fix-unreq") { -- $fix_unreq = 0; -- shift @gcc_cmd; -+while (@ARGV) { -+ my $opt = shift; -+ -+ if ($opt =~ /^-(no-)?fix-unreq$/) { -+ $fix_unreq = $1 ne "no-"; -+ } elsif ($opt eq "-force-thumb") { -+ $force_thumb = 1; -+ } elsif ($opt eq "-arch") { -+ $arch = shift; -+ die "unknown arch: '$arch'\n" if not exists $comments{$arch}; -+ } elsif ($opt eq "-as-type") { -+ $as_type = shift; -+ die "unknown as type: '$as_type'\n" if $as_type !~ /^((apple-)?(gas|clang)|armasm)$/; -+ } elsif ($opt eq "-help") { -+ usage(); -+ exit 0; -+ } elsif ($opt eq "--" ) { -+ @gcc_cmd = @ARGV; -+ } elsif ($opt =~ /^-/) { -+ die "option '$opt' is not known. See '$0 -help' for usage information\n"; -+ } else { -+ push @gcc_cmd, $opt, @ARGV; -+ } -+ last if (@gcc_cmd); - } - - if (grep /\.c$/, @gcc_cmd) { -@@ -29,9 +86,33 @@ - } elsif (grep /\.[sS]$/, @gcc_cmd) { - # asm file, just do C preprocessor - @preprocess_c_cmd = (@gcc_cmd, "-E"); -+} elsif (grep /-(v|-version|dumpversion)/, @gcc_cmd) { -+ # pass -v/--version along, used during probing. Matching '-v' might have -+ # uninteded results but it doesn't matter much if gas-preprocessor or -+ # the compiler fails. -+ exec(@gcc_cmd); - } else { - die "Unrecognized input filetype"; - } -+if ($as_type eq "armasm") { -+ -+ $preprocess_c_cmd[0] = "cpp"; -+ -+ @preprocess_c_cmd = grep ! /^-nologo$/, @preprocess_c_cmd; -+ # Remove -ignore XX parameter pairs from preprocess_c_cmd -+ my $index = 1; -+ while ($index < $#preprocess_c_cmd) { -+ if ($preprocess_c_cmd[$index] eq "-ignore" and $index + 1 < $#preprocess_c_cmd) { -+ splice(@preprocess_c_cmd, $index, 2); -+ next; -+ } -+ $index++; -+ } -+ if (grep /^-MM$/, @preprocess_c_cmd) { -+ system(@preprocess_c_cmd) == 0 or die "Error running preprocessor"; -+ exit 0; -+ } -+} - - # if compiling, avoid creating an output file named '-.o' - if ((grep /^-c$/, @gcc_cmd) && !(grep /^-o/, @gcc_cmd)) { -@@ -45,50 +126,95 @@ - } - } - } --@gcc_cmd = map { /\.[csS]$/ ? qw(-x assembler -) : $_ } @gcc_cmd; --@preprocess_c_cmd = map { /\.o$/ ? "-" : $_ } @preprocess_c_cmd; -- --my $comm; -+# replace only the '-o' argument with '-', avoids rewriting the make dependency -+# target specified with -MT to '-' -+my $index = 1; -+while ($index < $#preprocess_c_cmd) { -+ if ($preprocess_c_cmd[$index] eq "-o") { -+ $index++; -+ $preprocess_c_cmd[$index] = "-"; -+ } -+ $index++; -+} - --# detect architecture from gcc binary name --if ($gcc_cmd[0] =~ /arm/) { -- $comm = '@'; --} elsif ($gcc_cmd[0] =~ /powerpc|ppc/) { -- $comm = '#'; -+my $tempfile; -+if ($as_type ne "armasm") { -+ @gcc_cmd = map { /\.[csS]$/ ? qw(-x assembler -) : $_ } @gcc_cmd; -+} else { -+ @preprocess_c_cmd = grep ! /^-c$/, @preprocess_c_cmd; -+ @preprocess_c_cmd = grep ! /^-m/, @preprocess_c_cmd; -+ -+ @preprocess_c_cmd = grep ! /^-G/, @preprocess_c_cmd; -+ @preprocess_c_cmd = grep ! /^-W/, @preprocess_c_cmd; -+ @preprocess_c_cmd = grep ! /^-Z/, @preprocess_c_cmd; -+ @preprocess_c_cmd = grep ! /^-fp/, @preprocess_c_cmd; -+ @preprocess_c_cmd = grep ! /^-EHsc$/, @preprocess_c_cmd; -+ @preprocess_c_cmd = grep ! /^-O/, @preprocess_c_cmd; -+ -+ @gcc_cmd = grep ! /^-G/, @gcc_cmd; -+ @gcc_cmd = grep ! /^-W/, @gcc_cmd; -+ @gcc_cmd = grep ! /^-Z/, @gcc_cmd; -+ @gcc_cmd = grep ! /^-fp/, @gcc_cmd; -+ @gcc_cmd = grep ! /^-EHsc$/, @gcc_cmd; -+ @gcc_cmd = grep ! /^-O/, @gcc_cmd; -+ -+ my @outfiles = grep /\.(o|obj)$/, @gcc_cmd; -+ $tempfile = $outfiles[0].".asm"; -+ -+ # Remove most parameters from gcc_cmd, which actually is the armasm command, -+ # which doesn't support any of the common compiler/preprocessor options. -+ @gcc_cmd = grep ! /^-D/, @gcc_cmd; -+ @gcc_cmd = grep ! /^-U/, @gcc_cmd; -+ @gcc_cmd = grep ! /^-m/, @gcc_cmd; -+ @gcc_cmd = grep ! /^-M/, @gcc_cmd; -+ @gcc_cmd = grep ! /^-c$/, @gcc_cmd; -+ @gcc_cmd = grep ! /^-I/, @gcc_cmd; -+ @gcc_cmd = map { /\.S$/ ? $tempfile : $_ } @gcc_cmd; - } - --# look for -arch flag --foreach my $i (1 .. $#gcc_cmd-1) { -- if ($gcc_cmd[$i] eq "-arch") { -- if ($gcc_cmd[$i+1] =~ /arm/) { -- $comm = '@'; -- } elsif ($gcc_cmd[$i+1] =~ /powerpc|ppc/) { -- $comm = '#'; -+# detect architecture from gcc binary name -+if (!$arch) { -+ if ($gcc_cmd[0] =~ /(arm64|aarch64|arm|powerpc|ppc)/) { -+ $arch = $1; -+ } else { -+ # look for -arch flag -+ foreach my $i (1 .. $#gcc_cmd-1) { -+ if ($gcc_cmd[$i] eq "-arch" and -+ $gcc_cmd[$i+1] =~ /(arm64|aarch64|arm|powerpc|ppc)/) { -+ $arch = $1; -+ } - } - } - } - - # assume we're not cross-compiling if no -arch or the binary doesn't have the arch name --if (!$comm) { -- my $native_arch = qx/arch/; -- if ($native_arch =~ /arm/) { -- $comm = '@'; -- } elsif ($native_arch =~ /powerpc|ppc/) { -- $comm = '#'; -- } --} -+$arch = qx/arch/ if (!$arch); - --if (!$comm) { -- die "Unable to identify target architecture"; --} -+die "Unknown target architecture '$arch'" if not exists $canonical_arch{$arch}; -+ -+$arch = $canonical_arch{$arch}; -+$comm = $comments{$arch}; -+my $inputcomm = $comm; -+$comm = ";" if $as_type =~ /armasm/; - - my %ppc_spr = (ctr => 9, - vrsave => 256); - --open(ASMFILE, "-|", @preprocess_c_cmd) || die "Error running preprocessor"; -+open(INPUT, "-|", @preprocess_c_cmd) || die "Error running preprocessor"; -+ -+if ($ENV{GASPP_DEBUG}) { -+ open(ASMFILE, ">&STDOUT"); -+} else { -+ if ($as_type ne "armasm") { -+ open(ASMFILE, "|-", @gcc_cmd) or die "Error running assembler"; -+ } else { -+ open(ASMFILE, ">", $tempfile); -+ } -+} - - my $current_macro = ''; - my $macro_level = 0; -+my $rept_level = 0; - my %macro_lines; - my %macro_args; - my %macro_args_default; -@@ -96,39 +222,55 @@ - my $altmacro = 0; - my $in_irp = 0; - --my @pass1_lines; -+my $num_repts; -+my @rept_lines; -+ -+my @irp_args; -+my $irp_param; -+ - my @ifstack; - - my %symbols; - -+my @sections; -+ -+my %literal_labels; # for ldr , = -+my $literal_num = 0; -+my $literal_expr = ".word"; -+$literal_expr = ".quad" if $arch eq "aarch64"; -+ -+my $thumb = 0; -+ -+my %thumb_labels; -+my %call_targets; -+my %mov32_targets; -+ -+my %neon_alias_reg; -+my %neon_alias_type; -+ -+my $temp_label_next = 0; -+my %last_temp_labels; -+my %next_temp_labels; -+ -+my %labels_seen; -+ -+my %aarch64_req_alias; -+ -+if ($force_thumb) { -+ parse_line(".thumb\n"); -+} -+ - # pass 1: parse .macro - # note that the handling of arguments is probably overly permissive vs. gas - # but it should be the same for valid cases --while () { -+while () { - # remove all comments (to avoid interfering with evaluating directives) -- s/(? 0) { -- $ifstack[-1] = -$ifstack[-1]; -+ # Don't evaluate any new if statements if we're within -+ # a repetition or macro - they will be evaluated once -+ # the repetition is unrolled or the macro is expanded. -+ if (scalar(@rept_lines) == 0 and $macro_level == 0) { -+ if ($line =~ /\.endif/) { -+ pop(@ifstack); -+ return 1; -+ } elsif ($line =~ /\.elseif\s+(.*)/) { -+ if ($ifstack[-1] == 0) { -+ $ifstack[-1] = !!eval_expr($1); -+ } elsif ($ifstack[-1] > 0) { -+ $ifstack[-1] = -$ifstack[-1]; -+ } -+ return 1; -+ } elsif ($line =~ /\.else/) { -+ $ifstack[-1] = !$ifstack[-1]; -+ return 1; -+ } elsif (handle_if($line)) { -+ return 1; - } -- return 1; -- } elsif ($line =~ /\.else/) { -- $ifstack[-1] = !$ifstack[-1]; -- return 1; -- } elsif (handle_if($line)) { -- return 1; - } - - # discard lines in false .if blocks -@@ -210,31 +357,39 @@ sub parse_if_line { - } - - sub parse_line { -- my $line = @_[0]; -+ my $line = $_[0]; - - return if (parse_if_line($line)); - -- if (/\.macro/) { -- $macro_level++; -- if ($macro_level > 1 && !$current_macro) { -- die "nested macros but we don't have master macro"; -- } -- } elsif (/\.endm/) { -- $macro_level--; -- if ($macro_level < 0) { -- die "unmatched .endm"; -- } elsif ($macro_level == 0) { -- $current_macro = ''; -- return; -+ if (scalar(@rept_lines) == 0) { -+ if (/\.macro/) { -+ $macro_level++; -+ if ($macro_level > 1 && !$current_macro) { -+ die "nested macros but we don't have master macro"; -+ } -+ } elsif (/\.endm/) { -+ $macro_level--; -+ if ($macro_level < 0) { -+ die "unmatched .endm"; -+ } elsif ($macro_level == 0) { -+ $current_macro = ''; -+ return; -+ } -+ } -+ } -+ -+ if ($macro_level == 0) { -+ if ($line =~ /\.(rept|irp)/) { -+ $rept_level++; -+ } elsif ($line =~ /.endr/) { -+ $rept_level--; - } -- } elsif (/\.irp/ or /\.rept/) { -- $in_irp = 1; -- } elsif (/.endr/) { -- $in_irp = 0; - } - - if ($macro_level > 1) { - push(@{$macro_lines{$current_macro}}, $line); -+ } elsif (scalar(@rept_lines) and $rept_level >= 1) { -+ push(@rept_lines, $line); - } elsif ($macro_level == 0) { - expand_macros($line); - } else { -@@ -267,15 +422,17 @@ sub handle_set { - my $line = $_[0]; - if ($line =~ /\.set\s+(.*),\s*(.*)/) { - $symbols{$1} = eval_expr($2); -+ return 1; - } -+ return 0; - } - - sub expand_macros { -- my $line = @_[0]; -+ my $line = $_[0]; - - # handle .if directives; apple's assembler doesn't support important non-basic ones - # evaluating them is also needed to handle recursive macros -- if (!$in_irp && handle_if($line)) { -+ if (handle_if($line)) { - return; - } - -@@ -298,10 +455,69 @@ sub expand_macros { - - $line =~ s/\%([^,]*)/eval_expr($1)/eg if $altmacro; - -- handle_set($line); -+ # Strip out the .set lines from the armasm output -+ return if (handle_set($line) and $as_type eq "armasm"); -+ -+ if ($line =~ /\.rept\s+(.*)/) { -+ $num_repts = $1; -+ @rept_lines = ("\n"); -+ -+ # handle the possibility of repeating another directive on the same line -+ # .endr on the same line is not valid, I don't know if a non-directive is -+ if ($num_repts =~ s/(\.\w+.*)//) { -+ push(@rept_lines, "$1\n"); -+ } -+ $num_repts = eval_expr($num_repts); -+ } elsif ($line =~ /\.irp\s+([\d\w\.]+)\s*(.*)/) { -+ $in_irp = 1; -+ $num_repts = 1; -+ @rept_lines = ("\n"); -+ $irp_param = $1; -+ -+ # only use whitespace as the separator -+ my $irp_arglist = $2; -+ $irp_arglist =~ s/,/ /g; -+ $irp_arglist =~ s/^\s+//; -+ @irp_args = split(/\s+/, $irp_arglist); -+ } elsif ($line =~ /\.irpc\s+([\d\w\.]+)\s*(.*)/) { -+ $in_irp = 1; -+ $num_repts = 1; -+ @rept_lines = ("\n"); -+ $irp_param = $1; -+ -+ my $irp_arglist = $2; -+ $irp_arglist =~ s/,/ /g; -+ $irp_arglist =~ s/^\s+//; -+ @irp_args = split(//, $irp_arglist); -+ } elsif ($line =~ /\.endr/) { -+ my @prev_rept_lines = @rept_lines; -+ my $prev_in_irp = $in_irp; -+ my @prev_irp_args = @irp_args; -+ my $prev_irp_param = $irp_param; -+ my $prev_num_repts = $num_repts; -+ @rept_lines = (); -+ $in_irp = 0; -+ @irp_args = ''; - -- if ($line =~ /(\S+:|)\s*([\w\d\.]+)\s*(.*)/ && exists $macro_lines{$2}) { -- push(@pass1_lines, $1); -+ if ($prev_in_irp != 0) { -+ foreach my $i (@prev_irp_args) { -+ foreach my $origline (@prev_rept_lines) { -+ my $line = $origline; -+ $line =~ s/\\$prev_irp_param/$i/g; -+ $line =~ s/\\\(\)//g; # remove \() -+ parse_line($line); -+ } -+ } -+ } else { -+ for (1 .. $prev_num_repts) { -+ foreach my $origline (@prev_rept_lines) { -+ my $line = $origline; -+ parse_line($line); -+ } -+ } -+ } -+ } elsif ($line =~ /(\S+:|)\s*([\w\d\.]+)\s*(.*)/ && exists $macro_lines{$2}) { -+ handle_serialized_line($1); - my $macro = $2; - - # commas are optional here too, but are syntactically important because -@@ -313,7 +529,7 @@ sub expand_macros { - my $comma_sep_required = 0; - foreach (@arglist) { - # allow arithmetic/shift operators in macro arguments -- $_ =~ s/\s*(\+|-|\*|\/|<<|>>)\s*/$1/g; -+ $_ =~ s/\s*(\+|-|\*|\/|<<|>>|<|>)\s*/$1/g; - - my @whitespace_split = split(/\s+/, $_); - if (!@whitespace_split) { -@@ -377,39 +593,49 @@ sub expand_macros { - foreach (reverse sort {length $a <=> length $b} keys %replacements) { - $macro_line =~ s/\\$_/$replacements{$_}/g; - } -+ if ($altmacro) { -+ foreach (reverse sort {length $a <=> length $b} keys %replacements) { -+ $macro_line =~ s/\b$_\b/$replacements{$_}/g; -+ } -+ } - $macro_line =~ s/\\\@/$count/g; - $macro_line =~ s/\\\(\)//g; # remove \() - parse_line($macro_line); - } - } else { -- push(@pass1_lines, $line); -+ handle_serialized_line($line); - } - } - --close(ASMFILE) or exit 1; --if ($ENV{GASPP_DEBUG}) { -- open(ASMFILE, ">&STDOUT"); --} else { -- open(ASMFILE, "|-", @gcc_cmd) or die "Error running assembler"; -+sub is_arm_register { -+ my $name = $_[0]; -+ if ($name eq "lr" or -+ $name eq "ip" or -+ $name =~ /^[rav]\d+$/) { -+ return 1; -+ } -+ return 0; - } - --my @sections; --my $num_repts; --my @rept_lines; -- --my %literal_labels; # for ldr , = --my $literal_num = 0; -- --my $thumb = 0; -- --my %thumb_labels; --my %call_targets; -+sub handle_local_label { -+ my $line = $_[0]; -+ my $num = $_[1]; -+ my $dir = $_[2]; -+ my $target = "$num$dir"; -+ if ($dir eq "b") { -+ $line =~ s/$target/$last_temp_labels{$num}/g; -+ } else { -+ my $name = "temp_label_$temp_label_next"; -+ $temp_label_next++; -+ push(@{$next_temp_labels{$num}}, $name); -+ $line =~ s/$target/$name/g; -+ } -+ return $line; -+} - --my @irp_args; --my $irp_param; -+sub handle_serialized_line { -+ my $line = $_[0]; - --# pass 2: parse .rept and .if variants --foreach my $line (@pass1_lines) { - # handle .previous (only with regard to .section not .subsection) - if ($line =~ /\.(section|text|const_data)/) { - push(@sections, $line); -@@ -425,7 +651,7 @@ sub expand_macros { - $thumb = 0 if $line =~ /\.code\s+32|\.arm/; - - # handle ldr , = -- if ($line =~ /(.*)\s*ldr([\w\s\d]+)\s*,\s*=(.*)/) { -+ if ($line =~ /(.*)\s*ldr([\w\s\d]+)\s*,\s*=(.*)/ and $as_type ne "armasm") { - my $label = $literal_labels{$3}; - if (!$label) { - $label = "Literal_$literal_num"; -@@ -433,14 +659,21 @@ sub expand_macros { - $literal_labels{$3} = $label; - } - $line = "$1 ldr$2, $label\n"; -- } elsif ($line =~ /\.ltorg/) { -+ } elsif ($line =~ /\.ltorg/ and $as_type ne "armasm") { - $line .= ".align 2\n"; - foreach my $literal (keys %literal_labels) { -- $line .= "$literal_labels{$literal}:\n .word $literal\n"; -+ $line .= "$literal_labels{$literal}:\n $literal_expr $literal\n"; - } - %literal_labels = (); - } - -+ # handle GNU as pc-relative relocations for adrp/add -+ if ($line =~ /(.*)\s*adrp([\w\s\d]+)\s*,\s*#?:pg_hi21:([^\s]+)/) { -+ $line = "$1 adrp$2, ${3}\@PAGE\n"; -+ } elsif ($line =~ /(.*)\s*add([\w\s\d]+)\s*,([\w\s\d]+)\s*,\s*#?:lo12:([^\s]+)/) { -+ $line = "$1 add$2, $3, ${4}\@PAGEOFF\n"; -+ } -+ - # thumb add with large immediate needs explicit add.w - if ($thumb and $line =~ /add\s+.*#([^@]+)/) { - $line =~ s/add/add.w/ if eval_expr($1) > 255; -@@ -449,15 +682,26 @@ sub expand_macros { - # mach-o local symbol names start with L (no dot) - $line =~ s/(? with ic as conditional code -+ if ($cond =~ /|$arm_cond_codes/) { -+ if (exists $thumb_labels{$label}) { -+ print ASMFILE ".thumb_func $label\n"; -+ } else { -+ $call_targets{$label}++; -+ } - } - } - -@@ -474,6 +718,16 @@ sub expand_macros { - } - } - -+ if ($line =~ /\.unreq\s+(.*)/) { -+ if (defined $neon_alias_reg{$1}) { -+ delete $neon_alias_reg{$1}; -+ delete $neon_alias_type{$1}; -+ return; -+ } elsif (defined $aarch64_req_alias{$1}) { -+ delete $aarch64_req_alias{$1}; -+ return; -+ } -+ } - # old gas versions store upper and lower case names on .req, - # but they remove only one on .unreq - if ($fix_unreq) { -@@ -483,81 +737,288 @@ sub expand_macros { - } - } - -- if ($line =~ /\.rept\s+(.*)/) { -- $num_repts = $1; -- @rept_lines = ("\n"); -+ if ($line =~ /(\w+)\s+\.(dn|qn)\s+(\w+)(?:\.(\w+))?(\[\d+\])?/) { -+ $neon_alias_reg{$1} = "$3$5"; -+ $neon_alias_type{$1} = $4; -+ return; -+ } -+ if (scalar keys %neon_alias_reg > 0 && $line =~ /^\s+v\w+/) { -+ # This line seems to possibly have a neon instruction -+ foreach (keys %neon_alias_reg) { -+ my $alias = $_; -+ # Require the register alias to match as an invididual word, not as a substring -+ # of a larger word-token. -+ if ($line =~ /\b$alias\b/) { -+ $line =~ s/\b$alias\b/$neon_alias_reg{$alias}/g; -+ # Add the type suffix. If multiple aliases match on the same line, -+ # only do this replacement the first time (a vfoo.bar string won't match v\w+). -+ $line =~ s/^(\s+)(v\w+)(\s+)/$1$2.$neon_alias_type{$alias}$3/; -+ } -+ } -+ } - -- # handle the possibility of repeating another directive on the same line -- # .endr on the same line is not valid, I don't know if a non-directive is -- if ($num_repts =~ s/(\.\w+.*)//) { -- push(@rept_lines, "$1\n"); -+ if ($arch eq "aarch64" or $as_type eq "armasm") { -+ # clang's integrated aarch64 assembler in Xcode 5 does not support .req/.unreq -+ if ($line =~ /\b(\w+)\s+\.req\s+(\w+)\b/) { -+ $aarch64_req_alias{$1} = $2; -+ return; - } -- $num_repts = eval_expr($num_repts); -- } elsif ($line =~ /\.irp\s+([\d\w\.]+)\s*(.*)/) { -- $in_irp = 1; -- $num_repts = 1; -- @rept_lines = ("\n"); -- $irp_param = $1; -+ foreach (keys %aarch64_req_alias) { -+ my $alias = $_; -+ # recursively resolve aliases -+ my $resolved = $aarch64_req_alias{$alias}; -+ while (defined $aarch64_req_alias{$resolved}) { -+ $resolved = $aarch64_req_alias{$resolved}; -+ } -+ $line =~ s/\b$alias\b/$resolved/g; -+ } -+ } -+ if ($arch eq "aarch64") { -+ # fix missing aarch64 instructions in Xcode 5.1 (beta3) -+ # mov with vector arguments is not supported, use alias orr instead -+ if ($line =~ /^\s*mov\s+(v\d[\.{}\[\]\w]+),\s*(v\d[\.{}\[\]\w]+)\b\s*$/) { -+ $line = " orr $1, $2, $2\n"; -+ } -+ # movi 16, 32 bit shifted variant, shift is optional -+ if ($line =~ /^\s*movi\s+(v[0-3]?\d\.(?:2|4|8)[hsHS])\s*,\s*(#\w+)\b\s*$/) { -+ $line = " movi $1, $2, lsl #0\n"; -+ } -+ # Xcode 5 misses the alias uxtl. Replace it with the more general ushll. -+ # Clang 3.4 misses the alias sxtl too. Replace it with the more general sshll. -+ if ($line =~ /^\s*(s|u)xtl(2)?\s+(v[0-3]?\d\.[248][hsdHSD])\s*,\s*(v[0-3]?\d\.(?:2|4|8|16)[bhsBHS])\b\s*$/) { -+ $line = " $1shll$2 $3, $4, #0\n"; -+ } -+ # clang 3.4 does not automatically use shifted immediates in add/sub -+ if ($as_type eq "clang" and -+ $line =~ /^(\s*(?:add|sub)s?) ([^#l]+)#([\d\+\-\*\/ <>]+)\s*$/) { -+ my $imm = eval $3; -+ if ($imm > 4095 and not ($imm & 4095)) { -+ $line = "$1 $2#" . ($imm >> 12) . ", lsl #12\n"; -+ } -+ } -+ if ($ENV{GASPP_FIX_XCODE5}) { -+ if ($line =~ /^\s*bsl\b/) { -+ $line =~ s/\b(bsl)(\s+v[0-3]?\d\.(\w+))\b/$1.$3$2/; -+ $line =~ s/\b(v[0-3]?\d)\.$3\b/$1/g; -+ } -+ if ($line =~ /^\s*saddl2?\b/) { -+ $line =~ s/\b(saddl2?)(\s+v[0-3]?\d\.(\w+))\b/$1.$3$2/; -+ $line =~ s/\b(v[0-3]?\d)\.\w+\b/$1/g; -+ } -+ if ($line =~ /^\s*dup\b.*\]$/) { -+ $line =~ s/\bdup(\s+v[0-3]?\d)\.(\w+)\b/dup.$2$1/g; -+ $line =~ s/\b(v[0-3]?\d)\.[bhsdBHSD](\[\d\])$/$1$2/g; -+ } -+ } -+ } - -- # only use whitespace as the separator -- my $irp_arglist = $2; -- $irp_arglist =~ s/,/ /g; -- $irp_arglist =~ s/^\s+//; -- @irp_args = split(/\s+/, $irp_arglist); -- } elsif ($line =~ /\.irpc\s+([\d\w\.]+)\s*(.*)/) { -- $in_irp = 1; -- $num_repts = 1; -- @rept_lines = ("\n"); -- $irp_param = $1; -+ if ($as_type eq "armasm") { -+ # Also replace variables set by .set -+ foreach (keys %symbols) { -+ my $sym = $_; -+ $line =~ s/\b$sym\b/$symbols{$sym}/g; -+ } - -- my $irp_arglist = $2; -- $irp_arglist =~ s/,/ /g; -- $irp_arglist =~ s/^\s+//; -- @irp_args = split(//, $irp_arglist); -- } elsif ($line =~ /\.endr/) { -- if ($in_irp != 0) { -- foreach my $i (@irp_args) { -- foreach my $origline (@rept_lines) { -- my $line = $origline; -- $line =~ s/\\$irp_param/$i/g; -- $line =~ s/\\\(\)//g; # remove \() -- if (!parse_if_line($line) && !handle_if($line)) { -- handle_set($line); -- print ASMFILE $line; -- } -- } -+ # Handle function declarations and keep track of the declared labels -+ if ($line =~ s/^\s*\.func\s+(\w+)/$1 PROC/) { -+ $labels_seen{$1} = 1; -+ } -+ -+ if ($line =~ s/^(\d+)://) { -+ # Convert local labels into unique labels. armasm (at least in -+ # RVCT) has something similar, but still different enough. -+ # By converting to unique labels we avoid any possible -+ # incompatibilities. -+ -+ my $num = $1; -+ foreach (@{$next_temp_labels{$num}}) { -+ $line = "$_\n" . $line; - } -- } else { -- for (1 .. $num_repts) { -- foreach my $line (@rept_lines) { -- if (!parse_if_line($line) && !handle_if($line)) { -- handle_set($line); -- print ASMFILE $line; -- } -- } -+ @next_temp_labels{$num} = (); -+ my $name = "temp_label_$temp_label_next"; -+ $temp_label_next++; -+ # The matching regexp above removes the label from the start of -+ # the line (which might contain an instruction as well), readd -+ # it on a separate line above it. -+ $line = "$name:\n" . $line; -+ $last_temp_labels{$num} = $name; -+ } -+ -+ if ($line =~ s/^(\w+):/$1/) { -+ # Skip labels that have already been declared with a PROC, -+ # labels must not be declared multiple times. -+ return if (defined $labels_seen{$1}); -+ $labels_seen{$1} = 1; -+ } elsif ($line !~ /(\w+) PROC/) { -+ # If not a label, make sure the line starts with whitespace, -+ # otherwise ms armasm interprets it incorrectly. -+ $line =~ s/^[\.\w]/\t$&/; -+ } -+ -+ -+ # Check branch instructions -+ if ($line =~ /(?:^|\n)\s*(\w+\s*:\s*)?(bl?x?(..)?(\.w)?)\s+(\w+)/) { -+ my $instr = $2; -+ my $cond = $3; -+ my $width = $4; -+ my $target = $5; -+ # Don't interpret e.g. bic as b with ic as conditional code -+ if ($cond !~ /|$arm_cond_codes/) { -+ # Not actually a branch -+ } elsif ($target =~ /(\d+)([bf])/) { -+ # The target is a local label -+ $line = handle_local_label($line, $1, $2); -+ $line =~ s/\b$instr\b/$&.w/ if $width eq ""; -+ } elsif (!is_arm_register($target)) { -+ $call_targets{$target}++; -+ } -+ } elsif ($line =~ /^\s*.h?word.*\b\d+[bf]\b/) { -+ while ($line =~ /\b(\d+)([bf])\b/g) { -+ $line = handle_local_label($line, $1, $2); - } - } -- @rept_lines = (); -- $in_irp = 0; -- @irp_args = ''; -- } elsif (scalar(@rept_lines)) { -- push(@rept_lines, $line); -- } else { -- handle_set($line); -- print ASMFILE $line; -+ -+ # ALIGN in armasm syntax is the actual number of bytes -+ if ($line =~ /\.align\s+(\d+)/) { -+ my $align = 1 << $1; -+ $line =~ s/\.align\s(\d+)/ALIGN $align/; -+ } -+ # Convert gas style [r0, :128] into armasm [r0@128] alignment specification -+ $line =~ s/\[([^\[]+),\s*:(\d+)\]/[$1\@$2]/g; -+ -+ # armasm treats logical values {TRUE} and {FALSE} separately from -+ # numeric values - logical operators and values can't be intermixed -+ # with numerical values. Evaluate ! and (a <> b) into numbers, -+ # let the assembler evaluate the rest of the expressions. This current -+ # only works for cases when ! and <> are used with actual constant numbers, -+ # we don't evaluate subexpressions here. -+ -+ # Evaluate ! -+ while ($line =~ /!\s*(\d+)/g) { -+ my $val = ($1 != 0) ? 0 : 1; -+ $line =~ s/!(\d+)/$val/; -+ } -+ # Evaluate (a > b) -+ while ($line =~ /\(\s*(\d+)\s*([<>])\s*(\d+)\s*\)/) { -+ my $val; -+ if ($2 eq "<") { -+ $val = ($1 < $3) ? 1 : 0; -+ } else { -+ $val = ($1 > $3) ? 1 : 0; -+ } -+ $line =~ s/\(\s*(\d+)\s*([<>])\s*(\d+)\s*\)/$val/; -+ } -+ -+ # Change a movw... #:lower16: into a mov32 pseudoinstruction -+ $line =~ s/^(\s*)movw(\s+\w+\s*,\s*)\#:lower16:(.*)$/$1mov32$2$3/; -+ # and remove the following, matching movt completely -+ $line =~ s/^\s*movt\s+\w+\s*,\s*\#:upper16:.*$//; -+ -+ if ($line =~ /^\s*mov32\s+\w+,\s*([a-zA-Z]\w*)/) { -+ $mov32_targets{$1}++; -+ } -+ -+ # Misc bugs/deficiencies: -+ # armasm seems unable to parse e.g. "vmov s0, s1" without a type -+ # qualifier, thus add .f32. -+ $line =~ s/^(\s+(?:vmov|vadd))(\s+s)/$1.f32$2/; -+ # armasm is unable to parse &0x - add spacing -+ $line =~ s/&0x/& 0x/g; -+ } -+ -+ if ($force_thumb) { -+ # Convert register post indexing to a separate add instruction. -+ # This converts e.g. "ldr r0, [r1], r2" into "ldr r0, [r1]", -+ # "add r1, r1, r2". -+ $line =~ s/(ldr|str)\s+(\w+),\s*\[(\w+)\],\s*(\w+)/$1 $2, [$3]\n\tadd $3, $3, $4/g; -+ -+ # Convert "mov pc, lr" into "bx lr", since the former only works -+ # for switching from arm to thumb (and only in armv7), but not -+ # from thumb to arm. -+ s/mov\s*pc\s*,\s*lr/bx lr/g; -+ -+ # Convert stmdb/ldmia with only one register into a plain str/ldr with post-increment/decrement -+ $line =~ s/stmdb\s+sp!\s*,\s*\{([^,-]+)\}/str $1, [sp, #-4]!/g; -+ $line =~ s/ldmia\s+sp!\s*,\s*\{([^,-]+)\}/ldr $1, [sp], #4/g; -+ -+ $line =~ s/\.arm/.thumb/x; - } --} - --print ASMFILE ".text\n"; --print ASMFILE ".align 2\n"; --foreach my $literal (keys %literal_labels) { -- my $label = $literal_labels{$literal}; -- print ASMFILE ".set Lval_$label, $literal\n"; -- print ASMFILE "$label: .word Lval_$label\n"; -+ # comment out unsupported directives -+ $line =~ s/\.type/$comm$&/x if $as_type =~ /^(apple-|armasm)/; -+ $line =~ s/\.func/$comm$&/x if $as_type =~ /^(apple-|clang)/; -+ $line =~ s/\.endfunc/$comm$&/x if $as_type =~ /^(apple-|clang)/; -+ $line =~ s/\.endfunc/ENDP/x if $as_type =~ /armasm/; -+ $line =~ s/\.ltorg/$comm$&/x if $as_type =~ /^(apple-|clang)/; -+ $line =~ s/\.ltorg/LTORG/x if $as_type eq "armasm"; -+ $line =~ s/\.size/$comm$&/x if $as_type =~ /^(apple-|armasm)/; -+ $line =~ s/\.fpu/$comm$&/x if $as_type =~ /^(apple-|armasm)/; -+ $line =~ s/\.arch/$comm$&/x if $as_type =~ /^(apple-|clang|armasm)/; -+ $line =~ s/\.object_arch/$comm$&/x if $as_type =~ /^(apple-|armasm)/; -+ $line =~ s/.section\s+.note.GNU-stack.*/$comm$&/x if $as_type =~ /^(apple-|armasm)/; -+ -+ $line =~ s/\.syntax/$comm$&/x if $as_type =~ /armasm/; -+ -+ $line =~ s/\.hword/.short/x; -+ -+ if ($as_type =~ /^apple-/) { -+ # the syntax for these is a little different -+ $line =~ s/\.global/.globl/x; -+ # also catch .section .rodata since the equivalent to .const_data is .section __DATA,__const -+ $line =~ s/(.*)\.rodata/.const_data/x; -+ $line =~ s/\.int/.long/x; -+ $line =~ s/\.float/.single/x; -+ } -+ if ($as_type eq "armasm") { -+ $line =~ s/\.global/EXPORT/x; -+ $line =~ s/\.int/dcd/x; -+ $line =~ s/\.long/dcd/x; -+ $line =~ s/\.float/dcfs/x; -+ $line =~ s/\.word/dcd/x; -+ $line =~ s/\.short/dcw/x; -+ $line =~ s/\.byte/dcb/x; -+ $line =~ s/\.thumb/THUMB/x; -+ $line =~ s/\.arm/ARM/x; -+ # The alignment in AREA is the power of two, just as .align in gas -+ $line =~ s/\.text/AREA |.text|, CODE, READONLY, ALIGN=2, CODEALIGN/; -+ $line =~ s/(\s*)(.*)\.rodata/$1AREA |.rodata|, DATA, READONLY, ALIGN=5/; -+ -+ $line =~ s/fmxr/vmsr/; -+ $line =~ s/fmrx/vmrs/; -+ $line =~ s/fadds/vadd/; -+ } -+ -+ # catch unknown section names that aren't mach-o style (with a comma) -+ if ($as_type =~ /apple-/ and $line =~ /.section ([^,]*)$/) { -+ die ".section $1 unsupported; figure out the mach-o section name and add it"; -+ } -+ -+ print ASMFILE $line; - } - --map print(ASMFILE ".thumb_func $_\n"), -- grep exists $thumb_labels{$_}, keys %call_targets; -+if ($as_type ne "armasm") { -+ print ASMFILE ".text\n"; -+ print ASMFILE ".align 2\n"; -+ foreach my $literal (keys %literal_labels) { -+ print ASMFILE "$literal_labels{$literal}:\n $literal_expr $literal\n"; -+ } -+ -+ map print(ASMFILE ".thumb_func $_\n"), -+ grep exists $thumb_labels{$_}, keys %call_targets; -+} else { -+ map print(ASMFILE "\tIMPORT $_\n"), -+ grep ! exists $labels_seen{$_}, (keys %call_targets, keys %mov32_targets); -+ -+ print ASMFILE "\tEND\n"; -+} - -+close(INPUT) or exit 1; - close(ASMFILE) or exit 1; -+if ($as_type eq "armasm" and ! defined $ENV{GASPP_DEBUG}) { -+ system(@gcc_cmd) == 0 or die "Error running assembler"; -+} -+ -+END { -+ unlink($tempfile) if defined $tempfile; -+} - #exit 1 --- -1.9.3 -