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. |
16th February 2012, 12:12 | #1 | Link |
typo lover
Join Date: May 2009
Posts: 595
|
SSRC: which is correct?
I tried follow script,
Code:
ColorBars() AssumeSampleRate(48000) SSRC(40000, false) According to docs, these samplerates must be proper. fs1 / dfrq = sfrq / frqgcd = 48000 / 8000 = 6 6 % 2 = 0 (also 6 % 3 = 0) but code(SSRC.cpp) says as follows Code:
if (dfrq>sfrq){ int fs1 = sfrq / frqgcd * dfrq; if (fs1/dfrq == 1) return 1; else if (fs1/dfrq % 2 == 0) return 1; else if (fs1/dfrq % 3 == 0) return 1; else return 0; } else { if (dfrq/frqgcd == 1) return 1; else if (dfrq/frqgcd % 2 == 0) return 1; else if (dfrq/frqgcd % 3 == 0) return 1; else return 0; }
__________________
my repositories |
16th February 2012, 23:10 | #2 | Link |
Avisynth Developer
Join Date: Jan 2003
Location: Melbourne, Australia
Posts: 3,167
|
The documentation seem to be incomplete. That condition applies only for dest freq > source freq. i.e. for the class Upsampler case.
Your case is dest freq < source freq, and the reciprocal test needs to be applied. i.e. for the class Downsampler case. 40000 / 8000 = 5 and 5 is not mod 2 or mod 3. You can work around the restriction by using ResampleAudio or doing it in 2 passes, i.e. Code:
ColorBars() AssumeSampleRate(48000) SSRC(80000, false) SSRC(40000, false) |
17th February 2012, 09:27 | #3 | Link |
typo lover
Join Date: May 2009
Posts: 595
|
__________________
my repositories Last edited by Chikuzen; 17th February 2012 at 14:28. |
|
|