Quantcast MovieStacker: Suggestions & Requests - (Mstacker 2.1.0) - Page 2 - digitalFAQ.com Forums [Archives]
  #21  
04-17-2004, 07:05 PM
kwag kwag is offline
Free Member
 
Join Date: Apr 2002
Location: Puerto Rico, USA
Posts: 13,537
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by incredible
Maybe not Speed penalty but Luma range penalty ...
If a source already comes in TV Luma Range and the encoder will be forced to do a luma range compression again Double luma compression
Why would it do a luma compression again
Looking at the code of Limiter() (or even LegalClip() ), the actual code "clips" the pixels outside the TV range. If there are no pixels to clip, then nothing is done
I think there's something misunderstood here

-kwag
Reply With Quote
Someday, 12:01 PM
admin's Avatar
Site Staff / Ad Manager
 
Join Date: Dec 2002
Posts: 42
Thanks: ∞
Thanked 42 Times in 42 Posts
  #22  
04-17-2004, 08:38 PM
Dialhot Dialhot is offline
Free Member
 
Join Date: May 2003
Posts: 10,463
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by kwag
That's exactly what I'm thinking.
And really there's no speed penalty with or without the line in the script, so we might as well leave it in, as a "security" factor
If the encoder does not implement a clipping itself, using it in the script does not have any effect !!! That's a thing you never understood

What's the purpose to give source to the encoder in the range [16,235] if this one output the results of its computing in [0,255]

Limiter or legalclip DON'T HAVE ANY MEANS !
Reply With Quote
  #23  
04-17-2004, 09:14 PM
kwag kwag is offline
Free Member
 
Join Date: Apr 2002
Location: Puerto Rico, USA
Posts: 13,537
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by Dialhot
If the encoder does not implement a clipping itself, using it in the script does not have any effect !!! That's a thing you never understood
WHAT
Read what you said: If the encoder does not implement a clipping itself, using it in the script does not have any effect !!!
Of course it does
If you feed the encoder with a range of 0-255, using Limiter() will CLIP the range
Read:
Code:
LegalClip
An Avisynth filter for clipping levels to within CCIR-601 range

By Ross Thomas <ross@grinfinity.com>

There is no copyright on this code, and there are no conditions on its distribution or use. Do with it what you will.
Description

The standard known as CCIR-601 defines the range of pixel values considered legal for presenting on a TV. These ranges are 16-235 for the luma component and 16-240 for the chroma component.

Pixels outside this range are known to cause problems with some TV sets, and thus it is best to remove them before encoding if that is your intended display device. This filter clips (or "clamps") pixels under 16 to 16 and over 235 (or 240) to 235 (or 240). It's very complicated ;).
So if you feed a source which is already CCIR-601, and you have LegalClip() in your script, nothing happens because there's nothing to clip
Quote:

What's the purpose to give source to the encoder in the range [16,235] if this one output the results of its computing in [0,255]
I think you have it backwards
We're talking about "Clipping the INPUT"

Or, am I missing something here

-kwag
Reply With Quote
  #24  
04-17-2004, 09:19 PM
rds_correia rds_correia is offline
Free Member
 
Join Date: Apr 2003
Location: Chinese Democracy starts now!
Posts: 2,563
Thanks: 1
Thanked 0 Times in 0 Posts
Hya,
This is getting a bit off topic but nevertheless very interesting to watch closely.
This is why I love this forum: good arguments by great gurus like Phil, kwag and Inc.
Hope to hear more from you guys on this subject.
Cheers
__________________
Rui
Reply With Quote
  #25  
04-17-2004, 09:35 PM
Dialhot Dialhot is offline
Free Member
 
Join Date: May 2003
Posts: 10,463
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by kwag
Or, am I missing something here
Yeah ! You miss the real purpose of this clipping : to have a video that stay in the acceptable ouput for a TV set.

Right or not ?

If I'm right (and I think I am), what you give to the encoder doesn't have any importance ! The only important thing is what the encoder outputs !

And here, these encoders that don't implement the clipping will output in (0,255) whatever the range of the values they receive in entrance.

Do you expect that, because you use Limiter() in the source, the output will be in [16,235]
Reply With Quote
  #26  
04-17-2004, 09:50 PM
kwag kwag is offline
Free Member
 
Join Date: Apr 2002
Location: Puerto Rico, USA
Posts: 13,537
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by Dialhot
Yeah ! You miss the real purpose of this clipping : to have a video that stay in the acceptable ouput for a TV set.

Right or not ?
Not exactly. Read on!
Quote:

If I'm right (and I think I am), what you give to the encoder doesn't have any importance ! The only important thing is WHAT THE ENCODER OUTPUTS !
WRONG
If we feed the encoder with a range of 0-255 instead of CCIR-601, what do you think that will happen to the Q factor
Similar (but not the same ) as feeding more pixels as input, the encoder must work harder.
Without LegalClip() or Limiter(), the luma/chroma levels are "wider" (if the source is not CCIR-601), thus making the encoder work harder on extra range, which will have an effect on output quality.
I hope that now it makes sense
Quote:
! So the conclusion is... ?
... that the luma/chroma range on INPUT, has an indirect proportional impact on OUTPUT quality per pixel, because of out-of-bounds DATA that the encoder must analyze

-kwag
Reply With Quote
  #27  
04-17-2004, 10:07 PM
Dialhot Dialhot is offline
Free Member
 
Join Date: May 2003
Posts: 10,463
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by kwag
that the luma/chroma range on INPUT, has an indirect proportional impact on OUTPUT quality per pixel, because of out-of-bounds DATA that the encoder must analyze
Okay, seen like this, that makes sense to use it. Even if that's completly modify the first purpose of the filter
Let say it's just a filter like an other one whom purpose is to have a better compressibility.
Reply With Quote
  #28  
04-17-2004, 10:50 PM
jorel jorel is offline
Invalid Email / Banned / Spammer
 
Join Date: Aug 2002
Location: Brasil - MG - third stone from the sun
Posts: 5,570
Thanks: 0
Thanked 0 Times in 0 Posts
feature from avisynth 253 and new versions:

sh0dan's post:
* The default luma range in Limiter is corrected to 16-235 (it was 16-236).
http://www.kvcd.net/forum/viewtopic.php?t=7416

"Changes to 2.53 Released" :
- Added "pc_range=true/false" parameter to overlay.
This will make all RGB<->YUV conversions inside Overlay assume
[0->255] YUV range, and not CCIR 601 [16->235] range.
Default is false.
http://cultact-server.novi.dk/kpo/avisynth/avs_cvs.html

then?..... what we do and how?!?!
Reply With Quote
  #29  
04-17-2004, 11:52 PM
kwag kwag is offline
Free Member
 
Join Date: Apr 2002
Location: Puerto Rico, USA
Posts: 13,537
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by jorel

then?..... what we do and how?!?!
Keep at least ONE instance of Limiter(), at the beginning of the filter chain.
This will ensure that the input video is always clipped to CCIR-601.
I think the last "Limiter()" at the end of the chain can be removed, because I just don't see how any filter can produce out of bounds (range) video.
Unless there's an AviSynth filter that actually does produce data on the full range, then as a double safety measurement, the last "Limiter()" would also guarantee that any filter in the chain that does produce data out of the range, will also be clipped.

Think of it like this:
1) The first "Limiter()" will clip the input video to CCIR-601, thus feeding the filter chain with the TV range.
2) The last "Limiter()", will ensure that ANY filter that produces data out of CCIR-601 range will be clipped, before actually entering the encoder.


So yes, I will use both instances, just in case

-kwag
Reply With Quote
  #30  
04-18-2004, 05:56 AM
jorel jorel is offline
Invalid Email / Banned / Spammer
 
Join Date: Aug 2002
Location: Brasil - MG - third stone from the sun
Posts: 5,570
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by kwag
Quote:
Originally Posted by jorel

then?..... what we do and how?!?!
Keep at least ONE instance of Limiter(), at the beginning of the filter chain.
This will ensure that the input video is always clipped to CCIR-601.
I think the last "Limiter()" at the end of the chain can be removed, because I just don't see how any filter can produce out of bounds (range) video.
Unless there's an AviSynth filter that actually does produce data on the full range, then as a double safety measurement, the last "Limiter()" would also guarantee that any filter in the chain that does produce data out of the range, will also be clipped.

Think of it like this:
1) The first "Limiter()" will clip the input video to CCIR-601, thus feeding the filter chain with the TV range.
2) The last "Limiter()", will ensure that ANY filter that produces data out of CCIR-601 range will be clipped, before actually entering the encoder.


So yes, I will use both instances, just in case

-kwag
very clear why and where use limiter but, if choose:
"pc_range=true/false" parameter to overlay,
we still need to use limiter (the first, the last....both? )





Reply With Quote
  #31  
04-18-2004, 06:04 PM
Prodater64 Prodater64 is offline
Free Member
 
Join Date: Mar 2003
Location: Palma de Mallorca - España
Posts: 2,925
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by muaddib
- Dialhot's script filters -> unfortunately there are some missing filters (like deen, blindpp and atc). I do plan to add support to these filters and add a preset to Dialhot's script. I just didn't had enough time to do it now.
It is not only a missing filters ploblem (excuseme I don't know if you think about following, it is only a suggestion and help)

You must to have present that blidnpp needs both dimensions divisible by 16. When not, addborders (0,0,x,y) must to be just after avisource line to correct dimensions. I think, and Dialhot can confirm or not this, that it won't be enough to leave Moviestacker to put crop rows as actually, and after this to put blindpp row, because blindpp (like first blockbuster and convolution3d) must to be before gripcrop and gripsize rows. In other words, you must to change your filters order for give support to dialhot V4 optimal script.

eg.

V4 Dialhot Script order
Code:
AviSource("PATH\NAME.avi",false) 
#addborders(0,0,x,y)
BlindPP(cpu=4) 
Blockbuster(method="noise",detail_min=1,detail_max=3,variance=0.1,seed=1) 
Convolution3D(1, 6, 12, 6, 8, 2.8, 0) 
GripCrop(WIDTH, HEIGHT, overscan=1, source_anamorphic=false) 
GripSize(resizer="LanczosResize") 
Undot() 
TemporalSoften(2,7,7,3,2) 
DCTFilter(1,1,1,1,1,1,0.5,0) 
#Blockbuster(method="noise",detail_min=1,detail_max=10,variance=0.3,seed=5623) 
GripBorders()
Your order
Code:
AviSource("C:\your.avi", false)
# missed addborders row
# missed blindpp row
# missed first blockbuster row
# missed convolution3d row
Undot() #wrong order
GripCrop(480, 576, overscan=2, source_anamorphic=false)
GripSize(resizer="BicubicResize")
# Undot correct position
TemporalSoften(4, 4, 8, 15, 2)
Convolution3D(preset="movieHQ") # wrong order
BlockBuster(method="noise") # second optional blockbuster row, wrong order
DctFilter(1, 1, 1, 1, 1, 1, 0.5, 0) #wrong order
GripBorders()
@Dialhot:
Just in case of Gripfit replacement with Bicubic or Lanczos resize, where its addborders row (don't missunderstand, not the divisible by 16 addborders row previously mentioned) must to be placed?
Do we must to put it in Gripborders row place?
Reply With Quote
  #32  
04-18-2004, 07:48 PM
Dialhot Dialhot is offline
Free Member
 
Join Date: May 2003
Posts: 10,463
Thanks: 0
Thanked 0 Times in 0 Posts
The addborders is always the last line in a script (eventually followed by the subtitle lien if you want them into the borders and not into the picture).
Reply With Quote
  #33  
04-18-2004, 11:17 PM
muaddib muaddib is offline
Free Member
 
Join Date: Jun 2002
Location: São Paulo - Brasil
Posts: 879
Thanks: 0
Thanked 0 Times in 0 Posts
@ Prodater64

I'm aware that BlindPP needs a screen frame multiple of 16x16, and the additional addborders to "fix" the possible incorrect size is an easy one.
About the filters order, we could talk here for months discussing what filter should become first (or last) and not get in an agreement. So I plan to implement a selectable order to the filters. That should do it.
Reply With Quote
  #34  
04-19-2004, 03:57 PM
rds_correia rds_correia is offline
Free Member
 
Join Date: Apr 2003
Location: Chinese Democracy starts now!
Posts: 2,563
Thanks: 1
Thanked 0 Times in 0 Posts
Hi Muaddib,
That I was going to ask you soon if it was possible.
Also if there could be a flag for putting the same filter twice in the scrip.
Of course that would be for a limited amout of filters like limiter, blockbuster and a few others.
Cheers
__________________
Rui
Reply With Quote
  #35  
04-19-2004, 07:19 PM
Prodater64 Prodater64 is offline
Free Member
 
Join Date: Mar 2003
Location: Palma de Mallorca - España
Posts: 2,925
Thanks: 0
Thanked 0 Times in 0 Posts
As we all know, we can write in moviestacker avisynth script window, and we can scripting with another filter than moviestacker supports. If we put this filters not supported, in moviestacker avisynth scripts folder, does it (moviestacker) previews and/or compares correctly?
Reply With Quote
  #36  
04-19-2004, 08:53 PM
jorel jorel is offline
Invalid Email / Banned / Spammer
 
Join Date: Aug 2002
Location: Brasil - MG - third stone from the sun
Posts: 5,570
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by Prodater64
As we all know, we can write in moviestacker avisynth script window, and we can scripting with another filter than moviestacker supports. If we put this filters not supported, in moviestacker avisynth scripts folder, does it (moviestacker) previews and/or compares correctly?
yes if you put the correct address to load the filter in the script...like this:

LoadPlugin("X:\foldername\namefilter.dll")
Reply With Quote
  #37  
04-21-2004, 08:30 AM
m0rdant m0rdant is offline
Free Member
 
Join Date: May 2002
Posts: 137
Thanks: 0
Thanked 0 Times in 0 Posts
Just wondering if when I choose interlaced resizing is the script adjusted so that the filters are applied correctly for interlaced material? Planning to some VHS captures and conversions soon that I would like to keep interlaced.
Reply With Quote
  #38  
04-22-2004, 12:41 AM
muaddib muaddib is offline
Free Member
 
Join Date: Jun 2002
Location: São Paulo - Brasil
Posts: 879
Thanks: 0
Thanked 0 Times in 0 Posts
Unfortunately not yet. The interlaced resizing (as it is now) is applied only to the resizing. All filters will be applied as progressive.
If you want all filtering to be applied separated in the interlaced fields, you'll have to do it manually. But you could try it the way it is and see if you like the quality.
Reply With Quote
  #39  
04-22-2004, 05:35 AM
incredible incredible is offline
Free Member
 
Join Date: May 2003
Location: Germany
Posts: 3,189
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to incredible
@ Manipulators of Moviestackers AVS Script output:

On interlaced sources keep in mind that when only spatial filters are applied perform simple right behind the source import line:

separatefields()
AnyResizer(Here Settings output by Moviestacker "interlaced" mode!! used)
YourOnlySpatialFiltersHere()
Weave()

In case of temporal filtering:

separatefields()
AnyResizer(Here Settings output by Moviestacker "interlaced" mode!! used)
even=selecteven(). YourTemporal or Spatial FiltersHere()
odd=selectodd().YourTemporal or Spatial FiltersHere()
interleave(even,odd)
weave()

Means on a Simple interlaced captured PAL 768x576 (quadra pixels) resized to 704x576 (square pixels!) source we would use TemporalSoften like this:

Mpeg2source("Path:\ToMyMpegSource.d2v)
separatefields()
Bicubicresize(704,28 # half height cause of separated fields!!!
even=selecteven().TemporalSoften(2,5,8,5,2)
odd=selectodd().TemporalSoften(2,5,8,5,2)
interleave(even,odd)
weave()

As Temporal Filters do compare pixels in a radius count of Frames/fields and NOT in a radius on neighbour pixels on the SAME Frame/field .... a Temporal interlaced filtering the upper fields and lower fields have to be treaten temporal in their group (upper field group and lower field group).



NEVER do a filtering on interlaced sources without separated fields! As this would "touch/modifiy" the interlaced architecture which would be recognised on Tv! ... There do exist some smart temporal or spatial filters which do treat interlaced sources in the correct way ... but I don't trust in this


@ muaddib

My suggestion according to ready made scripts for implemenattion in Movietsacker would be:

- several templates could be offered within Movistackers folder
for MA, for interlaced MA, for OptimalScript, for interlaced Optimal script, for 29iTo24p conversion by Sharfis_Brain ... etc.
In these Templates there has to be only the width and heigth incl Resizer Model via %Varaibles% defined which will be set in Moviestackers engine automatically when a special Script Template is choosen.

Advantage: IF there will be an update of Optimal script or (even) MA ... you just have to update the template and not the program code.
Also knowledged users could do write their own spcific templates which will b often used (like in case of captures) by respecting the %Variables% when authoring a template.

totally automatism more time for Girls, girls, girls
Reply With Quote
  #40  
04-23-2004, 08:51 PM
muaddib muaddib is offline
Free Member
 
Join Date: Jun 2002
Location: São Paulo - Brasil
Posts: 879
Thanks: 0
Thanked 0 Times in 0 Posts
Hi incredible!

Thanks for pointing me the correct way to do it.
I'll keep that in mind while/when implementing it in MovieStacker.

About your suggestion… that’s a great idea!
And I will carefully study the possibility.
Reply With Quote
Reply




Similar Threads
Thread Thread Starter Forum Replies Last Post
PC Freezing up - any suggestions? Icarus3000 Computers 31 10-17-2005 09:32 PM
PackShot suggestions kwag Video Encoding and Conversion 106 07-28-2004 04:47 PM
MovieStacker: Mstacker 2.1.0 released gio_vanni Video Encoding and Conversion 3 04-23-2004 12:28 PM
MovieStacker Bug Reports - (MStacker 2.1.0) muaddib Video Encoding and Conversion 18 04-19-2004 06:48 PM
MovieStacker: Feature Requests (old) muaddib Video Encoding and Conversion 103 10-15-2003 07:29 PM

Thread Tools



 
All times are GMT -5. The time now is 06:51 PM  —  vBulletin © Jelsoft Enterprises Ltd