[FFmpeg-cvslog] r11379 - trunk/libavcodec/ac3dec.c
Justin Ruggles
justinruggles
Thu Jan 3 05:52:19 CET 2008
Rich Felker wrote:
> On Thu, Jan 03, 2008 at 03:26:30AM +0100, jbr wrote:
>> Author: jbr
>> Date: Thu Jan 3 03:26:29 2008
>> New Revision: 11379
>>
>> Log:
>> add crc check to ac3 decoder
>
> What is the performance impact?? I'm strongly against this change,
> especially the aspect of outputting _nothing_ (and thus breaking a/v
> sync!) when crc check fails. If crc check fails, the decoder should
> instead use error concealment heuristics, and crc should not be
> checked at all when error concealment is disabled.
I would definitely rather output audio (either error concealment or
silence) to keep a/v sync. But the only reliable way to know if the
frame size and/or number of channels are correct (and both can change
mid-stream) is to also check the first CRC code. And if that fails,
there is no way to know.
If other people think it's worth the risk, I can change it.
Personally, the only reason I want the CRC check is for debugging, so I
don't have a problem with only running the check when the log level is
>= AV_LOG_DEBUG or even putting it in an #ifdef so I can turn it on
whenever someone reports a sample as buggy which turns out just to be
damaged.
As for performance, I don't really know enough about dezicycles to make
a judgement, but I did a START_TIMER/STOP_TIMER on ac3_decode_frame()
with and without the crc check on a 5-minute 5.1-channel audio clip. My
processor is an AMD64 X2 6000+ if that makes any difference...
with: 8014687 dezicycles, 8191 runs, 1 skips
without: 7935784 dezicycles, 8191 runs, 1 skips
-Justin
More information about the ffmpeg-cvslog
mailing list