home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / misc / volume38 / tovcr / part01 / README.code < prev    next >
Text File  |  1993-07-14  |  3KB  |  89 lines

  1.  
  2. You must read this file if you wanna understand the code of the 
  3. program.
  4.  
  5. First of all, the program has been configured to the PAL system. This
  6. is controlled when you open the connection with the video framer
  7. ( the 'open_video' subroutine ), two #define fix these names ( 
  8. DEFAULT_VFR_BUFFER and OPTIONAL_VFR_BUFFER ), our default buffer name
  9. is "r_y_625" ( Betacam ) and optional is "rgb_625". You need change
  10. this if you use another video system.
  11.  
  12. If you change the system, also probably you need change the XSIZE and
  13. YSIZE defines. These fix the size of the image. Our render program sets
  14. a size of 780x576 for the PAL system, but when we recorded that image 
  15. into the Betacam it was cuted ( you get it ?, the image, not the 
  16. Betacam ). So, we applied proof and error and fix 'our' PAL system
  17. size to 710x576. So if you change the video norm ...
  18.  
  19. In the PAL system, we have 25 frames per second but in NTSC there are
  20. 30 f.p.s. So you need change the FPS define ( PAL => 24, NTSC => 29, 
  21. the last frame, not the number of frames ).
  22.  
  23. There is another important define, CHROMABORDER. It is what the 
  24. program understand as transparent ( from 0 to CHROMABORDER, where this
  25. number is r+g+b ).
  26.  
  27. The program works whit compressed files but it's very important how
  28. you ( well, the program ) uncompressed it. There are two procces
  29. working:
  30.  
  31. i.    
  32.     The parent process handles the video recorder. When a frame
  33.     has been recorded, it sends a signal to the child ( then a new
  34.     image can be loaded into the VFR ), release a new child and
  35.     waits for the first child to record that frame.
  36.  
  37. ii.    
  38.     The child process gets ready and load a new frame into VFR 
  39.     ( when the parent process allows it ).
  40.  
  41.  
  42. , and now is when how you uncompress the file is very important. If
  43. you use a system(...) library subroutine to execute the uncompress
  44. process what you really get is something like:
  45.  
  46.         if ( fork() )
  47.             wait( NULL );
  48.         else exe...( "uncompress", ... );
  49.  
  50. so, the child is wait-ing. Now the problem: if the child is wait-ing
  51. when the pattern sends a signal ( and altough this is catched ) the
  52. wait is released ( but the uncompress isn't finished !!! ). The 
  53. solution is the 'Uncompress' subroutine of the program, the child 
  54. waits for the end of the uncompress process and only is released by
  55. this. Ok ? ( so, if you use another subroutine to uncompress files,
  56. please check this or you can get a 'beatiful' core ).
  57.  
  58. Better algorithms could be implemented for some digital editing
  59. functions ( examples: blur and resample ) but what we wanna was
  60. speed ( when you have 500 frames, well ... the speed of the program
  61. is the most important thing ). But if you can do better ...
  62.  
  63. Also, some supported file format readers could be improved.
  64.  
  65. Well, you know, nothing is perfect and I'll wait your comments.
  66.  
  67. The code has a lot of comments, so you can refer to it for further
  68. explanations.
  69.  
  70.  
  71. When we record an animation, we always need something different: a
  72. moving background, a super, a blur with a mask, etc. So we always
  73. change the code of tovcr, but this is the base. It's too easy adapt
  74. it for what we need. You get it ?, it's too important understand the
  75. code because it's not a closed utility.
  76.  
  77.  
  78. Please, mail me if you have some question, suggestion, you find
  79. a bug, etc ...
  80.  
  81.  
  82. Enjoy !.
  83.  
  84. -----
  85. Raul Rivero
  86. Mathematics Dept.
  87. University of Oviedo
  88. ( nuevos@carreras.cuu.uniovi.es )
  89.