Message ID | 20200926102804.228089-25-andreas.rheinhardt@gmail.com |
---|---|
State | Accepted |
Commit | a162e78cd5f6cf3d8fc30169fc7df482905df01b |
Headers | show |
Series | [FFmpeg-devel,01/25] avcodec/photocd: Simplify parsing Huffman tables a bit | expand |
Context | Check | Description |
---|---|---|
andriy/default | pending | |
andriy/make | success | Make finished |
andriy/make_fate | success | Make fate finished |
On Sat, Sep 26, 2020 at 12:28:04PM +0200, Andreas Rheinhardt wrote: > This proved beneficial for performance: For the sample [1] the number > of decicycles in one decode call decreased from 155851561 to 108158037 > for Clang 10 and from 168270467 to 128847479 for GCC 9.3. For x86-32 > compiled with GCC 9.3 and run on an x64 Haswell the number increased > from 158405517 to 202215769, so that the cached bitstream reader is only > enabled if HAVE_FAST_64BIT is set. These values are the average of 10 > runs each looping five times over the input. > > [1]: samples.ffmpeg.org/ffmpeg-bugs/trac/ticket2593/fraps_flv1_decoding_errors.avi > > Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> > --- > libavcodec/fraps.c | 3 +++ > 1 file changed, 3 insertions(+) probably ok > > diff --git a/libavcodec/fraps.c b/libavcodec/fraps.c > index 00fd63ffec..8d01b44f11 100644 > --- a/libavcodec/fraps.c > +++ b/libavcodec/fraps.c > @@ -31,6 +31,9 @@ > * Version 2 files support by Konstantin Shishkov > */ > > +#include "config.h" > + > +#define CACHED_BITSTREAM_READER HAVE_FAST_64BIT > #define UNCHECKED_BITSTREAM_READER 1 > #include "avcodec.h" > #include "get_bits.h" > -- > 2.25.1 > > _______________________________________________ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
diff --git a/libavcodec/fraps.c b/libavcodec/fraps.c index 00fd63ffec..8d01b44f11 100644 --- a/libavcodec/fraps.c +++ b/libavcodec/fraps.c @@ -31,6 +31,9 @@ * Version 2 files support by Konstantin Shishkov */ +#include "config.h" + +#define CACHED_BITSTREAM_READER HAVE_FAST_64BIT #define UNCHECKED_BITSTREAM_READER 1 #include "avcodec.h" #include "get_bits.h"
This proved beneficial for performance: For the sample [1] the number of decicycles in one decode call decreased from 155851561 to 108158037 for Clang 10 and from 168270467 to 128847479 for GCC 9.3. For x86-32 compiled with GCC 9.3 and run on an x64 Haswell the number increased from 158405517 to 202215769, so that the cached bitstream reader is only enabled if HAVE_FAST_64BIT is set. These values are the average of 10 runs each looping five times over the input. [1]: samples.ffmpeg.org/ffmpeg-bugs/trac/ticket2593/fraps_flv1_decoding_errors.avi Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> --- libavcodec/fraps.c | 3 +++ 1 file changed, 3 insertions(+)