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 Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 20th April 2014, 10:22   #1  |  Link
magikarp99
Registered User
 
Join Date: Feb 2014
Posts: 16
10-bit YUV Level Adjustments

I have a 10-bit YUV video that I want to perform luma and chroma level adjustments on, and then down-sample to 8-bit video.

Can anyone advise on a good way to do this? I primarily use Linux if that makes any difference, I see mention of avs2yuv when Googling.

Last edited by Guest; 20th April 2014 at 13:22. Reason: rule 12
magikarp99 is offline   Reply With Quote
Old 20th April 2014, 17:07   #2  |  Link
Reel.Deel
Registered User
 
Join Date: Mar 2012
Location: Texas
Posts: 1,664
I don't have any experience with AviSynth under Linux but this thread seems to have the appropriate information: http://ubuntuforums.org/showthread.php?t=1333264

To do high bit depth color correction SmoothAdjust is the tool to use and to convert to 8-bit you can either use Dither or f3kdb_dither (part of flash3kyuu_deband).
Reel.Deel is offline   Reply With Quote
Old 20th April 2014, 20:53   #3  |  Link
magikarp99
Registered User
 
Join Date: Feb 2014
Posts: 16
Thanks for the input. That filter is just what I was looking for.

There is one more question. The YUV video format is v210 y422p10le. How can I read this into Avisynth, ensuring that it is processed in 10-bit?

Last edited by magikarp99; 22nd April 2014 at 21:37.
magikarp99 is offline   Reply With Quote
Old 20th April 2014, 21:02   #4  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,901
http://avisynth.nl/index.php/High_bi..._with_Avisynth
Guest is offline   Reply With Quote
Old 22nd April 2014, 21:46   #5  |  Link
magikarp99
Registered User
 
Join Date: Feb 2014
Posts: 16
Thank you. This leads to some confusion though.

It opens saying:
Quote:
Currently, Avisynth only supports 8-bit video.
But then it says:
Quote:
Uses Avisynth 2.6's new colorspace. You can process with the full quality of the format.
If I understand this correctly, does this mean that I must use Avisynth 2.6 in order to process video in 10-bit?

That wiki page is a mess of information.
magikarp99 is offline   Reply With Quote
Old 23rd April 2014, 01:09   #6  |  Link
Asmodian
Registered User
 
Join Date: Feb 2002
Location: San Jose, California
Posts: 4,406
Avisynth only supports 8-bit.

The patched ffms2/ffms2-ffmbc can use a fake 16-bit (it is a stacked format, double height with LSB in the bottom half). The Avisynth 2.6 color spaces are not needed for the bit depth but the 4:2:2 and 4:4:4 color spaces.

The >8 bit workflow is fairly mature now, at least all the pieces I have needed are present and work, and it is relatively well documented but it is all still convoluted compared to 8 bit.

Note: you will need to pipe (I use AVS2pipemod) to x264 to pass it >8 bit data.

Last edited by Asmodian; 23rd April 2014 at 01:12.
Asmodian is offline   Reply With Quote
Old 23rd April 2014, 01:33   #7  |  Link
Reel.Deel
Registered User
 
Join Date: Mar 2012
Location: Texas
Posts: 1,664
Quote:
Originally Posted by magikarp99 View Post
If I understand this correctly, does this mean that I must use Avisynth 2.6 in order to process video in 10-bit?

That wiki page is a mess of information.
Yes that page is indeed a mess (a bit outdated too). You do not need AviSynth 2.6 to process 16-bit data, but since >8-bit filters only allow planar formats.
This means in AviSynth 2.5 you're limited to only processing high bit depth data in YV12 while in 2.6 you can process >8-bit in Y8, YV12, YV16, and YV24. Thus 2.6 is highly recommended.

Regarding importing >8-bit video, I recommend L-SMASH-Works.

You can download r715 here: https://drive.google.com/folderview?...UU&usp=sharing

And here's the README that comes with the plugin:https://raw.githubusercontent.com/VF...viSynth/README
Reel.Deel is offline   Reply With Quote
Old 23rd April 2014, 09:24   #8  |  Link
magikarp99
Registered User
 
Join Date: Feb 2014
Posts: 16
How can I make sure the video I am processing is being processed in 10-bit?

If I do open the video with ffms2, then it appears to be YUY2. SmoothAdjust will not accept YUY2, and I assume conversion using ConvertToYV12() will not result in a high bit-depth.
magikarp99 is offline   Reply With Quote
Old 24th April 2014, 00:48   #9  |  Link
Asmodian
Registered User
 
Join Date: Feb 2002
Location: San Jose, California
Posts: 4,406
If it is YUY2 it is also 8-bit. It should be YV16.

If you open the avs in VirtualDub you can see the LSB in the bottom half, it doesn't look like an image but if it is uniform the source came in as 8-bit.

I would also give L-SMASH-Works a try.

Last edited by Asmodian; 24th April 2014 at 00:51.
Asmodian is offline   Reply With Quote
Old 24th April 2014, 19:21   #10  |  Link
magikarp99
Registered User
 
Join Date: Feb 2014
Posts: 16
LSmash looks really good but I am having problems. Whenever I try to load a video it just echoes the following.

Quote:
LSMASHVideoSource: the number of tracks equals 0.
Edit: Disregard this.
I needed to use "LWLibavVideoSource()" instead.
For future reference to get 10-bit video working with FFVideoSource you need to pass the argument enable10bithack=true

Last edited by magikarp99; 24th April 2014 at 19:44.
magikarp99 is offline   Reply With Quote
Old 24th April 2014, 19:46   #11  |  Link
magikarp99
Registered User
 
Join Date: Feb 2014
Posts: 16
The next question is this. How do I get SmoothAdjust to process my stacked video as 10-bit rather than two stacked 8-bit frames?
magikarp99 is offline   Reply With Quote
Old 24th April 2014, 19:54   #12  |  Link
sneaker_ger
Registered User
 
Join Date: Dec 2002
Posts: 5,565
SmoothLevels16(...), SmoothTweak16(...), SmoothCurve16(...), SmoothCustom16(...), SmoothTools16(...) for 16 bits

Also, see included readme chapter XIV.
sneaker_ger is offline   Reply With Quote
Old 26th April 2014, 01:31   #13  |  Link
mp3dom
Registered User
 
Join Date: Jul 2003
Location: Italy
Posts: 1,135
Your video will always be opened as 16bit (8bit + 8bit in stacked form), so if you open a 10bit video you will have 8bit for MSB and 2bit (+6 empty bits) for LSB. If you adjust something (deband, resize, adjust levels, curves and so on) the final video will be at full 16bit precision (clearly visible because your LSB will start to "grow").
mp3dom is offline   Reply With Quote
Old 27th April 2014, 12:46   #14  |  Link
magikarp99
Registered User
 
Join Date: Feb 2014
Posts: 16
Thanks for all the help. Got it all working
magikarp99 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 07:14.


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