Don't overlap simultaneous video content in the timeline. Fix keep-aligned for separ...
[dcpomatic.git] / doc / design / resampling.tex
1 \documentclass{article}
2 \begin{document}
3
4 Here is what resampling we need to do.  Content video is at $C_V$ fps, audio at $C_A$.  
5
6 \section{Easy case 1}
7
8 $C_V$ and $C_A$ are both DCI rates, e.g.\ if $C_V = 24$, $C_A = 48\times{}10^3$.
9
10 \medskip
11 \textbf{Nothing to do.}
12
13 \section{Easy case 2}
14
15 $C_V$ is a DCI rate, $C_A$ is not.  e.g.\ if $C_V = 24$, $C_A = 44.1\times{}10^3$.
16
17 \medskip
18 \textbf{Resample $C_A$ to the DCI rate.}
19
20 \section{Hard case 1}
21
22 $C_V$ is not a DCI rate, $C_A$ is, e.g.\ if $C_V = 25$, $C_A =
23 48\times{}10^3$.  We will run the video at a nearby DCI rate $F_V$,
24 meaning that it will run faster or slower than it should.  We resample
25 the audio to $C_V C_A / F_V$ and mark it as $C_A$ so that it, too,
26 runs faster or slower by the corresponding factor.
27
28 e.g.\ if $C_V = 25$, $F_V = 24$ and $C_A = 48\times{}10^3$, we
29 resample audio to $25 * 48\times{}10^3 / 24 = 50\times{}10^3$.
30
31 \medskip
32 \textbf{Resample $C_A$ to $C_V C_A / F_V$}
33
34
35 \end{document}