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.

Domains: forum.doom9.org / forum.doom9.net / forum.doom9.se

 

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

Reply
 
Thread Tools Search this Thread Display Modes
Old 6th October 2012, 18:02   #21  |  Link
Reel.Deel
Registered User
 
Join Date: Mar 2012
Location: Texas
Posts: 1,676
Hi Chikuzen, since HBVFWSource is able to convert Vapoursynth's YUV42xP10/16 format into Dither's interleaved msb/lsb.
I was wondering if is possible to output the stacked msb/lsb also? It can be usefull for futher proccesing.

I tried converting the interleaved format to stacked msb/lsb manually, but I was unsuccessful. Also, I don't know if the results would be *correct*.

* Edit *

I don't know if this is also correct but did manage to output stacked msb/lsb using f3kdb. The thing is I don't want to deband .

Code:
HBVFWSource("16-bit test.vpy")

f3kdb(input_mode=2, input_depth=16, output_mode=1, output_depth=16)

Last edited by Reel.Deel; 6th October 2012 at 18:34. Reason: added information
Reel.Deel is offline   Reply With Quote
Old 6th October 2012, 18:36   #22  |  Link
Chikuzen
typo lover
 
Chikuzen's Avatar
 
Join Date: May 2009
Posts: 601
Quote:
Originally Posted by Reel.Deel View Post
I was wondering if is possible to output the stacked msb/lsb also?
it is possible for me to add stacked format output mode.
however, Since it will be slower than interleaved mode, I don't want to implement it not much.

Code:
HBVFWSource("16-bit test.vpy")
f3kdb(input_mode=2, input_depth=16, output_mode=1, output_depth=16)
f3kdb's manual says "If output_depth = 16, dither algorithm specified by dither_algo won't be applied."
thus, Your purpose is already achieved.
__________________
my repositories
Chikuzen is offline   Reply With Quote
Old 6th October 2012, 18:47   #23  |  Link
Reel.Deel
Registered User
 
Join Date: Mar 2012
Location: Texas
Posts: 1,676
Quote:
Originally Posted by Chikuzen View Post
f3kdb's manual says "If output_depth = 16, dither algorithm specified by dither_algo won't be applied."
thus, Your purpose is already achieved.
Yeah, I read that too, while no dithering is taking place isn't f3kdb still debanding? I'll read the documentation some more and see if I can come up with a conclusion.

If I find a way to turn interleaved into stacked manually I'll report back. Thanks anyways Chikuzen.
Reel.Deel is offline   Reply With Quote
Old 6th October 2012, 19:12   #24  |  Link
Keiyakusha
契約者
 
Keiyakusha's Avatar
 
Join Date: Jun 2008
Posts: 1,576
Reel.Deel
Set all thresholds/noise generation to 0 if you want to be super sure is does nothing. I did that myself some time ago.

Also this probably works:
turnleft().separatefields()
StackHorizontal(Selectodd(),Selecteven()).Turnright()

Last edited by Keiyakusha; 6th October 2012 at 19:16.
Keiyakusha is offline   Reply With Quote
Old 6th October 2012, 23:34   #25  |  Link
Reel.Deel
Registered User
 
Join Date: Mar 2012
Location: Texas
Posts: 1,676
Quote:
Originally Posted by Keiyakusha View Post
Set all thresholds/noise generation to 0 if you want to be super sure is does nothing.
Thanks for the suggestion.
Code:
f3kdb(range=0, y=0, Cb=0, Cr=0, GrainY=0, grainC=0, blur_first=false, input_mode=2, input_depth=16, output_mode=1, output_depth=16)
Quote:
Originally Posted by Keiyakusha View Post
Also this probably works:
turnleft().separatefields()
StackHorizontal(Selectodd(),Selecteven()).Turnright()
I tried the same thing earlier. Strangely it doesn't work, I guess we must be doing something wrong.
Reel.Deel is offline   Reply With Quote
Old 6th October 2012, 23:42   #26  |  Link
Keiyakusha
契約者
 
Keiyakusha's Avatar
 
Join Date: Jun 2008
Posts: 1,576
Quote:
Originally Posted by Reel.Deel View Post
I tried the same thing earlier. Strangely it doesn't work, I guess we must be doing something wrong.
Just checked. Works for me, both solutions give the same result.
edit: but f3kdb approach 2 times faster

Last edited by Keiyakusha; 6th October 2012 at 23:44.
Keiyakusha is offline   Reply With Quote
Old 6th October 2012, 23:49   #27  |  Link
Reel.Deel
Registered User
 
Join Date: Mar 2012
Location: Texas
Posts: 1,676
I just double checked. You're correct, sorry. It only worked when the colorspace YUV420P16 but fails with YUV422P16.Turning interleaved YUV422P16 to Stacked 4:2:2 msb/lsb must be another ballgame.

Last edited by Reel.Deel; 6th October 2012 at 23:52.
Reel.Deel is offline   Reply With Quote
Old 7th October 2012, 00:10   #28  |  Link
Keiyakusha
契約者
 
Keiyakusha's Avatar
 
Join Date: Jun 2008
Posts: 1,576
Quote:
Originally Posted by Reel.Deel View Post
I just double checked. You're correct, sorry. It only worked when the colorspace YUV420P16 but fails with YUV422P16.Turning interleaved YUV422P16 to Stacked 4:2:2 msb/lsb must be another ballgame.
I see, since you said this, I'm not sure if separatefields approach is correct in respect of chroma...

But I'll post another try anyway. Seems to be working:

SeparateColumns(2)
StackVertical(Selectodd(),Selecteven())

^avisynth 2.6 required

edit: it also ~30% faster than f3kdb

Last edited by Keiyakusha; 7th October 2012 at 00:29.
Keiyakusha is offline   Reply With Quote
Old 7th October 2012, 00:14   #29  |  Link
Reel.Deel
Registered User
 
Join Date: Mar 2012
Location: Texas
Posts: 1,676
It works, thanks for your help Keiyakusha. Lesson learned.
Reel.Deel is offline   Reply With Quote
Old 7th October 2012, 07:06   #30  |  Link
Chikuzen
typo lover
 
Chikuzen's Avatar
 
Join Date: May 2009
Posts: 601
stacked output was implemented.

as I said, that is slower than interleaved mode.
but that may be faster than separatecolumns.
__________________
my repositories
Chikuzen is offline   Reply With Quote
Old 8th October 2012, 10:28   #31  |  Link
Chikuzen
typo lover
 
Chikuzen's Avatar
 
Join Date: May 2009
Posts: 601
update to 0.2.1

a bit faster stacked output.
__________________
my repositories
Chikuzen is offline   Reply With Quote
Old 8th October 2012, 12:21   #32  |  Link
Reel.Deel
Registered User
 
Join Date: Mar 2012
Location: Texas
Posts: 1,676
Take a look at the bright side. HBVFWSource uses less resources than f3kdb and SeparateColumns.
Thanks again Chikuzen.

Vapoursynth script
Code:
import vapoursynth as vs
core = vs.Core(accept_lowercase=True)
core.std.LoadPlugin(path=r'C:\Vapoursynth\FFMS2\ffms2.dll')

# Source is 720p60 YUV420P8
src = core.ffms2.source(source=r"X:\MVI_1597.MOV")
src = core.resize.Spline(clip=src, format=vs.YUV420P16)
last = src
Results using HBVFWSource-0.2.1.

Code:
AVSMeter v1.40b3
[AVISynth version]
AviSynth 2.60, build:May 16 2012 [03:31:34]                                    
Active MT Mode: 0


HBVFWSource Interleaved					f3kdb Stacked
[Clip info]						[Clip info]
Number of frames:                  5736			Number of frames:                  5736
Length (hh:mm:ss.ms):      00:01:35.694			Length (hh:mm:ss.ms):      00:01:35.694
Frame width:                       2560			Frame width:                       1280
Frame height:                       720			Frame height:                      1440
Framerate:                       59.940 (60000/1001)	Framerate:                       59.940 (60000/1001)
Progressive:                        Yes			Progressive:                        Yes
Colorspace:                        YV12			Colorspace:                        YV12


[AVSMeter runtime info]					[AVSMeter runtime info]
Frames processed:              5736			Frames processed:              5736
FPS (min | max | avg):         94.3 | 149.0 | 129.5	FPS (min | max | avg):         55.0 | 78.4 | 74.8
CPU usage (average):           87%			CPU usage (average):           69%
Physical Memory usage (peak):  389 MB			Physical Memory usage (peak):  633 MB
Virtual Memory usage (peak):   393 MB			Virtual Memory usage (peak):   637 MB
Time (elapsed):                00:00:44.305		Time (elapsed):                00:01:16.722


[Script]						[Script]

HBVFWSource("test.vpy", stacked=false)			HBVFWSource("test.vpy", stacked=false)

							f3kdb(range=0,y=0,Cb=0,Cr=0,GrainY=0,grainC=0,blur_first=false,input_mode=2,input_depth=16,output_mode=1,output_depth=16)

_________________________________________________________________________________________________________________________________________________________________________________


HBVFWSource Stacked					Separate Columns Stacked
[Clip info]						[Clip info]
Number of frames:                  5736			Number of frames:                  5736
Length (hh:mm:ss.ms):      00:01:35.694			Length (hh:mm:ss.ms):      00:01:35.694
Frame width:                       1280			Frame width:                       1280
Frame height:                      1440			Frame height:                      1440
Framerate:                       59.940 (60000/1001)	Framerate:                       59.940 (60000/1001)
Progressive:                        Yes			Progressive:                        yes
Colorspace:                        YV12			Colorspace:                        YV12


[AVSMeter runtime info]					[AVSMeter runtime info]
Frames processed:              5736			Frames processed:              5736
FPS (min | max | avg):         85.8 | 131.7 | 124.2	FPS (min | max | avg):         35.2 | 91.5 | 88.7
CPU usage (average):           86%			CPU usage (average):           64%
Physical Memory usage (peak):  385 MB			Physical Memory usage (peak):  613 MB
Virtual Memory usage (peak):   387 MB			Virtual Memory usage (peak):   614 MB
Time (elapsed):                00:00:46.194		Time (elapsed):                00:01:04.703


[Script]						[Script]

HBVFWSource("test.vpy", stacked=true)			HBVFWSource("test.vpy", stacked=false)

							SeparateColumns(2)
							StackVertical(Selectodd(),Selecteven())

Last edited by Reel.Deel; 9th October 2012 at 05:37. Reason: Updated to a more relevant comparison and added SeparateColumns.
Reel.Deel is offline   Reply With Quote
Old 8th October 2012, 16:20   #33  |  Link
Chikuzen
typo lover
 
Chikuzen's Avatar
 
Join Date: May 2009
Posts: 601
@Reel.Deel
HBVFWSource is not able to use on avisynth2.5x. (because I need YV16 for P210/P216)
thus, you should use SeparateColumns script on your comparison.
The cost of TurnLeft/Right is quite high.
__________________
my repositories

Last edited by Chikuzen; 8th October 2012 at 16:23.
Chikuzen is offline   Reply With Quote
Old 9th October 2012, 05:40   #34  |  Link
Reel.Deel
Registered User
 
Join Date: Mar 2012
Location: Texas
Posts: 1,676
@Chikuzen
Updated to SeparateColumns.
Reel.Deel is offline   Reply With Quote
Old 12th October 2012, 03:33   #35  |  Link
Chikuzen
typo lover
 
Chikuzen's Avatar
 
Join Date: May 2009
Posts: 601
sorry, I found a very stupid bug.

updated to 0.2.2
__________________
my repositories
Chikuzen is offline   Reply With Quote
Old 16th October 2012, 19:37   #36  |  Link
Pat357
Registered User
 
Join Date: Jun 2006
Posts: 452
I removed my post.
It was a false alarm : I made a mistake and I reported it as a bug.
My apologies for this.

Last edited by Pat357; 16th October 2012 at 19:57. Reason: SOLVED !!
Pat357 is offline   Reply With Quote
Old 28th April 2017, 21:42   #37  |  Link
Pat357
Registered User
 
Join Date: Jun 2006
Posts: 452
It seems that this plugin is broken.
My scripts that used to work (https://forum.doom9.org/showthread.p...76#post1594176), now give an error :
Code:
[avisynth @ 025a6e00] Cache: Filter returned invalid response to CACHE_GETCHILD_CACHE_MODE. 87825032
(K:\film\Vapoursynth\hbVFWSource_test.avs, line 6)
K:\film\Vapoursynth\hbVFWSource_test.avs: Unknown error occurred
I also tried the the posted scripts from reel.deel (see https://forum.doom9.org/showthread.p...78#post1594778), and got the same error.
If I just replace HBVFWSource by VSImport (VapourSource plugin) and replace last in the .vpy script by last.set_output(), everything works !

Any help on this issue would be more than welcome !!

Last edited by Pat357; 28th April 2017 at 21:44.
Pat357 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 15:15.


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