History

avcodec/fraps: Use unchecked bitstream reader

The fraps decoder already checked for overreads manually (and errored out in this scenario), yet it still enabled implicit checks, leading to worse performance and more code size. This commit disables the implicit bitstream reader checks. For the sample [1] this improves performance from 195105896 to 155851561 decicycles for Clang 10 and from 222801887 to 168270467 decicycles when compiled with GCC 9.3. These values are the average of 10 runs each looping ten times over the input. [1]: samples.ffmpeg.org/ffmpeg-bugs/trac/ticket2593/fraps_flv1_decoding_errors.avi

Andreas Rheinhardt committed 6 years ago

Commit bc6838d1 parent bb16dbc1 file · +1 −0Browse files

Unified · Split

libavcodec/fraps.c+1−0
@@ -31,6 +31,7 @@ · 30 unmodified lines
3131 * Version 2 files support by Konstantin Shishkov
3232 */
3333
34+#define UNCHECKED_BITSTREAM_READER 1
3435 #include "avcodec.h"
3536 #include "get_bits.h"
3637 #include "huffman.h"

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t