Marcelo
nella mia ignoranza potrei anche dire la mia ... tanto a fare figure di cioccolato non ho problemi

.
Se chi ha scritto reclock ha preferito quella strada un motivo ci sara'.
Ciao
----------------------------------------------------------------------------------------------------------------------------------------
Here comes ReClock
----------------------------------------------------------------------------------------------------------------------------------------
Now I think you understand what does ReClock. It provides a reference clock that is synchronised with your video hardware. How? By replacing entirely the default sound renderer with a new rewritten DirectShow filter that is somehow cleverer.
But by doing so, ReClock must solve the two problems we saw in the last section:
Video cards do not have a high-resolution hardware timer available to make a clock: well, this is not completely true, since many of them have something that will help us. ReClock provides a reference clock based on a high-resolution timer based on hardware on your motherboard or your processor. Let’s call this clock the “system clock”. Then, ReClock will correct the system clock with information gathered in real time from your video card if they are available. How it does that will be my little secret

Sound playback would become problematic: this is true. How can we solve that? By varying the speed of the sound in real time to force the sound to stay in sync with the video. This is another reason why we replace the sound renderer with our own one. There are two ways to change sound speed: pitch and playback speed. Changing the pitch in real time is very hard to do and I was too lazy, so I went with the second solution. ReClock change the play back rate of the sound in real time by adjusting the audio clock. Doing so will change the pitch of the sound, but your ears should not notice that with such a low correction.
Another thing that does ReClock is to change the global playback rate of the movie in order to match its frame rate to a multiple of the refresh rate of your monitor. Here is how it does that:
- CINEMA mode is detected if the monitor has a refresh rate that is a multiple of 24 Hz (72 Hz, etc…) and if the movie has a frame rate between 23.75 and 24.25. Then the playback rate of the movie (including sound) is modified to match exactly 24fps.
- PAL mode is detected if CINEMA mode wasn’t possible and if the monitor has a refresh rate that is a multiple of 25 Hz (50 Hz, 75 Hz, 100 Hz, etc…) and if the movie has a frame rate between 23.75 and 25.25. Then the playback rate of the movie (including sound) is modified to match exactly 25fps.
- NTSC mode is detected if the monitor has a refresh rate that is a multiple of 30 Hz (60 Hz, 120 Hz, etc…). Then the playback rate of the movie (including sound) is modified to match exactly 30fps.
Finally if nothing matched, the playback rate is not modified, but the reference clock is still synchronised to the video card in order to obtain a stable clock.
Side note: you may ask if NTSC will work well with TV since PC does 30fps where the TV wants 29,97fps. That’s a good question to which I do not have a complete response, but strangely I observed that when I use ReClock with the excellent TvTool in NTSC mode with a GeForce 3, I get a clock correction that make the reference clock work near … 29,97fps. So it seems that when the PC uses TV out in NTSC mode, the refresh rate is not 60 Hz, but 29,97*2 Hz, but I’m not sure at all of that, since it may be a coincidence. Anyway playing NTSC at 30 fps on a NTSC TV should not be a problem ; as you may know NTSC was originally a black/white standard at 30 Hz that became 29,97 Hz for technical reasons when colour appeared.
So by adjusting the reference clock to match your video card, adjusting the sound to stay in sync with picture, and modifying the global playback rate, ReClock should allow a smooth movie experience on your monitor and even on your TV.
But as I said before, ReClock will not work with all PC because it uses some functions that are not available on all of them. Firstly your PC must support high-resolution timers (nearly every modern PC have them). Secondly, your video card must support some special calls. I know that most nVidia, ATI, Intel i815 and Matrox G200 do support those calls, but some cheaper cards may not. If those functions are not supported, ReClock will not load and the Microsoft audio renderer will be used.
Moreover, ReClock has some constraints you need to understand:
- ReClock requires DirectX 8.0 or higher.
- ReClock will load and work only if your movie has sound, because ReClock is an audio renderer.
- ReClock render sound with DirectSound, so your soundcard must support DirectSound.
- ReClock will not always find the frame rate of the material. For example streaming will never be supported.
- When your run ReClock for the first time for a specific resolution and refresh rate, the reference clock will be inaccurate during the first minutes of playback while being corrected. This can cause jerky playback at the beginning of the movie. The time to obtain an accurate clock will depend on many factors (initial error of clock, PC speed, …). After this adjustment, ReClock will store the correction in the registry, so when you will open another media, the clock correction parameters will be retrieved.
- Changing the playback speed can be noticeable on sound especially when 23,976 fps material is up rated to 25 fps. Doing so will accelerate the sound by 4%, and sound will seem to be a little high pitched.