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. |
8th July 2012, 11:36 | #321 | Link |
Avisynth Developer
Join Date: Jan 2003
Location: Melbourne, Australia
Posts: 3,167
|
@forclip,
With the script as quoted, and substituting a 384Kbit stereo .AC3 file I had lying around, I see no problem with any versions of Avisynth.dll from 2.5.8.5, 2.6.0.0, 2.6.0.1, 2.6.0.2, current CVS and my current development version. I used a fairly old modified NicAudio.dll I built myself based on version 2.0.0.5. circa 2007. I tried a single pass linear save of the output stream as well as random spot playback. From your avs_audio.png image, the bass25.wav sample has a big jump in level at around 2:10, this might be bugs with decoding your file with seeking. Add the EnsureVBRMP3Sync() filter to your NicAC3Source() and observe any change in behaviour. Also try to reproduce the results using ColorBars() in place of NicAC3Source() for the audio source. |
9th July 2012, 01:28 | #322 | Link |
Registered User
Join Date: Dec 2009
Posts: 63
|
Ok. With ColorBars() I also can reproduce this strange slowness issue, however audio output seems to be fine and it is not as slow as with the real sources. Using this script:
Code:
ColorBars().Trim(0, 50000) MergeChannels(last, last, last) MergeChannels(last, last) ConvertAudioTo16bit() Code:
video = BlankClip(length=4248, fps=25.000, color=$000000) audio = bassAudioSource("E:\Temp\1804_0.ac3")#.EnsureVBRMP3Sync() AudioDub(video, audio) MergeChannels(last, last) ConvertAudioTo16bit() Any ideas? |
9th July 2012, 09:12 | #323 | Link |
Moderator
Join Date: Feb 2005
Location: Spain
Posts: 6,915
|
Please, send me also the source file 1804_0.ac3 to see if I can detect any trouble decoding whit NicAc3Source/bassAudioSource.
I don't know for what EnsureVBRMP3Sync() can make differences decoding CBR audio, like ac3 must be.
__________________
BeHappy, AviSynth audio transcoder. |
10th July 2012, 05:02 | #324 | Link |
Avisynth Developer
Join Date: Jan 2003
Location: Melbourne, Australia
Posts: 3,167
|
@forclip,
Between 2.6.0.1 and 2.6.0.2 the ac_expected_next update line was moved later in the code, so for the no audio cache state the skipping chunks case was constantly being incorrectly triggered. This led to all the default audio caches needlessly becoming enabled resulting in lots of extra memcpy'ing happening, slowing things down. Not sure if it's the whole cause but it does have quite a performance impact. Code:
... long _cs = ac_currentscore; if (start < ac_expected_next) _cs = InterlockedExchangeAdd(&ac_currentscore, -5) - 5; // revisiting old ground - a cache could help else if (start > ac_expected_next) _cs = InterlockedDecrement(&ac_currentscore); // skiping chunks - a cache might not help else // (start == ac_expected_next) _cs = InterlockedIncrement(&ac_currentscore); // strict linear reading - why bother with a cache ... >> ac_expected_next = start + count; if (h_audiopolicy == CACHE_AUDIO_NONE || h_audiopolicy == CACHE_AUDIO_NOTHING) { child->GetAudio(buf, start, count, env); return; // We are ok to return now! } ... << ac_expected_next = start + count; while (count>maxsamplecount) { //is cache big enough? @tebasuna51, EnsureVBRMP3Sync() adds a 1MB audio cache and causes a high penalty for any out of order accesses outside the audio cache (a seek to zero plus a linear read up to the new position). It made a good diagnostic tool here. |
10th July 2012, 22:02 | #326 | Link | ||
Moderator
Join Date: Feb 2005
Location: Spain
Posts: 6,915
|
Quote:
is only needed for VBR audio, with CBR you can access directly to needed frame to decode. The GetAudio function from NicAc3Source do (with SAMPLES_PER_FRAME, StreamOffset and FrameLength fix and know for each ac3): Quote:
__________________
BeHappy, AviSynth audio transcoder. |
||
11th July 2012, 12:10 | #328 | Link | |
Moderator
Join Date: Feb 2005
Location: Spain
Posts: 6,915
|
Quote:
The last AVS 2.6.0 Alpha 3 [110525] in SourceForge or a new one?
__________________
BeHappy, AviSynth audio transcoder. |
|
11th July 2012, 23:19 | #329 | Link |
Avisynth Developer
Join Date: Jan 2003
Location: Melbourne, Australia
Posts: 3,167
|
I gave forclip a private copy of my experimental development version. I have checked the fix into CVS.
The problem was as described above with the ac_expected_next calc being to late in the code. |
29th July 2012, 15:46 | #330 | Link |
Moderator
Join Date: Nov 2001
Location: Netherlands
Posts: 6,364
|
Hi, two comments:
In conditional_functions.cpp: Code:
AVSValue MinMaxPlane::MinMax(AVSValue clip, void* user_data, float threshold, int plane, int mode, IScriptEnvironment* env) { ... env->ThrowError("Compare Plane: This filter can only be used within run-time filters"); Also in avisynth.cpp: Code:
PVideoFrame __stdcall ScriptEnvironment::NewVideoFrame(const VideoInfo& vi, int align) { ... if (vi.IsPlanar() && !vi.IsY8()) { // Planar requires different math ;) const int xmod = 1 << vi.GetPlaneWidthSubsampling (PLANAR_U); |
29th July 2012, 16:32 | #331 | Link | |
Avisynth language lover
Join Date: Dec 2007
Location: Spain
Posts: 3,431
|
Quote:
But perhaps for aesthetic reasons, all three uses of GetPlaneXXXSubsampling in that function should be written the same way. Last edited by Gavino; 29th July 2012 at 16:34. |
|
29th July 2012, 20:26 | #332 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
This looks like a bug from Y8 to ConvertToRGB24(), to me.
Code:
Colorbars().convertToY8() Addborders(0,0,5,0) #crop(0,0,-5,0) # Uncomment, No Red Stripe. ConvertToRGB24() # Produces LHS vertical Red Stripe in Current VDub & MediaPlayer Classic Home Cinema. #ConvertToRGB32() # No red stripe #Addborders(3,0,0,0) # EDIT: Red stripe still there.
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? Last edited by StainlessS; 29th July 2012 at 21:05. |
29th July 2012, 22:07 | #333 | Link | |
Moderator
Join Date: Nov 2001
Location: Netherlands
Posts: 6,364
|
Quote:
Code:
Colorbars(width=645, height=480, pixel_type="YV24") ConvertToRGB24() |
|
29th July 2012, 23:29 | #334 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Code:
Colorbars().convertToY8() ERR=1 # Vary ERR 0+, Errors at eg 5, 21, 37, 53, 69 Addborders(0,0,ERR*16 + 5,0) #crop(0,0,-5,0) # Uncomment, No Red Stripe. ConvertToRGB24() # Produces LHS Red Stripe in Current VDub & MediaPlayer Class Home Cinema. #ConvertToRGB32() # No red stripe #Addborders(3,0,0,0) # EDIT: Red stripe still there.
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? |
30th July 2012, 00:07 | #335 | Link |
Avisynth Developer
Join Date: Jan 2003
Location: Melbourne, Australia
Posts: 3,167
|
Yes the RGB24 overrun save and mask code is borked. It shows up for width%16 == 5.
:Edit: RGB24 AddBorders(N, x, 0, y), N not mod 12 or not mod 16 is also borked. Last edited by IanB; 31st July 2012 at 06:43. |
6th August 2012, 10:46 | #338 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
There is an update and its called v2.6.0 alpha3 25 May 2011 (about 14.5 months ago, not 3 years).
See 1st post. EDIT: Thread was started 2009, but has endured several editions of v2.6. EDIT: Perhaps a more (current) full date in thread title would be better, ie the year.
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? Last edited by StainlessS; 6th August 2012 at 17:32. |
15th August 2012, 13:10 | #339 | Link |
͡҉҉ ̵̡̢̛̗̘̙̜̝̞̟̠͇̊̋̌̍̎̏̿̿
Join Date: Feb 2009
Location: No support in PM
Posts: 712
|
Why don't we have IsY8 and IsYV411 at the script level? We currently have to write helper functions to achieve this, which is not very convenient. To know the chroma subsampling H & V ratios would be useful too.
__________________
dither 1.28.1 for AviSynth | avstp 1.0.4 for AviSynth development | fmtconv r30 for Vapoursynth & Avs+ | trimx264opt segmented encoding |
15th August 2012, 14:04 | #340 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
+1 on that.
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? |
Thread Tools | Search this Thread |
Display Modes | |
|
|