PDA

View Full Version : raw uyvy input plugin?


billou2k
18th November 2003, 16:54
I am looking at doing some codec testing with PSNR analyses on raw UYVY files (no avi wrapping or nothing). But it's impossible to use them in that format in any tools.
I found a converter form UYVY to AVI that works well but there are quite many files (and they are quite huge) so I dont want to spend too much time and disk space converting them.
I was wondering if there was a cleaner way to do things: like an input plugin for avisynth that could be used directly in a script the sameway as mpeg2source("file"). That would be just perfect.
Unfortunately I've spent some time looking for one but I've never found any.
Do you think that is something that could be done? Well I'm not asking for someone to do it, I'm quite ok having a try at it but as I have never done any filter for avisynth before, it might take some time.
Do you think it's gonna ask a huge amount of time to develop?

Nic
18th November 2003, 21:21
It should be very simple, if AviSynth supports UYVY internally (don't know my colorspaces well enough to say ;) ). Although you'd probably have to specify the height and width in the parameters I suppose. Other than that it's pretty much a read and a memcopy in the GetFrame function, and because it's linear in size, seeking would be everso easy too.

MPEG2Source's code is a bit large, but if you just look at the AviSynth wrapper, especially the way paremeters are parsed and the ::GetFrame function. You should be fine :)

-Nic

billou2000
18th November 2003, 22:51
MPEG2Source's code is a bit large
Yes I thought so as well ;-)

Thanks Nic, I'll take some time to study the code of the wrapper first and then I guess I'll have to start the "serious" work;-)
Well the principle is pretty easy I just have to get myself in it!
Cheers!

Richard Berg
19th November 2003, 03:40
ImageReader's BMP support should be somewhat similar to what you're trying to accomplish.

hanfrunz
23rd November 2003, 16:38
look here:
http://forum.doom9.org/showthread.php?s=&threadid=39798

hanfrunz

billou2k
24th November 2003, 12:04
Great!
thanks guys,
Richard:I'll have a look to Imagereader I'll tell you if it works.
Hanfrunz:Thanks for the link I see you had the same problem, could you post the plugin in here as the link disappeared from the thread you posted? thanks a lot!
(Am I becoming lazy:D?)

billou2k
24th November 2003, 16:59
Richard: unfortunately imagereader plugins only seems to open clips where each frame is saved in a separate file, where as in the sequences I'm trying to open, all frames are saved in the same file (1 file per clip).
But actually I've got BMP clips I'd like to try as well so it'll probably be useful. Thanks for that Richard I didnt know about that plugin!

Richard Berg
24th November 2003, 19:40
Sorry, I didn't mean to imply that ImageReader would solve your problem. What I meant was, by looking at the code it should help you write a plugin that sticks RGB data into Avisynth's buffers.

Glad to hear it helped with a side project, though!

billou2k
24th November 2003, 19:46
Hi Richard,
Well I dont have much free time to code at the moment so I was hoping something would work immediately;-)
But anyway thanks for pointing me this tool as it'll probably be of great help when I finally start coding:D
And moreover I can use it on bmp sequences right now so thats great!
Thanks for the help!