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

AGKnotUser
27th January 2014, 17:23
Works here :rolleyes:
On a more serious note, mkv is a container format, this tells us nothing important. What codec is used, is the video interlaced, are you using software or hardware decoding (which exactly dxva-n/dxva-cb/cuvid/quicksync), what resolution are you scaling to/from?
If you're on MPC-HC select File->Properties and paste the MediaInfo here. Information about operating system, GPU, drivers, player and codecs used might also help.
Are you using any of the new features? Perhaps try restoring settings to default?

Video: MPEG4 Video (H264) 956x710 (171:127) 23.976fps [Video]
Audio: Dolby AC3 48000Hz stereo 640kbps [Audio]

General
Unique ID : 201361505293360179762353311071887896198 (0x977CD0B57A6965EABFF11649609F2E86)
Complete name : C:\MKV\A Christmas Carol.mkv
Format : Matroska
Format version : Version 4 / Version 2
File size : 1.99 GiB
Duration : 1h 26mn
Overall bit rate : 3 289 Kbps
Encoded date : UTC 2014-01-13 00:48:38
Writing application : mkvmerge v6.7.0 ('Back to the Ground') 64bit built on Jan 8 2014 15:10:52
Writing library : libebml v1.3.0 + libmatroska v1.4.1
Attachment : Yes

Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L4.1
Format settings, CABAC : Yes
Format settings, ReFrames : 4 frames
Codec ID : V_MPEG4/ISO/AVC
Duration : 1h 26mn
Bit rate : 2 584 Kbps
Width : 956 pixels
Height : 710 pixels
Display aspect ratio : 4:3
Frame rate mode : Constant
Frame rate : 23.976 fps
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.159
Stream size : 1.56 GiB (79%)
Writing library : x264 core 140 r2377 1ca7bb9
Encoding settings : cabac=1 / ref=3 / deblock=1:-1:-1 / analyse=0x3:0x113 / me=hex / subme=7 / psy=1 / psy_rd=1.00:0.15 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-3 / threads=12 / lookahead_threads=2 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=1 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=2 / keyint=250 / keyint_min=23 / scenecut=40 / intra_refresh=0 / rc_lookahead=40 / rc=crf / mbtree=1 / crf=20.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00
Language : English
Default : Yes
Forced : No

Audio
ID : 2
Format : AC-3
Format/Info : Audio Coding 3
Mode extension : CM (complete main)
Format settings, Endianness : Big
Codec ID : A_AC3
Duration : 1h 26mn
Bit rate mode : Constant
Bit rate : 640 Kbps
Channel(s) : 2 channels
Channel positions : Front: L R
Sampling rate : 48.0 KHz
Bit depth : 16 bits
Compression mode : Lossy
Stream size : 396 MiB (19%)
Language : English
Default : Yes
Forced : No

Using cuvid with nvidia GT 220 card:

NVIDIA System Information report created on: 01/27/2014 11:29:28
System name: USER-PC

[Display]
Operating System: Windows 8.1 Pro with Media Center, 64-bit
DirectX version: 11.0
GPU processor: GeForce GT 220
Driver version: 327.02
Direct3D API version: 10.1
CUDA Cores: 48
Core clock: 615 MHz
Shader clock: 1335 MHz
Memory data rate: 1580 MHz
Memory interface: 128-bit
Total available graphics memory: 4095 MB
Dedicated video memory: 1024 MB DDR3
System video memory: 0 MB
Shared system memory: 3071 MB
Video BIOS version: 70.16.3C.00.05
IRQ: 16
Bus: PCI Express x16 Gen2
Device Id: 10DE 0A20 19101462

[Components]

easyDaemonAPIU64.DLL 1.10.8.0 NVIDIA Update Components
WLMerger.exe 1.10.8.0 NVIDIA Update Components
daemonu.exe 1.10.8.0 NVIDIA Update Components
ComUpdatus.exe 1.10.8.0 NVIDIA Update Components
NvUpdtr.dll 1.10.8.0 NVIDIA Update Components
NvUpdt.dll 1.10.8.0 NVIDIA Update Components
nvui.dll 8.17.13.2702 NVIDIA User Experience Driver Component
nvxdsync.exe 8.17.13.2702 NVIDIA User Experience Driver Component
nvxdplcy.dll 8.17.13.2702 NVIDIA User Experience Driver Component
nvxdbat.dll 8.17.13.2702 NVIDIA User Experience Driver Component
nvxdapix.dll 8.17.13.2702 NVIDIA User Experience Driver Component
NVCPL.DLL 8.17.13.2702 NVIDIA User Experience Driver Component
nvCplUIR.dll 7.4.740.0 NVIDIA Control Panel
nvCplUI.exe 7.4.740.0 NVIDIA Control Panel
nvWSSR.dll 6.14.13.2702 NVIDIA Workstation Server
nvWSS.dll 6.14.13.2702 NVIDIA Workstation Server
nvViTvSR.dll 6.14.13.2702 NVIDIA Video Server
nvViTvS.dll 6.14.13.2702 NVIDIA Video Server
nvDispSR.dll 6.14.13.2702 NVIDIA Display Server
NVMCTRAY.DLL 8.17.13.2702 NVIDIA Media Center Library
nvDispS.dll 6.14.13.2702 NVIDIA Display Server
PhysX 09.10.0514 NVIDIA PhysX
NVCUDA.DLL 8.17.13.2702 NVIDIA CUDA 5.5.1 driver
nvGameSR.dll 6.14.13.2702 NVIDIA 3D Settings Server
nvGameS.dll 6.14.13.2702 NVIDIA 3D Settings Server

Resetting render-er to defaults had no effect.

Hope this helps.

mindbomb
27th January 2014, 17:43
are you using error diffusion or image doubling?

djfred93
27th January 2014, 18:16
Very thanks for your reply, the tread you tell me has been very useful.

I read these tread and I understand there is minus to none improvement on image quality, at least for the normal BD content, playing at 10 bits, is my understanding correct?

Anyway, can you tell me a good card, or some, to get the full potential of Madvr?

The only improvement is deep color who is a smooth gradation.
I think that your projector works in 12bit but can only display 8 bit. Madvr works in 16bit but can only output 8bit.

Maybe the next physical disk will do more than 8bit.
If you want to use OpenCL, you have to choose an ati card until madshi resolve all the problem with the Nvidia card.

My card is a ati radeon hd 5770 OC and i can't do all the OpenCL stuff. I can do Jinc3 AR/Jinc3 AR/ Catmull-Rom AR+SL with debanding. I think a ATI Radeon R9 280X is good. You can compare GPU here (http://www.hwcompare.com/category/gpu/).

AGKnotUser
27th January 2014, 18:52
are you using error diffusion or image doubling?


I had in madVR settings image upscaling and image downscaling set to DXVA2. If I change the settings to Bilinear the video plays.

vomanci
27th January 2014, 19:21
I can confirm setting image upscaling and/or downscaling to DXVA2 freezes the image whether it's up/downscaled. On an Nvidia 8200 onboard (that's right; I use bilinear and works :D )

antonyfrn
27th January 2014, 19:51
No joy with madVR v0.87.3 + NNEDI3 + MPC-HC 1.7.2 + NVidia 334.67 Beta still a black screen.

madshi
27th January 2014, 20:21
My configuration in this message (http://forum.doom9.org/showthread.php?p=1663895#post1663895).

Here (http://forum.doom9.org/showthread.php?p=1664113#post1664113) I post screenshots of memory consumption. v0.87.* consumes less RAM.
Your quote of my question does not include the ">" arrow, so I can't look back at my complete post you're refering to. Please always keep the quote logic working, otherwise you're making it hard for me to look back at our old discussion.

Can you please check whether the problem with 4K playback still occurs in v0.87.4?

I have a question about image doubling(which also applies to the scaling factor requirement). Does doubling mean doubling the total amount of pixels, or doubling both the height and width (quadrupling the total pixels)?
Image doubling looks at X and Y separately. Meaning that the image could be doubled in X direction, but not in Y. Or in both. Or only in Y but not in X. It all depends on the X and Y scaling factors and your settings.

Is the problem with dragging the screen to another monitor fixed? It would stop playback and you'd have to open the file again with the player on the second screen for it to play, or it would just stay stopped no matter matter. Pausing and Playing did nothing.
I don't know. Why don't you give it a try and report back?

I think the performance of error diffusion is quite poor on my computer (Radeon HD 6850 with Catalyst 13.12). Here is a little comparison:

720p50 to 1080p50:

Jinc 4 + AR (Image + chroma), medium deband, random dithering: 91% GPU load, no dropped frames
Bilinear (Image + chroma), no deband, error diffusion: ~90% GPU load, a lot of dropped frames (result is about the same with any scaling algorithm)

That is rather weird. It shouldn't be that slow. With D3D9 <-> OpenCL interop taken out of the picture, my HD7770 can do error diffusion on 1080p images with > 300fps. Measured in madVR it costs about 12ms rendering time, when talking about 1080p24 playback.

I the process of making this list I found something very odd.

Queues 13/13/8 works (good picture) but 13/12/8 gives black screen. 14/13/8 and 15/13/8 give black but 16/13/8 gives a good picture. This seems to be true with LL on or off, 24/22/8
LL Off (2295 MB) works but 23/22/8 doesn't, 23/20/8 does. Very odd; and these exact queue sizes seem to change. Sorry for the lack of good data. :(
That really is odd. I rather think it's random. Try again with v0.87.4. And if the problem still occurs, please double check with v0.86.11 to make sure it's a new bug and not an old one. I'm only interested right now in bugs which were introduced in v0.87.x.

Can you please add [...]
Have you ever thought about adding [...]

Do you have plans to further add [...]
I'm not accepting feature requests, anymore, until I've reached v1.0.

If you have problems with forced film mode, you can provide me with samples, so that I can improve forced film mode, when I find time to look at it again (probably not too soon).

1) My app is not free, so can I ask for a free license or do I have to pay license fee ?
I think we should better discuss this via email. Please contact me via madshi (at) gmail (dot) com with a description of your app (maybe a homepage link).

2) Still I can not make it to work : Here the code I use. I can see the madvr window inside my CView pane, and something that is moving (like a video playback) with flickering.
I don't have that much experience with media player development. But if it helps here's how madTPG initializes madVR for playback:

if (VideoWindow.put_Owner(MadVRPanel.Handle) = 0) and
(FilterGraph.AddFilter(DummySource, 'source') = 0) and
(FilterGraph.AddFilter(madVR, 'madVR' ) = 0) then
begin
DummySource.EnumPins(enumPins);
if enumPins <> nil then
enumPins.Next(1, outPin, @c1);
madVR.EnumPins(enumPins);
if enumPins <> nil then
enumPins.Next(1, inPin, @c1);
if (inPin <> nil) and (outPin <> nil) and
(FilterGraph.ConnectDirect(outPin, inPin, nil) = 0) and
(VideoWindow.put_MessageDrain(MadVRPanel.Handle) = 0) and
(VideoWindow.SetWindowPosition(0, 0, MadVRPanel.Width, MadVRPanel.Height) = 0) and
(VideoWindow.get_WindowStyle(style) = 0) and
(VideoWindow.put_WindowStyle((style and (not WS_CAPTION)) or WS_CHILD) = 0) and
(VideoWindow.put_AutoShow(true) = 0) and
((FilterGraph as IMediaControl).Pause = 0) then
If that doesn't help, maybe you could look at the MPC-HC code to find out how it makes madVR work?

Anyway, can you tell me a good card, or some, to get the full potential of Madvr?
That's hard to so. It all depends on which madVR features you want to use, and at which resolutions and framerates. Some algorithms are very hard on the GPU. But the question is if you have to use them. I'd suggest that you first play with the various madVR settings with your current GPU to find out which algorithms you want to use. Then maybe we can recommend a GPU that can do what you need.

So I cannot get NNEDI to upscale 360*288 to 1440*576?
Might be possible, depending on the exact target resolution. Look at all the options in the image doubling settings page, use your head, and you should be able to figure it out yourself. Just keep in mind that X and Y are handled completely separately by madVR.

What you cannot do is tell madVR to do exactly hard coded 4x in X direction and 2x in Y direction. You can only tell madVR whether to do 2x or 4x (or no change) depending on which scaling factor is needed to achieve the target resolution. I think my solution makes more sense because not every 360x288. My settings should make sense with all kinds of source resolutions, not just one.

And you recently said that NNEDI was kinda overkill for chroma, but for clarity sakes's what did you use for chroma in this screenshots comparison (http://forum.doom9.org/showpost.php?p=1663611&postcount=21592) please?
Don't remember, something cheap, I think.

But the profiles are great, more flexible than I have imagined! I was a little bit afraid at the beginning, it seemed a little bit complicated but after some testings, it's not so hard. I'm sure this is the price to pay for this high flexibility.
What I found important was to not make the settings dialog more complicated - as long as you don't activate profiles. If you do activate them, you have to live with a bit more complicated setup. I'm sure it would have been possible to make the profiles slightly less complicated, but then, as you say, it wouldn't have been as flexible then...

I juste have one question about NNEDI3. I understand it doubles the resolution so if a video is 720*576 I get 1440*1152. I have a 1920*1080 TV screen so horizontal resolution is smaller and vertical resolution is bigger. Does it imply a upscale or a downscale or both in that case?
Both (if NNEDI3 is used). First, video is upscaled with NNEDI3 (720x576 -> 1440x1152), then downscaled (1440x1152 -> 1350x1080 (square pixels) or 1440x1080 (4:3)).
I'm not sure about anamorphic 16:9, however. It should be 1440x1152 -> 1920x1080, means upscaling in one direction and downscaling in the other.
Thanks, I forgot that for a 1080p Tv screen, the resolution is only 1440*1080 for a 4:3 video so after NNEDI3 doubles the resolution to 1440*1152, madVR has only to downscale it to the appropriate resolution with Catmull-Rom or whatever you've chosen.

Yes, there is still anamorphic 16:9 content who needs to be upscaled horizontally and downscaled vertically, I wonder what happens in that particular case, if Jinc (for example) and Catmull-Rom work together.
NNEDI3 image doubling is completely separate from the other scaling. Think of NNEDI3 as manipulating the source video into a different resolution. The other scaling algorithms don't care what the original source video res was, they just look at the resolution of the image doubling output, and go from there.

Jinc currently doesn't support downscaling, and it always handles both X and Y. So if either X or Y need to be downscaled, Jinc can't be used (and should silently be disabled by madVR).

I had in madVR settings image upscaling and image downscaling set to DXVA2. If I change the settings to Bilinear the video plays.
I can confirm setting image upscaling and/or downscaling to DXVA2 freezes the image whether it's up/downscaled. On an Nvidia 8200 onboard (that's right; I use bilinear and works :D )
I can confirm the problem. Will look at that for v0.87.5. But not today, anymore...

hannes69
27th January 2014, 20:24
Today I played around with my AMD 4550 GPU to test all the new features of madvr. Debanding and the profile stuff is working great.
Just for info concerning the OpenCL stuff: I donīt use it (no need for the features in my setup) and it doesnīt seem to work properly. Thatīs no problem because this ancient video card could certainly not handle this stuff, even if the implementation of these functions would be correct.
NNEDI3 chroma upscaling: GPU load rises, but the load is independent of the number of neurons ...
image doubling: GPU load stays the same, it doesnīt matter which settings are made (tested with lowres video)
OpenCL DXVA NV12 surfaces: no effect when using DXVA native or copyback decoder (GPU load the same)
OpenCL error diffusion: GPU load stays the same.

I doubt that any of the OpenCL stuff is working with my good old card. GPU-Z reports full OpenCL support for this GPU.
Maybe the old generation cards HD2000 - HD4000 series with legacy drivers donīt support all the OpenCL features.

All no problem for me, just wanted to notify.

Beside that the recent version of madvr works stable for me.

General idea: it would be really nice in a mid-term future that all the computing of video could be freely allocated to CPU/GPU. My CPU is bored at the moment with just decoding the video. I thought the idea of OpenCL was to use CPU and GPU interchangeable for all purposes...
Of course it is too time consuming to make code implementations for GPU and CPU for every little feature, but isnīt OpenCL comparable to a sort of cross-compiler (have no better comparison) so code can rather easily be converted?
Sorry for my non-expert point of view, just interested.:o

madshi
27th January 2014, 20:27
madVR v0.87.4 released

http://madshi.net/madVR.zip

* workaround added: NNEDI3 upscaling failed/froze with newer NVidia GPUs
* fixed: NNEDI3 chroma upscaling produced wrong colors with 10bit sources
* got rid of some unnecessary texture sharing
All OpenCL features (except DXVA NV12 processing) should now also work with newer NVidia GPUs. However, the current official NVidia drivers are broken and always produce zero/black output when used with D3D9 interop inside of madVR. I've tried to make it work somehow, but failed. You have to downgrade to NVidia 327.23 drivers (or older) to make the OpenCL features work with NVidia. Would be nice if someone could report the OpenCL driver bug with the current official drivers to NVidia.

Maybe the 4K downscaling performance issue could be fixed, too, but I don't know. Give it a try and let me know.

antonyfrn
27th January 2014, 20:42
madVR v0.87.4 released

http://madshi.net/madVR.zip

* workaround added: NNEDI3 upscaling failed/froze with newer NVidia GPUs
* fixed: NNEDI3 chroma upscaling produced wrong colors with 10bit sources
* got rid of some unnecessary texture sharing
All OpenCL features (except DXVA NV12 processing) should now also work with newer NVidia GPUs. However, the current official NVidia drivers are broken and always produce zero/black output when used with D3D9 interop inside of madVR. I've tried to make it work somehow, but failed. You have to downgrade to NVidia 327.23 drivers (or older) to make the OpenCL features work with NVidia. Would be nice if someone could report the OpenCL driver bug with the current official drivers to NVidia.

Maybe the 4K downscaling performance issue could be fixed, too, but I don't know. Give it a try and let me know.

Sent a bug report to NVidia ill try poke one of the reps over at guru3d

djfred93
27th January 2014, 20:52
MadVR don't load with the latest version, it is stuck at opening the file and it crash on the setting window. The debug don't work either.

Log (http://www.mediafire.com/view/rdbj28pvqs6o1nh/madVR%200.87.4%20log.txt)

My system : Intel Core i7@920, Ati Radeon HD 5770, Windows 8.1, MPC-HC 1.7.2

michkrol
27th January 2014, 21:17
Thanks for the rapid releases madshi :D

MadVR don't load with the latest version, it is stuck at opening the file and it crash on the setting window. The debug don't work either.

Log

My system : Intel Core i7@920, Ati Radeon HD 5770, Windows 8.1, MPC-HC 1.7.2

For me v0.87.4 works correctly. I'm on Intel HD4000, MPC-HC 1.7.2, Windows 8.1, so it might be Radeon-related. Have you tried resetting settings, just in case?

trip_let
27th January 2014, 21:43
I seem to get the same results as below, even with 0.87.4. I also have HD 4000 / GT 650M (Optimus), on Win8.1 64. The OpenCL stuff doesn't work if GT 650M is used; otherwise, it does. DXVA image upscaling + NNEDI3 image doubling looks "correct," but that's just because NNEDI3 seemingly isn't being used at all with DXVA image upscaling. With the other upscaling, there are problems.

By the way, for a test case of 540p -> 1080p, rendering times Jinc3 AR are about 22 ms, while they're about 312 ms with NNEDI3 64 neurons (for image doubling), producing incorrect colors like namaiki got.

I tried 332.21, 327.23, and 326.01 drivers, all mobile versions, all with the same results.

My apologies if this has already been reported:

Testing Intel HD4000 with Nvidia 650M (Optimus). I have not replaced C:\Windows\SysWOW64\opencl.dll as was previously suggested. The 650M is selected for use. I have the latest drivers installed (ForceWare 327.02, Intel 3345). I tested with madVR87d. OpenCL error diffusion is not enabled for the below screenshots, but when it is enabled it seems to produce a black image.

How the image normally looks:
http://i43.tinypic.com/10xrlue.jpg

NNEDI Chroma enabled:
http://i43.tinypic.com/2yugkck.jpg
(appears to have a green tint)

NNEDI Chroma and Image doubling both enabled:
http://i40.tinypic.com/2zi0wfd.jpg

NNEDI Image doubling enabled:
http://i42.tinypic.com/4s04th.jpg
(image appears dark and perhaps missing a layer?)

DXVA scaling and nnedi doubling combined does seem to produce a correct image:
https://www.mediafire.com/?mgvmhdovgys5dfr

Note: Video was scaled from 1280x720 to 1920x1080 for 1.5x NNEDI to be enabled.

Logs for the above: https://www.mediafire.com/?wz32v37zzd3u9bj

Original 0.87 was crashing MPC-HC but 87a-d don't.

If I disable Optimus and use the Intel HD4000, the colors are not affected as such but the Intel GPU is too slow for realtime playback.

If a log means anything (it's not crashing, just not looking correct), see here (http://pastebin.com/vSfXGreu).

Profile switching and all sorts of other goodies work fine and nothing is wrong except OpenCL features not working—producing garbage output like above or black screen for error diffusion. Thanks for all your work and rapid-fire debugging efforts, madshi!

yok833
27th January 2014, 21:43
With Dithering + DeBanding we currently have in MadVR, DeNoise from ffdshow, and MPC-LumaSharpen (from SuperFX, the best one yet) sharpening, I get a better picture from a full 50Gb blu-ray than it can ever have.

James could you please give me a link where I could find this sharpen filter... Guess it is to add with shaders filters in mpc (post resize)...

antonyfrn
27th January 2014, 21:50
@madashi some good news MPCHC + v0.87.4 + Geforce 334.67 Betas I can use NNEID3 but picture is green with my GTX760 4GB

Deim0s
27th January 2014, 21:54
madshi,
Can you please check whether the problem with 4K playback still occurs in v0.87.4?
Maybe the 4K downscaling performance issue could be fixed, too, but I don't know. Give it a try and let me know.
On version 0.87.4, playback of all my test 4k samples it became perfectly.
And with the queue settings: CPU - 16, GPU - 8, backbuffers - 3, playback too perfectly and mpc-hc not crash.
Thanks for your great work!

cyberbeing
27th January 2014, 22:03
madshi, could you explain how 'chroma upscaling = NNEDI3' and 'image doubling, double Chroma resolution' relate when upscaling a video exactly 2x?

640x360 -> 1280x720

GPU load 37%
chroma upscaling = NNEDI3
image doubling luma = NNEDI3
image doubling chroma = NNEDI3
opencl dither = enabled

GPU load 34%
chroma upscaling = Catmull-Rom
image doubling luma = NNEDI3
image doubling chroma = NNEDI3
opencl dither = enabled

GPU load 28%
chroma upscaling = NNEDI3
image doubling luma = NNEDI3
image doubling chroma = disabled
opencl dither = enabled

Why does GPU load differ?

[Edit]
Same thing happens with GPU load changing when 'image doubling luma = NNEDI3' is active for 640x360->1280x720 2x scale, depending on the setting for 'image upscaling'.

I was under the impression that 'image doubling luma' & 'image doubling chroma' would override 'image upscaling' & 'chroma upscaling' when the video is resized to a 2x multiple.

Am I misunderstanding something?

iSunrise
27th January 2014, 22:23
madVR v0.87.4 released
Thanks!

Would be nice if someone could report the OpenCL driver bug with the current official drivers to NVidia.
Iīve reported it to Blaire (3dcenter forum). Not sure if he needs more details though, but I just went with "black screen/no picture output" as the failure description and linked to your full post for completeness sake.

yok833
27th January 2014, 22:47
@madashi some good news MPCHC + v0.87.4 + Geforce 334.67 Betas I can use NNEID3 but picture is green with my GTX760 4GB

Same here with the last beta... Green screen with NNEDI3 chroma upscaling
&
very dark picture (but no black screen) with image doubling <use NNEDI3 to double Luma resolution>

Error dithering & double chroma resolution is still black screen

Windows 7 + gtx 660 ti

LoRd_MuldeR
27th January 2014, 22:47
madVR v0.87.4

* workaround added: NNEDI3 upscaling failed/froze with newer NVidia GPUs
* fixed: NNEDI3 chroma upscaling produced wrong colors with 10bit sources
* got rid of some unnecessary texture sharing

Thanks for the update, but while NNEDI3 now doesn't make the video output freeze completely anymore, I still get broken output:
With NNEDI3 (http://i.imgur.com/gu6iodp.png) vs. No NNEDI3 (http://i.imgur.com/AKMknKU.jpg)

Running on a GeForce GTX 660 Ti with latest drivers (January 7, 2014).

nevcairiel
27th January 2014, 22:51
Thanks for the update, but while NNEDI3 now doesn't make the video output freeze completely anymore, I still get broken output:
With NNEDI3 (http://i.imgur.com/gu6iodp.png) vs. No NNEDI3 (http://i.imgur.com/AKMknKU.jpg)

Running on a GeForce GTX 660 Ti with latest drivers (January 7, 2014).

You have to downgrade to NVidia 327.23 drivers (or older) to make the OpenCL features work with NVidia.

You should've read the release announcement to the end. :)

madshi
27th January 2014, 22:56
Sent a bug report to NVidia ill try poke one of the reps over at guru3d
Iīve reported it to Blaire (3dcenter forum). Not sure if he needs more details though, but I just went with "black screen/no picture output" as the failure description.
Thanks guys. More details would be:

(1) Can be reproduced by unchecking the "use random dithering instead of OpenCL error diffusion" option in the "rendering -> trade quality for performance" section of the madVR settings.

(2) Works fine with 327.23 and older drivers. Problem occurs with anything newer than 327.23.

(3) Technical cause is that D3D9 <-> OpenCL interop doesn't seem to work properly. All APIs return success, but the OpenCL kernels seem to produce zero/black output at all times.

MadVR don't load with the latest version, it is stuck at opening the file and it crash on the setting window. The debug don't work either.
If I remember correctly, this problem occurred for you multiple times already in the past. I think this is very likely not a bug in madVR, but has some other cause specific to your PC. My first guess would be some other software making trouble. E.g. do you have some sort of Microsoft security software (anti-virus or similar) running? These are known to sometimes produce such problems.

I seem to get the same results as below, even with 0.87.4. I also have HD 4000 / GT 650M (Optimus), on Win8.1 64. The OpenCL stuff doesn't work if GT 650M is used; otherwise, it does. [...] I tried 332.21, 327.23, and 326.01 drivers, all mobile versions, all with the same results.
That is very weird. I also tested with Win8.1 64. But I used a dedicated GTX 650. With 327.23 drivers I get perfectly correct image output with all NNEDI3 related options and with error diffusion. With newer drivers everything is screwed up (either black screen or green tint).

On version 0.87.4, playback of all my test 4k samples it became perfectly.
And with the queue settings: CPU - 16, GPU - 8, backbuffers - 3, playback too perfectly and mpc-hc not crash.
Thanks for your great work!
Great! :)

(Your quotes are still missing the ">" button.)

madshi, could you explain how 'chroma upscaling = NNEDI3' and 'image doubling, double Chroma resolution' relate when upscaling a video exactly 2x?

640x360 -> 1280x720

GPU load 37%
chroma upscaling = NNEDI3
image doubling luma = NNEDI3
image doubling chroma = NNEDI3
opencl dither = enabled

GPU load 34%
chroma upscaling = Catmull-Rom
image doubling luma = NNEDI3
image doubling chroma = NNEDI3
opencl dither = enabled

GPU load 28%
chroma upscaling = NNEDI3
image doubling luma = NNEDI3
image doubling chroma = disabled
opencl dither = enabled

Why does GPU load differ?

[Edit]
Same thing happens with GPU load changing when 'image doubling luma = NNEDI3' is active for 640x360->1280x720 2x scale, depending on the setting for 'image upscaling'.

I was under the impression that 'image doubling luma' & 'image doubling chroma' would override 'image upscaling' & 'chroma upscaling' when the video is resized to a 2x multiple.

Am I misunderstanding something?
The first step in the madVR rendering pipeline is always to convert all content to RGB. This is always done, totally ignoring what the image doubling, image upscaling and image downscaling options say. If you have a 4:2:0 or 4:2:2 source, the algorithm in the chroma upscaling settings page defines what madVR does to get from 4:2:0/4:2:2 to 4:4:4. This has nothing to do with image doubling or image upscaling.

Once the image is RGB, image doubling is performed (if the settings say so). There are basically 3 different ways how image doubling can be done:

(1) Either you only double/quadruple the luma channel, but not the chroma channels. For this to work, madVR converts the RGB video data back to YCbCr, then doubles/quadruples the resolution of the Y channel. Afterwords two further scaling operations are done: The Y channel is up- or downscaled to the final target resolution (this step is skipped if image doubling already reached the exact target resolution, of course). And the CbCr channels are upscaled to the final target resolution in a separate step. Both of these operations are performed using the algorithms specified in the image up/downscaling settings pages. Finally, the separate Y and CbCr channels are joined together again and converted back to RGB.

(2) Or you double both luma and chroma channels using NNEDI3. This makes it easier for madVR because it isn't necessary to do *separate* followup scaling operations for Y and CbCr channels. It's easier for madVR, but usually not faster, simply because letting NNEDI3 double 3 channels is much slower than letting it double only 1 channel. So although (1) is more complicated, it should usually be faster.

(3) Or you quadruple luma and double chroma. This is somewhat similar to (1), just a bit more complicated.

Hope that explains everything?

Generally when using image doubling I'd recommend not using Jinc for image upscaling because it would cost a lot of extra performance for very little quality benefit. E.g. Lanczos3AR or even BicubicAR should do fine as followup upscaling algorithms after image doubling.


@madashi some good news MPCHC + v0.87.4 + Geforce 334.67 Betas I can use NNEID3 but picture is green with my GTX760 4GB
Same here with the last beta... Green screen with NNEDI3 chroma upscaling
Thanks for the update, but while NNEDI3 now doesn't make the video output freeze completely anymore, I still get broken output

Running on a GeForce GTX 660 Ti with latest drivers (January 7, 2014).
Come on guys. Read the v0.87.4 announcement text!!!

You should've read the release announcement to the end. :)
^ Exactly!!

Farfie
27th January 2014, 23:04
Thanks for the update, but while NNEDI3 now doesn't make the video output freeze completely anymore, I still get broken output:
With NNEDI3 (http://i.imgur.com/gu6iodp.png) vs. No NNEDI3 (http://i.imgur.com/AKMknKU.jpg)

Running on a GeForce GTX 660 Ti with latest drivers (January 7, 2014).

You still need to downgrade drivers even with 87.4.

Edit: man you guys are seriously too quick, madshi, nev. Seriously dedicated.

djfred93
27th January 2014, 23:14
If I remember correctly, this problem occurred for you multiple times already in the past. I think this is very likely not a bug in madVR, but has some other cause specific to your PC. My first guess would be some other software making trouble. E.g. do you have some sort of Microsoft security software (anti-virus or similar) running? These are known to sometimes produce such problems.

It was Avast who was making trouble. Thanks for this advice and for the new version.

yok833
27th January 2014, 23:15
Same here with the last beta... Green screen with NNEDI3 chroma upscaling
&
very dark picture (but no black screen) with image doubling <use NNEDI3 to double Luma resolution> enable

Error dithering & double chroma resolution = black screen

Windows 7 + gtx 660 ti

@Madshi
here is a my log if it can help.
Both Chroma & double luma NNEDI3 are activated

madshi
27th January 2014, 23:21
@Madshi
here is a my log if it can help.
Both Chroma & double luma NNEDI3 are activated
Read the v0.87.4 announcement text!!!

cyberbeing
27th January 2014, 23:39
And the CbCr channels are upscaled to the final target resolution in a separate step. Both of these operations are performed using the algorithms specified in the image up/downscaling settings pages. Finally, the separate Y and CbCr channels are joined together again and converted back to RGB.

Could you clarify this separate scaling step for the CbCr channel? Does it use the 'chroma upscaling' setting or the 'image upscaling' setting?

Or what if the destination resolution after NNEDI3 luma is smaller than 2x? Does it use the 'chroma upscaling' setting or the 'image downscaling' setting on the CbCr channel?

Also when you have NNEDI3 double both luma and chroma, are you working in RGB or YCbCr? Is only the 'image upscaling|downscaling' setting and NOT the 'chroma upscaling' used to go from 2x to destination size?

I ask, since a long time ago you changed madVR so the 'chroma scaling' setting was only used for converting sub-sampled YCbCr -> 4:4:4, followed by 'image upscaling' scaling both luma & chroma together to destination resolution. If the 'chroma scaling' setting is no longer doing 2x only scaling with NNEDI, I'd need to completely reassess my chroma setting.


Side question. What is the behavior if you set both NNEDI3 doubling, and quadrupling to 'Always'? Is madVR smart enough to only quadruple for scale factors >2x, or does it only quadruple?

6233638
27th January 2014, 23:40
I don't know if you know this, but NNEDI3 scaling is still not working in the new builds on Nvidia cards.
Also, there seems to be a bug where the new OpenCL features are draining my wallet.


In all seriousness, the new dithering and NNEDI3 image doubling looks very nice.
NNEDI can look a bit artificial sometimes, but even when that is the case, the overall image is probably better than without it.

DarkSpace
27th January 2014, 23:48
Also, there seems to be a bug where the new OpenCL features are draining my wallet.
It's not a bug. It's a feature! ;)

flashmozzg
27th January 2014, 23:52
I don't know if you know this, but NNEDI3 scaling is still not working in the new builds on Nvidia cards.
Also, there seems to be a bug where the new OpenCL features are draining my wallet.


In all seriousness, the new dithering and NNEDI3 image doubling looks very nice.
NNEDI can look a bit artificial sometimes, but even when that is the case, the overall image is probably better than without it.
Myabe
Read the v0.87.4 announcement text!!!

trip_let
27th January 2014, 23:56
That is very weird. I also tested with Win8.1 64. But I used a dedicated GTX 650. With 327.23 drivers I get perfectly correct image output with all NNEDI3 related options and with error diffusion. With newer drivers everything is screwed up (either black screen or green tint).

To be clear, previous versions of 0.87.x prior to 0.87.4 have the same behavior as 0.87.4 for me: the black screen on error diffusion and the red/dark thing on NNEDI3 doubling.

That said, I didn't try new drivers with 0.87.x prior to 0.87.4, but that's two variables off and I don't think that combination's going to work. :p

Wait, oh yeah, there was that OpenCL.dll thing. I'll go try a few different ones of these from the old drivers.

edit: looks like no luck trying different versions of the OpenCL.dll from C:\Program Files\NVIDIA Corporation\OpenCL from different driver installs. Same results.

madshi
27th January 2014, 23:56
Could you clarify this separate scaling step for the CbCr channel? Does it use the 'chroma upscaling' setting or the 'image upscaling' setting?
The "chroma upscaling" settings are only for 4:2:0/4:2:2 to 4:4:4 conversion, for nothing else. Once 4:4:4 is reached, all other scaling operations are decided by "image doubling/upscaling/downscaling" options.

Also when you have NNEDI3 double both luma and chroma, are you working in RGB or YCbCr?
YCbCr because that allows you to use more neurons (higher quality) for Y and less neurons (lower quality) for CbCr. Which is also the default neuron configuration.

I ask, since a long time ago you changed madVR so the 'chroma scaling' setting was only used for converting sub-sampled YCbCr -> 4:4:4
That is still the case.

Side question. What is the behavior if you set both NNEDI3 doubling, and quadrupling to 'Always'? Is madVR smart enough to only quadruple for scale factors >2x, or does it only quadruple?
I've added the " - if upscaling is needed" text to the "always" option to indicate that madVR won't (ever) double if the scaling factor is <= 1.0, and madVR won't (ever) quadruple if the scaling factor is <= 2.0.

I don't know if you know this, but NNEDI3 scaling is still not working in the new builds on Nvidia cards.
Haha - you got me there for a second! :p

In all seriousness, the new dithering and NNEDI3 image doubling looks very nice.
NNEDI can look a bit artificial sometimes, but even when that is the case, the overall image is probably better than without it.
Yeah, I guess I agree with that. What is your opinion about error diffusion? It's hard for me to compare. My projector dithers itself, and is never perfectly smooth. And my LCD monitor is too small to see any difference. So I can't really judge if error diffusion is an improvement over random dithering or not. Technically/scientifically it should be. And the lower noise level is visible on my projector, well in test patterns, at least. Can't really judge smoothness, though...

Farfie
28th January 2014, 00:02
Okay so, signature is relevant for this post... reporting performance.

Everything is working for me, but image doubling 1280x720 to 2560x1440 is absolutely killer. With error diffusion on I can forget using anything above 32 neurons. Actually I find it rather funny, with nnedi3 at 64 neurons, mitchel on chroma, with opencl error diff turned on, it can just barely.. barely not handle it. I watched the render queue slowly creep down over the course of 6 seconds before frames start dropping. Pretty funny. I feel like if I just overclocked it a bit, it might just work! (default clocks currently). I might actually start tinkering with that soon.

So what I've settled with is: error diffusion on, nnedi3@32 neurons (720p to 1440p) on luma, jinc 3+ar on chroma (I realize the chroma is overkill but as I said before, going from 64 to 32 neurons kills almost all the overhead, so the GPU is bored. Might as well up the chroma.)
I just want to make sure this is the kind of performance you're expecting.


Opinion section:
Error diffusion vs going from 32 to 64 neurons? :D

leeperry
28th January 2014, 00:07
Yeah, NNEDI does wonders with 64 neurons when upscaling VCD to 1080p :scared:

Too bad mVR doesn't align chroma properly for MPG1 but that's nothing ffdshow can't fix. I'm just not sure whether it makes any sense to output P216 as I'm doubtful about ffdshow's ability to output >8bit.

I would really appreciate some sort of indication in the OSD to know what kind of exact NNEDI upscaling is going on but anyway, I've got them set to 1.2x/2.4x with 64 neurons and my hopeless low-res files have never looked so crispy :)

mimi123
28th January 2014, 00:07
The only improvement is deep color who is a smooth gradation.
I think that your projector works in 12bit but can only display 8 bit. Madvr works in 16bit but can only output 8bit.

Maybe the next physical disk will do more than 8bit.
If you want to use OpenCL, you have to choose an ati card until madshi resolve all the problem with the Nvidia card.

My card is a ati radeon hd 5770 OC and i can't do all the OpenCL stuff. I can do Jinc3 AR/Jinc3 AR/ Catmull-Rom AR+SL with debanding. I think a ATI Radeon R9 280X is good. You can compare GPU here (http://www.hwcompare.com/category/gpu/).



That's hard to so. It all depends on which madVR features you want to use, and at which resolutions and framerates. Some algorithms are very hard on the GPU. But the question is if you have to use them. I'd suggest that you first play with the various madVR settings with your current GPU to find out which algorithms you want to use. Then maybe we can recommend a GPU that can do what you need.


My primary play content is Bluray, then 1920*1080 and a frame rate of 23.976Hz.
My display is a JVC X3 projector and 110" screen.

At this moment I have not any discrete card, I use the intel hd3000.

I want to remove banding as much as possible and add a bit of sharpness.
I want a card that can do all this flawlessly and without artifacts and if someday Madvr can send more than 8 bits I want a compatible card.
And finally the card must to be as silent as possible.


Very thanks.

Chortos-2
28th January 2014, 00:13
0.87 looks amazing! I have just a few quick questions about nnedi3.

First: do you correct for the half-sample shifts it introduces? (One step goes x x x x -> x y x y x y x y, and the image has now shifted by half a new sample to the left. And don’t forget about chroma positioning!)

Second: I gather from the nnedi3ocl thread that you mirror edge pixels? Doing that causes lines that disappear off the edge of the screen suddenly make a sharp turn after upscaling. Of course, no edge padding is perfect, but I think replicating the edge pixel works better as a default and is normally used as such, probably in your own pre-nnedi3 rescalers too.

cyberbeing
28th January 2014, 00:23
I know you've said the NNEDI3 shifts pixels to the left, but looking at some screenshots it appears the image is shifted both up & left (i.e. diagonally)? Is that expected?

6233638
28th January 2014, 00:33
Yeah, I guess I agree with that. What is your opinion about error diffusion? It's hard for me to compare. My projector dithers itself, and is never perfectly smooth. And my LCD monitor is too small to see any difference. So I can't really judge if error diffusion is an improvement over random dithering or not. Technically/scientifically it should be. And the lower noise level is visible on my projector, well in test patterns, at least. Can't really judge smoothness, though...I need to spend more time with it to draw a "real world" conclusion.
There does seem to be less noise, and looking up close, error diffusion is a lot better than random dithering - but whether that actually translates to a visible difference that's worth the performance hit, I'm not sure yet.

I know you've said the NNEDI3 shifts pixels to the left, but looking at some screenshots it appears the image is shifted both up & left (i.e. diagonally)? Is that expected?I'm seeing this too.

flashmozzg
28th January 2014, 00:34
I know you've said the NNEDI3 shifts pixels to the left, but looking at some screenshots it appears the image is shifted both up & left (i.e. diagonally)? Is that expected?

Maybe it's because NNEDI scales only one side (X or Y), so when it scales X it shifts left, and when Y - up.

Werewolfy
28th January 2014, 00:43
madVR v0.87.4 released

http://madshi.net/madVR.zip

* workaround added: NNEDI3 upscaling failed/froze with newer NVidia GPUs
* fixed: NNEDI3 chroma upscaling produced wrong colors with 10bit sources
* got rid of some unnecessary texture sharing
All OpenCL features (except DXVA NV12 processing) should now also work with newer NVidia GPUs. However, the current official NVidia drivers are broken and always produce zero/black output when used with D3D9 interop inside of madVR. I've tried to make it work somehow, but failed. You have to downgrade to NVidia 327.23 drivers (or older) to make the OpenCL features work with NVidia. Would be nice if someone could report the OpenCL driver bug with the current official drivers to NVidia.

Maybe the 4K downscaling performance issue could be fixed, too, but I don't know. Give it a try and let me know.

Thanks it works on my Geforce GTX660! NNEDI3 does a really good job on very aliased videos, it's really impressive. And it hides ringing too. It's definitely someting I'm going to use on some videos. My GPU can handle it for 24 fps SD videos but not 60 fps videos so profiles are going to be very useful ;)


NNEDI3 image doubling is completely separate from the other scaling. Think of NNEDI3 as manipulating the source video into a different resolution. The other scaling algorithms don't care what the original source video res was, they just look at the resolution of the image doubling output, and go from there.

Jinc currently doesn't support downscaling, and it always handles both X and Y. So if either X or Y need to be downscaled, Jinc can't be used (and should silently be disabled by madVR).


I tested it with a 750*576 video on a 1080p TV screen and it does seem that when I use NNEDI3, Jinc upscales in one direction and Catmull-Rom downscales in the other direction simultaneously because rendering times go up when I select Jinc 8 for upscaling for example and go up too when I select Lanczos 8 for downscaling.

I also noticed that on this video, if you select the option "if scale factor is 2x or bigger" rendering time is lower than with the option "if scale factor is 1.5x or bigger" . NNEDI3 is enabled on both case, if I disable it, rendering time go down.

6233638
28th January 2014, 00:50
Thanks it works on my Geforce GTX660! NNEDI3 does a really good job on very aliased videos, it's really impressive. And it hides ringing too. It's definitely someting I'm going to use on some videos. My GPU can handle it for 24 fps SD videos but not 60 fps videos so profiles are going to be very useful ;)I can see that I'm going to end up with a lot of profiles to manage too. I already had to split up my NTSC and PAL settings.

rendering times go up when I select Jinc 8 for upscaling for example and go up too when I select Lanczos 8 for downscaling.For what it's worth, 3-tap is generally considered the best for image quality. (though some argue for 4-tap Lanczos over 3-tap)

I also noticed that on this video, if you select the option "if scale factor is 2x or bigger" rendering time is lower than with the option "if scale factor is 1.5x or bigger" . NNEDI3 is enabled on both case, if I disable it, rendering time go down.It's only scaling in one dimension if you select 2x.

1920/720 = 2.67x
1080/576 = 1.88x

cyberbeing
28th January 2014, 00:53
And to make sure I'm no longer confused, what is the result of the following?

640x360 4:2:0 -> 1920x1080
Chroma Upscaling = NNEDI3
NNEDI3 double Luma = Enabled
NNEDI3 double Chroma = Enabled
NNEDI3 quadruple Luma = Enabled
NNEDI3 quadruple Chroma = Disabled



Conversion from 4:2:0 YcbCr (320x180) to 4:4:4 RGB (640x360) with 'chroma upscaling' setting NNEDI3

Conversion from 640x360 4:4:4 RGB -> 640x360 4:4:4 YCbCr.

Y & CbCr channels doubled to 1280x720 4:4:4 YCbCr with NNEDI3

Y channel only doubled to 2560x1440


Is it then:

CbCr channels upscaled 1280x720->1920x1080 with 'image upscaling' setting

Y channel downscaled 2560x1440->1920x1080 with 'image downscaling' setting

Conversion from 4:4:4 YCbCr to RGB


Or is it:

CbCr channels upscaled 1280x720->2560x1440 with 'image upscaling' setting

Conversion from 4:4:4 YCbCr to RGB

2560x1440 RGB -> 1920x1080 RGB with 'image downscaling' setting

Werewolfy
28th January 2014, 01:00
For what it's worth, 3-tap is generally considered the best for image quality. (though some argue for 4-tap Lanczos over 3-tap)


I don't use Jinc 8 usually, it was just to test if madVR upscales or downscales or both after NNEDI3 doubles the resolution on this particular scenario. I use Jinc 4 because it's a little bit sharper without introducing more ringing (to my eyes) but I agree, the difference is negligible. With the new NNEDI3 I will probably use Jinc 3 or a cheaper algorithm.


It's only scaling in one dimension if you select 2x.

1920/720 = 2.67x
1080/576 = 1.88x

Thanks, I think I understand.

dansrfe
28th January 2014, 01:06
It might be nice to have the ability to import/export profiles so that we can potentially share and cross-check them.

mandarinka
28th January 2014, 01:15
In case anybody was wondering - I just tried the openCL dithering on the Llano APU (A8-3850, so the model with best IGP) with 1600MHz/CL11 DDR3 RAM (dual channel).

It definitely works, but perhaps contrary to what one would expect (given it's called APU/Fusion etc), the performance hit is very high.

Testing with an 1856 x 1004 resolution video, scaled to 1920x1080 (windowed mode, not FSE), the rendering time went from 34,5 ms to 57 ms.
Using nnedi3 luma/chroma doubling for a 704x480 -> 1920x1080 upscaling but without OpenCL dithering raises rendering time "just" to 156 ms or so, BTW. :)
(Note: othere settings: Jinc3AR luma, lanczos3AR chroma)

I guess using the same physical memory for CPU/GPU just doesn't help at all with the DX9/OpenCL interoperation overhead. Has anybody tried with less ancient APU (Trinity/Richland and Kaveri)?

------------------------

Obvious performance costs aside, I find these new features great, awesome job!

turbojet
28th January 2014, 01:19
A few issues on 87.4 that I don't think have been reported:

1. With nvidia 250 and 650 and error diffusion on 87.4 the screen goes blank when paused and takes a few seconds to come back. Is this intentional or a bug?

2. On a 60mhz display when ivtcing with smoothmotion on there is a lot of good frames removed and blended frames left. Almost as if smoothmotion is running before ivtc.

3. Probably known but playing video in film mode is not good. It see's the correct cadence, 2:2, but it still looks like frames are being removed. Would it make sense for it to detect cadence in the middle of the video (if possible, to avoid title which is often a different cadence) and if 2:2 is detected force video if 3:2 is detected force film (and lock in 3:2 with a new option). I know madshi isn't working on ivtc now just want to mention it while it's on my mind.

yok833: you can find lumasharpen at http://dropcanvas.com/l46x9

kasper93
28th January 2014, 01:39
That is rather weird. It shouldn't be that slow. With D3D9 <-> OpenCL interop taken out of the picture, my HD7770 can do error diffusion on 1080p images with > 300fps. Measured in madVR it costs about 12ms rendering time, when talking about 1080p24 playback.


Apparently AMD made great improvements in this matter. On my old HD5870 I have rendering time ~35ms with 720p23. Of course with disabled smooth motion and not upscaled. After upscaling to full hd I have ~93ms, smooth motion (to 60fps) adds ~74ms to the process :) So OCL performance on my gpu is dreadful, but I bet it's better than NV :D

I know this post doesn't help you in any way, but I just wanted to show you how performance is scaled when it comes to older generations :cool:

cyberbeing
28th January 2014, 01:47
Yeah, I guess I agree with that. What is your opinion about error diffusion? It's hard for me to compare. My projector dithers itself, and is never perfectly smooth. And my LCD monitor is too small to see any difference. So I can't really judge if error diffusion is an improvement over random dithering or not. Technically/scientifically it should be. And the lower noise level is visible on my projector, well in test patterns, at least. Can't really judge smoothness, though...

I did a bit of testing on this:

madVR 'opencl error diffusion dither':

Flat colors without noise, but sometimes creates a uniform checkerboard pattern.
Sharper hard edges.
Source banding is more visible.


madVR 'random dither':

Noisy flat colors, without any patterns.
Hard edges softened by noise.
Source banding is less visible.


To get similar visible smoothness on gradients containing banding, I need to use higher debanding settings with 'opencl error diffusion dither' than I do with 'random dither'.

noee
28th January 2014, 01:55
Has anybody tried with less ancient APU (Trinity/Richland and Kaveri)?

I have a Kaveri (GIGABYTE GA-F2A88XM-D3H/A10-7700K) build coming together (pieces are arriving this week) and I hope to have some results by the weekend.

mrcorbo
28th January 2014, 03:56
Apparently AMD made great improvements in this matter. On my old HD5870 I have rendering time ~35ms with 720p23. Of course with disabled smooth motion and not upscaled. After upscaling to full hd I have ~93ms, smooth motion (to 60fps) adds ~74ms to the process :) So OCL performance on my gpu is dreadful, but I bet it's better than NV :D

I know this post doesn't help you in any way, but I just wanted to show you how performance is scaled when it comes to older generations :cool:

Enabling any of the OpenCL options (except process NV12 surfaces) causes my GPU usage to spike to 99% with full clocks on my HD 6970 (win8.1/Cat 13.12) even when everything else is turned off/down as low as it will go.

Is anyone else seeing this issue with a 69XX Radeon? Up until now my GPU has handled any kind of processing that madVR could throw at it without breaking a sweat.