home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Usenet 1994 October
/
usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso
/
misc
/
volume38
/
tovcr
/
part01
/
README.code
< prev
next >
Wrap
Text File
|
1993-07-14
|
3KB
|
89 lines
You must read this file if you wanna understand the code of the
program.
First of all, the program has been configured to the PAL system. This
is controlled when you open the connection with the video framer
( the 'open_video' subroutine ), two #define fix these names (
DEFAULT_VFR_BUFFER and OPTIONAL_VFR_BUFFER ), our default buffer name
is "r_y_625" ( Betacam ) and optional is "rgb_625". You need change
this if you use another video system.
If you change the system, also probably you need change the XSIZE and
YSIZE defines. These fix the size of the image. Our render program sets
a size of 780x576 for the PAL system, but when we recorded that image
into the Betacam it was cuted ( you get it ?, the image, not the
Betacam ). So, we applied proof and error and fix 'our' PAL system
size to 710x576. So if you change the video norm ...
In the PAL system, we have 25 frames per second but in NTSC there are
30 f.p.s. So you need change the FPS define ( PAL => 24, NTSC => 29,
the last frame, not the number of frames ).
There is another important define, CHROMABORDER. It is what the
program understand as transparent ( from 0 to CHROMABORDER, where this
number is r+g+b ).
The program works whit compressed files but it's very important how
you ( well, the program ) uncompressed it. There are two procces
working:
i.
The parent process handles the video recorder. When a frame
has been recorded, it sends a signal to the child ( then a new
image can be loaded into the VFR ), release a new child and
waits for the first child to record that frame.
ii.
The child process gets ready and load a new frame into VFR
( when the parent process allows it ).
, and now is when how you uncompress the file is very important. If
you use a system(...) library subroutine to execute the uncompress
process what you really get is something like:
if ( fork() )
wait( NULL );
else exe...( "uncompress", ... );
so, the child is wait-ing. Now the problem: if the child is wait-ing
when the pattern sends a signal ( and altough this is catched ) the
wait is released ( but the uncompress isn't finished !!! ). The
solution is the 'Uncompress' subroutine of the program, the child
waits for the end of the uncompress process and only is released by
this. Ok ? ( so, if you use another subroutine to uncompress files,
please check this or you can get a 'beatiful' core ).
Better algorithms could be implemented for some digital editing
functions ( examples: blur and resample ) but what we wanna was
speed ( when you have 500 frames, well ... the speed of the program
is the most important thing ). But if you can do better ...
Also, some supported file format readers could be improved.
Well, you know, nothing is perfect and I'll wait your comments.
The code has a lot of comments, so you can refer to it for further
explanations.
When we record an animation, we always need something different: a
moving background, a super, a blur with a mask, etc. So we always
change the code of tovcr, but this is the base. It's too easy adapt
it for what we need. You get it ?, it's too important understand the
code because it's not a closed utility.
Please, mail me if you have some question, suggestion, you find
a bug, etc ...
Enjoy !.
-----
Raul Rivero
Mathematics Dept.
University of Oviedo
( nuevos@carreras.cuu.uniovi.es )