diff --git a/projects/RPi/patches/xbmc/xbmc-gotham_rbp_backports.patch b/projects/RPi/patches/xbmc/xbmc-gotham_rbp_backports.patch index 9a47724376..10d38c46c7 100644 --- a/projects/RPi/patches/xbmc/xbmc-gotham_rbp_backports.patch +++ b/projects/RPi/patches/xbmc/xbmc-gotham_rbp_backports.patch @@ -1,7 +1,7 @@ -From 1353d8feca19f2f84019797942d70864054db1b0 Mon Sep 17 00:00:00 2001 +From 0e4677f16443036b8ac3bead76e3044de7324fba Mon Sep 17 00:00:00 2001 From: Ben Avison Date: Mon, 5 Aug 2013 13:12:46 +0100 -Subject: [PATCH 01/94] h264_parser: Initialize the h264dsp context in the +Subject: [PATCH 01/98] h264_parser: Initialize the h264dsp context in the parser as well MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 @@ -39,10 +39,10 @@ index aff9ba1..a732f79 100644 1.9.3 -From 7ea2cb68f6fb1149fce70854e36ed6357a267238 Mon Sep 17 00:00:00 2001 +From de1aa84226490d566cfc2674fae6ec3dc56f5bfe Mon Sep 17 00:00:00 2001 From: Ben Avison Date: Mon, 5 Aug 2013 13:12:47 +0100 -Subject: [PATCH 02/94] h264dsp: Factorize code into a new function, +Subject: [PATCH 02/98] h264dsp: Factorize code into a new function, h264_find_start_code_candidate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 @@ -168,10 +168,10 @@ index 98ea15c..1be4804 100644 1.9.3 -From 458ff4b6c1855c529f563dbbd15e35aaab50adae Mon Sep 17 00:00:00 2001 +From 02dc1229504e49803fc2fc1bb9e4fa7d56b195af Mon Sep 17 00:00:00 2001 From: Ben Avison Date: Mon, 5 Aug 2013 13:12:48 +0100 -Subject: [PATCH 03/94] arm: Add assembly version of +Subject: [PATCH 03/98] arm: Add assembly version of h264_find_start_code_candidate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 @@ -197,7 +197,7 @@ Signed-off-by: Martin Storsjö create mode 100644 lib/ffmpeg/libavcodec/arm/h264dsp_armv6.S diff --git a/lib/ffmpeg/libavcodec/arm/Makefile b/lib/ffmpeg/libavcodec/arm/Makefile -index 7390a8b..480000b71 100644 +index 7390a8b..480000b 100644 --- a/lib/ffmpeg/libavcodec/arm/Makefile +++ b/lib/ffmpeg/libavcodec/arm/Makefile @@ -9,6 +9,7 @@ OBJS-$(CONFIG_AAC_DECODER) += arm/sbrdsp_init_arm.o \ @@ -505,10 +505,10 @@ index 972aace..363843c 100644 1.9.3 -From 5841d5b69f0df2f286c0a8e419deb16d927e864e Mon Sep 17 00:00:00 2001 +From 200a134b06358bc8330bda5d63d87ef01b5854f4 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 19 Aug 2013 22:48:05 +0100 -Subject: [PATCH 04/94] [ffmpeg] Backport of h264_find_start_code_candidate +Subject: [PATCH 04/98] [ffmpeg] Backport of h264_find_start_code_candidate optimisation --- @@ -1037,10 +1037,10 @@ index 0000000..cdc2d1e 1.9.3 -From db098a580259625bb7b7385a48cb0756aea5cafe Mon Sep 17 00:00:00 2001 +From 966fc6910759e9576232943422fed1532f3ff193 Mon Sep 17 00:00:00 2001 From: Ben Avison Date: Wed, 16 Apr 2014 01:51:31 +0100 -Subject: [PATCH 05/94] h264: Move search code search functions into separate +Subject: [PATCH 05/98] h264: Move search code search functions into separate source files. This permits re-use with parsers for codecs which use similar start codes. @@ -1075,7 +1075,7 @@ index dc065a5..460f42c 100644 OBJS-$(CONFIG_H264QPEL) += h264qpel.o OBJS-$(CONFIG_HUFFMAN) += huffman.o diff --git a/lib/ffmpeg/libavcodec/arm/Makefile b/lib/ffmpeg/libavcodec/arm/Makefile -index 480000b71..0b432e3 100644 +index 480000b..0b432e3 100644 --- a/lib/ffmpeg/libavcodec/arm/Makefile +++ b/lib/ffmpeg/libavcodec/arm/Makefile @@ -9,7 +9,7 @@ OBJS-$(CONFIG_AAC_DECODER) += arm/sbrdsp_init_arm.o \ @@ -1791,10 +1791,10 @@ index 0000000..cc55d5f 1.9.3 -From 7d95eb8e026582e5446e7e11d75ba999286a34d0 Mon Sep 17 00:00:00 2001 +From 3409633d6f1a142714c5f1065a2539eb074fbf6b Mon Sep 17 00:00:00 2001 From: Ben Avison Date: Wed, 16 Apr 2014 01:51:32 +0100 -Subject: [PATCH 06/94] vc-1: Add platform-specific start code search routine +Subject: [PATCH 06/98] vc-1: Add platform-specific start code search routine to VC1DSPContext. Initialise VC1DSPContext for parser as well as for decoder. @@ -1975,10 +1975,10 @@ index 6540eff..302e4a8 100644 1.9.3 -From 9b459c3c4130299099b2e5aca5bff3d6f8d60e72 Mon Sep 17 00:00:00 2001 +From 755968b89289b99fc809867fc52e6a1a8dbdef2e Mon Sep 17 00:00:00 2001 From: Ben Avison Date: Wed, 23 Apr 2014 01:41:04 +0100 -Subject: [PATCH 07/94] vc-1: Optimise parser (with special attention to ARM) +Subject: [PATCH 07/98] vc-1: Optimise parser (with special attention to ARM) The previous implementation of the parser made four passes over each input buffer (reduced to two if the container format already guaranteed the input @@ -2363,10 +2363,10 @@ index 53af61c..af601ad 100644 1.9.3 -From c2ebe54fe1d7c7a6cee7282bcf2668a826006ade Mon Sep 17 00:00:00 2001 +From fb77325cb16d727e8985e009397eee384c847388 Mon Sep 17 00:00:00 2001 From: Ben Avison Date: Wed, 19 Mar 2014 17:44:59 +0000 -Subject: [PATCH 08/94] truehd: add hand-scheduled ARM asm version of +Subject: [PATCH 08/98] truehd: add hand-scheduled ARM asm version of mlp_filter_channel. Profiling results for overall audio decode and the mlp_filter_channel(_arm) @@ -2922,10 +2922,10 @@ index 84a8aa3..129bcfe 100644 1.9.3 -From 904cb11e58484c5d0bca17b8c209916d106d2079 Mon Sep 17 00:00:00 2001 +From 9ce9c34ba36fb1b1cf3b5e4588207b504ee054ce Mon Sep 17 00:00:00 2001 From: Ben Avison Date: Wed, 19 Mar 2014 17:48:54 +0000 -Subject: [PATCH 09/94] truehd: break out part of rematrix_channels into +Subject: [PATCH 09/98] truehd: break out part of rematrix_channels into platform-specific callback. Verified with profiling that this doesn't have a measurable effect upon @@ -3083,10 +3083,10 @@ index 129bcfe..f98e9be 100644 1.9.3 -From 0bb8daacca4b35d716addbc591fec43fd4fe6467 Mon Sep 17 00:00:00 2001 +From f9504ba375eca903765131ce66ac07a6d8b19dc9 Mon Sep 17 00:00:00 2001 From: Ben Avison Date: Wed, 19 Mar 2014 17:49:48 +0000 -Subject: [PATCH 10/94] truehd: add hand-scheduled ARM asm version of +Subject: [PATCH 10/98] truehd: add hand-scheduled ARM asm version of ff_mlp_rematrix_channel. Profiling results for overall audio decode and the rematrix_channels function @@ -3379,10 +3379,10 @@ index f0ea285..268dfdd 100644 1.9.3 -From 034e1a8920aec0fa36ffc7da8f63e48c68364e15 Mon Sep 17 00:00:00 2001 +From de851398b0286fb3aa0ea9a75b252eedc23828c3 Mon Sep 17 00:00:00 2001 From: Ben Avison Date: Wed, 19 Mar 2014 17:50:36 +0000 -Subject: [PATCH 11/94] truehd: tune VLC decoding for ARM. +Subject: [PATCH 11/98] truehd: tune VLC decoding for ARM. Profiling on a Raspberry Pi revealed the best performance to correspond with VLC_BITS = 5. Results for overall audio decode and the get_vlc2 function @@ -3444,10 +3444,10 @@ index e9343a5..a998dac 100644 1.9.3 -From 25ab0401ebb7f035bcf7291452e6772a9c7b233a Mon Sep 17 00:00:00 2001 +From bb303c9c4ed63e7dcccd84383d9636e0c72db7b6 Mon Sep 17 00:00:00 2001 From: Ben Avison Date: Wed, 19 Mar 2014 17:54:07 +0000 -Subject: [PATCH 12/94] truehd: break out part of output_data into +Subject: [PATCH 12/98] truehd: break out part of output_data into platform-specific callback. Verified with profiling that this doesn't have a measurable effect upon @@ -3641,10 +3641,10 @@ index f98e9be..5bc901f 100644 1.9.3 -From bdefac00779c5601816f949353d9bbeb3b199611 Mon Sep 17 00:00:00 2001 +From 32844d385942b5d702c1c7b9ff3167a8ed79a9fe Mon Sep 17 00:00:00 2001 From: Ben Avison Date: Wed, 19 Mar 2014 17:54:59 +0000 -Subject: [PATCH 13/94] truehd: add hand-scheduled ARM asm version of +Subject: [PATCH 13/98] truehd: add hand-scheduled ARM asm version of ff_mlp_pack_output. Profiling results for overall decode and the output_data function in @@ -4268,10 +4268,10 @@ index 268dfdd..2d8b98d 100644 1.9.3 -From 9af15bf0b7bc7940bd8bcc9ddae23178c9723bd6 Mon Sep 17 00:00:00 2001 +From 5d1972e33ab52ffbfd05d06615af75fcc28938de Mon Sep 17 00:00:00 2001 From: Ben Avison Date: Thu, 14 Nov 2013 19:48:41 +0000 -Subject: [PATCH 14/94] More efficient infobool expression evaluator +Subject: [PATCH 14/98] More efficient infobool expression evaluator Expession infobools are evaluated at runtime from one or more single infobools and a combination of boolean NOT, AND and OR operators. Previously, parsing @@ -4770,10 +4770,10 @@ index 4e0faee..0a91399 100644 1.9.3 -From 36067cf823d539a00eea75d561ac78a4b1431a66 Mon Sep 17 00:00:00 2001 +From 3dc38ff680371f226e2400d0b429d43b122b66fc Mon Sep 17 00:00:00 2001 From: Ben Avison Date: Mon, 24 Mar 2014 22:26:21 +0000 -Subject: [PATCH 15/94] Where an infobool expression failed to parse, evaluate +Subject: [PATCH 15/98] Where an infobool expression failed to parse, evaluate the infobool as false. Previously, this would result in a segfault due to the dereferencing of an uninitialised pointer to the head of the expression tree. @@ -4800,10 +4800,10 @@ index db461dd..7c54064 100644 1.9.3 -From 7f2870606f1e183d70b1dc2dbc07fa8bc437d0cc Mon Sep 17 00:00:00 2001 +From 5a00efc845572f9994395afbfc757d041e41f0b4 Mon Sep 17 00:00:00 2001 From: Ben Avison Date: Tue, 26 Nov 2013 20:09:48 +0000 -Subject: [PATCH 16/94] Add caching of infolabels +Subject: [PATCH 16/98] Add caching of infolabels The functions CGUIInfoLabel::GetLabel and CGUIInfoLabel::GetItemLabel take a number of strings returned from CGUIInfoManager::GetImage or @@ -5016,10 +5016,10 @@ index 8c1c1dc..418b2c4 100644 1.9.3 -From 3d5a1912ffd4556ec09208fea50d2a2919775c9f Mon Sep 17 00:00:00 2001 +From 353a7ee2320d9bb21bf75b8aeb99b62e02812e8c Mon Sep 17 00:00:00 2001 From: Ben Avison Date: Tue, 10 Dec 2013 01:12:31 +0000 -Subject: [PATCH 17/94] De-duplication of string cache for non-item and item +Subject: [PATCH 17/98] De-duplication of string cache for non-item and item labels --- @@ -5159,10 +5159,10 @@ index 418b2c4..6d9ebf7 100644 1.9.3 -From 1427baf4395b760227afbef8e17956ba251f2fbe Mon Sep 17 00:00:00 2001 +From a82b1e138821477953c3ca66f8ce585e0332d490 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Fri, 21 Feb 2014 15:16:13 +0000 -Subject: [PATCH 18/94] Faster and simpler portable implementation of +Subject: [PATCH 18/98] Faster and simpler portable implementation of MathUtils::round_int(). Much as I like a bit of inline assembler, I have also removed the ARM versions @@ -5368,10 +5368,10 @@ index 96af9f4..0dae77d 100644 1.9.3 -From 0ad4df440ea225cc951a65bf9553b1f00f416d85 Mon Sep 17 00:00:00 2001 +From 14c7a8c4d6145610b782a3cec7a43d622c7776fc Mon Sep 17 00:00:00 2001 From: Ben Avison Date: Wed, 11 Dec 2013 17:21:54 +0000 -Subject: [PATCH 19/94] Move the reference-counting of Begin and End calls from +Subject: [PATCH 19/98] Move the reference-counting of Begin and End calls from DX and GL source files into GUIFontTTF.cpp. --- @@ -5726,10 +5726,10 @@ index a0dacba..6736cf7 100644 1.9.3 -From 427373ae5bb96489afb22529714c16e8f82c2195 Mon Sep 17 00:00:00 2001 +From 850db95cde49bde2faa1ef593e6806476becf135 Mon Sep 17 00:00:00 2001 From: Ben Avison Date: Wed, 11 Dec 2013 18:47:54 +0000 -Subject: [PATCH 20/94] Convert CGUIFontTTFBase::m_vertex to be managed as a +Subject: [PATCH 20/98] Convert CGUIFontTTFBase::m_vertex to be managed as a std::vector. Also retired CGUIFontTTFBase::m_vertex_count and CGUIFontTTFBase::m_vertex_size because these can be derived from vector member functions. @@ -5911,10 +5911,10 @@ index 93b7ea6..a4e8571 100644 1.9.3 -From a3e8e7f1055726a050e04d1e4ab61a5355cdbd6a Mon Sep 17 00:00:00 2001 +From 7d1009dea41c5e363b5390b6a67e9bfe74f3d728 Mon Sep 17 00:00:00 2001 From: Ben Avison Date: Mon, 16 Dec 2013 18:58:12 +0000 -Subject: [PATCH 21/94] CGUIFontTTFBase::RenderCharacter can now append to +Subject: [PATCH 21/98] CGUIFontTTFBase::RenderCharacter can now append to arbitrary vectors of vertices rather than only CGUIFontTTFBase::m_vertex --- @@ -5990,10 +5990,10 @@ index 35e3cf9..4a6a696 100644 1.9.3 -From 79263f02e56ef10410984c98a844aaa9bf43199e Mon Sep 17 00:00:00 2001 +From c4d124c9812aafcd662f0d3bd973861956d59c88 Mon Sep 17 00:00:00 2001 From: Ben Avison Date: Wed, 15 Jan 2014 17:18:38 +0000 -Subject: [PATCH 22/94] Add a cache of font glyph bounding box vertices. This +Subject: [PATCH 22/98] 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 have a GLES or non-GLES backend, and for GLES, whether or not the currently @@ -6653,10 +6653,10 @@ index f351c99..9036ba9 100644 1.9.3 -From 65d2b7f112b400f75140de44579e6cdf98378b67 Mon Sep 17 00:00:00 2001 +From 12ad71c8d654dbe0aea7eab5963526459df9d187 Mon Sep 17 00:00:00 2001 From: Ben Avison Date: Thu, 23 Jan 2014 22:24:17 +0000 -Subject: [PATCH 23/94] Lay the groundwork for hardware clipping. +Subject: [PATCH 23/98] 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 @@ -6921,10 +6921,10 @@ index 98e398a..81ee49e 100644 1.9.3 -From e372121bc53da1b0353b51f5e9897011c5f54033 Mon Sep 17 00:00:00 2001 +From e2f88ea13dcf733c3693674be57f0aa6fcb1e605 Mon Sep 17 00:00:00 2001 From: Ben Avison Date: Thu, 23 Jan 2014 16:42:22 +0000 -Subject: [PATCH 24/94] Increase font cache hit rate by keying on the +Subject: [PATCH 24/98] 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 @@ -7128,10 +7128,10 @@ index 7cb4669..78445ab 100644 1.9.3 -From 10eeb73ca15798de26abd5f8846214c8938f8b42 Mon Sep 17 00:00:00 2001 +From 9e763f0a59fe23fb87699f779c5bfee519cc260e Mon Sep 17 00:00:00 2001 From: Ben Avison Date: Wed, 8 Jan 2014 12:16:33 +0000 -Subject: [PATCH 25/94] Rewrite of scrolling text code. +Subject: [PATCH 25/98] 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 @@ -7450,10 +7450,10 @@ index 2c6f366..b74faf2 100644 1.9.3 -From 7064920379f68a7f6114813db8ad40a21c4957cc Mon Sep 17 00:00:00 2001 +From 07b70365ecb58067f525413c77438f0bb9fe22f5 Mon Sep 17 00:00:00 2001 From: Ben Avison Date: Mon, 27 Jan 2014 23:21:10 +0000 -Subject: [PATCH 26/94] Move the application of the translation offsets into +Subject: [PATCH 26/98] 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 the interface between CGUIFontTTFBase and CGUIFontTTFGL. The old way (array of vertices in m_vertex) are retained in addition, for the @@ -7649,10 +7649,10 @@ index cb56987..f6aa081 100644 1.9.3 -From 476fce7bc2897e8898f4392809d934b0d5f46518 Mon Sep 17 00:00:00 2001 +From 0482abfaa6906d54dca31f757ee008f38f7a2589 Mon Sep 17 00:00:00 2001 From: Ben Avison Date: Wed, 15 Jan 2014 15:28:06 +0000 -Subject: [PATCH 27/94] Rather than applying the translation offsets to the +Subject: [PATCH 27/98] 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. @@ -7799,10 +7799,10 @@ index 81ee49e..d2f9cd1 100644 1.9.3 -From 473ccc4cbe616f672a72108d2ec98107780ac7da Mon Sep 17 00:00:00 2001 +From e39d0069f1171c617ce13c80bcd57ffa4208fb6e Mon Sep 17 00:00:00 2001 From: Ben Avison Date: Wed, 29 Jan 2014 13:21:19 +0000 -Subject: [PATCH 28/94] Enable hardware clipping. +Subject: [PATCH 28/98] Enable hardware clipping. --- xbmc/guilib/GUIFontTTF.cpp | 4 ++-- @@ -7878,10 +7878,10 @@ index fbffaa0..b7618e1 100644 1.9.3 -From f39c4523a1c05425fb94d3536a510709784f9558 Mon Sep 17 00:00:00 2001 +From b24391596bd3c1c1ccc425ca242f22c925137da8 Mon Sep 17 00:00:00 2001 From: Ben Avison Date: Wed, 15 Jan 2014 15:32:51 +0000 -Subject: [PATCH 29/94] Move the vertex data across to a vertex buffer object +Subject: [PATCH 29/98] Move the vertex data across to a vertex buffer object just prior to drawing. --- @@ -7935,10 +7935,10 @@ index b7618e1..0df3749 100644 1.9.3 -From 3c6c1c4f9c7aec0f41fd22d7d4e7f5918a70c69a Mon Sep 17 00:00:00 2001 +From 8fb0cefe76f154c97d7b07141e5fc4edabb688ae Mon Sep 17 00:00:00 2001 From: Ben Avison Date: Wed, 15 Jan 2014 16:04:04 +0000 -Subject: [PATCH 30/94] Move vertex data into an OpenGL VBO when the font cache +Subject: [PATCH 30/98] 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 of vertices. @@ -8213,10 +8213,10 @@ index 6736cf7..168fb21 100644 1.9.3 -From 073c09ba7de6f6b7676c83d71b6933790626874f Mon Sep 17 00:00:00 2001 +From 85d986702bdd7838cf755a4a2e5419e2166524da Mon Sep 17 00:00:00 2001 From: Ben Avison Date: Thu, 16 Jan 2014 16:29:42 +0000 -Subject: [PATCH 31/94] Switch from glDrawArrays() to glDrawElements(). This +Subject: [PATCH 31/98] 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. @@ -8439,10 +8439,10 @@ index dfc4672..0c32947 100644 1.9.3 -From ec39dce3628b276e3ed2fe19c95a056a1aa171b8 Mon Sep 17 00:00:00 2001 +From 5b172f2a3527b798e6b1d061829e28c338bc1b2a Mon Sep 17 00:00:00 2001 From: Ben Avison Date: Tue, 4 Feb 2014 16:17:57 +0000 -Subject: [PATCH 32/94] Update Windows project files +Subject: [PATCH 32/98] Update Windows project files --- project/VS2010Express/XBMC.vcxproj | 2 ++ @@ -8497,10 +8497,10 @@ index b536eb3..cb34443 100644 1.9.3 -From e25eb385d09a5378be8616f10806610df90416db Mon Sep 17 00:00:00 2001 +From 4b0bd54eaaf4a206356b493e472b4303bc31110a Mon Sep 17 00:00:00 2001 From: Ben Avison Date: Tue, 4 Feb 2014 16:49:45 +0000 -Subject: [PATCH 33/94] Update XCode project file +Subject: [PATCH 33/98] Update XCode project file --- XBMC.xcodeproj/project.pbxproj | 10 ++++++++++ @@ -8566,10 +8566,10 @@ index fdd10a1..62e7e69 100644 1.9.3 -From 5f4ebd2e9fd6d503220627b916e522b671d7d9ba Mon Sep 17 00:00:00 2001 +From 5f16d58fbf9fe82662528df956faf08335b949f2 Mon Sep 17 00:00:00 2001 From: Ben Avison Date: Tue, 4 Feb 2014 17:44:34 +0000 -Subject: [PATCH 34/94] Clang seems to be more picky than gcc about some C++ +Subject: [PATCH 34/98] Clang seems to be more picky than gcc about some C++ template syntax --- @@ -8637,10 +8637,10 @@ index 895fa72..bd84b9a 100644 1.9.3 -From 33693dc9ff9ba7695bc0e702a41566d54a5135b9 Mon Sep 17 00:00:00 2001 +From 9e85915e268d162a32b1d1e76ae110518c7267f3 Mon Sep 17 00:00:00 2001 From: Ben Avison Date: Tue, 4 Feb 2014 18:52:14 +0000 -Subject: [PATCH 35/94] Fix header to hopefully permit iOS builds to work +Subject: [PATCH 35/98] Fix header to hopefully permit iOS builds to work again. GUIShader.cpp added #include windowing/egl/WinSystemEGL.h inside a but also need the header windowing/osx/WinSystemIOS.h instead. The only thing GUIShader.cpp needed was g_windowing.GetViewPort, which is provided by the @@ -8669,10 +8669,10 @@ index 53bce09..86330cc 100644 1.9.3 -From 9b95b3b13bd714d8320dc61c5039eee6cb3c5737 Mon Sep 17 00:00:00 2001 +From 41a3690e21d6da0b3cac6399e815587208c25fd2 Mon Sep 17 00:00:00 2001 From: Ben Avison Date: Tue, 8 Apr 2014 18:14:55 +0100 -Subject: [PATCH 36/94] Fix font display in stereoscopic modes +Subject: [PATCH 36/98] Fix font display in stereoscopic modes CGUIFontTTFGL::LastEnd was previously using the relatively high-level CGraphicContext::SetScissors function to enforce hardware clipping. However, the coordinates it passed in already contained the stereoscopic offset, so @@ -8713,10 +8713,10 @@ index d476409..8466a81 100644 1.9.3 -From d51ef43b61b50de46edb2832f457af8229995cab Mon Sep 17 00:00:00 2001 +From 33d7d301281c9a6bc3c720a615d2489f38a39c5b Mon Sep 17 00:00:00 2001 From: popcornmix Date: Fri, 10 Jan 2014 12:10:43 +0000 -Subject: [PATCH 37/94] [rbp] Don't override dvdplayer with omxplayer. +Subject: [PATCH 37/98] [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. @@ -8749,10 +8749,10 @@ index 27f0bec..fc12bb7 100644 1.9.3 -From 3cd01da5418f1693e50ed40273cb17ca9f6d622a Mon Sep 17 00:00:00 2001 +From 9a28faed556cd48fc8dfb3c2730baf84a0087e4b Mon Sep 17 00:00:00 2001 From: popcornmix Date: Fri, 10 Jan 2014 15:37:41 +0000 -Subject: [PATCH 38/94] [players] Use default players rather than hard coded +Subject: [PATCH 38/98] [players] Use default players rather than hard coded DVDPlayer/PAPlayer --- @@ -8811,10 +8811,10 @@ index 57dfcdd..7be9799 100644 1.9.3 -From 5c4de293325bba93c4b820aed6863ee8d732ce2c Mon Sep 17 00:00:00 2001 +From fd93ad2b9218939c5f0dc41b3e696719f9d99514 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Sat, 11 Jan 2014 18:23:42 +0000 -Subject: [PATCH 39/94] [rbp] Don't force dvdplayer for airplay +Subject: [PATCH 39/98] [rbp] Don't force dvdplayer for airplay --- xbmc/network/AirPlayServer.cpp | 2 ++ @@ -8840,10 +8840,10 @@ index 8040d9b..182daaa 100644 1.9.3 -From 454b77543018aac5d7e70769ef13231ae16eefb9 Mon Sep 17 00:00:00 2001 +From b3608c3493593a7de3c353a388d569483902a05c Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 13 Jan 2014 13:11:06 +0000 -Subject: [PATCH 40/94] [rbp] Give plugins omxplayer when they request +Subject: [PATCH 40/98] [rbp] Give plugins omxplayer when they request dvdplayer on pi --- @@ -8870,10 +8870,10 @@ index 16f0174..b172d47 100644 1.9.3 -From 7201ee3e0ca664518eaaf3142682b294c34c69c0 Mon Sep 17 00:00:00 2001 +From 36ad20d82dbfcacf04db8d9bd89753273fca12e8 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 14 Jan 2014 18:04:07 +0000 -Subject: [PATCH 41/94] [rbp] Allow ALSA to be chosen in addition to Pi sink +Subject: [PATCH 41/98] [rbp] Allow ALSA to be chosen in addition to Pi sink Needs --enable-alsa in ./configure step and alsa support on platform --- @@ -8965,10 +8965,10 @@ index e493123..7df6807 100644 1.9.3 -From 8ffa85ccdc4760751849d75d37924fbf6cb1b1c8 Mon Sep 17 00:00:00 2001 +From 928bbe51feef4b6d0bf0b0bbdc0b97764e07e873 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Thu, 16 Jan 2014 01:39:29 +0000 -Subject: [PATCH 42/94] [omxcodec] Add hardware decode to dvdplayer for Pi +Subject: [PATCH 42/98] [omxcodec] Add hardware decode to dvdplayer for Pi Hijack the abandoned OpenMaxVideo codec --- @@ -12024,10 +12024,10 @@ index 54d35aa..5b9c2f9 100644 1.9.3 -From e9b71fb1ee80896444d3301f919bf315a96530a3 Mon Sep 17 00:00:00 2001 +From f5b72f5a0485d762548cce26ef3fa68f5a938556 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Sat, 3 May 2014 11:57:25 +0100 -Subject: [PATCH 43/94] [omxcodec] Enable for dvd menus +Subject: [PATCH 43/98] [omxcodec] Enable for dvd menus --- xbmc/cores/dvdplayer/DVDCodecs/DVDFactoryCodec.cpp | 4 ++++ @@ -12052,10 +12052,10 @@ index 18b8e3a..c85c8d2 100644 1.9.3 -From a7a4ccc26d85d1362a77b718564ddb1f08ca1246 Mon Sep 17 00:00:00 2001 +From 1b63beca9a08688d74f6aae6b0502a006013c01e Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 3 Feb 2014 22:27:44 +0000 -Subject: [PATCH 44/94] [omxcodec] Add omx specific texture +Subject: [PATCH 44/98] [omxcodec] Add omx specific texture create/upload/delete functions --- @@ -12133,10 +12133,10 @@ index 0ca56a2..f3dd3d3 100644 1.9.3 -From 6a8bd5509ada85a05ad4672a33b76418573382ea Mon Sep 17 00:00:00 2001 +From 25fcabd0b365d49b98ceddfb0d4c84f140556b01 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 3 Feb 2014 22:50:43 +0000 -Subject: [PATCH 45/94] [omxcodec] Add shared pointer to delay shutdown of +Subject: [PATCH 45/98] [omxcodec] Add shared pointer to delay shutdown of codec until buffers are returned --- @@ -12317,10 +12317,10 @@ index 9079c13..0975e8a 100644 1.9.3 -From e8f40e625203fe4113e2687d3730c38770cc0857 Mon Sep 17 00:00:00 2001 +From 9a1daa01c46bc16355ac9762e5c3bfb5ecbac5f6 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 3 Feb 2014 23:11:31 +0000 -Subject: [PATCH 46/94] [omxcodec] Fix for aspect ratio in non-square pixel +Subject: [PATCH 46/98] [omxcodec] Fix for aspect ratio in non-square pixel modes --- @@ -12409,10 +12409,10 @@ index 0975e8a..9138a20 100644 1.9.3 -From e42ca92b464ad88dbe0f8b0d86080d64d52e08a8 Mon Sep 17 00:00:00 2001 +From a7cd6c827b92108dd31aa1f281ac047f2c2b4c5a Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 3 Feb 2014 23:19:22 +0000 -Subject: [PATCH 47/94] [omxcodec] Report error when codec not enabled +Subject: [PATCH 47/98] [omxcodec] Report error when codec not enabled --- xbmc/cores/dvdplayer/DVDCodecs/Video/OpenMaxVideo.cpp | 10 +++++++++- @@ -12457,10 +12457,10 @@ index 7e23c87..2ae722b 100644 1.9.3 -From 55b0b157ba32d03ca0ec854b7935aee5601810d8 Mon Sep 17 00:00:00 2001 +From 342604148c83354d9eebca0c2f8cfbeeb57c1477 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 4 Feb 2014 17:29:37 +0000 -Subject: [PATCH 48/94] [omxcodec] Add deinterlace support +Subject: [PATCH 48/98] [omxcodec] Add deinterlace support --- xbmc/cores/VideoRenderers/LinuxRendererGLES.cpp | 2 +- @@ -12697,10 +12697,10 @@ index 9138a20..c8ad4d8 100644 1.9.3 -From 0701b41709e6a18567b9f6bfd0d491285546eedc Mon Sep 17 00:00:00 2001 +From e4c15cb63c743f152b9e8948b2540eb102f8d862 Mon Sep 17 00:00:00 2001 From: Ben Avison Date: Wed, 12 Feb 2014 18:43:14 +0000 -Subject: [PATCH 49/94] Improved file buffering in CArchive. +Subject: [PATCH 49/98] Improved file buffering in CArchive. CArchive already did some file buffering, but only on writes. Added the equivalent code for reads. Also improved the write buffer case so that it @@ -13090,10 +13090,10 @@ index 0148fcb..5b25be5 100644 1.9.3 -From 2ae9667952e98ab91b0056094231e923570fa64b Mon Sep 17 00:00:00 2001 +From 16bdb4b2e50a167a04eb0d52834e828713000756 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 5 Feb 2014 11:46:33 +0000 -Subject: [PATCH 50/94] [rbp/settings] Allow av sync type to be enabled +Subject: [PATCH 50/98] [rbp/settings] Allow av sync type to be enabled It works for dvdplayer --- @@ -13122,10 +13122,10 @@ index 2b7d0a6..1429256 100644 1.9.3 -From 4fb1419b986a36f2e53a5bca71caf90bd13443ba Mon Sep 17 00:00:00 2001 +From 5cabff5450ba68fb88106c12dac00dd39da9a7eb Mon Sep 17 00:00:00 2001 From: popcornmix Date: Sun, 16 Feb 2014 17:38:05 +0000 -Subject: [PATCH 51/94] [omxcodec] Only do essential calls in texture thread +Subject: [PATCH 51/98] [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 @@ -13475,10 +13475,10 @@ index c8ad4d8..f234f6d 100644 1.9.3 -From 182b137323347482bfca46dbb857813e4f984298 Mon Sep 17 00:00:00 2001 +From 54f76bb53a29f986da3aa904905063c3920845d4 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Sat, 1 Mar 2014 14:24:08 +0000 -Subject: [PATCH 52/94] [omxplayer] Allow small audio packets to be +Subject: [PATCH 52/98] [omxplayer] Allow small audio packets to be concatenated to make better use of audio fifo Some audio codecs produce small packets which causes a high overhead when submitting to GPU, and doesn't make full use of GPU side buffering. @@ -13850,7 +13850,7 @@ index 343465c..66e5b4a 100644 DllAvUtil m_dllAvUtil; DllSwResample m_dllSwResample; diff --git a/xbmc/cores/omxplayer/OMXPlayerAudio.cpp b/xbmc/cores/omxplayer/OMXPlayerAudio.cpp -index 8219015..a4c11777 100644 +index 8219015..a4c1177 100644 --- a/xbmc/cores/omxplayer/OMXPlayerAudio.cpp +++ b/xbmc/cores/omxplayer/OMXPlayerAudio.cpp @@ -227,9 +227,10 @@ bool OMXPlayerAudio::Decode(DemuxPacket *pkt, bool bDropPacket) @@ -13896,10 +13896,10 @@ index 8219015..a4c11777 100644 1.9.3 -From 10a9d6134a624bf59096831851ee12191f658da1 Mon Sep 17 00:00:00 2001 +From 769b554400d700f8a272ac4379220eb46e76ea73 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 5 Mar 2014 22:10:01 +0000 -Subject: [PATCH 53/94] [omxplayer] Use media for determing audio delay and +Subject: [PATCH 53/98] [omxplayer] Use media for determing audio delay and cache time I've also added caching to the call to OMXMediaTime as the GPU round trip is expensive when called too frequently @@ -14155,10 +14155,10 @@ index d7d06fe..f83074a 100644 1.9.3 -From 29c5c42b2f5be546c242bc8ef02dc06a8dd0fd17 Mon Sep 17 00:00:00 2001 +From e0a79d522b0a6743655a491753f1acaea69583f9 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 3 Mar 2014 22:24:19 +0000 -Subject: [PATCH 54/94] [omx] Skip the resize when not needed when decoding +Subject: [PATCH 54/98] [omx] Skip the resize when not needed when decoding jpegs The decode to texture path almost always uses cached jpegs that are the correct size, so the resize is rarely needed. @@ -14509,10 +14509,10 @@ index 4456fdb..262a004 100644 1.9.3 -From 1156d9abfac43de458d4ba66e5494c1d027e0f17 Mon Sep 17 00:00:00 2001 +From bbb15f71b27e159311062a5597fa462871c5dbfe Mon Sep 17 00:00:00 2001 From: popcornmix Date: Sat, 8 Mar 2014 15:36:06 +0000 -Subject: [PATCH 55/94] [hifiberry] Hack: force it to be recognised as IEC958 +Subject: [PATCH 55/98] [hifiberry] Hack: force it to be recognised as IEC958 capable to enable passthrough options --- @@ -14538,10 +14538,10 @@ index b48a4fc..d9897e5 100644 1.9.3 -From 03aa9ebf0993f06d24a34f8dd7d86a183ebd2dcd Mon Sep 17 00:00:00 2001 +From 1a01205425e6fc048444e45fee5309e300439bc6 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 11 Mar 2014 18:50:23 +0000 -Subject: [PATCH 56/94] [dvdplayer] Use inexact seeking like omxplayer +Subject: [PATCH 56/98] [dvdplayer] Use inexact seeking like omxplayer --- xbmc/cores/dvdplayer/DVDPlayer.cpp | 11 +++++++++++ @@ -14592,10 +14592,10 @@ index d607f55..1d4ba52 100644 1.9.3 -From d4487b87819003a44f59a607074a41108f644915 Mon Sep 17 00:00:00 2001 +From 3fc57889558472480f13445747d4e4ebd4c1a604 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Thu, 13 Mar 2014 16:08:46 +0000 -Subject: [PATCH 57/94] [omxplayer] Make use of TrueHD fastpath when downmixing +Subject: [PATCH 57/98] [omxplayer] Make use of TrueHD fastpath when downmixing The TrueHD codec actually works in 3 stages. It decodes the downmixed stereo. It then decodes the differences required to produce 5.1. It then decodes the differences required to produce 7.1. @@ -14640,10 +14640,10 @@ index 557e847..7f6ef6e 100644 1.9.3 -From 8dedad4307cbca1416262af9e2ac2404c7490713 Mon Sep 17 00:00:00 2001 +From a689ad65553e6472660570de93b96aa6a1d15c65 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Sat, 15 Mar 2014 19:38:38 +0000 -Subject: [PATCH 58/94] [omxplayer] When in dual audio mode, make one output +Subject: [PATCH 58/98] [omxplayer] When in dual audio mode, make one output the slave May help audio sync between the two outputs @@ -14677,10 +14677,10 @@ index 3e64de0..72e42ec 100644 1.9.3 -From 96842193cb39ac3625a1dcbdd67388141733a5ee Mon Sep 17 00:00:00 2001 +From ec600a50adc435e5f704aa70c1ca8698bd92f4b0 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 30 Dec 2013 12:02:14 +0000 -Subject: [PATCH 59/94] [rbp] Hardware accelerated resampling +Subject: [PATCH 59/98] [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. @@ -15453,10 +15453,10 @@ index 99e407a..8d3c86a 100644 1.9.3 -From 07042c916d780bf4acb742e174005aa1e38f3a13 Mon Sep 17 00:00:00 2001 +From 9dcb012f5b43e130925e8c86914dfdf961d15fa9 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Thu, 27 Mar 2014 00:22:05 +0000 -Subject: [PATCH 60/94] [PiResample] Work around AE not providing correct +Subject: [PATCH 60/98] [PiResample] Work around AE not providing correct src_bits --- @@ -15499,10 +15499,10 @@ index 1d7b425..a91e208 100644 1.9.3 -From 16e8c9550b1afc0a4f5c050cc10c2c19ec9cea38 Mon Sep 17 00:00:00 2001 +From 9ce07d056b61fdaf4e821a441910334d772963e5 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 25 Mar 2014 19:43:07 +0000 -Subject: [PATCH 61/94] [ffmpeg] Speed up wtv index creation +Subject: [PATCH 61/98] [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. @@ -15552,10 +15552,10 @@ index e423370..70898bd 100644 1.9.3 -From c95293a4cfd39a5296b434c330c3e6e24831bb6e Mon Sep 17 00:00:00 2001 +From ae6a17ad6db529cbea390d04cb0cade894496b06 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 7 Apr 2014 18:19:32 +0100 -Subject: [PATCH 62/94] [rbp/omxplayer] When opening a stream don't try to +Subject: [PATCH 62/98] [rbp/omxplayer] When opening a stream don't try to update gui so often --- @@ -15582,10 +15582,10 @@ index e9ba7d3..0fdc3c2 100644 1.9.3 -From 9420d803f17902c7d9f1e6734ab42a78c5d67572 Mon Sep 17 00:00:00 2001 +From 0a5a53e9d891fa4fbbc15a55ae4ef3072bbd0d93 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 7 Apr 2014 15:28:57 +0100 -Subject: [PATCH 63/94] [omxcodec] Clamp video texture at edges to avoid image +Subject: [PATCH 63/98] [omxcodec] Clamp video texture at edges to avoid image wrapping --- @@ -15609,10 +15609,10 @@ index a57abe4..e22a153 100644 1.9.3 -From 49c65c8d083952be840d8730f3fa40cfd5e0211c Mon Sep 17 00:00:00 2001 +From 47c305f4fce506b2822a5dd6698486369b10f338 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 7 Apr 2014 17:36:19 +0100 -Subject: [PATCH 64/94] [PiSink] Remove unneeded header and use CAEChannelInfo +Subject: [PATCH 64/98] [PiSink] Remove unneeded header and use CAEChannelInfo directly --- @@ -15688,10 +15688,10 @@ index 9ce00e3..070e6eb 100644 1.9.3 -From 6ce35e828b39e0a8f2d81cb6fb6162edd53468a8 Mon Sep 17 00:00:00 2001 +From f3eee570e5a5295165b326fab73fb9d91648e590 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 7 Apr 2014 17:37:41 +0100 -Subject: [PATCH 65/94] [omxplayer] Remove PCMRemap and handle multichannel +Subject: [PATCH 65/98] [omxplayer] Remove PCMRemap and handle multichannel mixing like ActiveAE does --- @@ -16353,7 +16353,7 @@ index 66e5b4a..6e6b226 100644 bool m_bGotFrame; bool m_bNoConcatenate; diff --git a/xbmc/cores/omxplayer/OMXPlayerAudio.cpp b/xbmc/cores/omxplayer/OMXPlayerAudio.cpp -index a4c11777..d3348ec 100644 +index a4c1177..d3348ec 100644 --- a/xbmc/cores/omxplayer/OMXPlayerAudio.cpp +++ b/xbmc/cores/omxplayer/OMXPlayerAudio.cpp @@ -567,13 +567,13 @@ bool OMXPlayerAudio::OpenDecoder() @@ -17352,10 +17352,10 @@ index a273cd1..0000000 1.9.3 -From f642e8eac4fb16039ce662a8a170908efd43ebf8 Mon Sep 17 00:00:00 2001 +From 128910c91f1f17cb7d86903a82bc580756f6a039 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Thu, 10 Apr 2014 17:19:18 +0100 -Subject: [PATCH 66/94] [omxplayer] Remove unused framerate functions +Subject: [PATCH 66/98] [omxplayer] Remove unused framerate functions --- xbmc/cores/omxplayer/OMXPlayerVideo.cpp | 4 +--- @@ -17462,10 +17462,10 @@ index f83074a..7bb6d4d 100644 1.9.3 -From 652d09aff0c0ed4cab08ab7ebbe0da37118c53ba Mon Sep 17 00:00:00 2001 +From acc430759b24126fbe5ee1d24cd31bb4bc9aca9d Mon Sep 17 00:00:00 2001 From: popcornmix Date: Sun, 30 Mar 2014 15:54:34 +0100 -Subject: [PATCH 67/94] [omxplayer] Make the sharpness control act as a +Subject: [PATCH 67/98] [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] @@ -17847,10 +17847,10 @@ index 2515fa1..b09e8e0 100644 1.9.3 -From 97a3f2347e45eee8f960a2190891d4bd9de3dda0 Mon Sep 17 00:00:00 2001 +From 8da8846e0d92f0a9040fae5be412db5bd1495240 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Thu, 10 Apr 2014 17:24:51 +0100 -Subject: [PATCH 68/94] [rpi] Include ntsc frequencies in list of supported +Subject: [PATCH 68/98] [rpi] Include ntsc frequencies in list of supported resolutions --- @@ -17984,10 +17984,10 @@ index 0c32947..258a293 100644 1.9.3 -From 6e000e35a42863a9db644692246c43300e4ab948 Mon Sep 17 00:00:00 2001 +From ef04309cb623ffdb76ddaa9e69f50d7cd3b91a33 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Thu, 10 Apr 2014 17:26:20 +0100 -Subject: [PATCH 69/94] [omxplayer] Allow a framerate callback from GPU to +Subject: [PATCH 69/98] [omxplayer] Allow a framerate callback from GPU to trigger a hdmi mode change --- @@ -18127,10 +18127,10 @@ index d69f854..fd23e70 100644 1.9.3 -From 7d8653f297a2aeea7b10bf36732892878ae89334 Mon Sep 17 00:00:00 2001 +From 0ee17e4027f01b7d43b3152f8906b89382b4a7f4 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Fri, 11 Apr 2014 19:01:26 +0100 -Subject: [PATCH 70/94] [omxplayer] Request to be notified about framerate +Subject: [PATCH 70/98] [omxplayer] Request to be notified about framerate changes --- @@ -18173,10 +18173,10 @@ index 10a7530..148b16f 100644 1.9.3 -From 12a54cc9ca0c0500f1d86173df0c8466270bd766 Mon Sep 17 00:00:00 2001 +From 2627ab4e61b8455c23759ed60f17be418ca3377f Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 14 Apr 2014 17:04:57 +0100 -Subject: [PATCH 71/94] [omxplayer] Support stereo view modes with scaling +Subject: [PATCH 71/98] [omxplayer] Support stereo view modes with scaling The Pi only supported a single view rectangle, which is sufficient for all mono view modes, but only supports a subset of stereo modes. @@ -18453,10 +18453,10 @@ index fd23e70..226000e 100644 1.9.3 -From 716400b7b3cf13c6546bba6a0d0a2f47825f9117 Mon Sep 17 00:00:00 2001 +From 6cf198becad5505eadd8827141fa31af8e7ec980 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 16 Apr 2014 21:18:06 +0100 -Subject: [PATCH 72/94] [omxplayer] Don't propagate 3d flags based on supported +Subject: [PATCH 72/98] [omxplayer] Don't propagate 3d flags based on supported 3d modes --- @@ -18512,10 +18512,10 @@ index d5f3bec..e9f86f3 100644 1.9.3 -From 7f2220746d9efeb3e8cfc4524479a615db5b710c Mon Sep 17 00:00:00 2001 +From 6a7ea75022a25f3705f06a6e4e4a2d39fa30fb15 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Thu, 17 Apr 2014 13:00:52 +0100 -Subject: [PATCH 73/94] [graphics] Don't set stereo mode based on resolution +Subject: [PATCH 73/98] [graphics] Don't set stereo mode based on resolution The resolution change should follow stereo mode --- @@ -18559,10 +18559,10 @@ index 5bffdf5..7e4fdd4 100644 1.9.3 -From 7885d90283809ccbcdb9c39809682dfc099049c4 Mon Sep 17 00:00:00 2001 +From 992078833651230ed53427a6b44000c4c8a2b742 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Thu, 17 Apr 2014 13:01:51 +0100 -Subject: [PATCH 74/94] [graphics] Allow switching to a more suitable 3D +Subject: [PATCH 74/98] [graphics] Allow switching to a more suitable 3D resolution --- @@ -18652,10 +18652,10 @@ index 0a27643..df55e92 100644 1.9.3 -From 49438256c57d11b415f6a90f653857e7fae16a1d Mon Sep 17 00:00:00 2001 +From d039385ac65ef0b0d2d62d5ef8cf2b56b0ae7915 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Thu, 17 Apr 2014 13:38:55 +0100 -Subject: [PATCH 75/94] [3D] Support switching to 3D resolutions +Subject: [PATCH 75/98] [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. @@ -18740,10 +18740,10 @@ index 970b822..9ca1be1 100644 1.9.3 -From bd077947037288550a8e68efed630a3477a16564 Mon Sep 17 00:00:00 2001 +From e914875a2e9b4623ec1f94a5c888913029b64e28 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 23 Apr 2014 00:05:07 +0100 -Subject: [PATCH 76/94] [graphics] Make pixel ratio for 3d modes consistent +Subject: [PATCH 76/98] [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. @@ -18931,10 +18931,10 @@ index 21b8cc4..f57b22b 100644 1.9.3 -From 7464b116a5db0be0c2b50314fcf703529d6f646e Mon Sep 17 00:00:00 2001 +From f3b7b4ea56132cbc24080f4d692e0f3d7bd7d553 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 23 Apr 2014 21:07:51 +0100 -Subject: [PATCH 77/94] [PiSink] More attempts to reduce underrun audio +Subject: [PATCH 77/98] [PiSink] More attempts to reduce underrun audio glitches with multichannl and high samplerate --- @@ -19056,10 +19056,10 @@ index 070e6eb..133b9f6 100644 1.9.3 -From 508c32de290d09c429d73b2497408b930550f1a3 Mon Sep 17 00:00:00 2001 +From d951322cff8f3e996c910fbf9c72ed60e703e4e3 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 23 Apr 2014 22:36:01 +0100 -Subject: [PATCH 78/94] [omxplayer] Fix for aspect ratio of portrait videos +Subject: [PATCH 78/98] [omxplayer] Fix for aspect ratio of portrait videos --- xbmc/cores/omxplayer/OMXPlayerVideo.cpp | 10 ++++++++++ @@ -19090,10 +19090,10 @@ index e9f86f3..7e2c644 100644 1.9.3 -From fe9fea7a1aac545aa601b71aae01651bc42a5376 Mon Sep 17 00:00:00 2001 +From 521a87d51ca163073fbde7c7121cacac55f3f87f Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 22 Apr 2014 12:23:23 +0100 -Subject: [PATCH 79/94] [omxplayer] Make dvdplayer the default for dvd images +Subject: [PATCH 79/98] [omxplayer] Make dvdplayer the default for dvd images --- xbmc/cores/omxplayer/omxplayer_advancedsettings.xml | 2 +- @@ -19115,10 +19115,10 @@ index 77c6a15..51c0daf 100644 1.9.3 -From f417d7d303eaa5113edba8ba562cb61ed8a6c59a Mon Sep 17 00:00:00 2001 +From c04b020c42f2b911b3dabff6b75f19fd3239c901 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Sat, 26 Apr 2014 17:27:52 +0100 -Subject: [PATCH 80/94] [cec] Don't suspend pi on tv switch off - it can't wake +Subject: [PATCH 80/98] [cec] Don't suspend pi on tv switch off - it can't wake up --- @@ -19142,10 +19142,10 @@ index a906628..9b5271a 100644 1.9.3 -From 0563f1df1295ac5600fd330fb201e854ad900e02 Mon Sep 17 00:00:00 2001 +From 868015271d27bcb3f0199105db8c1d997dab6961 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Sat, 12 Apr 2014 17:57:19 +0100 -Subject: [PATCH 81/94] [omxplayer] Ignore occasionally valid pts values, they +Subject: [PATCH 81/98] [omxplayer] Ignore occasionally valid pts values, they cause live tv stutter --- @@ -19169,10 +19169,10 @@ index 7e2c644..b3786f6 100644 1.9.3 -From cddc5f27f9aa11dfb65e16ec1f84a809cf79c68b Mon Sep 17 00:00:00 2001 +From 3d041a1a6fa0ea13a23d99a313cc7cc778b4378d Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 7 May 2014 14:54:41 +0100 -Subject: [PATCH 82/94] [Pi] Fix naming of refresh rates to avoid lost +Subject: [PATCH 82/98] [Pi] Fix naming of refresh rates to avoid lost calibration settings --- @@ -19256,10 +19256,10 @@ index d1ebb81..59401f5 100644 1.9.3 -From a4c36a4925e780b63d9821fb04504453ac982205 Mon Sep 17 00:00:00 2001 +From 76426876d5b0a117f861e894670a57c482b1cf6a Mon Sep 17 00:00:00 2001 From: popcornmix Date: Sat, 10 May 2014 11:40:41 +0100 -Subject: [PATCH 83/94] [omxplayer] Skip out of submit loop when closing. +Subject: [PATCH 83/98] [omxplayer] Skip out of submit loop when closing. Avoids a permanent hang at EOF when using IPTV streams --- @@ -19373,10 +19373,10 @@ index 6f19395..8eff32f 100644 1.9.3 -From b90562b8ffc29c1d9e037e94b0c92b3b0b67413b Mon Sep 17 00:00:00 2001 +From d0b2413f22d817dc8dda01330ca02a70ebd4e739 Mon Sep 17 00:00:00 2001 From: xbmc Date: Mon, 28 May 2012 10:34:39 +0200 -Subject: [PATCH 84/94] videoplayer: adapt lateness detection and dropping to +Subject: [PATCH 84/98] videoplayer: adapt lateness detection and dropping to buffering --- @@ -19993,10 +19993,10 @@ index f8ad541..186e271 100644 1.9.3 -From 16d2c2ee305eb2cd3ec42fd0aad474dbf356d75d Mon Sep 17 00:00:00 2001 +From fa0d9219ab98b812cad69e231719cf18c6ba9c32 Mon Sep 17 00:00:00 2001 From: xbmc Date: Sun, 2 Sep 2012 16:05:21 +0200 -Subject: [PATCH 85/94] video player: present correct pts to user for a/v sync +Subject: [PATCH 85/98] video player: present correct pts to user for a/v sync (after buffering in renderer) --- @@ -20048,10 +20048,10 @@ index 186e271..59c7f09 100644 1.9.3 -From afa38b57afee02720263e2db79d20e1411461433 Mon Sep 17 00:00:00 2001 +From 06be8bcb7c20b1f3b9251cf741e35a2bde38c1c9 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 12 May 2014 23:06:43 +0100 -Subject: [PATCH 86/94] [omxcodec] Updates to work better with dropping and +Subject: [PATCH 86/98] [omxcodec] Updates to work better with dropping and lateness detection --- @@ -20341,10 +20341,10 @@ index f234f6d..adf53b5 100644 1.9.3 -From 4dd2fcf0f479b6b18dac9a496ddf1788b82388f2 Mon Sep 17 00:00:00 2001 +From b1b0796544aa6f2ec1a3f5e75d9fad754f2801b1 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Sun, 11 May 2014 16:13:45 +0100 -Subject: [PATCH 87/94] [rbp] Add config.txt settings to log file +Subject: [PATCH 87/98] [rbp] Add config.txt settings to log file --- xbmc/linux/RBP.cpp | 8 +++++++- @@ -20377,10 +20377,10 @@ index 49dcbb8..9a5e9cb 100644 1.9.3 -From eb2cba833f1399befcbd60901f3d97a08e3a2781 Mon Sep 17 00:00:00 2001 +From dc526c2aeb1dac6eef4d9aeb4861efe07b217c19 Mon Sep 17 00:00:00 2001 From: Alex Deryskyba Date: Thu, 8 May 2014 18:54:54 +0300 -Subject: [PATCH 88/94] Reset display region when video stream properties +Subject: [PATCH 88/98] Reset display region when video stream properties change Currently when video stream properties change, e.g. when user switches to next or previous Live TV channel, and has the same frame width and height, the COMXVideo::SetVideoRect() method is not called, causing the video to play back with default source and destination rectangles, not respecting the user-defined zoom settings. @@ -20408,10 +20408,10 @@ index 61b884e..eaa1e34 100644 1.9.3 -From 7c369ba5ec4e700f5c06e1caa20095bc26e61195 Mon Sep 17 00:00:00 2001 +From 3c93efc86f3b11695085248ea1aa57e5a2c85e5c Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 28 May 2014 23:44:11 +0100 -Subject: [PATCH 89/94] [omxplayer] Fix for mapping of multichannel PCM audio +Subject: [PATCH 89/98] [omxplayer] Fix for mapping of multichannel PCM audio --- xbmc/cores/omxplayer/OMXAudio.cpp | 11 ++++++++--- @@ -20447,10 +20447,10 @@ index d9beb68..75eff26 100644 1.9.3 -From 458ec80741e4aa1ae95fe616f5953e1268a4802e Mon Sep 17 00:00:00 2001 +From f6e004472167be1c7643fab78d8249c0e25d2c99 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Fri, 30 May 2014 14:15:10 +0100 -Subject: [PATCH 90/94] [pi] Fix for logged resolutions +Subject: [PATCH 90/98] [pi] Fix for logged resolutions --- xbmc/windowing/egl/EGLNativeTypeRaspberryPI.cpp | 15 +++++---------- @@ -20518,10 +20518,10 @@ index 5b26b20..a3edf0e 100644 1.9.3 -From 9eb0d69eb1f319421780025cefe6df3ade40c4dc Mon Sep 17 00:00:00 2001 +From b2cb0a99711c10e1d2f9ffa4d44a72315e88c0f6 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Sat, 7 Jun 2014 16:55:41 +0100 -Subject: [PATCH 91/94] [omx] Remove logging for texture jobs +Subject: [PATCH 91/98] [omx] Remove logging for texture jobs This causes a lot of log spam which hasn't proved useful so far. --- @@ -20566,10 +20566,10 @@ index 262a004..d529b20 100644 1.9.3 -From 4c7a42273416f4053a5bb90755ea45cc0a5f7a0b Mon Sep 17 00:00:00 2001 +From c76e633e0b3e436b121d3259db9867d67029939b Mon Sep 17 00:00:00 2001 From: popcornmix Date: Sun, 15 Jun 2014 13:20:53 +0100 -Subject: [PATCH 92/94] gles: Avoid crash when capturing snapshot when using +Subject: [PATCH 92/98] gles: Avoid crash when capturing snapshot when using dvdplayer Note: snapshot will be blank, but that's better than crashing @@ -20595,10 +20595,10 @@ index e22a153..0cff2c5 100644 1.9.3 -From 9805b1c9b218f8ba15c41752cc88f6e8bc3223ad Mon Sep 17 00:00:00 2001 +From b43223542e1af7566cf9cf67636a314016cb2970 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 28 May 2014 18:30:51 +0100 -Subject: [PATCH 93/94] [omxcodec] Reduce GPU memory use by 2 video frames +Subject: [PATCH 93/98] [omxcodec] Reduce GPU memory use by 2 video frames --- xbmc/cores/dvdplayer/DVDCodecs/Video/OpenMaxVideo.cpp | 14 ++++++++++++++ @@ -20633,10 +20633,10 @@ index 93cf521..cc45570 100644 1.9.3 -From 1b49a6f5b1655918e26d84ca4260fc249c00022f Mon Sep 17 00:00:00 2001 +From 92b67abffac0785aae41827177b52f9f76561746 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 18 Jun 2014 23:11:28 +0100 -Subject: [PATCH 94/94] [rbp] Reduce GPU memory use when limited +Subject: [PATCH 94/98] [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. @@ -20663,3 +20663,473 @@ index 9a5e9cb..50d5186 100644 -- 1.9.3 + +From c2af0930ca8a0a61f04f752517f1f813d32d3450 Mon Sep 17 00:00:00 2001 +From: popcornmix +Date: Sat, 5 Jul 2014 19:26:46 +0100 +Subject: [PATCH 95/98] [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 +--- + xbmc/cores/omxplayer/OMXVideo.cpp | 22 +++++++++++++++++++++- + 1 file changed, 21 insertions(+), 1 deletion(-) + +diff --git a/xbmc/cores/omxplayer/OMXVideo.cpp b/xbmc/cores/omxplayer/OMXVideo.cpp +index dceb8bf..eeb563d 100644 +--- a/xbmc/cores/omxplayer/OMXVideo.cpp ++++ b/xbmc/cores/omxplayer/OMXVideo.cpp +@@ -254,13 +254,33 @@ bool COMXVideo::PortSettingsChanged() + + if(m_deinterlace) + { ++ bool advanced_deinterlace = port_image.format.video.nFrameWidth * port_image.format.video.nFrameHeight <= 576 * 720; ++ ++ if (!advanced_deinterlace) ++ { ++ // Image_fx assumed 3 frames of context. simple deinterlace doesn't require this ++ OMX_PARAM_U32TYPE extra_buffers; ++ OMX_INIT_STRUCTURE(extra_buffers); ++ extra_buffers.nU32 = -2; ++ ++ omx_err = m_omx_image_fx.SetParameter(OMX_IndexParamBrcmExtraBuffers, &extra_buffers); ++ if(omx_err != OMX_ErrorNone) ++ { ++ CLog::Log(LOGERROR, "%s::%s error OMX_IndexParamBrcmExtraBuffers omx_err(0x%08x)", CLASSNAME, __func__, omx_err); ++ return false; ++ } ++ } ++ + OMX_CONFIG_IMAGEFILTERPARAMSTYPE image_filter; + OMX_INIT_STRUCTURE(image_filter); + + image_filter.nPortIndex = m_omx_image_fx.GetOutputPort(); + image_filter.nNumParams = 1; + image_filter.nParams[0] = 3; +- image_filter.eImageFilter = OMX_ImageFilterDeInterlaceAdvanced; ++ if (!advanced_deinterlace) ++ image_filter.eImageFilter = OMX_ImageFilterDeInterlaceFast; ++ else ++ image_filter.eImageFilter = OMX_ImageFilterDeInterlaceAdvanced; + + omx_err = m_omx_image_fx.SetConfig(OMX_IndexConfigCommonImageFilterParameters, &image_filter); + if(omx_err != OMX_ErrorNone) +-- +1.9.3 + + +From 90e5963b1281cca702021bfa2d628c28f56b39ab Mon Sep 17 00:00:00 2001 +From: popcornmix +Date: Tue, 1 Jul 2014 00:38:54 +0100 +Subject: [PATCH 96/98] [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 +https://github.com/raspberrypi/firmware/issues/288 +http://openelec.tv/forum/120-news-announcements/70709-openelec-4-0-released?start=15#105219 + +It should fail and continue with software decode. It hangs on the OMX_FreeBuffer call. +Looks like image_decode component should be returned to idle state before freeing buffers +when operation did not complete successfully +--- + xbmc/cores/omxplayer/OMXImage.cpp | 78 ++++++++++++++++++++++++++------------- + xbmc/cores/omxplayer/OMXImage.h | 4 ++ + 2 files changed, 56 insertions(+), 26 deletions(-) + +diff --git a/xbmc/cores/omxplayer/OMXImage.cpp b/xbmc/cores/omxplayer/OMXImage.cpp +index d529b20..f5fe546 100644 +--- a/xbmc/cores/omxplayer/OMXImage.cpp ++++ b/xbmc/cores/omxplayer/OMXImage.cpp +@@ -902,6 +902,7 @@ COMXImageDec::COMXImageDec() + { + m_decoded_buffer = NULL; + OMX_INIT_STRUCTURE(m_decoded_format); ++ m_success = false; + } + + COMXImageDec::~COMXImageDec() +@@ -916,15 +917,20 @@ void COMXImageDec::Close() + { + CSingleLock lock(m_OMXSection); + +- if(m_omx_decoder.IsInitialized()) +- { +- m_omx_decoder.FlushInput(); +- m_omx_decoder.FreeInputBuffers(); +- } +- if(m_omx_resize.IsInitialized()) ++ if (!m_success) + { +- m_omx_resize.FlushOutput(); +- m_omx_resize.FreeOutputBuffers(); ++ if(m_omx_decoder.IsInitialized()) ++ { ++ m_omx_decoder.SetStateForComponent(OMX_StateIdle); ++ m_omx_decoder.FlushInput(); ++ m_omx_decoder.FreeInputBuffers(); ++ } ++ if(m_omx_resize.IsInitialized()) ++ { ++ m_omx_resize.SetStateForComponent(OMX_StateIdle); ++ m_omx_resize.FlushOutput(); ++ m_omx_resize.FreeOutputBuffers(); ++ } + } + if(m_omx_tunnel_decode.IsInitialized()) + m_omx_tunnel_decode.Deestablish(); +@@ -1177,6 +1183,7 @@ bool COMXImageDec::Decode(const uint8_t *demuxer_content, unsigned demuxer_bytes + + memcpy( (char*)pixels, m_decoded_buffer->pBuffer, stride * height); + ++ m_success = true; + Close(); + return true; + } +@@ -1191,6 +1198,7 @@ COMXImageEnc::COMXImageEnc() + CSingleLock lock(m_OMXSection); + OMX_INIT_STRUCTURE(m_encoded_format); + m_encoded_buffer = NULL; ++ m_success = false; + } + + COMXImageEnc::~COMXImageEnc() +@@ -1416,6 +1424,7 @@ COMXImageReEnc::COMXImageReEnc() + m_encoded_buffer = NULL; + m_pDestBuffer = NULL; + m_nDestAllocSize = 0; ++ m_success = false; + } + + COMXImageReEnc::~COMXImageReEnc() +@@ -1431,15 +1440,24 @@ void COMXImageReEnc::Close() + { + CSingleLock lock(m_OMXSection); + +- if(m_omx_decoder.IsInitialized()) +- { +- m_omx_decoder.FlushInput(); +- m_omx_decoder.FreeInputBuffers(); +- } +- if(m_omx_encoder.IsInitialized()) ++ if (!m_success) + { +- m_omx_encoder.FlushOutput(); +- m_omx_encoder.FreeOutputBuffers(); ++ if(m_omx_decoder.IsInitialized()) ++ { ++ m_omx_decoder.SetStateForComponent(OMX_StateIdle); ++ m_omx_decoder.FlushInput(); ++ m_omx_decoder.FreeInputBuffers(); ++ } ++ if(m_omx_resize.IsInitialized()) ++ { ++ m_omx_resize.SetStateForComponent(OMX_StateIdle); ++ } ++ if(m_omx_encoder.IsInitialized()) ++ { ++ m_omx_encoder.SetStateForComponent(OMX_StateIdle); ++ m_omx_encoder.FlushOutput(); ++ m_omx_encoder.FreeOutputBuffers(); ++ } + } + if(m_omx_tunnel_decode.IsInitialized()) + m_omx_tunnel_decode.Deestablish(); +@@ -1856,14 +1874,15 @@ bool COMXImageReEnc::ReEncode(COMXImageFile &srcFile, unsigned int maxWidth, uns + } + } + +- Close(); +- + if(m_omx_decoder.BadState()) + return false; + + pDestBuffer = m_pDestBuffer; + CLog::Log(LOGDEBUG, "%s::%s : %s %dx%d -> %dx%d\n", CLASSNAME, __func__, srcFile.GetFilename(), srcFile.GetWidth(), srcFile.GetHeight(), maxWidth, maxHeight); + ++ m_success = true; ++ Close(); ++ + return true; + } + +@@ -1875,6 +1894,7 @@ bool COMXImageReEnc::ReEncode(COMXImageFile &srcFile, unsigned int maxWidth, uns + + COMXTexture::COMXTexture() + { ++ m_success = false; + } + + COMXTexture::~COMXTexture() +@@ -1886,15 +1906,20 @@ void COMXTexture::Close() + { + CSingleLock lock(m_OMXSection); + +- if(m_omx_decoder.IsInitialized()) +- { +- m_omx_decoder.FlushInput(); +- m_omx_decoder.FreeInputBuffers(); +- } +- if(m_omx_egl_render.IsInitialized()) ++ if (!m_success) + { +- m_omx_egl_render.FlushOutput(); +- m_omx_egl_render.FreeOutputBuffers(); ++ if(m_omx_decoder.IsInitialized()) ++ { ++ m_omx_decoder.SetStateForComponent(OMX_StateIdle); ++ m_omx_decoder.FlushInput(); ++ m_omx_decoder.FreeInputBuffers(); ++ } ++ if(m_omx_egl_render.IsInitialized()) ++ { ++ m_omx_egl_render.SetStateForComponent(OMX_StateIdle); ++ m_omx_egl_render.FlushOutput(); ++ m_omx_egl_render.FreeOutputBuffers(); ++ } + } + if (m_omx_tunnel_decode.IsInitialized()) + m_omx_tunnel_decode.Deestablish(); +@@ -2196,6 +2221,7 @@ bool COMXTexture::Decode(const uint8_t *demuxer_content, unsigned demuxer_bytes, + eos = true; + } + } ++ m_success = true; + Close(); + return true; + } +diff --git a/xbmc/cores/omxplayer/OMXImage.h b/xbmc/cores/omxplayer/OMXImage.h +index ec7a229..62e931a 100644 +--- a/xbmc/cores/omxplayer/OMXImage.h ++++ b/xbmc/cores/omxplayer/OMXImage.h +@@ -135,6 +135,7 @@ class COMXImageDec + OMX_BUFFERHEADERTYPE *m_decoded_buffer; + OMX_PARAM_PORTDEFINITIONTYPE m_decoded_format; + CCriticalSection m_OMXSection; ++ bool m_success; + }; + + class COMXImageEnc +@@ -153,6 +154,7 @@ class COMXImageEnc + OMX_BUFFERHEADERTYPE *m_encoded_buffer; + OMX_PARAM_PORTDEFINITIONTYPE m_encoded_format; + CCriticalSection m_OMXSection; ++ bool m_success; + }; + + class COMXImageReEnc +@@ -176,6 +178,7 @@ class COMXImageReEnc + CCriticalSection m_OMXSection; + void *m_pDestBuffer; + unsigned int m_nDestAllocSize; ++ bool m_success; + }; + + class COMXTexture +@@ -200,6 +203,7 @@ class COMXTexture + + OMX_BUFFERHEADERTYPE *m_egl_buffer; + CCriticalSection m_OMXSection; ++ bool m_success; + }; + + extern COMXImage g_OMXImage; +-- +1.9.3 + + +From e9f2e6f8294e24a57448774d4b1575a1b014fb07 Mon Sep 17 00:00:00 2001 +From: popcornmix +Date: Wed, 2 Jul 2014 21:03:59 +0100 +Subject: [PATCH 97/98] [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 +can be overlapped with vchiq message transfer. + +Experimentally, 3 outstanding operations is optimal. + +Allowing more that this ties up memory on GPU without any performance benefit, so avoid submitting more jobs +--- + xbmc/cores/omxplayer/OMXImage.cpp | 35 +++++++++++++++++++++++++++++++++++ + 1 file changed, 35 insertions(+) + +diff --git a/xbmc/cores/omxplayer/OMXImage.cpp b/xbmc/cores/omxplayer/OMXImage.cpp +index f5fe546..a3704da 100644 +--- a/xbmc/cores/omxplayer/OMXImage.cpp ++++ b/xbmc/cores/omxplayer/OMXImage.cpp +@@ -49,6 +49,33 @@ + #define EXIF_TAG_ORIENTATION 0x0112 + + ++// A helper for restricting threads calling GPU functions to limit memory use ++static XbmcThreads::ConditionVariable g_count_cond; ++static CCriticalSection g_count_lock; ++static int g_count_val; ++ ++static void limit_calls_enter(int &count, int allowed) ++{ ++ //printf("%s in=%d\n", __func__, m_count_val); ++ CSingleLock lock(g_count_lock); ++ while (count >= allowed) ++ { ++ g_count_cond.wait(lock); ++ } ++ count++; ++ //printf("%s out=%d\n", __func__, m_count_val); ++} ++ ++static void limit_calls_leave(int &count) ++{ ++ //printf("%s in=%d\n", __func__, m_count_val); ++ CSingleLock lock(g_count_lock); ++ count--; ++ g_count_cond.notifyAll(); ++ //printf("%s out=%d\n", __func__, m_count_val); ++} ++ ++ + #ifdef CLASSNAME + #undef CLASSNAME + #endif +@@ -900,6 +927,7 @@ bool COMXImageFile::ReadFile(const CStdString& inputFile) + + COMXImageDec::COMXImageDec() + { ++ limit_calls_enter(g_count_val, 3); + m_decoded_buffer = NULL; + OMX_INIT_STRUCTURE(m_decoded_format); + m_success = false; +@@ -911,6 +939,7 @@ COMXImageDec::~COMXImageDec() + + OMX_INIT_STRUCTURE(m_decoded_format); + m_decoded_buffer = NULL; ++ limit_calls_leave(g_count_val); + } + + void COMXImageDec::Close() +@@ -1195,6 +1224,7 @@ bool COMXImageDec::Decode(const uint8_t *demuxer_content, unsigned demuxer_bytes + + COMXImageEnc::COMXImageEnc() + { ++ limit_calls_enter(g_count_val, 3); + CSingleLock lock(m_OMXSection); + OMX_INIT_STRUCTURE(m_encoded_format); + m_encoded_buffer = NULL; +@@ -1209,6 +1239,7 @@ COMXImageEnc::~COMXImageEnc() + m_encoded_buffer = NULL; + if(m_omx_encoder.IsInitialized()) + m_omx_encoder.Deinitialize(); ++ limit_calls_leave(g_count_val); + } + + bool COMXImageEnc::Encode(unsigned char *buffer, int size, unsigned width, unsigned height, unsigned int pitch) +@@ -1421,6 +1452,7 @@ bool COMXImageEnc::CreateThumbnailFromSurface(unsigned char* buffer, unsigned in + + COMXImageReEnc::COMXImageReEnc() + { ++ limit_calls_enter(g_count_val, 3); + m_encoded_buffer = NULL; + m_pDestBuffer = NULL; + m_nDestAllocSize = 0; +@@ -1434,6 +1466,7 @@ COMXImageReEnc::~COMXImageReEnc() + free (m_pDestBuffer); + m_pDestBuffer = NULL; + m_nDestAllocSize = 0; ++ limit_calls_leave(g_count_val); + } + + void COMXImageReEnc::Close() +@@ -1894,12 +1927,14 @@ bool COMXImageReEnc::ReEncode(COMXImageFile &srcFile, unsigned int maxWidth, uns + + COMXTexture::COMXTexture() + { ++ limit_calls_enter(g_count_val, 3); + m_success = false; + } + + COMXTexture::~COMXTexture() + { + Close(); ++ limit_calls_leave(g_count_val); + } + + void COMXTexture::Close() +-- +1.9.3 + + +From a4ba388632869d1d40d1ea7a9b4386121110a0d0 Mon Sep 17 00:00:00 2001 +From: popcornmix +Date: Wed, 2 Jul 2014 20:41:29 +0100 +Subject: [PATCH 98/98] [pi] Reduce time textures are held for when memory is + low + +--- + xbmc/Application.cpp | 9 +++++++++ + xbmc/linux/RBP.cpp | 10 ++++++++++ + xbmc/linux/RBP.h | 1 + + 3 files changed, 20 insertions(+) + +diff --git a/xbmc/Application.cpp b/xbmc/Application.cpp +index 43bc778..270df45 100644 +--- a/xbmc/Application.cpp ++++ b/xbmc/Application.cpp +@@ -348,6 +348,10 @@ + #include "utils/AMLUtils.h" + #endif + ++#if defined(TARGET_RASPBERRY_PI) ++#include "linux/RBP.h" ++#endif ++ + using namespace std; + using namespace ADDON; + using namespace XFILE; +@@ -5140,6 +5144,11 @@ void CApplication::ProcessSlow() + if (!m_pPlayer->IsPlayingVideo()) + g_largeTextureManager.CleanupUnusedImages(); + ++#ifdef TARGET_RASPBERRY_PI ++ if (g_RBP.GetGpuMemFree() < 64) ++ g_TextureManager.FreeUnusedTextures(); ++ else ++#endif + g_TextureManager.FreeUnusedTextures(5000); + + #ifdef HAS_DVD_DRIVE +diff --git a/xbmc/linux/RBP.cpp b/xbmc/linux/RBP.cpp +index 50d5186..3d93026 100644 +--- a/xbmc/linux/RBP.cpp ++++ b/xbmc/linux/RBP.cpp +@@ -80,6 +80,16 @@ bool CRBP::Initialize() + return true; + } + ++int CRBP::GetGpuMemFree() ++{ ++ int reloc_mem = 0; ++ char response[80] = ""; ++ ++ if (vc_gencmd(response, sizeof response, "get_mem reloc") == 0) ++ vc_gencmd_number_property(response, "reloc", &reloc_mem); ++ return reloc_mem; ++} ++ + void CRBP::LogFirmwareVerison() + { + char response[1024]; +diff --git a/xbmc/linux/RBP.h b/xbmc/linux/RBP.h +index 2aae579..f36329c 100644 +--- a/xbmc/linux/RBP.h ++++ b/xbmc/linux/RBP.h +@@ -50,6 +50,7 @@ class CRBP + void Deinitialize(); + int GetArmMem() { return m_arm_mem; } + int GetGpuMem() { return m_gpu_mem; } ++ int GetGpuMemFree(); + bool GetCodecMpg2() { return m_codec_mpg2_enabled; } + bool GetCodecWvc1() { return m_codec_wvc1_enabled; } + void GetDisplaySize(int &width, int &height); +-- +1.9.3 +