PDA

View Full Version : Premiere AVISynth Plugin bugfix release


zettai
27th August 2002, 22:40
Premiere AVISynth Plugin v1.0 Bugfix release

This is an update of the Premiere Avisynth Import Plugin originally written by Ben Rudiak-Gould, see http://math.berkeley.edu/~benrg/avisynth.html. The plugin and the sourcecode can be obtained from Tom Ford's web site: http://www.ox.compsoc.net/~flend/avisynth/index.html

Changelist: Version 1.0b:

- Fixed high saturation colour error bug.
- Fixed Blank Screen bug.
- Fixed no-thumbnail bug.
- Code optimised and fixed for compling with VC7

IMPORTANT:

Although the plugin is vastly improved, please note the following caveats:

1) The plugin now includes the ability to resize to fit the preview window and timeline thumbnails. However this resize is not very accurate (as it is optimised for speed) and will give poor results if used in your export. Hence, it is very important that the resolution (and pixel aspect ratio) of your import files EXACTLY MATCH those of your output in order to maintain perfect quality.

2) Avisynth has changed since the original plugin and now uses RGB32 as the default RGB method. However, the Premiere Import Plugin expects 24 bits and hence if you are using an RGB source you will have to add ConvertToRGB24() to your script.

How the bugfix was developed:

The import plugin was written two years ago and had not been changed, or so it seems, since it's original release which contained (primarily) a black screen bug. this required the user to resize the preview window to 720x480 in order to see the footage. Later a colour bug was discovered that happened at high saturation colours. (ErMaC made a post about this last week in this thread (http://forum.doom9.org/showthread.php?s=&threadid=31915))

After years of having to cope with the problems caused by this import plugin, AbsoluteDestiny decided to download the source code and try to decipher what exactly was going wrong. With aid from one half of Turboneko Studios and ErMaC, areas in the code were pinpointed that were suspected to be the source of the main problem - the blank screen bug. It appeared that import plugin has to include its own resize routines and the plugin didn't actually have one. This resulted in only footage that matched the preview window resolution and export resolution to be processed. The other main bug was to do with the way certain high level colours were completely changing, causing ugly artefacts on footage. After much theorising, the conclusions were passed on to Tom Ford who endeavoured to tinker with the code to see if they could be resolved..

The fixes

The original plugin lacked the ability to resize information for display in Premiere, resulting in the black screen bug mentioned earlier. To combat this, a resize algorithm was added to the plugin. This resize algorithm was written by Tom Ford and applies a Nearest Neighbour resize to the footage for general display in premiere. It is desinged for speed and hence the import and export resolutions should be kept the same to maintain quality.

The colour bug was much more curious. I'll let Tom explain:


you'll be pleased to know that the colour bug was PARTICULARLY subtle
The problem was actually to do with the compile implicitally casting *(char *) to a signed int before doing a shift
This meant that if the RGB components were > 127 they would go negative
and everything would go to hell :)
Bits with 2 non-zero colour things would be particularly bad, hence the little blocks in the middle looked a bit screwed
If you remember the code it was
dst[round_x] = src[x*3+0] + (src[x*3+1] << 8) + (src[x*3+2] << 16);
Now, if some of the operands were negative, you can imagine all kind of strange effects happening
due to the + s

So, in short the colour bug was really really nasty and now it's fixed.

Future Optimisations:

There are possible future optimisations to be made but this is a fully working version. It is uncertain how much further development will occur on this plugin as the main problems have been solved. Rest assured, if further bugs present themselves we may become proactive again.

The main bottleneck with using this method for editing dvd footage is the speed of the mpeg2 decoding. It is possible that an editing version of mpeg2dec.dll will be developed to allow more fluid editing. An mpeg2dec-lite, so to speak. This could be changed in the avisynth script later for full quality or quality could be set using external registers. This may be intergrated into the plugin (allwoing d2v file loading) or may manipulate a new avisynth plugin (an mpeg2prm.dll or similar). A bicubic resize option activated by external registers is also being considered - but these are still only ideas.

This is just supposition at the moment but essentially what we want to do is to create a fast and reliable method for editing with dvd footage. This plugin release isn't any faster but it is less broken :)

RGB32 support is being worked on presently and mpeg2dec is being looked at. Please report any bugs here, to myself or to Tom. Thanks.

AbsoluteDestiny

zettai
28th August 2002, 00:01
Bug report 1:

Whoops we broke backwards compatibility. It won't work with Premiere 5.x - please bear with us whilst be try out some new headers :)

Should be fine for 6.0 though.

vinetu
28th August 2002, 00:24
I hate Premiere 5.x !

ErMaC
28th August 2002, 11:52
I don't - that's what I use. Beats pants off 6 AFAIK.

Oh and I've also been working on coding something else Premiere-oriented.

I think we plan on trying to merge all our stuff in with the AVISynth codebase since these Premiere plugins were originally part of Ben's AVIsynth 0.3 source tree.

Wilbert
29th August 2002, 10:11
Are you guys also looking at the export plugin? Are there any known limitations/bugs?

zettai
29th August 2002, 10:21
Well, the export plugin has since been superseded by the Premiere Frameserver that you can get on videotools.net - which works fine now that it can do random access.

So for now it's just work on the import plugin. It's already faster than the native mpeg2 support you get with Premiere 6.5 and once we get a draft mode set up it should be good enough to edit with effortlessly.

I think we've fixed Premiere 5 support too, we might release that for testing in a day or so once we've worked out why the RGB32 support is doing strange things :)

zettai
2nd September 2002, 22:05
Premiere Avisynth Plugin v1.1 Released

Changelist Version 1.1:
- Improved Premiere 5.x Support
- Fixed RGB32 support
- Compiled with VC6 for extra compatibility
- Various plugin code tidying and colourspace efficiency

http://www.ox.compsoc.net/~flend/avisynth/index.html

vinetu
3rd September 2002, 22:56
THANK YOU MAN !!!

I'll try this soon ...
Indeed, I prefer Premiere 4.2 over all new
versions,but it's impossible to open large files(>2gb).
Is there any chance of compatibility with so OLD version?

Best Regards !

vinetu

zettai
3rd September 2002, 23:08
hmmm... I'm not sure about v4.2 compatibility, mainly because I'd imagine the SDK is very different.

We'll check it out but I just not sure - also I don't have 4.2 so testing will be dificult.

We'll see.

Did the old one work with 4.2?

vinetu
4th September 2002, 11:14
Hi zettai !

When i put the plugin (ver. 1.0 or 1.1) in Premiere 4.2 plugins folder,
it crash at start (just disappear when initializing plugins).

I'm sure that Premiere 42 SDK and Premiere 5-6-7-8 SDKs are
completely different ,so forget my ask ...
... however, I can send you 42 if you are interested in testing.

Thank You !

zettai
4th September 2002, 11:23
Well, I'll have a look at the 4 SDK and see if we can even do the same things.

BTW when I said the old one I meant the original one by Ben - does that work in 4.2? If it does then there's hope.

vinetu
4th September 2002, 12:10
On the "Ben Rudiak-Gould's Home Page"I see the folow :

"The Avisynth Premiere import plugin allows you to open AVS scripts and VDR signpost files in Premiere 5.0 or later"...

anyway i have to check and ...
when i put the plugin(version 0.25) in "Plugins" folder,
Premiere 42 disappiar at initialization of plugins...