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
Register FAQ Calendar Today's Posts Search

Reply
 
Thread Tools Search this Thread Display Modes
Old 14th June 2011, 02:06   #201  |  Link
Mini-Me
Registered User
 
Join Date: Jan 2011
Posts: 121
Quote:
Originally Posted by IanB View Post
The intent is yes, I have tested the new code, but I also wrote it, so may have a blinkered view. Report any bugs here.
According to my tests, YV12/YUY2 conversion is still broken in Alpha3 (I also doublechecked with Version() that I was using the newest alpha). A good way of testing is getting Gavino's routines from the relevant thread and running the following test script:

Code:
function ConvertCore(clip c, int times)
{
    times == 0 ? c : c.ConvertToYUY2(interlaced = True).ConvertToYV12(interlaced = True).ConvertCore(times - 1)
}

function ConvertGavino(clip c, int times)
{
    times == 0 ? c : c.YV12ToYUY2_26(interlaced = True).YUY2ToYV12_26(interlaced = True).ConvertGavino(times - 1)
}

bars = ColorBars(pixel_type = "YV12")
core = bars.Animate(0, 500, "ConvertCore", 0, 500)
gavino = bars.Animate(0, 500, "ConvertGavino", 0, 500)
return StackHorizontal(core, gavino)
The difference is still very apparent after just a few iterations, and it keeps getting worse as you iterate.

Note that I transcribed the script by sight from another computer, so there might be typos.
Mini-Me is offline   Reply With Quote
Old 14th June 2011, 12:45   #202  |  Link
IanB
Avisynth Developer
 
Join Date: Jan 2003
Location: Melbourne, Australia
Posts: 3,167
Comparing Apples with Apples seems to work fine.
Code:
function ConvertCore(clip c, int times)
{
    times == 0 ? c : c.ConvertToYUY2(interlaced=True, chromaresample="Bilinear").ConvertToYV12(interlaced=True, chromaresample="Bilinear").ConvertCore(times - 1)
}
IanB is offline   Reply With Quote
Old 14th June 2011, 12:58   #203  |  Link
IanB
Avisynth Developer
 
Join Date: Jan 2003
Location: Melbourne, Australia
Posts: 3,167
The routines isse_yv12_i_to_yuy2, mmx_yv12_i_to_yuy2, isse_yuy2_i_to_yv12 and mmx_yuy2_i_to_yv12 are unchanged from 2.5.8 (and older)
IanB is offline   Reply With Quote
Old 15th June 2011, 10:14   #204  |  Link
Mini-Me
Registered User
 
Join Date: Jan 2011
Posts: 121
Quote:
Originally Posted by IanB View Post
Comparing Apples with Apples seems to work fine.
Code:
function ConvertCore(clip c, int times)
{
    times == 0 ? c : c.ConvertToYUY2(interlaced=True, chromaresample="Bilinear").ConvertToYV12(interlaced=True, chromaresample="Bilinear").ConvertCore(times - 1)
}
Sometimes I just like oranges better. (I'm such an amateur. )

Thanks for pointing out that parameter. I just checked with Subtract and Levels, and no matter how many round trips I take, your new code works exactly the same as Gavino's with chromaresample = "Bilinear." Good work!
Mini-Me is offline   Reply With Quote
Old 15th June 2011, 18:38   #205  |  Link
Ziddy76
Registered User
 
Join Date: Feb 2011
Posts: 14
Need help with AviSynth 2.6. The performance with Yatta is just too slow for me.

I downloaded Alpha 3 and Yatta now crawls. Now I know 2.6 and Yatta work as it seems I'm alone with this issue, everyone else I've talked to say no problems. I don't think it's a hardware issue as others with lesser hardware are having no issues.

So I'm asking AviSynth developers, any idea what could be going on? As soon as I replace the AviSynth.dll with the 2.5.8 version in SysWow64, the performance of Yatta skyrockets. Replace with 2.6, it's a slideshow.

Thanks.

The Rig I'm using:
Windows 7 Ultimate 64, all updates installed.
Intel i7 720QM (HT, 1.9-3Ghz)
HD5870M (815/1125, running WHQL 11.6 Drivers)
8GB 1333 DDR3
Latest Intel Chipset drivers instaled

Last edited by Ziddy76; 15th June 2011 at 18:42.
Ziddy76 is offline   Reply With Quote
Old 15th June 2011, 22:31   #206  |  Link
IanB
Avisynth Developer
 
Join Date: Jan 2003
Location: Melbourne, Australia
Posts: 3,167
@Ziddy76,
IanB is offline   Reply With Quote
Old 15th June 2011, 23:12   #207  |  Link
Ziddy76
Registered User
 
Join Date: Feb 2011
Posts: 14
Quote:
Originally Posted by IanB View Post
@Ziddy76,
It's not a script, it's YATTA.
Ziddy76 is offline   Reply With Quote
Old 15th June 2011, 23:19   #208  |  Link
Groucho2004
 
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
Quote:
Originally Posted by Ziddy76 View Post
It's not a script, it's YATTA.
From the YATTA thread:

YATTA, from a technical standpoint, is essentially a very complex AVS script which calls telecide to provide a visual interface to the patern matching process while creating a total encode override file.

Apart from that, it's 8 years old. Are you still using the old plugins with it?
Groucho2004 is offline   Reply With Quote
Old 15th June 2011, 23:46   #209  |  Link
IanB
Avisynth Developer
 
Join Date: Jan 2003
Location: Melbourne, Australia
Posts: 3,167
@Ziddy76,

You are not giving us a great deal to work with here. YATTA is a monster set of scripts that beat up on a fist full of IVTC plugins.

Try a big SetMemoryMax()

In my testing 2.6 is the same or faster than 2.5.8 when running 2.5 scripts and plugins. The major difference is 2.6 has much better self control about blindly grabbing excess memory beyond the specified MemoryMax limit. 2.5.X can easily be tricked into grossly exceeding the MemoryMax limit. With 2.6 it obeys the limit.
IanB is offline   Reply With Quote
Old 16th June 2011, 00:21   #210  |  Link
Ziddy76
Registered User
 
Join Date: Feb 2011
Posts: 14
Quote:
Originally Posted by IanB View Post
@Ziddy76,

You are not giving us a great deal to work with here. YATTA is a monster set of scripts that beat up on a fist full of IVTC plugins.

Try a big SetMemoryMax()

In my testing 2.6 is the same or faster than 2.5.8 when running 2.5 scripts and plugins. The major difference is 2.6 has much better self control about blindly grabbing excess memory beyond the specified MemoryMax limit. 2.5.X can easily be tricked into grossly exceeding the MemoryMax limit. With 2.6 it obeys the limit.
Uh, no that can't be the problem. No one else who has 2.6 and Yatta working has to setmemorymax. I know it runs supposedly faster and it does run with Yatta fine with other useres. I'm trying to figure out why it's not running at similar performance as it is for me. Is there anything I could be missing from the install or anything that avisynth 2.6 needs that I didn't install?

I have not written any script. It's just a d2v and .yap file with metrics collected from ymc. Where am I placing this setmemorymax? It's just the Yatta program. It's driving my nuts because all I have to do is copy 2.5.8 into syswo64 and the performance is back. No script written. Copy 2.6 alpha 3, and it's a slideshow again. I feel that I am missing something that is prevent from 2.6 and Yatta from functioning properly.

All the plugins are up to date. And using the last version of Yatta which was released about a week ago. And no it's not a problem with Yatta being 8 years old. I've already said it works fine with other users, they don't seem to have any problems. I'm missing something. Has to be something.

Last edited by Ziddy76; 16th June 2011 at 00:31.
Ziddy76 is offline   Reply With Quote
Old 16th June 2011, 22:49   #211  |  Link
IanB
Avisynth Developer
 
Join Date: Jan 2003
Location: Melbourne, Australia
Posts: 3,167
@Ziddy76,

Where exactly did you download your copy of Yatta from (Exact URL please). The old one I found on my disk works perfectly.

The SetMemoryMax goes in the Avisynth scripts created by Yatta. You could create a special Script.AVSI in your Avisynth plugin folder with the required script line to auto-load first so you don't need to stuff around with Yatta.
IanB is offline   Reply With Quote
Old 17th June 2011, 16:06   #212  |  Link
JEEB
もこたんインしたお!
 
JEEB's Avatar
 
Join Date: Jan 2008
Location: Finland / Japan
Posts: 512
Newest version of YATTA at the moment is available from here (I would guess Ziddy76 uses one of those 131 builds there). Surprisingly, Myrsloik has taken the time lately to update it and fix certain bugs as well as bring it up to the times in certain things.
__________________
[I'm human, no debug]
JEEB is offline   Reply With Quote
Old 18th June 2011, 00:12   #213  |  Link
IanB
Avisynth Developer
 
Join Date: Jan 2003
Location: Melbourne, Australia
Posts: 3,167
@JEEB,

I know you are trying to be helpful but, please don't prompt for inexperienced user. I want to know exactly where Ziddy76 got there copy from. So many times people download "improved" versions of product that expose issues that the standard version never does. Fine if Ziddy76 got it from ivtc.org, but I need it to be stated. Something about Ziddy76's setup is exposing a problem I would like to get to the bottom of the problem.
IanB is offline   Reply With Quote
Old 19th June 2011, 16:29   #214  |  Link
Mounir
Registered User
 
Join Date: Nov 2006
Posts: 773
Not sure if it's a v2.6 problem but i find the convertion YUY2 to YV12 blurry !
yuy2: http://www.sendspace.com/file/jlakv8
YV12 (convertion) : http://www.sendspace.com/file/v55p4v

Take a look at the end of the large magenta bar for instance, is this normal ?

zoom-in (gives a better idea)
YUY2: http://www.sendspace.com/file/jwsq53
YV12: http://www.sendspace.com/file/xpvn4f

Last edited by Mounir; 21st June 2011 at 15:39.
Mounir is offline   Reply With Quote
Old 19th June 2011, 19:15   #215  |  Link
Wilbert
Moderator
 
Join Date: Nov 2001
Location: Netherlands
Posts: 6,364
@IanB,

Could you describe a bit how this dithering works for Levels, RGBAdjust & Tweak. Then i will add it to the documentation.

Last edited by Wilbert; 19th June 2011 at 19:28.
Wilbert is offline   Reply With Quote
Old 19th June 2011, 20:01   #216  |  Link
LaTo
LaTo INV.
 
LaTo's Avatar
 
Join Date: Jun 2007
Location: France
Posts: 701
Quote:
Originally Posted by Wilbert View Post
@IanB,

Could you describe a bit how this dithering works for Levels, RGBAdjust & Tweak. Then i will add it to the documentation.
It's a simple ordered dithering (using pattern) but I haven't checked which matrix is used (maybe "Bayer").
LaTo is offline   Reply With Quote
Old 20th June 2011, 01:28   #217  |  Link
IanB
Avisynth Developer
 
Join Date: Jan 2003
Location: Melbourne, Australia
Posts: 3,167
@Wilbert,

It is ordered input dithering with a 02/31 recursive Bayer pattern (contrast normal 13/42 pattern) modified for equal sums in both rows and columns. Avery Lee described the recursive generation in his blog a while ago on Dithering. I modified the resultant pattern for equal summing to eliminate an obvious pattern visible in 16x16 cells.

The dithering is added as an extra lower 8 bits (4bits for chroma) on the input pixels, making 16bit data. This is then used as an index into a 65K LUT to get the output 8 bit pixel. The dither pattern effectively replaces the 0.5 rounding term in generating the LUT.

A non-dithered TV->PC levels translation i.e. O=(I-16)*255/219, results in only 219 distinct output values and causes banding. With dithering the output is evenly distributes with all 256 output values used. E.g input values 128 would like output value 130.41. Without dithering this is always rounded to 130. With dithering 41% of pixels become 131 and 59% become 130. The distribution is based on spatial position. This implementation is very fast. A better model might be error diffusion but this cannot be done with a simple LUT.

LUT code without dither.
Code:
      for (int y=0; y<vi.height; ++y) {
        for (int x=0; x<vi.width; ++x) {
          p[x] = map[p[x]];
        }
        p += pitch;
      }
LUT code with dither. Additional operations in Blue.
Code:
      for (int y=0; y<vi.height; ++y) {
        const int _y = (y << 4) & 0xf0;
        for (int x=0; x<vi.width; ++x) {
          p[x] = map[ p[x]<<8 | ditherMap[(x&0x0f)|_y] ];
        }
        p += pitch;
      }
IanB is offline   Reply With Quote
Old 20th June 2011, 02:23   #218  |  Link
Ziddy76
Registered User
 
Join Date: Feb 2011
Posts: 14
Quote:
Originally Posted by IanB View Post
@JEEB,

I know you are trying to be helpful but, please don't prompt for inexperienced user. I want to know exactly where Ziddy76 got there copy from. So many times people download "improved" versions of product that expose issues that the standard version never does. Fine if Ziddy76 got it from ivtc.org, but I need it to be stated. Something about Ziddy76's setup is exposing a problem I would like to get to the bottom of the problem.
I don't mod or build anything. I just get it from ivtc.org. The latest version, whenever Myrsolik releases it. Currently using beta 5. I just used the installer for 2.6 from SourceForge, and run the .yap file in YATTA, I don't use any special AVS script with it. No special filters in the presets or anything. And it is a slideshow, going frame by frame. All I do is replace the avisynth.dll from 2.5.8 into SysWow64, reload the .yap in YATTA, and it's like 30X faster, smooth and fast. I'm a simpleton when it comes to AVS and YATTA, so I don't do anything complicated.

Last edited by Ziddy76; 20th June 2011 at 03:00.
Ziddy76 is offline   Reply With Quote
Old 20th June 2011, 06:32   #219  |  Link
IanB
Avisynth Developer
 
Join Date: Jan 2003
Location: Melbourne, Australia
Posts: 3,167
@Ziddy76,

Not to be pedantic, please state the exact version you are running!
IanB is offline   Reply With Quote
Old 20th June 2011, 06:54   #220  |  Link
pbristow
Registered User
 
pbristow's Avatar
 
Join Date: Jun 2009
Location: UK
Posts: 263
@Ziddy76, just in case you're starting to feel persecuted... [SYMPATHETIC GRIN]

The reason IanB needs to know exactly which version you're using is so that he can try to recreate and investigate your problem. Otherwise, he'd have to just guess at which version, do tests with that, and if (after probably a lot of work) he couldn't find anything wrong he wouldn't even know if that was because he was testing the wrong version (i.e. one that doesn't interact with the new AViSynth alpha the same way yours does) or because the problem is caused by something else entirely. You need to help IanB to help you (and thereby to help everyone): Be as precise as you can about the set-up you're using.
pbristow is offline   Reply With Quote
Reply


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 00:02.


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