Kodi Community Forum
WIP Windows DirectX 11 upgrade test thread - Printable Version

Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Kodi Application (https://forum.kodi.tv/forumdisplay.php?fid=93)
--- Thread: WIP Windows DirectX 11 upgrade test thread (/showthread.php?tid=218274)



RE: Windows DirectX 11 upgrade test thread - liquidskin76 - 2016-01-28

(2016-01-28, 17:09)afedchin Wrote: To properly detecting movie as stereo 3D it should correspond two rules:
1. The main rule to detect what movie is stereo 3d the file name should contains '3d'. It's your case. But it's not enought to detect which type of stereo type the movie is.
2. Second rule is the filename should contains 'sbs' or 'tab' to properly detect which type of stereo the movie is.

Only if the filename corresponds to both rules then the movie properly detected as stereo movie.

Ok, cool. Now I know I'll stick to that naming format.

Many thanks for your help Wink


RE: Windows DirectX 11 upgrade test thread - ciukacz - 2016-01-29

you can also try to change regexp in advancedsettings.xml so no source file renaming will be required:

<advancedsettings>
...
<stereoscopicregexsbs>[-. _](h(alf)?)?-?sbs[-. _]</stereoscopicregexsbs>
<stereoscopicregextab>[-. _](h(alf)?)?-?ou[-. _]|[-. _](h(alf)?)?-?tab[-. _]</stereoscopicregextab>
...
</advancedsettings>


RE: Windows DirectX 11 upgrade test thread - ashlar - 2016-01-30

(2016-01-27, 12:25)afedchin Wrote:
(2016-01-26, 18:36)ashlar Wrote: Hi! I wanted to ask if the anaglyph display options use Dubois method (http://www.site.uottawa.ca/~edubois/anaglyph/) or not. I see FFMPEG supports it (https://trac.ffmpeg.org/wiki/Stereoscopic) but I'm not sure it's been implemented through FFMPEG.
Thank you.
All anaglyph modes implemented through our rendering system. The implementation just uses different color channels for different eyes. That's all.
I'm completely no developer, unfortunately, but as the source is open in FFMPEG... would you mind giving a look at how they implemented Dubois?

This is the relevant portion of source, I think: https://github.com/FFmpeg/FFmpeg/blob/257766a838c5359558a7745d39d570d78eeecd76/libavfilter/vf_stereo3d.c

Maybe it's just a matter of changing some formulas in the calculations (maybe not, but it's worth investigating as the results are seriously better). Thank you. Smile


RE: Windows DirectX 11 upgrade test thread - Ed76 - 2016-02-06

(2016-01-15, 17:36)afedchin Wrote: Latest Kodi doesn't apply color corection in dxva processing it does that in post processing stage. But seems your drivers for dx11 ignores what Kodi requires don't touch color range during dxva processing. With enabled Use limited colors setting in Kodi this causes a double color correction in dxva processing (in drivers which is wrong) and then in post processing (in Kodi). If Use limited colors is disabled then drivers still apply color correction in dxva processing stage, but Kodi doesn't do color correction in post post-processing stage and you get correct video brightness. This bug doesn't affect Kodi 15.2 and madVR because both of them use DirectX9 API.

I'll try a last try to solve this driver bug. Stay tuned for news. But I'm promise nothing.

hi afedchin
any news on this? i guess its not possible to solve this driver bug for ati hardware. because the colors and black/white looks a little better with full rgb output i have a suggestion/ feature request to get this working for ati card:

if its possible you can add a setting in "advanced options / advanced settings.xml" that does the following: only if "limited color room" within kodi is activated do the following: limit color room for everything where it is needed (gui, picture viewer ...) but not for video. these setting would more or less simulate the behaviour of last kodi 15.2_dx11 build from november. that way we would turn the bug from kodi15.2_dx11 into a feature :-)
if you would do this this would have 2 advantages:

1) full rgb would work for ati hardware or other hardware with driver bug because you can limit the color room only for video within driver settings (means driver does it and not kodi and that works in every case)
2) there are external video players like html5-browser-player (netflix/amazon) which have no settings/no possibility to limit the color room for videos. these players also only work with full rgb if you can limit the color room within driver settings

would this be possible? thanks.


RE: Windows DirectX 11 upgrade test thread - Ed76 - 2016-02-17

just tested with latest crimson drivers but i get the same issue as describet above.
at the moment its absolutely not possible to get correct colors with full rgb output. the "new" method for changing color room does not work, at least for ati cards. is it possible to get back the "old" method of changing color room, because with that method user can force limited color room within drivers (in the case kodi cant set the video color room)?


RE: Windows DirectX 11 upgrade test thread - crawfish - 2016-02-25

I started a thread today on a limited color range and DXVA2 issue with my Nvidia card and was directed here. I see some discussion on ATI cards, so I thought I would copy my message here as it's not too long and may not be quite the same problem, and in any case, it affects Nvidia.

Kodi 16.0 Limited Color Range plus DXVA2 = levels expansion plus compression

In Kodi 16.0 DXVA2 mode, when viewing AVS HD 709 Black and White Clipping patterns, BTB and WTW are lost when "Use limited color range" is selected, and banding is evident in gradients. Disabling DXVA2 fixes it, while the Rendering Method choice has no effect. There is no difference between full-screen and windowed mode. This was never an issue in versions prior to Jarvis that implemented the feature. My video card is Nvidia GT640, and my driver version is 361.91. The card is configured to output RGB 0-255, and video settings are "With the video player settings". The OS is Windows 8.1 x64.

It appears that Jarvis is expanding (or instructing the card to expand) video to RGB 0-255 and then compressing to 16-235, when it should be simple passthrough. Indeed, when I look at pixel values in screenshots for Black Clipping, I see 16 for the background and all bars < 17, and when I look at White Clipping, I see 235 for the background and all bars > 234. This was not what happened with earlier versions, where for Black Clipping, I saw 1 for the background, and the bars < 17 contained the same pixel values as their labels, and for White Clipping, I saw 253 for the background, and the bars > 234 contained the same pixel values as their labels.


RE: Windows DirectX 11 upgrade test thread - Ed76 - 2016-02-25

@crawfish
the whole thing is a little confusing right now, let me explain:
you can choose between 2 options (if your tv needs limited color room (most tvs need this)):

1) output rgb limited + (disable limited color room within kodi) and all is fine. this will give you a good picture quality.

if you want a better picture quality than 1) you have to set:

2) output full rgb (driver) + enable limited color room within kodi. thats a little problematic right now but i think i can help you:

up to kodi 16 beta 4 afedchin used the "old method" of changing color room from full to limited. with that method kodi tries to "tell" your gpu driver to use limited color room. that worked good under dx9 (kodi15) but with dx11 (kodi16) it did not work on some gpus (e.g. ati/amd) because of driver problems. for these gpus the result was kodi sets your gui correct to limited color room but not for videos (video remains full color room).

the "new method" should work independently of drivers. with the new method the operation from full to limited color room is done within shaders. but this is not working as it should work. gui has correct limited color room but not video. if you enable limited color room within kodi also the video gets brighter (what is right) but within that flashing lights testvideo you can not see any flashing light <17 (also if i set the brightness of tv to 100%). i guess there is a little failure with color conversion, means there is a change in brightnes and/or contrast, but the result is not the right one.

i have done the following to solve the problem (at least for ati/amd):
download kodi 16 beta 4 and extract it (e.g. 7zip). search for folder "shaders". copy the lanzcos3/spline36 upscaling shader to your installed kodi 16 shader-folder and overwrite file. make sure to set upscaling method within kodi to lanzcos3/spline. within your driver settings set full rgb output and force limited color room for videos only (that is possible for ati/amd, not sure if it works for nvidia). now the color room is correct for kodi gui + kodi video + all other video players (also which have no option to set color room like html5-netflix-player). (with these settings and upscaling shaders you should have the best possible picture with "normal" kodi / no-dsplayer-kodi)

hope this helps you or others...


RE: Windows DirectX 11 upgrade test thread - crawfish - 2016-02-25

(2016-02-25, 17:51)Ed76 Wrote: @crawfish
the whole thing is a little confusing right now, let me explain:
you can choose between 2 options (if your tv needs limited color room (most tvs need this)):

1) output rgb limited + (disable limited color room within kodi) and all is fine. this will give you a good picture quality.

That would be the last resort. Having the card output RGB 16-235 (or YCbCr) instead of RGB 0-255 means video has to be expanded from Video Levels to PC Levels (as you noted) so it works out when the card compresses all output to the 16-235 range right before it puts the signal on the wire. This is the levels round trip that tends to introduce banding in gradients. It is because of the banding that I believe Kodi 16 is causing a levels round trip, even though my card is outputting RGB 0-255. It could also simply be setting everything below 17 to 16 and above 234 to 235, but the banding suggests otherwise.

Quote:if you want a better picture quality than 1) you have to set:

2) output full rgb (driver) + enable limited color room within kodi.

That's what I described doing in my message. I trade black/white crush on the desktop for video that calibrates the same as my standalone BD player, that doesn't sacrifice BTB/WTW, etc. This is the "passthrough" mode for video.

Quote:up to kodi 16 beta 4 afedchin used the "old method" of changing color room from full to limited. with that method kodi tries to "tell" your gpu driver to use limited color room. that worked good under dx9 (kodi15) but with dx11 (kodi16) it did not work on some gpus (e.g. ati/amd) because of driver problems. for these gpus the result was kodi sets your gui correct to limited color room but not for videos (video remains full color room).

the "new method" should work independently of drivers. with the new method the operation from full to limited color room is done within shaders.

Does changing the "Render method" make a difference for your AMD card? As I said in my message, it does not for my Nvidia card. The only thing that helped was disabling DXVA2. Again, it was fine in earlier Kodi versions. Also, to be clear, Kodi 16 is outputting limited range video for me, only values < 17 have been replaced by 16 and values > 234 by 235, plus it has introduced banding in gradients, as I described in more detail in my message. It's not the "passthrough" that I got from earlier versions of Kodi.

P.S. I believe you're using the word "room", but "range" is the customary term and the one used by Kodi. Or am I missing something?


RE: Windows DirectX 11 upgrade test thread - Ed76 - 2016-02-25

@crawfish:
sorry, did not noticed your first post in the other threat.
"room" ...."range" is the same for me. sorry, english is not my native language and i am happy if other understand the most. in german its called "room", but you are right "range" is the better one in english.
after reading your first post i think you are much more an expert to these things than i am.

its not possible for me to test anything befor next week.

all i can say is with the method i describet i get exactly the same result concerning color range with kodi 16, kodi 15, madvr(mc-hc) (tested with black clipping video).

one thing i want to say again:
simply test kodi 16 beta 4 because it uses a very different method to color conversion (more or less the same as kodi 15, means driver does it). i guess this should work for you. if the colors are not limited for video (with version beta 4) force limited via drivers. if this works for you simply replace the shader within kodi 16 final.


RE: Windows DirectX 11 upgrade test thread - afedchin - 2016-02-25

(2016-02-25, 17:51)Ed76 Wrote: the "new method" should work independently of drivers. with the new method the operation from full to limited color room is done within shaders. but this is not working as it should work. gui has correct limited color room but not video. if you enable limited color room within kodi also the video gets brighter (what is right) but within that flashing lights testvideo you can not see any flashing light >17 (also if i set the brightness of tv to 100%). i guess there is a little failure with color conversion, means there is a change in brightnes and/or contrast, but the result is not the right one.
It should but doesn't because some drivers ignore application "request" don't touch color range. If there is a bug in shaders then all users has issue with color range but it occurs only some users independent on harware. I think it's an issue of driver settings (because drivers ignores application "request") Thats all. If I will fix your cause then other will receive an issue with color range. Please check your driver settings.


RE: Windows DirectX 11 upgrade test thread - afedchin - 2016-02-26

9213 (PR) if the team members has no objections it will be in 16.1 also


RE: Windows DirectX 11 upgrade test thread - Ed76 - 2016-02-26

thanks very much afedchin!


RE: Windows DirectX 11 upgrade test thread - afedchin - 2016-02-26

@Ed76
can you also try this build http://mirrors.kodi.tv/test-builds/win32/KodiSetup-20160226-8ff28fb-range_test.exe


RE: Windows DirectX 11 upgrade test thread - Ed76 - 2016-02-27

just tested the new version. i get more or less the same result as with the "old methode" of changing color range. means:

driver setting: output full rgb + automatic choise of video color range by application
kodi setting: limited range
result for video: full rgb output

change driver settings to: output full rgb + force limited color range for video
kodi setting: limited range
result for video: limited range, all seems to be good

but there was a big problem in gui presentation. all the black backgrounds/backdrops (e.g. behind the fonts in confluence skin) are missing. also the gui seems a little to bright to me, but iam not 100% sure. i should better test this in the evening again (if the room is a little darker). are you aware of that (because its a test version)? if you want i can make a picture.

yesterday i also had a look into driver settings. i changend 2 things but without succes regarding color range. i think there are absolutly no settings that can influence the wrong behavior on changing color range with the new method.


RE: Windows DirectX 11 upgrade test thread - phate89 - 2016-02-27

@Ed76 with "automatic choose color room for video" you mean you disable the dynamic range option?