Playback stutters when AMD CPU clock is reduced by power management
On AMD CPUs, if Cool+Quiet is activated (using Power Management or Power Profiles in the Windows Control Panel, depending on the Windows version), the CPU cores clock down if the load is low enough.
VLC Audio playback instantly starts to stutter (constant hickups, about 1-2 times per second), video playback slows down, regardless of media type (avi, mp3, flv, mov, wmv, mp4 testet). Playback quality is more than annoying, it becomes unbearable after a few seconds.
As soon as Power Management is disabled, or even a single CPU core has a high load so that the clock speed returns to the maximum value, playback becomes stable.
My current hardware: AMD X4 920 on Asus M3N-HDMI Mainboard
Same behaviour with Windows 7 x64, Windows 7 x32, Windows XP x32 and Windows XP x64, in all VLC versions I tested so far (nearly every version since 0.9 to 1.1.0; haven't tested other platforms, versions or CPUs, never found a working combination!). However there are quite a few forum posts
Other Players I testet so far (Win Media Player, WinAmp, foobar200, Flash-Player-Plugin) do not have this problem, so if this is a Windows-Problem, at least other players work around it.
I would call this quite a major problem, since Power Management is enabled by default in Win7 (and Vista maybe too??).
'Workarounds' are to constantly produce a high load on at least one core (i.e. by running something like folding@home in the background), or disabling Power-management. However given the current temperatures here alone I really would appreciate a less energy-consuming solution :)
I would like to get my hands dirty and try to create a patch for this problem, however any hints on where to start would be welcome..
main debug: using vout display module "direct3d"
main debug: TIMER module_need() : 129.000 ms - Total 129.000 ms / 1 intvls (Avg 129.000 ms)
main debug: using video output module "vout_wrapper"
main debug: TIMER module_need() : 129.000 ms - Total 129.000 ms / 1 intvls (Avg 129.000 ms)
main debug: got 1 direct buffer(s)
main debug: pic render sz 352x288, of (0,0), vsz 352x288, 4cc I420, sar 12:11, msk r0x0 g0x0 b0x0
main debug: pic in sz 352x288, of (0,0), vsz 352x288, 4cc I420, sar 12:11, msk r0x0 g0x0 b0x0
main debug: pic out sz 352x288, of (0,0), vsz 352x288, 4cc I420, sar 12:11, msk r0x0 g0x0 b0x0
main debug: direct render, mapping render pictures 0-23 to system pictures 1-24
main debug: VoutDisplayEvent 'resize' 427x288 window
avcodec debug: using direct rendering
main debug: End of video preroll
main debug: Received first picture
main debug: Decoder buffering done in 263 ms
main debug: Post-processing available
main warning: vlc_object_find_name(postproc) is not safe!
freetype debug: using fontsize: 18
main debug: looking for video blending module: 1 candidate
blend debug: chroma: YUVA -> I420
main debug: using video blending module "blend"
main debug: TIMER module_need() : 0.000 ms - Total 0.000 ms / 1 intvls (Avg 0.000 ms)
main error: ES_OUT_SET_(GROUP_)PCR is called too late (pts_delay increased to 1200 ms)
main error: ES_OUT_RESET_PCR called
avcodec warning: Physical channel configuration not set : guessing
main debug: reusing aout
main debug: looking for audio output module: 4 candidates
aout_directx debug: Opening DirectSound Audio Output
aout_directx debug: found device: Primary Sound Driver
aout_directx debug: found device: Speakers (Creative SB Audigy 2 ZS (WDM))
aout_directx debug: found device: SPDIF Out (Creative SB Audigy 2 ZS (WDM))
aout_directx debug: found device: Headphones (2- High Definition Audio Device)
aout_directx debug: found device: Digital Audio (HDMI) (High Definition Audio Device)
aout_directx debug: found device: Digital Audio (S/PDIF) (2- High Definition Audio Device)
aout_directx debug: device supports 2 channels (DEFAULT!)
aout_directx debug: device supports 1 channel
aout_directx debug: Windows says your SpeakerConfig is 5.1
aout_directx debug: creating DirectSoundThread
main debug: thread started
main debug: thread (DirectSound Notification Thread) created at priority 15 (../../.././modules/audio_output/directx.c:321)
aout_directx debug: DirectSoundThread ready
main debug: using audio output module "aout_directx"
main debug: TIMER module_need() : 43.000 ms - Total 43.000 ms / 1 intvls (Avg 43.000 ms)
main debug: output 's16l' 32000 Hz Stereo frame=1 samples/4 bytes
main debug: mixer 'f32l' 32000 Hz Stereo frame=1 samples/8 bytes
main debug: filter(s) 'f32l'->'s16l' 32000 Hz->32000 Hz Stereo->Stereo
main debug: looking for audio filter module: 14 candidates
audio_format debug: f32l->s16l, bits per sample: 32->16
main debug: using audio filter module "audio_format"
main debug: TIMER module_need() : 0.000 ms - Total 0.000 ms / 1 intvls (Avg 0.000 ms)
main debug: found a filter for the whole conversion
main debug: looking for audio mixer module: 3 candidates
main debug: using audio mixer module "float32_mixer"
main debug: TIMER module_need() : 0.000 ms - Total 0.000 ms / 1 intvls (Avg 0.000 ms)
main debug: input 's16l' 32000 Hz Stereo frame=1 samples/4 bytes
main debug: looking for audio filter module: 1 candidate
scaletempo debug: format: 32000 rate, 2 nch, 4 bps, fl32
scaletempo debug: params: 30 stride, 0.200 overlap, 14 search
scaletempo debug: 1.000 scale, 960.000 stride_in, 960 stride_out, 768 standing, 192 overlap, 448 search, 1600 queue, fl32 mode
main debug: using audio filter module "scaletempo"
main debug: TIMER module_need() : 0.000 ms - Total 0.000 ms / 1 intvls (Avg 0.000 ms)
main debug: filter(s) 's16l'->'f32l' 32000 Hz->32000 Hz Stereo->Stereo
main debug: looking for audio filter module: 14 candidates
audio_format debug: s16l->f32l, bits per sample: 16->32
main debug: using audio filter module "audio_format"
main debug: TIMER module_need() : 0.000 ms - Total 0.000 ms / 1 intvls (Avg 0.000 ms)
main debug: found a filter for the whole conversion
main debug: filter(s) 'f32l'->'f32l' 35200 Hz->32000 Hz Stereo->Stereo
main debug: looking for audio filter module: 14 candidates
bandlimited_resampler debug: f32l/35200KHz/2->f32l/32000KHz/2
main debug: using audio filter module "bandlimited_resampler"
main debug: TIMER module_need() : 0.000 ms - Total 0.000 ms / 1 intvls (Avg 0.000 ms)
main debug: found a filter for the whole conversion
main debug: End of audio preroll
main warning: received buffer in the future
main warning: early picture skipped
main debug: Buffering 0%
main debug: Buffering 16%
main debug: Buffering 32%
main debug: Buffering 48%
main debug: End of audio preroll
main debug: Buffering 63%
main debug: Buffering 79%
main debug: Buffering 90%
main debug: Stream buffering done (1216 ms in 1 ms)
main debug: Decoder buffering done in 0 ms
main debug: End of video preroll
main warning: output date isn't PTS date, requesting resampling (56001)
main warning: buffer is 57001 late, triggering upsampling
main debug: audio output is starving (51032), playing silence
main warning: output date isn't PTS date, requesting resampling (-46032)
main debug: audio output is starving (110000), playing silence
main warning: output date isn't PTS date, requesting resampling (-45000)
main debug: audio output is starving (125000), playing silence
main warning: resampling stopped after 769000 usec (drift: 35375)
main warning: output date isn't PTS date, requesting resampling (-50000)
main warning: buffer is 84125 in advance, triggering downsampling
main debug: audio output is starving (115000), playing silence
main warning: output date isn't PTS date, requesting resampling (-50000)
main warning: audio drift is too big (-135344), clearing out
main warning: timing screwed, stopping resampling
main warning: mixer start isn't output start (-41735)
main debug: audio output is starving (363031), playing silence
main debug: audio output is too slow (93001), trashing 50000us
main debug: audio output is too slow (43001), trashing 50000us
main warning: output date isn't PTS date, requesting resampling (61969)
main warning: buffer is 63219 late, triggering upsampling
main debug: audio output is starving (95000), playing silence
main debug: audio output is starving (140000), playing silence
main debug: audio output is starving (135000), playing silence
main debug: audio output is too slow (101032), trashing 50000us
main debug: audio output is too slow (51032), trashing 50000us
main warning: output date isn't PTS date, requesting resampling (90000)
main warning: audio drift is too big (151625), dropping buffer
main debug: audio output is starving (85000), playing silence
main debug: audio output is starving (150000), playing silence
main warning: output date isn't PTS date, requesting resampling (-50000)
main debug: audio output is starving (105000), playing silence
main debug: audio output is starving (150000), playing silence
main warning: output date isn't PTS date, requesting resampling (-50000)
main debug: audio output is starving (90000), playing silence
main warning: output date isn't PTS date, requesting resampling (-45000)
main warning: audio drift is too big (-120813), clearing out
main warning: timing screwed, stopping resampling
main warning: mixer start isn't output start (-41991)
main debug: audio output is starving (269031), playing silence
main warning: output date isn't PTS date, requesting resampling (70969)
main debug: auto hidding mouse
main warning: buffer is 71219 late, triggering upsampling
main debug: audio output is starving (105000), playing silence
main warning: output date isn't PTS date, requesting resampling (-45000)
main debug: audio output is starving (115000), playing silence
main warning: output date isn't PTS date, requesting resampling (-45000)
main debug: audio output is starving (100000), playing silence
main debug: audio output is starving (125000), playing silence
main debug: audio output is starving (120000), playing silence
main warning: resampling stopped after 2112000 usec (drift: 19719)
main debug: audio output is starving (130000), playing silence
main debug: audio output is starving (150000), playing silence