Log in

View Full Version : LAV Filters - DirectShow Media Splitter and Decoders


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

DragonQ
16th May 2012, 10:54
You can force your GPU to stay in P1 when using CUVID with certain tweaker programs but this may not provide enough power for lower-end cards aimed at the HTPC market. Using DXVA2 Native is better in terms of power usage.

aufkrawall
16th May 2012, 11:02
You can force your GPU to stay in P1 when using CUVID with certain tweaker programs but this may not provide enough power for lower-end cards aimed at the HTPC market.

With those cards, P0 state may consume less power than P12 state with big Fermis. ;)


Using DXVA2 Native is better in terms of power usage.
Doesn't work with madVR and QS still consumes less power.

shadowdogg
16th May 2012, 13:53
I have only noticed this to happen in HP1 ultimate edition but it keeps wanting to restart to the beginning part way through the track? Then randomly fix itself later.. it doesn't do that with TMT5 or FFDshow audio decoder

egur
16th May 2012, 15:15
I'm curios for QuickSync deinterlacing.
With 1080p VC-1 interlaced my GPU still has to switch to P0 state with shader deinterlacing, very annoying. :(
HQ deinterlacing via QS "for free" would really be a nice thing.
I really got exited about QS in general. :)

In QuickSync, the deinterlacing is ASIC not shaders for superior power/performance (same goes for everything you see in the driver's Media control panel).
My decoder has already basic support for it so LAV + QS DI is not far.
The price will be more memory copying, but the next feature will be output of DXVA frames. I'll also add the option to copy the DXVA frames so subtitle could be added on them. I'll ask for suggestions/requirement when it's relevant.

aufkrawall
16th May 2012, 16:51
In QuickSync, the deinterlacing is ASIC not shaders for superior power/performance (same goes for everything you see in the driver's Media control panel).
My decoder has already basic support for it so LAV + QS DI is not far.

Will the quality be about the same as CUVID or madVR? :)

egur
16th May 2012, 19:52
Will the quality be about the same as CUVID or madVR? :)

I think MadVR uses DXVA deinterlacing which will be the same.
CUVID will be different and we need some test clips. My guess is that for most clips, they will produce similar results. I'm not familiar at all with the DI quality of CUVID.

nevcairiel
16th May 2012, 19:54
It uses the same DXVA deinterlacing. I was hoping aufkrawall realized by now that all deinterlacing done is the same GPU deinterlacing. :P
Of course CUVID uses NVIDIAs deinterlacing.... :)

Fullmetal Encoder
16th May 2012, 21:44
That's interesting.
So, Nvidia, AMD and Intel have a dedicated function on the chip to do HQ deinterlacing?

Edit: Or at least in the driver.

Define "high quality."

While hardware de-interlacing I've seen is better than nothing it still leaves obnoxious distortions in the image. So far, nothing I've seen can compare to QTGMC. It really is a shame that we can't abstract QTGMC into an algorithm that could be implemented in such a way as to run on a GPU.

aufkrawall
16th May 2012, 22:10
I think MadVR uses DXVA deinterlacing which will be the same.

Alright. :)

Define "high quality."

I just lent that term from the LAV decoder GUI.


While hardware de-interlacing I've seen is better than nothing it still leaves obnoxious distortions in the image. So far, nothing I've seen can compare to QTGMC. It really is a shame that we can't abstract QTGMC into an algorithm that could be implemented in such a way as to run on a GPU.
I haven't tried QTGMC yet, but now that you mention it, I will do so.
That weird tearing artifacts are really totally fugly.

DragonQ
16th May 2012, 22:34
I can't see any deinterlacing artefacts on a VP4 GPU. I'm sure the algorithm is better than older GPUs though because my VP2 GPU's deinterlacing doesn't look as good in fast moving scenes.

aufkrawall
16th May 2012, 22:48
I see kind of tearing when he is moving his hand quickly:
http://forum.doom9.org/showpost.php?p=1274753&postcount=15

ajp_anton
16th May 2012, 22:53
That only applies to uncompressed video.How else would I compare the two? Both double the uncompressed data, so they both probably slightly-less-than-double the compressed data.
I was countering the "4:2:0 sucks on colored edges" argument.

kolak
16th May 2012, 23:13
I haven't tried QTGMC yet, but now that you mention it, I will do so.
That weird tearing artifacts are really totally fugly.

QTGMC and deinterlacing in LAV decoder is like day and night :)
I have not seen anything, which comes close to QTGMC- including DigitalVision DVO filters. They have 20 years experience in motion/video aspects, but even so QTGMC is better. Maybe Teranex box can match it, but I would not be so sure.
Problem with QTGMC is speed :(

MasterNobody
16th May 2012, 23:21
How else would I compare the two? Both double the uncompressed data, so they both probably slightly-less-than-double the compressed data.
I was countering the "4:2:0 sucks on colored edges" argument.
2160p 4:2:0 quadruple uncompressed bitrate not double as 1080p 4:4:4. And as was mentioned already chroma samples in 4:2:0 are not aligned with luma so you can't simply downsize luma to get 4:4:4.

xv
16th May 2012, 23:47
Why shouldn´t it be possible to create 4:4:4 by downsizing? You just need to know chroma position and use correct subpixel-cropping during resize. AviSynth-resizers support that (you can use float parameters as source position):
...Resize(clip clip, int target_width, int target_height, float src_left, float src_top, float -src_right, float -src_bottom)
I think you will have a position change of 0.5 pixel towards the bottom for standard 4:2:0 chroma position (at the bottom 0.5 pixel are missing and at the top 0.5 pixel are added by the resizer)

Any news for DV sound problem? Problem reproduceable with my sample?

STaRGaZeR
17th May 2012, 00:20
How else would I compare the two? Both double the uncompressed data, so they both probably slightly-less-than-double the compressed data.
I was countering the "4:2:0 sucks on colored edges" argument.

Compressed obviously, because that's what would be distributed eventually.

Regarding the bitrate, that's not true at all. Encoders do a much better job discarding info when compressing than just blindly removing 3/4 of the color samples. For a given bitrate, if you feed the encoder with 4:4:4 and 4:2:0, 4:4:4 will look much better without sacrificing luma quality.

The same thing happens with audio. Just feed the encoder with your 48kHz source and let it decide what is important and what is not, instead of lowpassing the source to 24kHz and compressing that. At a given bitrate, the 48kHz one will sound much, much better.

ajp_anton
17th May 2012, 01:11
2160p 4:2:0 quadruple uncompressed bitrate not double as 1080p 4:4:4. And as was mentioned already chroma samples in 4:2:0 are not aligned with luma so you can't simply downsize luma to get 4:4:4.I never mentioned 2160p. I specifically said increase the resolution so that the bitrate doubles. It doesn't give the same chroma resolution as simply going 4:4:4, but it also increases the luma resolution
Encoders do a much better job discarding info when compressing than just blindly removing 3/4 of the color samples. For a given bitrate, if you feed the encoder with 4:4:4 and 4:2:0, 4:4:4 will look much better without sacrificing luma quality.That's true... I was somehow thinking lossless compression. Yes, a (good) lossy encoder should be able to decide where to keep the chroma at high quality and where not to.

Fullmetal Encoder
17th May 2012, 01:34
QTGMC and deinterlacing in LAV decoder is like day and night :)
I have not seen anything, which comes close to QTGMC- including DigitalVision DVO filters. They have 20 years experience in motion/video aspects, but even so QTGMC is better. Maybe Teranex box can match it, but I would not be so sure.
Problem with QTGMC is speed :(

Yes, I'd really like to see a direct comparison between Teranex and QTGMC. Though I doubt Teranex could beat it. And yeah it's slow but if memory serves the last time I tested it I was able to get it to run with Preset="slow" in real time without video freezing and that's with a Core i7 860 at stock speeds. Hell even at medium preset it's still better than the deinterlacing on my Radeon 5850. Makes me wonder what will be possible with a Haswell "E" processor at end of next year which is probably what I'll be upgrading to.

The only way I can think of that you could find better deinterlacing than with QTGMC would be with a manual frame-by-frame approach.

We need to get -Vit- and Didée jobs with Teranex so they can straighten out their act.

Andy o
17th May 2012, 02:29
For media converter from ArcSoft it works fine. For madVR, not so much. I have to use Egur's trick of setting up a fake display. But I have CUVID now so I don't much care about it for madVR. QS is freaking *FAST* for transcoding blu-rays to mp4's for my Xoom, though. Like 7 minutes fast. It's insane.

How about if you connect the display to the Intel output, and use Virtu to access 3D graphics from NV instead? I think such a solution would work for me, if I could have an NV card with Intel HDMI audio, if Intel doesn't have the "silent stream" thing.

SamuriHL
17th May 2012, 02:58
How about if you connect the display to the Intel output, and use Virtu to access 3D graphics from NV instead? I think such a solution would work for me, if I could have an NV card with Intel HDMI audio, if Intel doesn't have the "silent stream" thing.

Wouldn't you wanna do the opposite then? :) I believe Nev said connecting Intel to the receiver for audio and the nVidia card to the display for video works fine. I haven't tried it cause I don't know where the hell I put my spare HDMI cables. But I'm seriously considering it because the 680 has massive overscan issues when going through the Pio Elite. I have to set a custom res to get it to work and it makes me unhappy. I'm replacing the TV sometime this year with a plasma screen, but, that's a few months away at the earliest.

Andy o
17th May 2012, 03:24
overscan issues now? Damn this never ends. But what I meant was why do you need to connect the cable to the NV output? If I'm not mistaken, most of what you guys said involved connecting the cable to NV, and either fool the Intel output into thinking it's active, or using Virtu for QS decoding. What I'm saying is connect the cable to the Intel output, and then you can use Virtu with the NV card for games and CUDA?

SamuriHL
17th May 2012, 03:28
Yea, you can do it that way and it works ok with a small performance decrease in games. My thought is that if the Intel HDMI connection is connected to the receiver and the NV is connected directly to the display (which I'll need to do anyway once I upgrade my TV for 3D since the Pio Elite isn't 1.4a) that both QS and CUDA should be active. Besides, the NV has better output IMO than the Intel.

wanezhiling
17th May 2012, 03:32
It uses the same DXVA deinterlacing. I was hoping aufkrawall realized by now that all deinterlacing done is the same GPU deinterlacing. :P
Of course CUVID uses NVIDIAs deinterlacing.... :)

CUVIDs deinterlacing is very nice on a not so weak or old card.

Do you have any plan to implement the GPU deinterlacing for AMD/ATI cards? I mean cb/native mode. :)

RBG
17th May 2012, 05:04
Do you have any plan to implement the GPU deinterlacing for AMD/ATI cards? I mean cb/native mode

Deinterlacing should work in native mode on ATI/AMD and on every dxva compatible gpu. In CB mode either EVR or MadVR can do deinterlacing just fine.

wanezhiling
17th May 2012, 06:13
Deinterlacing should work in native mode on ATI/AMD and on every dxva compatible gpu. In CB mode either EVR or MadVR can do deinterlacing just fine.

In cb/native mode, the deinterlacing job is just taken over by the video renderer(madVR,EVR,VMR..), lav video decoder does nothing on this.

ianken
17th May 2012, 06:39
I cannot get VSFILTER to load in WMP.

I searched. Googled. Binged. Bingled. Saw one post asking the same question followed by a "I figured it out" wihtout any info. Grrrrr.

Graphstudio works fine. The only bits on the box are LAV and vsfiler (xy-vsfilter 3.0.0.8).

MPC-HC of course works fine. But sometime users hit the regular player in Media Center rather than going in through Media Browser which is configured to use MPC-HC.

RBG
17th May 2012, 08:55
In cb/native mode, the deinterlacing job is just taken over by the video renderer(madVR,EVR,VMR..), lav video decoder does nothing on this.

In both cases deinterlacing is done via DXVA DDI function callback, and it works fine on AMD/ATI cards. I understand it now, you asked about deinterlasing implementation, where deinterlaced frames are returned to the RAM. I doubt that it possible to make it work this way in DXVAc/b mode, and I am pretty sure it is impossible in DXVAnative mode.

wanezhiling
17th May 2012, 10:35
I doubt that it possible to make it work this way in DXVAc/b mode.
CUVID implemented it, dunno if cb also can.
and I am pretty sure it is impossible in DXVAnative mode.
:thanks: I agree.

shadowdogg
17th May 2012, 14:47
Nobody wants to help. Fine. Cheers anyway

Cyber-Mav
17th May 2012, 15:18
MPEG4 ASP works fine if you have a 300 series driver.

thats good news, i will give it a try.

Sebastiii
17th May 2012, 16:29
Nobody wants to help. Fine. Cheers anyway

hi,
I was converted to PCM :) with arcsoft dll.

aufkrawall
17th May 2012, 18:13
thats good news, i will give it a try.
May I ask if you really need it?
Probably your PC will consume much more power with it than with CPU processing, even slow CPUs aren't stressed much.
imho on most PCs just H.264 and VC-1/WMV3 acceleration are useful.

Octo-puss
17th May 2012, 20:38
hi,
I was converted to PCM :)
Better than converting to Islam I guess.

Pat357
17th May 2012, 21:47
In both cases deinterlacing is done via DXVA DDI function callback, and it works fine on AMD/ATI cards. I understand it now, you asked about deinterlasing implementation, where deinterlaced frames are returned to the RAM. I doubt that it possible to make it work this way in DXVAc/b mode, and I am pretty sure it is impossible in DXVAnative mode.

On AMD even DXVA c/b with copying the deinterlaced frames back to the RAM would be for sure impossible due the slow copy performance from AMD to copy from the surface that holds the interlaced frames.
Maybe for NV it's possible, but what would be the sense ?
With the current implementation DVXA cb works well with interlaced content because the most important renderers (EVR, EVR-Custom, MadVR) will do deinterlace while rendering.

Midzuki
17th May 2012, 23:18
hi,
I was converted to PCM :) with arcsoft dll.

I see, Soaron has been enforcing the will of the Machine. :D

nussman
18th May 2012, 12:37
On AMD even DXVA c/b with copying the deinterlaced frames back to the RAM would be for sure impossible due the slow copy performance from AMD to copy from the surface that holds the interlaced frames.
Maybe for NV it's possible, but what would be the sense ?

You could use some processing (scaling, sharpen, ...) with ffdshow/avisynth for interlaced content (together with high quality gpu deinterlacing).

But i dont know if it's possible.

aufkrawall
18th May 2012, 12:52
You could use some processing (scaling, sharpen, ...) with ffdshow/avisynth for interlaced content (together with high quality gpu deinterlacing).

But i dont know if it's possible.
Why not? :)
Using LAV CUVID deinterlacing via Avisynth is possible.

nussman
18th May 2012, 13:09
Why not? :)
.
For dxva copyback? Its not very fast.
copyback 50i <> copyback 50p (adaptiv deinterlacing).


Using LAV CUVID deinterlacing via Avisynth is possible.
LAV CUVID => decoding, deinterlacing, copyback => avisynth?
Or what do you mean?

RBG
18th May 2012, 14:13
CUVID implemented it, dunno if cb also can.


CUVID is a different api, working only on nvidia hardware. AFAIK as it was designed, it had this functionality from the beginning. Anyway, sooner or later quick sync will have deinterlacing with frames return to the RAM.



Maybe for NV it's possible, but what would be the sense ?
With the current implementation DVXA cb works well with interlaced content because the most important renderers (EVR, EVR-Custom, MadVR) will do deinterlace while rendering.

Well that was originally my point, but as far as I understand wanezhiling would like to apply some kind of postprocessing to an interlaced video. :)


For dxva copyback? Its not very fast.
copyback 50i <> copyback 50p (adaptiv deinterlacing).
.....
LAV CUVID => decoding, deinterlacing, copyback => avisynth?
Or what do you mean?

I think he wrote about CUVID, and I can assure you postprocessing is working like a charm with CUVID, even in a hardest cases like SVP. For example, I did real time frame interpolation with SVP on PAL video to match 60hz refresh rate of my display. :)

DragonQ
18th May 2012, 17:04
Hmm I haven't found any video conversion/encoding software that can do good deinterlacing. Most of the time I prefer to leave files in interlaced format but occasionally I've thought it would be useful to deinterlace something. Are there any decent GUIs that support CUVID deinterlacing (to 50/60p) via avisynth?

Diegotimmy
18th May 2012, 23:31
I asked this question over at the AVS forums but didn't receive a reply:

Wondered if anyone here could help.

How can I get the lav splitter to prefer the secondary audio stream by default rather than the hearing impaired stream?

Annoyingly the hearing impaired stream is 256kbps compared to the default of 192kbps in my .WTV recordings, so i guess this is why it is being selected by default. In addition to this, playback freezes until I select the correct stream in MPC HC.

Thanks

wanezhiling
19th May 2012, 09:26
http://www.mediafire.com/?htq1ahkue7pqbre


http://i.imgur.com/YpNG6.png
lav splitter + lav cuvid + evr cp

http://i.imgur.com/7P6C2.jpg
lav splitter + lav sw/qs/cb/native + evr cp

egur
19th May 2012, 23:11
Nev, try QuickSync decoder r54.
Got Deinterlacing working (including telecine) as well as Detail and Denoise.
Let me know if this passes your regression.
Note that on soft telecined content, the output frame rate will change to 23.976 - no frame replication. If you want frame replication as a feature, let me know.
This works with and without my decoder changing the time stamps.

nevcairiel
19th May 2012, 23:13
Soft-telecine needs to set the repeat flags on the frames, but it should not convert it to hard-telecine. So if its not doing that, thats OK for me.
I'll check it when i have some time.

dukey
19th May 2012, 23:20
I got a problem with some VC1 files and CUDA. Using lav splitter and CUDA decoder. The stream ends up quite broken.

http://i.imgur.com/i6K9h.jpg

I'll upload a sample

nevcairiel
19th May 2012, 23:22
I'll upload a sample

Don't bother, its not like anyone here can fix any problems with CUDA decoding, only NVIDIA can do that. Send it to them.

dukey
19th May 2012, 23:22
Okay ..

aufkrawall
19th May 2012, 23:49
You could upload it anyway and I will report it to someone else who maybe can Nvidia let it fix this. :)

sumawo13
20th May 2012, 01:56
I made an encode from a Fraps video recorded in RGB mode, using x264 version 2197, my command line was as follows:

x264-10 --demuxer lavf --force-cfr --fps 60 --output-csp i444 --crf 16 --preset slower -o vid.mp4 "SoF2MP 2012-05-19 09-50-24-37.avi"

Here is the original file.
http://ompldr.org/tZHRmaQ (http://ompldr.org/vZHRmaQ)

Here is the encoded file.
http://ompldr.org/tZHRmeA (http://ompldr.org/vZHRmeA)

If you look you can notice a slight difference in color, I believe this to be a colorimetry problem caused by decoding with LAV Filters, which I use.

----

It seems adding --colorprim bt470bg --transfer bt470bg --colormatrix bt470bg decodes properly, but this seems like only a temporary fix.

http://ompldr.org/tZHRnZA (http://ompldr.org/vZHRnZA)

nevcairiel
20th May 2012, 08:48
If you look you can notice a slight difference in color, I believe this to be a colorimetry problem caused by decoding with LAV Filters, which I use.

1024x768 already qualifies as a "HD" resolution, so if the color matrix is not explicitly tagged, it'll use the BT.709 matrix.
If your content is not BT.709, and you have a resolution that would otherwise qualify as HD, you need to explicitly tag the matrix like you did in the command line you quoted in your "temporary" fix.

If the file does not tell LAV which matrix was used, all we can do is guess. And every guess will be wrong eventually.
Its working as intended, from where i'm standing.