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. |
6th December 2002, 00:57 | #1 | Link |
Registered User
Join Date: Feb 2002
Location: Germany
Posts: 540
|
YUV-Bitmap Import filter?
Hello,
in our company we have a Abekas 8150 production switcher. It has a framestore option so you can save framegrabs to a .yuv file. The format of this file is very simple: (i can email a sample if someone wants it) 720x576 Pixel (PAL): Y(8bit), U(8bit), Y(8bit),V(8bit)... and so on. As you can see its 4:2:2. Now my question: is there a way to import these files (lets say i have 250 grabs = 10sec) into avisynth and serve it directly to tmpenc without any colorspace conversions and create a mpeg2 file? There is also the possibility to save .y10 files witch are 10bit instead of 8! But i think mpeg2 is always 8bit (am i right?) thanks hans runz Last edited by hanfrunz; 6th December 2002 at 01:05. |
7th December 2002, 05:40 | #5 | Link |
Registered User
Join Date: Oct 2002
Posts: 462
|
The fourcc code us YUY2.
If you attach a frame or if you can give more specific information about this raw data and how it is produced and someone might look at is out of curiousity, anonymously. It is at least interesting as a question. Stephen |
7th December 2002, 14:39 | #6 | Link |
Registered User
Join Date: Feb 2002
Location: Germany
Posts: 540
|
Hello,
@scmccarthy: i gave information about this format in my first question. a PAL frame (720x576): row1: Y001 U001 Y002 V001 Y003 U002 Y004 V002 ... Y719 U360 Y720 V360 row2: Y721 U361 Y722 V361 ... etc. it is produced with an Abekas 8150 production switcher (http://accom.com/products/abekas/815...-frameset.html) or with a photoshop in-/export plugin: ftp://ftp.accom.com/abekas/software/...gin/psnt95.zip Hans Runz |
7th December 2002, 19:36 | #7 | Link |
XviD fan
Join Date: Jun 2002
Location: France
Posts: 907
|
@ hanfrnz
it's very easy tocode. you just need to read YUY2 from yourfile and memcpy to new frames. BTW, AFAIK, TMPEGEnc only works with RGB24 input. so you'll need a convertion. if you attach a file with 2-3 320x240 frames i can code that in speed. <EDIT> not a good idea : i would't be able upload it :-/ so i've just 2 question : - how are consecutive frames stored ? (behind eachother i thing) - is there any header, or you need to enter size manualy. Last edited by Marc FD; 7th December 2002 at 19:39. |
7th December 2002, 19:53 | #8 | Link |
Registered User
Join Date: Feb 2002
Location: Germany
Posts: 540
|
@ MarkFD
answer 1: each frame is stored in a seperate file! like t001.yuv, t002.yuv ... answer 2: there is no header in these .yuv files and the resolution is always 720x576 (PAL) and 720x480 (NTSC) is there a mpeg2 coder which uses yuv2 input? I always thought an mpeg2 file is yuv (4:2:0) or is it rgb??? <edit> if you give me your email-adress i can send you a sample image. i tried to attach it to this reply, but is doesn work... hans runz Last edited by hanfrunz; 7th December 2002 at 19:56. |
7th December 2002, 20:02 | #9 | Link |
XviD fan
Join Date: Jun 2002
Location: France
Posts: 907
|
>answer 1: each frame is stored in a seperate file! like t001.yuv,
>t002.yuv ... >answer 2: there is no header in these .yuv files and the resolution is >always 720x576 (PAL) and 720x480 (NTSC) the source filter will need 4 args (path,maxframes,width,height) and will output YUY2. that's okay ? >is there a mpeg2 coder which uses yuv2 input? I always thought an mpeg2 >file is yuv (4:2:0) or is it rgb??? MPEG is YV12 (4:2:0) YV12 support is recent in Avisynth (2.5 alpha), before we needed to upsample YV12 to YUY2. |
7th December 2002, 20:23 | #11 | Link |
Registered User
Join Date: Feb 2002
Location: Germany
Posts: 540
|
@ MarcFD
>the source filter will need 4 args (path,maxframes,width,height) and will output YUY2. that's okay ? yep! that is exactly what i need! :-) YV12 is 8bit/Y, 8bit/U and 8bit/V right? Hans Runz |
7th December 2002, 20:46 | #13 | Link |
Registered User
Join Date: Oct 2002
Posts: 462
|
@hunfrunz
It wouldn't hurt to get the terminology right. Notice we are saying YUY2, not YUV2. YUV is the generic term we use for any color space that uses Y, U, and V samples. YUY2 uses 8-bit samples YUYVYUVY... I remember it by saying they replaced the V with a 2 in the name. If your files use 10-bit samples, they can be truncated to 8-bit by dropping the two least significant bits. @MarkFD I posted a thread today, asking how to write a filter that does not take a clip as the first argument. GetGenericFilter needs a clip as an argument and once I remove it, I don't know what to replace it with. The filter we are talking about here would make a good simple example of how that can be done. I can't write a filter like this yet, could you show me how? Stephen |
7th December 2002, 21:10 | #14 | Link |
XviD fan
Join Date: Jun 2002
Location: France
Posts: 907
|
okay i've finished. Avsiytnh 2.5 is cool, because i don't want to switch back ^^.
rawYUY2load/rawYUY2save (to test the loader ^^) i've some packaging to do. it read path???.yuy2 files where path is user-defined and ??? is the frame number (001-002..) it's okay for you ?? @scmccarthy just instansiate IClip, create a new VideoInfo, and fetch the functions. |
7th December 2002, 21:18 | #15 | Link |
Registered User
Join Date: Feb 2002
Location: Germany
Posts: 540
|
@Mark FD:
thank you very much! >frame number (001-002..) it's okay for you ?? i think five or six digits would be better -> 000001-000002... can you send it to me for testing ? hanfrunz Last edited by hanfrunz; 15th May 2008 at 13:38. |
7th December 2002, 23:23 | #19 | Link |
Registered User
Join Date: Feb 2002
Location: Germany
Posts: 540
|
uuups i made a B-I-G mistake...
it's not YUY2, but UYVY! i tested the filter with a byte-swapped file i created with a simple basic programm and then everything is fine!! @MakrFD: it would be very nice if you could add a RawUYVYload and RawUYVYsave (with file-extension .YUV) then it would be another perfect avisynthfilter!!!! hans *very sorry* runz |
|
|