Log in

View Full Version : madVR - high quality video renderer (GPU assisted)


Pages : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 [599] 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329

Dogway
13th May 2015, 21:07
Remember the chroma is half the resolution of the luma so you need to upscale it before doubling somehow

I might be missing something but, can't you double chroma with nnedi3, then up to 4:4:4 target display resolution with the chroma upscaling kernel? Why do you need to do a mini-upscale first?

huhn
13th May 2015, 21:09
I think I understand what you mean, first line is converting to 4:4:4, then it upscales the whole thing with nnedi (hence image >, and not luma >), but in my opinion it shouldn't be doing that... it's not a good idea to use a a scaler before nnedi because you are amplifying artifacts, also you are adding one more step to chroma.

chroma > mitchell > nnedi (double) > resizer (for up or downscale to 1080)

has the behavior changed in last version?

edit: btw I don't think what you say is right, I disabled chroma nnedi and I get the same OSD output.

make new screen with disabled nnedi3 chroma doubling. there should be a new chroma line.

ibius
13th May 2015, 21:15
Issues with D3D11:
1. Going FSE is fine, but after first seek presentation glitches start piling up by the dozen every second during playback, enabling 'Present a frame for every v-sync' fixes it, but windowed FS mode works fine without. All queues apart from render queue (see below) are full at the time.
2. After going windowed FS or FSE, render queue is always only 3-5/8, other queues are full, and I get increased CPU usage, e.g. from ~7% to ~30% on my 3,6GHz Intel Core2Duo.
3. Sometimes after seeking/stopping playback video gets stuck in a loop, jumping between few frames.
4. Render times are better compared to D3D9, but present times are way worse, e.g. going from 0.12ms to 0.9x/1.xx ms in windowed mode, in windowed FS or FSE they are even higher (although only chroma is scaled).

I did more tests and figured out that disabling smooth motion fixes first issue.
Fun fact, without 'Present a frame for every v-sync' enabled, FSE starts piling up presentation glitches right after going into FSE, with smooth motion all was well until I tried to seek.

Dogway
13th May 2015, 21:19
make new screen with disabled nnedi3 chroma doubling. there should be a new chroma line.

yep, now chroma uses another scaler (third line), problem is it uses lanczos which I only set for luma upscaling... instead of mitchell

huhn
13th May 2015, 21:34
yep, now chroma uses another scaler (third line), problem is it uses lanczos which I only set for luma upscaling... instead of mitchell

working as intended. the image upscaler was used in that version.

XMonarchY
13th May 2015, 21:48
madshi
Ok, good to hear. Is this with Jinc3 AR selected for image upscaling?

BTW, there's one difference between v0.87.x and v0.88.x that I forgot to mention: The setting for image quadrupling is now also applied for "octadrupling" and "hexadrupling". Meaning, NNEDI3 doubling is used as long as upscaling is needed. v0.87.x used NNEDI3 max twice, v0.88.x doesn't have this limit. Is it possible that NNEDI3 is used with v0.88.x on your PC more than twice? You can see that in the debug OS.

Yes, with Jinc 3 tap AR for Image Upscaling.

In OSD I just see this..:
Chroma>NNEDI32
Luma X>NNEDI32<Catmull-ROM AR
Chroma X> Catmull-ROM AR

I can even set Chroma Upscaling to NNEDI3 128 neurons and keep both Doubling and Quadrupling @ NNEDI3 32 neurons without any frame drops.

I have 2 separate questions:
- Is it worth disabling desktop composition?
- What is a good Shiandow's Deband setting for low/medium-low quality content? I know the original debanding settings for such content should be at least medium for strength and high for fade in/out
- I assume both algorithms can be used together (the original and Shiandow's?)

ALSO, 3DLUT organization is plain buggy. I have content specifically labeled SMPTE C In Ctrl+J menu is says SMPTE C), but if I place Rec.709 3DLUT into madVR Rec.709 line and place Rec.601 3DLUT into Rec.601 line, then madVR will actually use Rec.709 line and Rec.709 3DLUT to render content specifically labeled SMPTE C. The only way to use 3DLUT's accurately is to place all/any 3DLUT's into Rec.709 line in madVR, regardless of whether those 3DLUT's are Rec.601 or Rec.709. madVR will use Rec.709 line (and whichever 3DLUT in it) to render ANY content, regardless of whether that content is labeled Rec.709 or SMPTE C. I used the latest HCFR to test Rec.601 3DLUT in Rec.709 line and it came out just right - very accurate Rec.601 results. Someone stated that Rec.601 3DLUT in Rec.709 line in madVR would produce inaccurate/wrong results, but my HCFR testing proved otherwise. Its like madVR actually alters the 3DLUT in any way. It can only decide which 3DLUT to use, but that feature does not work.

Asmodian
13th May 2015, 23:01
I might be missing something but, can't you double chroma with nnedi3, then up to 4:4:4 target display resolution with the chroma upscaling kernel? Why do you need to do a mini-upscale first?

Isn't that the same thing?

1920x1080p 4:2:0 source.

step 1) 960x540 chroma to 1920x1080 using 'chroma upscaling'. This is the only step 'chroma upscaling' is used for. This converts the 4:2:0 to 4:4:4.
step 2) 1920x1080 chroma to 3840x2160 with NNEDI3 (chroma doubling) or, if not doubled, to the target resolution with 'image upscaling'.

madshi
13th May 2015, 23:52
I could list the modes which are in the edit fields for display mode switching
Yes, this would be great.
Well, to be honest, I don't think this is a good time to add this feature. The whole refresh rate changing will be rewritten sooner or later and work quite differently to how to works now. It makes more sense to wait until then.

Btw, can we get dithering for every frame presented? With Dx11 path and "present every vsync" option that should beat any FRC.
For high quality junkies I would strongly recommend to match refresh rate to movie frame rate. If you do that, you already get a changing dithering for each frame right now. Of course it would be possible to change the dither pattern for repeated frames, too, if the refresh rate is higher than the movie framerate. But it would increase GPU power consumption, and to be honest, I have a *lot* of things to do which hopefully bring a bigger image quality improvement than that would bring. Just my 2cents, of course.

I guess it's a known issue with Madvr 88.4 and 88.5 because I have an issue watching any movie with some random presention error and Renderer queue and all others are not full.
I'm not sure what you mean. There are known issues with 88.4 and 88.5, but not those you're describing.

What is the differences between Font Renderer : Vector Text Renderer and Bitmap Text Renderer ?
I have no idea. madVR doesn't have any such options.

1. Going FSE is fine, but after first seek presentation glitches start piling up by the dozen every second during playback, enabling 'Present a frame for every v-sync' fixes it, but windowed FS mode works fine without. All queues apart from render queue (see below) are full at the time.
You will have to use "present a frame for every v-sync" then. Driver bug or D3D11 bug, not my fault.

2. After going windowed FS or FSE, render queue is always only 3-5/8, other queues are full, and I get increased CPU usage, e.g. from ~7% to ~30% on my 3,6GHz Intel Core2Duo.
This is exactly the effect you would get with "Nvidia control panel 'Max. pre-rendered frames'" set to a fixed low value. So my best guess is that either the GPU uses a different setting for this behind your back, or there are profiles active somehow which set a low value for this, or there's some GPU driver bug, or something.

3. Sometimes after seeking/stopping playback video gets stuck in a loop, jumping between few frames.
Doesn't occur on my PC. Please try again with the next build.

4. Render times are better compared to D3D9, but present times are way worse, e.g. going from 0.12ms to 0.9x/1.xx ms in windowed mode, in windowed FS or FSE they are even higher (although only chroma is scaled).
Again this points to "Max. pre-rendered frames" not being set correctly. Or the GPU ignoring that settings.

I noticed that ordered dithering is a very noisy process. I found it fun lately to turn on 1bit output and see very obviously some algorithmic patterns. It appears not dithering at all gives the most "stable" unnoisy picture while error diffusion is more stable and 'random' is a total mess.

I'm surprised, but it appears no dithering at all is a viable choice.
"No dithering" is not a viable choice *at all*. Testing with 1bit is not a good test for this. Try 2bit. See here:

http://madshi.net/2bitNoDithering.png
http://madshi.net/2bitOrderedDithering.png

(CAUTION: Please zoom the images in the browser to 100%, otherwise the dither pattern will look ugly.)

I think no sane human could possibly prefer the image with no dithering there.

You will *always* need dithering, because its about the mathematical process, not about the quality of the source. In fact, its entirely independent of that (although its going to be more obvious in some sources than in others, of course)
If such a perfect source would exist, then dithering also wouldn't add noise, since dithering, by definition and design, is only used to spread the rounding error to multiple pixels, instead of accumulating it all in one. If there wouldn't be a rounding error, there would be no "noise".

At the end of the day, movies are all going to be in YUV, and YUV needs to be converted to RGB. This conversion process (if done right) results in floating point values, which need to be converted to 8-bit (or recently, 10-bit) on output. If you don't use dithering, you will effectively cut off data. Thats also were your analogy goes wrong, dithering isn't about hiding flaws, its about preserving data when converting to a lower bitdepth (ie. from 16/32-bit float, to 8/10-bit integer for output)

Of course you are free to use whatever settings you like, but please don't spread them as advice.
QFT.

I'm a bit confused when you ask "what mode my PC is", where should I look that? Control panel just said (roughly) 1080 native, 60Hz.

Anyways I had a look and I don't find any video that turns my TV to 1080p60 mode, it stays always in PC mode which is fine and bad at the same time... I would expect a bit more consistency for these things (I should be able to treat 60fps sources as every other non-PC source, TV settings wise). 1080p59 is also defaulting to PC mode.

Then I played a 50fps video and screen turned to 50p mode, so here the story does apply.
Anyways I removed the 1080p50 entry and it defaulted to 1080p60 now seemingly and oddly enough "PC mode" (I still think passthrough should be a better idea?).
Sounds all good to me?

My playback is fine (no dropped frames, no glitches).

Anyway, just for info .. when I watch movie 24.000 and refresh rate fix is active, render queue and present queue are low (render queue 3-5/8 and present queue 2-3/8. Average stats present 31.00 ms which is abnormally high, usually 0.05 ms.)
Sounds like you have "Nvidia control panel 'Max. pre-rendered frames'" set to a fixed low value. Set it to "application control".

Your fix never worked for me even before but this time it works! Thanks, great work.
Cool! I did improve it a bit, hoped it might work better in some exotic cases now.

ALSO, 3DLUT organization is plain buggy. I have content specifically labeled SMPTE C In Ctrl+J menu is says SMPTE C), but if I place Rec.709 3DLUT into madVR Rec.709 line and place Rec.601 3DLUT into Rec.601 line, then madVR will actually use Rec.709 line and Rec.709 3DLUT to render content specifically labeled SMPTE C.
How do you know it uses the BT.709 3dlut? If that is really the case, it's a bug and then please enter it to the madVR bug tracker.

madshi
14th May 2015, 00:00
madVR v0.88.6 released

http://madshi.net/madVR.zip

* fixed: D3D11 rendering sometimes got stuck (e.g. when minimizing player)
* fixed: NNEDI3 quadrupling with SuperRes didn't work properly (NVidia only)
* fixed: refresh rate fix didn't work in 64bit
* added D3D11 refresh rate fix (proper support for 23p vs. 24p etc)
* added option "octuple luma/chroma resolution"
* re-added NNEDI3 chroma doubling options
* removed limitation to double chroma with Catmull-Rom
* updated Shiandow deband algorithm to latest version
* double clicking tray icon now opens the settings dialog
Please note that image/luma octupling is only applied if you use any of the "upscaling refinement" options. Otherwise this option will be ignored because without "upscaling refinement" the image becomes so soft after quadrupling that there's no use using expensive octupling at that point. Octupling can be useful for upscaling DVDs to 4K (640 > 1280 > 2560 > 5120 < 3840).

Shiandow's deband algorithm was updated to the latest version. Could everyone please re-test? Please note that the defaults have changed, but the settings dialog will remember your previous values. So please manually change the values to threshold 0.2 and detail level 1, and start testing with those values. Your vote counts in deciding whether I'll keep using the "old" debanding algorithms or whether I'll replace some or all of the old algos with the new one. If you're not sure which one you like better, please say just that, instead of randomly picking one. If you do like one clearly better than the other, please let me know - thanks!!

Edit: Shiandow has released yet another fine tuned version of his Deband algorithm. Please copy the code from the following post into the file "madVR\legal stuff\Shiandow\Deband.hlsl", then madVR will immediately use the new Deband version:

http://forum.doom9.org/showthread.php?p=1721949#post1721949

aufkrawall
14th May 2015, 00:54
Thanks a lot for these changes and fixes.

Could it be that Shiandow's deband doesn't work as intended with this version? I can't see any positive effect.
As a reminder, madVR's and Shiandow's old deband filters:
http://forum.doom9.org/showpost.php?p=1721014&postcount=29510

Shiandow new (new default values):
http://abload.de/thumb/shiandowdef9rom5.png (http://abload.de/image.php?img=shiandowdef9rom5.png)

Threshold changed to 2.0:
http://abload.de/thumb/shiandow2.0zlpae.png (http://abload.de/image.php?img=shiandow2.0zlpae.png)

Changing detail levels doesn't change much.

I also quickly benchmarked performance impact of Jinc3 chroma scaling over C-R (both AR) when doing NNEDI3 64 luma quadrupling.
GPU usage was pretty much totally identical (and clocks too):
http://abload.de/img/abm2o01.png (http://abload.de/image.php?img=abm2o01.png)

Shiandow
14th May 2015, 01:26
Thanks a lot for these changes and fixes.

Could it be that Shiandow's deband doesn't work as intended with this version? I can't see any positive effect.
As a reminder, madVR's and Shiadow's old deband filters:
http://forum.doom9.org/showpost.php?p=1721014&postcount=29510

[...]



Hmm, that's not quite what's supposed to happen. For now could you try placing a file called "Deband.hlsl" in the MadVr/legal stuff/Shiandow folder, with the code below? Since madshi has been so kind to conform to the LGPL requirements this should replace the internal shader. In the code below I've removed one of the steps in the algorithm that may have been causing those problems.


// This file is a part of MPDN Extensions.
// https://github.com/zachsaw/MPDN_Extensions
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 3.0 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library.
//
sampler s0 : register(s0);
sampler s2 : register(s2);
float4 infoConsts1 : register(c0);
float4 infoConsts2 : register(c1);
#define size1 (infoConsts1)
#define ppx (infoConsts1[2])
#define ppy (infoConsts1[3])
#define acuity (infoConsts2[0])
#define threshold (infoConsts2[1])
#define sqr(x) dot(x,x)
#define norm(x) (rsqrt(rsqrt(sqr(sqr(x)))))
#define Get(x,y) (tex2D(s2,float2(ppx,ppy)*(pos + 0.5 + float2(x,y))).xyz)
static const float3x3 YUVtoRGB_709 =
{1.0, 0.0000000000000000, 1.5748000000000000,
1.0, -0.1873242729306488, -0.4681242729306488,
1.0, 1.8556000000000000, 0.0000000000000000};

float4 main(float2 tex : TEXCOORD0) : COLOR0
{
float4 c0 = tex2D(s0, tex);
float2 pos = tex * size1.xy - 0.5;
float2 offset = frac(pos);
pos -= offset;
float4x3 X = {Get(0,0), Get(1,0), Get(0,1), Get(1,1)};
float3x4 LinFit = {{-2, 2, -2, 2}, {-2, -2, 2, 2}, {1, 1, 1, 1}};
float4 w = 0.25*mul(float1x3(offset-0.5,1), LinFit);
float3 avg = mul(float1x4(w), X) / dot(w, 1);
float3 diff = avg - c0;
diff -= clamp(diff, -0.5 / acuity, 0.5 / acuity);
float str = smoothstep(0, threshold, length(diff*acuity));
c0.xyz = lerp(avg, c0, str);
c0.rgb = mul(YUVtoRGB_709, c0.xyz - float3(0.0, 0.5, 0.5));
return c0;
}

aufkrawall
14th May 2015, 01:46
Yes, issue is gone. But the result is probably not better than with the previous madVR versions?

Shiandow
14th May 2015, 01:58
Yes, issue is gone. But the result is probably not better than with the previous madVR versions?

Is that a question or are you not seeing any improvement? In theory it should still be better than the previous one.

x7007
14th May 2015, 02:02
Thanks for the fixes, will check it at home, works fine for now

aufkrawall
14th May 2015, 02:11
Is that a question or are you not seeing any improvement? In theory it should still be better than the previous one.
It was an assumption, based on a quick look.
I will do a direct comparison with the same parameters like with the previous version once I'm done with sleeping.

Shiandow
14th May 2015, 02:37
It was an assumption, based on a quick look.
I will do a direct comparison with the same parameters like with the previous version once I'm done with sleeping.

Well, when you're back, I made some additional changes to improve the interpolation somewhat. So please update the code of Deband.hlsl with the edited code from my previous comment before you do any testing.

Although, maybe madshi could replace the internal shaders before then? Just don't forget to remove "Deband.hlsl" if you update MadVR.

By the way, well done finding that sample. For some reason I didn't encounter such problems in the other files I tested.

leeperry
14th May 2015, 02:59
Oh my, thanks for the daily updates and killer features :)

If I check and then uncheck "octuple luma/chroma resolution", I can't uncheck "double chroma resolution" and "quad chroma resolution" anymore, bug?

This said, 8X is complete overkill for 1080p, I still would like to try it coz there used to be a feature in Avisynth where you would massively upscale, process and then downscale at the very last stage. NEDI is so GPU efficient than why not giving it a shot on 360*288@1080p+NEDI/SuperRes :devil:

I guess 8X luma only isn't possible due to the pixel shifts? I'm not too keen on wasting GPU cycles on chroma.

cvrkuth
14th May 2015, 05:29
My playback is fine (no dropped frames, no glitches).

Anyway, just for info .. when I watch movie 24.000 and refresh rate fix is active, render queue and present queue are low (render queue 3-5/8 and present queue 2-3/8. Average stats present 31.00 ms which is abnormally high, usually 0.05 ms.)
When I watch movie 23.976 and refresh rate fix is not active, everything is fine with numbers (render queue 7-8/8 and present queue 6-7/8. Average stats present is 0.05 ms.)

Hope this help,
Regards


Sounds like you have "Nvidia control panel 'Max. pre-rendered frames'" set to a fixed low value. Set it to "application control".


No, I have ATI card (Sapphire Radeon HD 5670 Ultimate 1GB, Catalyst™ 14.12)

x7007
14th May 2015, 06:14
I still have issue with my 970 windows 7 at home. it still doesn't use the whole render queue when using D3D11 . without D3D11 it is ok. anyone knows why it happens or how to fix it ? with my laptop G751 970m windows 8 it doesn't happen with it enabled.

Should I enable everything on Upscaling refinement ?

FineSharp
LumaSharpen
SuperRes - Error upscaling quality - high
Refine the image after every ~2x upscaling step

James Freeman
14th May 2015, 08:37
I still have issue with my 970 windows 7 at home. it still doesn't use the whole render queue when using D3D11 . without D3D11 it is ok. anyone knows why it happens or how to fix it ? with my laptop G751 970m windows 8 it doesn't happen with it enabled.


It's a known issue with 0.88.x versions in windows 7.


Should I enable everything on Upscaling refinement ?


I hope you are kidding...:rolleyes:

No, you should not.
You should at least have a basic knowledge of what each of these do.

pirlouy
14th May 2015, 11:08
That's the reason why madshi wants to remove options. People like him (or me) just don't understand if it's good or bad. :D

@x7007: If you're unsure of these options, don't enable them now. For now, madshi only wants feedback on debanding (http://forum.doom9.org/showthread.php?p=1721944#post1721944). So if you want to test something, test only what he said in his post. You'll do tests on Upscaling refinement later.

a8213711
14th May 2015, 11:35
RGBA

red green blue and alpha channel.
it "is" 24 bit or 8 bit per channel.
So can I safely say it doesn't support 10bit simply looking at that image?




Another thing:
since I found some trade-off already enabled on a clean install (right after a format), I wonder how madVR detects which settings to apply (are these restrained only to trade-off?) and how are calculated.

luk008
14th May 2015, 11:47
Madvr 0.88.6 is not using the whole render in FSE with D3D11. I'm using 8.1 x64.

GCRaistlin
14th May 2015, 12:04
Well, to be honest, I don't think this is a good time to add this feature. The whole refresh rate changing will be rewritten sooner or later and work quite differently to how to works now. It makes more sense to wait until then.
It is surely up to you but I'd be really grateful if you add this feature independently of rewriting the refresh rate changing - its current implementation works OK, and this means that rewriting will be rather "later" than "sooner".

pirlouy
14th May 2015, 12:05
@luk008: Answer is 3 posts earlier: known issue :confused:

aufkrawall
14th May 2015, 12:45
Shiandow, your new algorithm gives some interesting results.

madVR high:
http://abload.de/thumb/madvrhighqrr8x.png (http://abload.de/image.php?img=madvrhighqrr8x.png)

Shiandow 0.2; 1:
http://abload.de/thumb/0.21shiandow2krxv.png (http://abload.de/image.php?img=0.21shiandow2krxv.png)

Shiandow 0.7; 2:
http://abload.de/thumb/0.72shiandown4plv.png (http://abload.de/image.php?img=0.72shiandown4plv.png)

Shiandow 1.0; 1:
http://abload.de/thumb/1.01shiandow2rqgt.png (http://abload.de/image.php?img=1.01shiandow2rqgt.png)

0.2; 1 vs madVR high:
I'd say madVR high hardly vanishes any detail (Shiandow neither), but it looks much better with the upper blue gradient.

This is still the case with setting Shiandow threshold to 1.0: Upper gradient still looks better with madVR deband high, but now Shiandow's algorithm already reduces quite an amount of detail (e.g. the jacket is less sharp).
However, the blue gradient in the lower half of the image isn't processed well by madVR deband, there Shiandow now looks much better.

Detail loss can be prevented by highering the detail level. But the behavior for the upper image half needs to be improved.
It'd be great if your algorithm could cover it as well as the lower one, then it'd be probably better than madVR's older one.

huhn
14th May 2015, 13:36
So can I safely say it doesn't support 10bit simply looking at that image?

this is the desktop bit deep. the windows desktop can't do 10 bit.
so you will learn nothing about this topic in this place. you have to try and see it for your self.

Another thing:
since I found some trade-off already enabled on a clean install (right after a format), I wonder how madVR detects which settings to apply (are these restrained only to trade-off?) and how are calculated.

they are just checked my default the same on any PC.

aufkrawall
14th May 2015, 13:45
this is the desktop bit deep. the windows desktop can't do 10 bit.

Are you sure? DWM is always 8 bit, even if e.g. in the CCC 10 bit is selected?

huhn
14th May 2015, 13:48
Oh my, thanks for the daily updates and killer features :)

If I check and then uncheck "octuple luma/chroma resolution", I can't uncheck "double chroma resolution" and "quad chroma resolution" anymore, bug?

This said, 8X is complete overkill for 1080p, I still would like to try it coz there used to be a feature in Avisynth where you would massively upscale, process and then downscale at the very last stage. NEDI is so GPU efficient than why not giving it a shot on 360*288@1080p+NEDI/SuperRes :devil:

I guess 8X luma only isn't possible due to the pixel shifts? I'm not too keen on wasting GPU cycles on chroma.


i can't get octuple to work what so ever.

and the pixel shift shouldn't matter at all it's not like you have to shift the picture in the same direction every time.

huhn
14th May 2015, 13:49
Are you sure? DWM is always 8 bit, even if e.g. in the CCC 10 bit is selected?

of cause.
you need FSE to get 10 bit.
this may change with windows 10.

ibius
14th May 2015, 14:02
Issues with D3D11:
2. After going windowed FS or FSE, render queue is always only 3-5/8, other queues are full, and I get increased CPU usage, e.g. from ~7% to ~30% on my 3,6GHz Intel Core2Duo.
3. Sometimes after seeking/stopping playback video gets stuck in a loop, jumping between few frames.
4. Render times are better compared to D3D9, but present times are way worse, e.g. going from 0.12ms to 0.9x/1.xx ms in windowed mode, in windowed FS or FSE they are even higher (although only chroma is scaled).


This is exactly the effect you would get with "Nvidia control panel 'Max. pre-rendered frames'" set to a fixed low value. So my best guess is that either the GPU uses a different setting for this behind your back, or there are profiles active somehow which set a low value for this, or there's some GPU driver bug, or something.


I never used profiles, and to be sure none were created by an application I double-checked in Nvidia control panel and in NvidiaInspector. Also, I tried two different driver versions besides the one I was on, I uninstalled previous driver and clean-installed new ones each time, didn't help.

So, I tried actually setting 'Max. pre-rendered frames' to a fixed value to see how madVR would behave, I had a choice between 1-4 frames.

With max. 4 pre-rendered frames my render queue was 2-4/8 and now also present queue wouldn't fill up staying at 4-5/8, with still unusually high CPU usage in fullscreen.

With max. 1 pre-rendered frame my render and present queues were both at 1-2/8, but without unusually high CPU usage in FS.

Note: in both tests I only got those queue values after going into FSE, in windowed/FS modes render queue was 3-5/8 and present queue was full.


I also did some tests with flush settings, where I found something interesting.

Note: Before these tests I had them all at 'Dont flush'.

First I set them to defaults: Flush, Flush and wait (sleep), Don't Flush and Don't Flush - nothing changed.

Then after experimenting with each one individually I found out that 'Flush and wait (sleep) after copy to backbuffer' lowers present times back down a little (from ~0.90ms to ~0.22ms), and no more high CPU usage, but render queue still remains at 3-5/8.

Also, setting 'after copy to backbuffer' to 'Flush' or 'Flush and wait (loop)', I get high CPU usage even in windowed mode, without going FS or FSE.


PS: I think issue 3 is fixed with 0.88.6 build, at least I didn't encounter it during my tests today, usually it happend at least once during 1-2 tests when seeking/pausing/stopping the video.

aufkrawall
14th May 2015, 14:28
of cause.
you need FSE to get 10 bit.
this may change with windows 10.
What the heck is then the option for bitdepth in the CCC for?

iSunrise
14th May 2015, 14:30
When doing tests, one should always re-test with madVR defaults. That would make configuration-based problems a lot faster to catch for madshi.

Also, I wonder since a lot of people are using >350 drivers, whether the newest Quadro ones (348.07) still show the same problems. I always use the newest Quadro release and besides crashes and apparent madVR bugs (which can be ruled out by returning to the last madVR release) they served me very well.

Also, I never once had driver-related crashes with them, not once. Every crashes that I had, clearly were a madVR bug which madshi fixed instantly.

huhn
14th May 2015, 14:36
What the heck is then the option for bitdepth in the CCC for?

what is send over HDMI/DP/DVI/otherstuff.
it's not that complicated. you can send 8 10 and 16 bit to a GPU using something like d3d11 FSE.
without d3d11 madVR is "only" outputting 8 bit to the GPU driver and the GPU driver is than outputting that as set in the GPU driver.
10 bit is for specialized software. on windows 7 adobe photo disabled aero to output 10 bit using openGL.
not sure how that works with windows 8 and newer but even windows 7 overlay doesn't care about DWM.

one thing is clear.
to get 10 bit out of madVR you need d3d11 10 bit mode with FSE.

Dogway
14th May 2015, 14:43
Isn't that the same thing?

1920x1080p 4:2:0 source.

step 1) 960x540 chroma to 1920x1080 using 'chroma upscaling'. This is the only step 'chroma upscaling' is used for. This converts the 4:2:0 to 4:4:4.
step 2) 1920x1080 chroma to 3840x2160 with NNEDI3 (chroma doubling) or, if not doubled, to the target resolution with 'image upscaling'.

it's not, you are describing a best scenario example.
this is what happens currently with 720p as far as I have been told here:

1280x720p 4:2:0 source.

step 1) 640x360 chroma to 1280x720 using 'chroma upscaling'. This converts source to 4:4:4
step 2) 1280x720 chroma doubling to 2560x1440 using NNEDI3.
step 3) 2560x1440 to target display resolution using chroma upscale/downscale kernel (a question is this one the same as step 1? this was the question I asked in my last post)

As you see this involves 3 resizes for chroma (not counting the resizes the source suffered first from rip)
I think a better approach -2 resizes- would be the next, although I know there might be obvious reasons not to do like this.

step 1) 640x360 chroma doubling to 1280x720 using NNEDI3. This converts source to 4:4:4
step 2) 1280x720 to target display resolution using chroma upscale/downscale kernel

ibius
14th May 2015, 14:50
Also, I wonder since a lot of people are using >350 drivers, whether the newest Quadro ones (348.07) still show the same problems. I always use the newest Quadro release and besides crashes and apparent madVR bugs (which can be ruled out by returning to the last madVR release) they served me very well.

Also, I never once had driver-related crashes with them, not once. Every crashes that I had, clearly were a madVR bug which madshi fixed instantly.

Same here, I also never had driver-related crashes. I don't play games so I don't bother with 'Game Ready' drivers, but I did test latest 350.12 to be sure. Before, I was on 340.52 which is one of the most stable drivers for the Fermi family, it also comes recommended from Windows Update on Win8.1, at least for my GTX 550Ti. I also tried 331.82 version, which with 314.22 (supports up to Win8 only) are the other stable drivers, and 331.82 gives me even lower render times (only by ~0.10-20ms) than 340.52.

huhn
14th May 2015, 14:55
it's not, you are describing a best scenario example.
this is what happens currently with 720p as far as I have been told here:

1280x720p 4:2:0 source.

step 1) 640x360 chroma to 1280x720 using 'chroma upscaling'. This converts source to 4:4:4
step 2) 1280x720 chroma doubling to 2560x1440 using NNEDI3.
step 3) 2560x1440 to target display resolution using chroma upscale/downscale kernel (a question is this one the same as step 1? this was the question I asked in my last post)

As you see this involves 3 resizes for chroma (not counting the resizes the source suffered first from rip)
I think a better approach -2 resizes- would be the next, although I know there might be obvious reasons not to do like this.

step 1) 640x360 chroma doubling to 1280x720 using NNEDI3. This converts source to 4:4:4
step 2) 1280x720 to target display resolution using chroma upscale/downscale kernel

madVR always converts to RGB first for debanding and other stuff that needs RGB.

so yes there are reasons for this.

nevcairiel
14th May 2015, 15:06
it's not, you are describing a best scenario example.
this is what happens currently with 720p as far as I have been told here:

1280x720p 4:2:0 source.

step 1) 640x360 chroma to 1280x720 using 'chroma upscaling'. This converts source to 4:4:4
step 2) 1280x720 chroma doubling to 2560x1440 using NNEDI3.
step 3) 2560x1440 to target display resolution using chroma upscale/downscale kernel (a question is this one the same as step 1? this was the question I asked in my last post)

As you see this involves 3 resizes for chroma (not counting the resizes the source suffered first from rip)
I think a better approach -2 resizes- would be the next, although I know there might be obvious reasons not to do like this.

step 1) 640x360 chroma doubling to 1280x720 using NNEDI3. This converts source to 4:4:4
step 2) 1280x720 to target display resolution using chroma upscale/downscale kernel

"Chroma Upscaling" is only ever performed in the first step, 4:2:0 to 4:4:4. Its not used for anything else. This allows the chroma upscaler to be somewhat specialized, since it always does a flat 2x upscale, and will never do anything else.

All other scale operations that affect chroma are performed using the image up/down scaling algorithms, because scaling is usually performed in RGB (with the exception of NNEDI3, were Luma and Chroma can be split)

.. and the whole process is only a 2 step process, unless you use NNEDI3 and a final scale is required. If you don't want that, then don't enable NNEDI3 chroma doubling!

1) Chroma scaling 4:2:0 -> 4:4:4 using the "chroma upscaling" algorithm (which might be NNEDI3 if you set that, note however that this is not "chroma doubling", but "chroma upscaling"!)
(optional) 2) NNEDI3 chroma doubling
3) Scaling to final output size using image scaling algorithm

If you don't use NNEDI3, then its the two steps that you want, except that it uses different algorithms than you think.
Its important to note that you can also simply select NNEDI3 as a "chroma upscaling" algorithm, if thats something you want.

aufkrawall
14th May 2015, 15:24
what is send over HDMI/DP/DVI/otherstuff.

So, if 8 bit are selected in the CCC, it will output a signal with this bitdepth, even though applications in FSE used 10 bit?


not sure how that works with windows 8 and newer but even windows 7 overlay doesn't care about DWM.

Well, this was exactly my question, which remains open. :(


one thing is clear.
to get 10 bit out of madVR you need d3d11 10 bit mode with FSE.
Why? Does madVR D3D11 automatically convert and dither in windowed mode, even if there was true 10 bit desktop output with DWM?

nevcairiel
14th May 2015, 15:27
Why? Does madVR D3D11 automatically convert and dither in windowed mode, even if there was true 10 bit desktop output with DWM?

It probably would, but there is no 10-bit desktop output in Windows. Once there is, madshi will probably support that for us.
It may be something MS is secretly working on for Windows 10, as some signs have hinted at that, but nothing is confirmed.

aufkrawall
14th May 2015, 15:35
Alright, thanks.

yok833
14th May 2015, 16:20
Hello

Is someone could explain me what is the interest to upscale a good 1080p source on a full HD display?
Regarding the sharpening on a good source, in theory, is it then better to apply it before or after the upscaling (or both)?

Dogway
14th May 2015, 16:23
"Chroma Upscaling" is only ever performed in the first step, 4:2:0 to 4:4:4. Its not used for anything else. This allows the chroma upscaler to be somewhat specialized, since it always does a flat 2x upscale, and will never do anything else.

All other scale operations that affect chroma are performed using the image up/down scaling algorithms, because scaling is usually performed in RGB (with the exception of NNEDI3, were Luma and Chroma can be split)

yeah, as it is currently exposed the settings layout is very misleading, as if "chroma upscaling" and "image upscaling" were performing the same function, which is clearly not.

I gave in to nnedi3 (general image) doubling when I tested on my TV, so all my discussion is with this option in mind. It really makes a great difference when scaling ratio is very big (> 2x) as it happens when I watch content (films specially) at 720x304 in a 1080p display. NNEDI3 can create some plastic like look so you need to disable all other types of filters specially sharpeners (also on the TV side). For that reason I use spline instead of lanczos after NNEDI3, lanczos strengthens the "bad" NNEDI look. The same reason I don't use NNEDI quadruple.

At this point I'm wondering what is RGB required for (so early in the process chain). This is what forces a format change to YCbCr 4:4:4 (chroma pre-scale), as a preparation to convert to RGB. As I said I'm the type of not using any of the so called image enhancement post filters so I wonder if an image quality boost could be possible when not using any of those. I find no reason not to resize in YCbCr, besides a chroma pre-scale we also save two color format conversion steps RGB->YCbCr->RGB.

edit:

Sounds all good to me?
so far...

madshi
14th May 2015, 18:23
If I check and then uncheck "octuple luma/chroma resolution", I can't uncheck "double chroma resolution" and "quad chroma resolution" anymore, bug?
Actually, no. The "octuple" option had nothing to do with that. You can't uncheck "double/quad chroma resolution" if you have NEDI selected because NEDI handles luma+chroma at the same time.

I guess 8X luma only isn't possible due to the pixel shifts?
It is possible. You just got confused due to the above mentioned NEDI vs. NNEDI3 difference.

You see, there was a reason why I had removed the chroma doubling options. Things are simply more confusing with the options as they are now, although everything behaves as intended.

Shiandow, your new algorithm gives some interesting results.

0.2; 1 vs madVR high:
I'd say madVR high hardly vanishes any detail (Shiandow neither), but it looks much better with the upper blue gradient.

This is still the case with setting Shiandow threshold to 1.0: Upper gradient still looks better with madVR deband high, but now Shiandow's algorithm already reduces quite an amount of detail (e.g. the jacket is less sharp).
However, the blue gradient in the lower half of the image isn't processed well by madVR deband, there Shiandow now looks much better.

Detail loss can be prevented by highering the detail level. But the behavior for the upper image half needs to be improved.
It'd be great if your algorithm could cover it as well as the lower one, then it'd be probably better than madVR's older one.
Thanks for your tests! It might be a good idea to test with more than just one image/source, though, just to get a broader perspective on how the different debanding algos react in different circumstances/conditions. E.g. one algo might be better at bright scenes, the other at dark scenes. One might be better with lots of grain in the image, the other with grain-less images etc...

i can't get octuple to work what so ever.
As mentioned in the v0.88.6 release notes, octupling is only performed if you activate one of the "image refinement" options at the same time. If you don't do that, octupling would be a waste of power.

-------

Good news, btw, I've found a bug which caused the D3D11 rendering queue not to fill up in Windows 7. Should hopefully be fixed in the next build.

mark0077
14th May 2015, 18:56
madshi, I think it was already reported, it doesn't effect anything but I get exactly 1 presentation glitch after I pause / unpause or seek when using DX11 for presentation (either in FSE or windowed mode). (Nvidia GTX 980 - Windows 8.1 64bit, 32bit mpc-be)

sneaker_ger
14th May 2015, 19:05
@aufkrawall
Do you have the trade for quality option "don't analyze gradient angles for debanding" un-ticked?


Personally, I don't like Shiandow better than the "classic" madvr debanding so far. I'm a user of "high" + the trade for quality option disabled and overall it is working good. I don't notice quality loss but sometimes it isn't strong enough. Shiandow matches "high" at about treshold=1.6, detail=3 but I didn't find any scene where it surpasses the classic algo, most of the time they were equally good. On scenes were classic wasn't strong enough I didn't find any Shiandow setting that could do it better. Shiandow is faster, though. (14.4ms vs 13.5ms rendering)
For now my vote would be to keep the more tested/proven classic algo unless Shiandow can be further improved to handle stronger banding.

I used this trailer for testing, it has all kinds of banding, dark, light, static, moving:
https://mega.co.nz/#!cxlGiABA!vxZMlqpY8FX3dt414eQoYnnebXjHFAFB0rtqpwpi6M4

zveroboy
14th May 2015, 19:12
madshi
It does not work "Disable desktop composition" @ v.0.88.6
Could you fix this bug?

(Win7x86 GF 560Ti FW 347.88)

mark0077
14th May 2015, 19:18
also not sure if this is expected behaviour, but madVR when paused seems to keep rerendering the image, ie I can see the rendering times updating all the time, and cpu usage shows mpc-be is not at 0. I guess this is expected or is the intention that it truly does use 0 when paused?

pirlouy
14th May 2015, 19:19
@zveroboy: can't say on Windows 8, but you can use Windows properties of your application (MPC-HC for example): right-click on mpc-hc.exe > Properties > 2nd tab > Disable desktop composition.

madshi
14th May 2015, 19:30
I think it was already reported, it doesn't effect anything but I get exactly 1 presentation glitch after I pause / unpause or seek when using DX11 for presentation (either in FSE or windowed mode). (Nvidia GTX 980 - Windows 8.1 64bit, 32bit mpc-be)
Glitches/drops at seeking or pause/play don't matter, never did.

Personally, I don't like Shiandow better than the "classic" madvr debanding so far. I'm a user of "high" + the trade for quality option disabled and overall it is working good. I don't notice quality loss but sometimes it isn't strong enough. Shiandow matches "high" at about treshold=1.6, detail=3 but I didn't find any scene where it surpasses the classic algo, most of the time they were equally good. On scenes were classic wasn't strong enough I didn't find any Shiandow setting that could do it better. Shiandow is faster, though. (14.4ms vs 13.5ms rendering)
For now my vote would be to keep the more tested/proven classic algo unless Shiandow can be further improved to handle stronger banding.

I used this trailer for testing, it has all kinds of banding, dark, light, static, moving:
https://mega.co.nz/#!cxlGiABA!vxZMlqpY8FX3dt414eQoYnnebXjHFAFB0rtqpwpi6M4
Thanks for your feedback - appreciated!

Any more opinions about madVR vs. Shiandow debanding quality anyone?

It does not work "Disable desktop composition" @ v.0.88.6
Could you fix this bug?

(Win7x86 GF 560Ti FW 347.88)
You probably have D3D11 enabled? If you do that, madVR cannot disable desktop composition, because the D3D11 windowed mode used by madVR requires desktop composition to be enabled. Nothing I can do about it, sorry.

also not sure if this is expected behaviour, but madVR when paused seems to keep rerendering the image, ie I can see the rendering times updating all the time, and cpu usage shows mpc-be is not at 0. I guess this is expected or is the intention that it truly does use 0 when paused?
If you enable the debug OSD, then madVR will update it every second or so. If you disable the debug OSD, madVR should not rerender in paused mode, unless the media player asks it to.