[RESOLVED] DGSource() resize or z.lib?

Support forum for DGDecNV
Post Reply
DAE avatar
Guest 2
Posts: 903
Joined: Mon Sep 20, 2010 2:18 pm

[RESOLVED] DGSource() resize or z.lib?

Post by Guest 2 »

A friend of mine has bought E.T. UHD BD and he lent me to watch again after long long time.

Unfortunately I don't own a 4k HDR display. My only possibility is to convert to SDR and resize (does order matters?) to 1080p.

My question is: is DGSource() resize enough to give good quality or should I address to z.lib (that I never used)?

Any hint and AVS script is welcome.

HDR format : SMPTE ST 2086, HDR10 compatible
Bit depth : 10 bits
Color range : Limited
Color primaries : BT.2020
User avatar
Rocky
Posts: 3555
Joined: Fri Sep 06, 2019 12:57 pm

Re: DGSource() resize or z.lib?

Post by Rocky »

Resize first to reduce data into the HDR->SDR conversion. The DGSource() filter resizing will be fine for this use case.

I'll give a script but what does the Info dialog say? PQ or HLG?
DAE avatar
Guest 2
Posts: 903
Joined: Mon Sep 20, 2010 2:18 pm

Re: DGSource() resize or z.lib?

Post by Guest 2 »

Rocky wrote:
Sat Mar 28, 2020 3:44 pm
I'll give a script but what does the Info dialog say? PQ or HLG?
PQ, thanks!

What if I want the utmost quality in resizing?
User avatar
Rocky
Posts: 3555
Joined: Fri Sep 06, 2019 12:57 pm

Re: DGSource() resize or z.lib?

Post by Rocky »

The scripts are very simple. Here is one doing resizing and cropping in DGSource():

dgsource("10bit.dgi",ct=276,cb=276,rw=1920,rh=804)
dghdrtosdr(mode="pq",white=2930)

Of course you can tweak the dghdrtosdr() parameters. Use the interactive dialog in DGIndexNV to find your desired parameters. 'white' level usually needs to be set per your source video.

If you want a better resizer, LanczosResize() is very good for reduction (there's no need to mess about with zlib):

dgsource("10bit.dgi")
crop(0,276,0,-276)
lanczosresize(1920,804)
dghdrtosdr(mode="pq",white=2930)

Marking resolved but follow up as needed.
DAE avatar
Guest 2
Posts: 903
Joined: Mon Sep 20, 2010 2:18 pm

Re: DGSource() resize or z.lib?

Post by Guest 2 »

Rocky wrote:
Sun Mar 29, 2020 7:50 am
The scripts are very simple. Here is one doing resizing and cropping in DGSource()
Thanks Rocky! :hat:
Rocky wrote:
Sun Mar 29, 2020 7:50 am
there's no need to mess about with zlib
Poor z.lib. I remember how much time you spent somewhere else about speed comparison on VS vs AVS+. :)
DAE avatar
Guest 2
Posts: 903
Joined: Mon Sep 20, 2010 2:18 pm

Re: DGSource() resize or z.lib?

Post by Guest 2 »

Rocky wrote:
Sun Mar 29, 2020 7:50 am
dghdrtosdr(mode="pq",white=2930)
How is the white value chosen?
User avatar
Rocky
Posts: 3555
Joined: Fri Sep 06, 2019 12:57 pm

Re: [RESOLVED] DGSource() resize or z.lib?

Post by Rocky »

Try different values and pick the one you like. :ugeek:

The problem with trying to get an analytic solution is that PQ is based on a reference background level, and that is totally uncontrolled in the real world. That's one reason to prefer HLG.
User avatar
Bullwinkle
Posts: 338
Joined: Thu Sep 05, 2019 6:37 pm

Re: [RESOLVED] DGSource() resize or z.lib?

Post by Bullwinkle »

Ye olde brightness control. Who'd'a thunk?
Post Reply