Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Development

Reply
 
Thread Tools Search this Thread Display Modes
Old 15th September 2018, 12:18   #4261  |  Link
Richard1485
Registered User
 
Join Date: Feb 2010
Posts: 221
When converting from 10bit to 8bit with the following script...

Code:
LWLibavVideoSource("bla.mkv", stacked=true, format="YUV420P10")
ConvertFromStacked(bits=10)
ConvertBits(bits=8, dither=0)
... the luma range goes from looking like this...



to looking like this...



Have I overlooked something? When previewing in VirtualDub2, the video doesn't look obviously wrong, but I've never seen a histogram look like that unless there's a problem of some kind.

Last edited by Richard1485; 15th September 2018 at 12:25.
Richard1485 is offline   Reply With Quote
Old 15th September 2018, 12:20   #4262  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 5,619
what happens when us use: dither = -1 ?
Quote:
int dither = -1
If -1 (default), do not add dither;
If 0, add ordered dither;
If 1, add error diffusion (Floyd-Steinberg) dither doom9
Cu Selur
__________________
Hybrid here in the forum, homepage
Selur is offline   Reply With Quote
Old 15th September 2018, 12:27   #4263  |  Link
Richard1485
Registered User
 
Join Date: Feb 2010
Posts: 221
Yeah, I tried that. The resulting histogram still looks like the second one that I posted above.
Richard1485 is offline   Reply With Quote
Old 15th September 2018, 13:50   #4264  |  Link
davidhorman
I'm the Doctor
 
Join Date: Jan 2004
Posts: 1,487
At what point in the script did you call histogram to get the first image?

It looks to me like histogram has got its levels mixed up. The graph is ostensibly the same, but there are parts where it looks like the values being plotted have overflowed - the same pattern of pixels is seen as in the "correct" image but in dark grey instead of light grey.

In fact that is exactly how it looks - if you darken the image to 0-128, then add 128 to the "blacked-out" areas, it seems to take on the correct range when comparing it to the "correct" image.

So it's like a 9-bit graph output truncated to 8-bits.
__________________
My AviSynth filters / I'm the Doctor

Last edited by davidhorman; 15th September 2018 at 13:55.
davidhorman is offline   Reply With Quote
Old 15th September 2018, 14:05   #4265  |  Link
Richard1485
Registered User
 
Join Date: Feb 2010
Posts: 221
I called Histogram() when returning the video. But the first one looks fine to me. It's the second one that looks messed up.
Richard1485 is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 04:54.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2018, vBulletin Solutions Inc.