Log in

View Full Version : AlignFields


Pages : 1 [2]

kassandro
31st August 2004, 08:40
Originally posted by acrespo
I found a way to solve the problem.

ConvertToYUY2(interlaced=true)
AlignFields()
ConvertToYV12()

This is a very poor solution. In general, you should avoid back and forth conversion of color spaces, because it causes chroma blurring. Now, if you convert with interlaced=true, this effect is particularily strong, because interlaced yv12 is a bad idea from the very beginning (but infortunately we have to live with it). Also the experts agree that ConvertToYUY2(interlaced=true) is incorrect for version 2.54. If you have version 2.54, SeparateFields.ConvertToYUY2(interlaced=false).ConvertToYV12() is certainly better. Personally. I think interlaced=true should always handled this way, but all experts reject this solution.
If vdub "only" crashes on exit, I wouldn't change the script. I had this kind of problem with other filters. It was caused by an incomplete clean up then.


There is something wrong with mode = 2 and YV12 colorspace.
To make life easier for me, it would be very nice, if you could simplify the script: try to take out filters from the script as along as the problems persists. Thus I would like to have a minimal script exhibiting the bug, such that I can reproduce it easier. Reproducing the bug is the hardest obstacle in order to fix it.

acrespo
2nd September 2004, 05:31
Yes, I already know about ConvertToYUY2(interlaced=true).

I removed all filters and when I put any filter after AlignFields the crash in virtualdub occurs.

This is important to me because I usually do 2 pass Xvid encode. When 1pass finish, Virtualdub crash, because vdub close video and reopen to next pass.

Do you plan to continue development of this filter?

kassandro
2nd September 2004, 21:50
Originally posted by acrespo
I removed all filters and when I put any filter after AlignFields the crash in virtualdub occurs.

I use AlignFields(mode=3) for nearly all my interlaced material (about 20%) and AlignFields(mode=2) for hybrid material (about 5%), but besides crop and AvsTimer I virtually never use other filters after AlignFields. As I use Matroska with Ogg Vorbis audio, there is usually no audio in my scripts (the audio is processed separately by oggenc and then muxed with Vdubmod). There is one exception, though. When I do some video editing in the script, the audio must be edited the same way such that a/v does not get broken. In this case the audio must be in the script and I have to use avs2wav + oggenc to process the audio of the script. What I do not like in your script is that you use AudioDub so early. The audio then has to be passed through all the video filters, which shouldn't cause problems, but a tiny overhead. I would use it as late as possible (of course you have to use it before any trim and similar filters).
Anyway, I will try to reproduce the bug.


Do you plan to continue development of this filter?

There will be at least one further version of AlignFields. Firstly, a new sharp mode will be added. Essentially, the idea underlying RemoveGrain(mode=8) will be used for this mode. It should avoid most smart edge artifacts of mode=0,1 while giving only slightly worse compression. Tomsmocomp should be changed in a similar way, but I do not want to mess around with the source code of others. Otherwise there will probably only releases, which fix bugs.
Because the AlignFields source code is quite messy, I hope to write a new deinterlacer from scratch, which, however, should keep the positve properties of AlignFields: While not touching static areas, AlignFields(mode=3) beats any other deinterlacer by a landslide as far as compression is concerned. On the other hand AlignFields has also some negative properties: Firstly, while AlignFields creates no spatial threshold artifacts, it does creat temporal threshold artifacts (mostly caused by noise), which show up as flicker. Secondly, because all planes are handled independently, in some one plane may be deinterlaced and the others not and I don't like that. Thirdly, AlignFields(mode=3) is the only deinterlacer, which may creat double ghosts, while normal blur deinterlacers like AlignFields(mode=2) may creat only one ghost. I want to remove ghosts from blur deinterlacers and I would sacrifice quite some speed to achieve this. While I know how to tackle the first two problems, I still have no idea how to solve the ghost problem and as long as this problem is unsettled, I will not start with a new deinterlacer.