Difference between revisions of "HOW-TO:Modify dirty regions"

From Official Kodi Wiki
Jump to: navigation, search
(Updated for v18)
 
Line 2: Line 2:
 
<section begin="intro" />Dirty regions is an advanced setting and interface rendering method that can help speed up the GUI in Kodi 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 Kodi v11 (Eden) or higher.<section end="intro" />
 
<section begin="intro" />Dirty regions is an advanced setting and interface rendering method that can help speed up the GUI in Kodi 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 Kodi v11 (Eden) or higher.<section end="intro" />
  
{{TOC limit|2}}
 
  
== Steps ==
+
 
 +
= Settings explained =
 +
The following settings are available
 +
 
 +
 
 +
== algorithmdirtyregions ==
 +
<syntaxhighlight lang="xml">
 +
<algorithmdirtyregions>3</algorithmdirtyregions>
 +
</syntaxhighlight>
 +
{{#lst:advancedsettings.xml|algorithmdirtyregions}}
 +
 
 +
 
 +
== visualizedirtyregions ==
 +
<syntaxhighlight lang="xml">
 +
<visualizedirtyregions>false</visualizedirtyregions>
 +
</syntaxhighlight>
 +
{{#lst:advancedsettings.xml|visualizedirtyregions}}
 +
 
 +
== nofliptimeout ==
 +
This tag was removed in v17 and no longer has any effect.
 +
 
 +
 
 +
 
 +
 
 +
= Steps =
 
If you don't already have an [[advancedsettings.xml]] file, it's very simple to make. Kodi uses this file for advanced settings and features that normal users shouldn't modify without first knowing what they do, as well as for experimental features.
 
If you don't already have an [[advancedsettings.xml]] file, it's very simple to make. Kodi uses this file for advanced settings and features that normal users shouldn't modify without first knowing what they do, as well as for experimental features.
  
 
{{how-to
 
{{how-to
 
| Step1 = Create a '''plain text file''' (no rich text formatting, don't use .doc, etc) and save it as '''advancedsettings.xml'''. Make sure that the file extension is ".xml" and {{color|red|'''not'''}} ".txt" or ".xml.txt".
 
| Step1 = Create a '''plain text file''' (no rich text formatting, don't use .doc, etc) and save it as '''advancedsettings.xml'''. Make sure that the file extension is ".xml" and {{color|red|'''not'''}} ".txt" or ".xml.txt".
 
+
<br>
| Step2 = Cut and paste this into your new plain text file:
+
| Step2 = Cut and paste this into your new plain text file. Do not duplicate any tags if they already exist in your advancedsettings.xml file:
 
:<syntaxhighlight lang="xml" enclose="div">
 
:<syntaxhighlight lang="xml" enclose="div">
 
<advancedsettings>
 
<advancedsettings>
 
   <gui>
 
   <gui>
 
     <algorithmdirtyregions>3</algorithmdirtyregions>
 
     <algorithmdirtyregions>3</algorithmdirtyregions>
    <nofliptimeout>0</nofliptimeout>
 
 
   </gui>
 
   </gui>
 
</advancedsettings>
 
</advancedsettings>
 
</syntaxhighlight>
 
</syntaxhighlight>
 
+
<br>
 
| Step3 = Change the values between the tags to fit your situation. See '''[[#Settings explained]]''' for details.
 
| Step3 = Change the values between the tags to fit your situation. See '''[[#Settings explained]]''' for details.
 
+
<br>
 
| Step4 = Save this file in your [[userdata folder]]:
 
| Step4 = Save this file in your [[userdata folder]]:
 
:{{#lst:userdata|location all}}
 
:{{#lst:userdata|location all}}
{{note|If you have an existing advancedsettings.xml file, make sure the <gui></gui> tags, and settings we'll add between them, are between the main <advancedsettings></advancedsettings> tags.}}
 
 
 
}}
 
}}
  
== Settings explained ==
 
{| class="prettytable"
 
! advancedsettings.xml tag !! what it does
 
|-
 
| <code><algorithmdirtyregions>'''3'''</algorithmdirtyregions></code>
 
 
| {{big|'''Dirty regions mode'''}}
 
 
{{#lst:advancedsettings.xml|algorithmdirtyregions}}
 
 
|-
 
| <code><visualizedirtyregions>'''false'''</visualizedirtyregions></code>
 
 
| {{big|'''Visualized dirty regions'''}}
 
 
{{#lst:advancedsettings.xml|visualizedirtyregions}}
 
  
|}
 
  
== Examples ==
+
= Examples =
  
=== Example 1 ===
+
== Example 1 ==
  
 
;advancedsettings.xml
 
;advancedsettings.xml
Line 56: Line 59:
 
   <gui>
 
   <gui>
 
     <algorithmdirtyregions>1</algorithmdirtyregions>
 
     <algorithmdirtyregions>1</algorithmdirtyregions>
    <nofliptimeout>1000</nofliptimeout>
 
 
   </gui>
 
   </gui>
 
</advancedsettings>
 
</advancedsettings>
 
</syntaxhighlight>
 
</syntaxhighlight>
  
== History ==
+
 
 +
 
 +
= History =
 
Kodi 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 Kodi’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), Kodi now has the ability to only render what has changed.
 
Kodi 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 Kodi’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), Kodi now has the ability to only render what has changed.
  
 
For more information see: '''[http://kodi.tv/working-with-dirty-regions/ Working with dirty regions]'''
 
For more information see: '''[http://kodi.tv/working-with-dirty-regions/ Working with dirty regions]'''
  
{{Updated|17}}
 
  
 +
{{Top}}
 +
 +
 +
{{updated|18}}
 +
 +
[[Category:Index]]
 +
[[Category:Manual]]
 +
[[Category:How-to]]
 +
[[Category:Video library]]
 
[[Category:Advanced topics]]
 
[[Category:Advanced topics]]
[[Category:How-to]]
 

Latest revision as of 03:14, 18 November 2019

Home icon grey.png   ▶ advancedsettings.xml ▶ HOW-TO:Modify dirty regions

Dirty regions is an advanced setting and interface rendering method that can help speed up the GUI in Kodi 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 Kodi v11 (Eden) or higher.


1 Settings explained

The following settings are available


1.1 algorithmdirtyregions

<algorithmdirtyregions>3</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


1.2 visualizedirtyregions

<visualizedirtyregions>false</visualizedirtyregions>

Enable dirty-region visualization. Paints a rectangle over marked controls.

  • true: on
  • false: off (Default)

Note: This is only a development mode and isn't of use to normal users.


1.3 nofliptimeout

This tag was removed in v17 and no longer has any effect.



2 Steps

If you don't already have an advancedsettings.xml file, it's very simple to make. Kodi uses this file for advanced settings and features that normal users shouldn't modify without first knowing what they do, as well as for experimental features.

1 Create a plain text file (no rich text formatting, don't use .doc, etc) and save it as advancedsettings.xml. Make sure that the file extension is ".xml" and not ".txt" or ".xml.txt".


2 Cut and paste this into your new plain text file. Do not duplicate any tags if they already exist in your advancedsettings.xml file:
<advancedsettings>
  <gui>
    <algorithmdirtyregions>3</algorithmdirtyregions>
  </gui>
</advancedsettings>


3 Change the values between the tags to fit your situation. See #Settings explained for details.


4 Save this file in your userdata folder:
Note: In older versions of the software (before v14) the kodi directories were named xbmc.
Operating system File path
Android Android/data/org.xbmc.kodi/files/.kodi/userdata/ (see note)
iOS /private/var/mobile/Library/Preferences/Kodi/userdata/
LibreELEC /storage/.kodi/userdata/
Linux ~/.kodi/userdata/
OSMC /home/osmc/.kodi/userdata/
Mac /Users/<your_user_name>/Library/Application Support/Kodi/userdata/ (see note)
Windows C:\Users\<your username>\AppData\Roaming\Kodi\userdata
Windows UWP  %LOCALAPPDATA%\Packages\XBMCFoundation.Kodi_4n2hpmxwrvr6p\LocalCache\Roaming\Kodi\



3 Examples

3.1 Example 1

advancedsettings.xml
<advancedsettings>
  <gui>
    <algorithmdirtyregions>1</algorithmdirtyregions>
  </gui>
</advancedsettings>


4 History

Kodi 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 Kodi’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), Kodi now has the ability to only render what has changed.

For more information see: Working with dirty regions


Return to top