[pvr] make all livetv views available to the user earlier (as soon as channels are fetched from the backend and before epg is loaded from the db) by changing the pvr/epg manager startup logic
Revert "[epg] fixed - epg load/update was interrupted when the pvr manager imports channels, leading to delays and channel ids gone missing in certain situations"

This reverts commit bdf8842d543fae54067c4dd453bded8474e1044f.

Conflicts:

	xbmc/pvr/PVRManager.h
Merge pull request #1994 from nemphys/pvr-epg-startup

[pvr] make all livetv views available to the user earlier (as soon as channels are fetched from the backend and before epg is loaded from the db) by changing the pvr/epg manager startup logic
CDVDDemuxPVRClient: zero-init props in RequestStreams()
Merge pull request #3192 from herrnst/pvrprops-init

CDVDDemuxPVRClient: zero-init props in RequestStreams()
[skin] update Touched skin
[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.

I've also added a small weight to higher multiples of the desired framerate, so if display supports 30, 60 and 120Hz
and the video is 30fps then 30 will now be chosen rather than 120. This reduces the overhead of rendering the gui.
[confluence] Use animated gif as a cheaper working spinner
[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.
[rbp/omxplayer] Cosmetics
[utils] Speed up sorting code used by library views

Sort a table of references to maps, rather than shuffling the maps themselves.
Should speed up time taken to enter library views like movies.
h264_parser: Initialize the h264dsp context in the parser as well

Each AVStream struct for an H.264 elementary stream actually has two
copies of the H264DSPContext struct (and in fact all the other members
of H264Context as well):

((H264Context *) ((AVStream *)st)->codec->priv_data)->h264dsp
((H264Context *) ((AVStream *)st)->parser->priv_data)->h264dsp

but only the first of these was actually being initialised. This
prevented the addition of platform-specific implementations of
parser-related functions.

Signed-off-by: Martin Storsjö <martin@martin.st>
h264dsp: Factorize code into a new function, h264_find_start_code_candidate

This performs the start code search which was previously part of
h264_find_frame_end() - the most CPU intensive part of the function.

By itself, this results in a performance regression:
              Before          After
              Mean   StdDev   Mean   StdDev  Change
Overall time  2925.6 26.2     3068.5 31.7    -4.7%

but this can more than be made up for by platform-optimised
implementations of the function.

Signed-off-by: Martin Storsjö <martin@martin.st>
arm: Add assembly version of h264_find_start_code_candidate

               Before          After
               Mean   StdDev   Mean   StdDev  Change
This function   508.8 23.4      185.4  9.0    +174.4%
Overall        3068.5 31.7     2752.1 29.4     +11.5%

In combination with the preceding patch:
                Before          After
                Mean   StdDev   Mean   StdDev  Change
Overall         2925.6 26.2     2752.1 29.4     +6.3%

Signed-off-by: Martin Storsjö <martin@martin.st>
[ffmpeg] Backport of h264_find_start_code_candidate optimisation
[utils] Speed up url processing on music library

This reduces url processing when entering music/song view, and reduced time takes from 23 to 13 seconds
[rbp/omxplayer] Avoid too many calls to GPU

We currently read the media time once per packet received from demuxer to determine gpu underrun.
We've found that TrueHD audio in particular produces ~1000 packets per second (whether it is the active track or not).
The cost of reading media time (from gpu) is high enough that 1000 calls per second makes us fail to keep up.
So, cache the media time, and only read it at most 50 times per second.
[rbp/omxplayer] Avoid audio codec when in passthrough modes

There is no need to open the ffmpeg audio codec when in passthrough mode.
Also there is no need to close/open the OMXAudio component when parameters (like number of channels) change in passthough.
This avoids an unpleasant stutter
[rendercapture] Fix passthrough rendercapture interface

The RenderCapture function doesn't behave correctly for passthough video renderers,
and in fact segfaults on Pi when setting a bookmark.

There is no need to do a glReadPixels to get a video snapshot in the passthrough case,
so provide a shortcut.
[rbp] Support grabbing just the video layer through rendercapture

As the bookmark snapshot doesn't want the OSD (and neither does boblight)
allow video, or video + GUI to be selectable.

While we're there, making the GPU do the red/blue swap and stride packing saves some cpu.

Requires updated firmware