Page 1 of 1

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

Posted: Sat Mar 28, 2020 3:36 pm
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

Re: DGSource() resize or z.lib?

Posted: Sat Mar 28, 2020 3:44 pm
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?

Re: DGSource() resize or z.lib?

Posted: Sat Mar 28, 2020 6:13 pm
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?

Re: DGSource() resize or z.lib?

Posted: Sun Mar 29, 2020 7:50 am
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.

Re: DGSource() resize or z.lib?

Posted: Sun Mar 29, 2020 8:30 am
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+. :)

Re: DGSource() resize or z.lib?

Posted: Sun Mar 29, 2020 11:19 am
by Guest 2
Rocky wrote:
Sun Mar 29, 2020 7:50 am
dghdrtosdr(mode="pq",white=2930)
How is the white value chosen?

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

Posted: Sun Mar 29, 2020 11:52 am
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.

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

Posted: Sun Mar 29, 2020 3:07 pm
by Bullwinkle
Ye olde brightness control. Who'd'a thunk?