HOW-TO:Modify dirty regions: Difference between revisions

From Official Kodi Wiki
Jump to navigation Jump to search
No edit summary
Line 37: Line 37:


'''<algorithmdirtyregions>'''
'''<algorithmdirtyregions>'''
{{#lsth:advancedsettings.xml|<algorithmdirtyregions>}}
{{#lsth:advancedsettings.xml|algorithmdirtyregions}}




'''<nofliptimeout>'''
'''<nofliptimeout>'''
{{#lsth:advancedsettings.xml|<nofliptimeout>}}
{{#lsth:advancedsettings.xml|nofliptimeout}}


[[Category:How-to]]
[[Category:How-to]]

Revision as of 23:11, 24 May 2014

Dirty regions is an advanced setting and interface rendering method that can help speed up the GUI in XBMC and decrease the demand on your CPU and GPU. Dirty regions has no effect during video playback unless there are GUI elements (on screen buttons) visible. Using dirty regions requires XBMC v11 (Eden) or higher.

XBMC started as a project for the original XBOX where things were very different. After the move to desktops and embedded environments, many of the legacy procedures remained. One of these procedures, and a long-time thorn in XBMC’s side has long been its rendering model in which where every frame is rendered by the GPU in its entirety, typically at 60fps. As you can imagine, this is incredibly intensive and very unfriendly to low-power platforms. This is where dirty-region rendering comes in. Thanks to the work of Tobias and Jonathan (jmarshall), XBMC now has the ability to only render what has changed.

For more information see: Working with dirty regions

Modes

"Mode" 3 is currently enabled by default (as of XBMC v12), as it will reduce CPU/GPU usage without causing any flickering in the graphics. However Mode 3 will not make the GUI any faster. For that you will need mode 1 or 2. Mode 1 will provide the greatest speedup.

Some GPU/hardware configurations will have some minor issues (such as a visual "flicker"), so for those situations try mode 2 or use the default (mode 3, which requires no advancedsetting).

Example

This example is probably the setting that most users will want to try if they want to increase the GUI speed. As noted above, if you have issues you might want to try this same setting with mode 2 or 3:

1. Create a text document and save it as advancedsettings.xml (or edit the existing one if you've already made it)
2. Cut and paste the following into your new advancedsettings.xml file:
<advancedsettings>
 <gui>
   <algorithmdirtyregions>1</algorithmdirtyregions>
   <nofliptimeout>1000</nofliptimeout>
 </gui>
</advancedsettings>
3. Place your advancedsettings.xml file in your userdata folder.
4. Done!

Technical notes

From the advancedsettings.xml page:


<algorithmdirtyregions>

Note: Some GPU/hardware configurations will have some minor issues (such as a visual "flicker"). For those situations try mode 2 or use the default (mode 3, which requires no advancedsetting). Almost all ARM-based devices (such as Android) willl likely have flickering issues.

Enable dirty-region processing. Dirty regions are any parts of the screen that have changed since the last frame. By not re-rendering what hasn't changed the GUI can be sped up. Because all GPUs work differently, only Mode 3 is guaranteed to work for everyone without flickering issues. This mode will reduce CPU/GPU usage, but will not increase GUI speed.

value result description
0 Off The entire viewport is always rendered.
1 Union All dirty regions are grouped into the smallest possible rectangle. This is typically the fastest mode for slower GPUs due to only making one pass.
2 Cost reduction Each dirty region is presented separately, in as many passes as there are regions.
3 Whole Screen The entire screen is rendered if there are any dirty regions. This is a safe default for drivers that clear buffer contents (manifests as blinking or vibrating images). Default

Example:

<gui>    
  <algorithmdirtyregions>1</algorithmdirtyregions>
</gui>



<nofliptimeout>