[RESOLVED] Artifacts On GITS VOB Frame Serving

Support forum for DGDecNV
Post Reply
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: Artifacts On GITS VOB Frame Serving

Post by admin »

I have a temporary workaround that seems to work but I want to ask nVidia if it's OK to lie in the bit_rate_value field, i.e., will it break something in the decoder if I just write a 1 in there unconditionally? Seems to be OK but I want to get an nVidia A-OK before letting anything loose.

If quant matrices change, though, there is no workaround and we have to wait for a driver fix. In your stream, only the bit_rate_value field changes between sequence headers.
DAE avatar
himself
Posts: 7
Joined: Wed Jan 18, 2017 7:26 am

Re: Artifacts On GITS VOB Frame Serving

Post by himself »

Thanks for looking into all of this!

Also, thanks for giving me some pretty detailed background info. I'm genuinely curious about how these tools work. I've got a reasonably good high-level understanding of the basics, but I'm totally lost on any of the actual implementation.
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: Artifacts On GITS VOB Frame Serving

Post by admin »

You know what I always say, I aim to please (except when I don't).

I like to give all the details because there are other developers out there implementing CUVID and they surely like to know about these things. I grokked 10-bit HEVC thanks to another developer, so it's the least I can do to share the things I discover.

You get brownie points for bringing this to light and following up instead of just grumbling to yourself. :bravo:
DAE avatar
himself
Posts: 7
Joined: Wed Jan 18, 2017 7:26 am

Re: Artifacts On GITS VOB Frame Serving

Post by himself »

admin wrote:You get brownie points for bringing this to light and following up instead of just grumbling to yourself.
Why thank you kindly! I'm just happy to help out! :D
DAE avatar
himself
Posts: 7
Joined: Wed Jan 18, 2017 7:26 am

Re: Artifacts On GITS VOB Frame Serving

Post by himself »

I went back and extracted a small segment again, and this time it does show problems. I must've done something really absentminded the first time, like open the m2v file in dgindex.
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: Artifacts On GITS VOB Frame Serving

Post by admin »

Hehe, good old human error. It's why I always "trust but verify". I wish you had been right because then it would have been on my program stream parser and it would have been fully in my control.

I'm going to slipstream a fix for you later this morning. Watch out for it.
DAE avatar
Aleron Ives
Posts: 126
Joined: Fri May 31, 2013 8:36 pm

Re: Artifacts On GITS VOB Frame Serving

Post by Aleron Ives »

admin wrote:I'm going to slipstream a fix for you later this morning. Watch out for it.
That sounds like a dangerous and/or violent fix. :wow:

:lol:
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: Artifacts On GITS VOB Frame Serving

Post by admin »

Holy fortune cookies. You funny guy. :lol:

BTW, the fix is in.
DAE avatar
jpsdr
Posts: 214
Joined: Tue Sep 21, 2010 4:16 am

Re: Artifacts On GITS VOB Frame Serving

Post by jpsdr »

admin wrote:OK, thanks to nVidia's fine support, the problem is now understood. It is due to a recent CUVID regression.
Just out of curiosity, as there has been several driver releases since, what is the actual status of this ?
Is it fixed in the driver, or do you still need your workaround ?
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: [RESOLVED] Artifacts On GITS VOB Frame Serving

Post by admin »

Hi jpsdr.

I just updated to version 378.78 and it is indeed fixed. I usually leave harmless workarounds in place so as not to hose people running older drivers.
DAE avatar
jpsdr
Posts: 214
Joined: Tue Sep 21, 2010 4:16 am

Re: Artifacts On GITS VOB Frame Serving

Post by jpsdr »

admin wrote: If quant matrices change, though, there is no workaround and we have to wait for a driver fix.
Is your workaround safe in that case ? Also, it's possible that i didn't understood this statement properly, and you were not comparing this case with your workaround.
And i thought you were not sure your workaround may not break things in specific cases, but as it was just my thought/feeling, it may be wrong also.
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: [RESOLVED] Artifacts On GITS VOB Frame Serving

Post by admin »

Everything is fine; don't worry.

The CUVID bug was this: When a sequence header is encountered that differs from the previous one, the next GOP is erroneously marked as bad link, meaning the referenced frames in the preceding GOP are discarded. That caused macroblocking at that point. A sequence header change should NOT mark the GOP as bad link.

In the case of the stream offered here, the only change in the sequence header was the signaled bit rate. But CUVID does not use this field in any way (other than when comparing the sequence header). That allowed me to simply always write it as 0, so that CUVID would not see a change in the sequence header. If, however, the quant matrices would change, I cannot write those to 0 because decoding would then fail miserably. In that case, the CUVID bug would be triggered with no possible workaround.

So: The workaround is unconditionally safe because it simply writes a field that is never used. I never thought it would break anything. But I did speculate that some streams may be encountered for which the workaround is useless.

All clear?
DAE avatar
jpsdr
Posts: 214
Joined: Tue Sep 21, 2010 4:16 am

Re: [RESOLVED] Artifacts On GITS VOB Frame Serving

Post by jpsdr »

Perfect, thanks.
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: [RESOLVED] Artifacts On GITS VOB Frame Serving

Post by admin »

You're welcome, my pleasure. Have a great Sunday!
Post Reply