summaryrefslogtreecommitdiff
path: root/libavcodec/huffyuvdsp.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-10-01 23:36:09 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-10-09 09:15:40 +0200
commit566280c3f464512446768fa5ee625edbf6a53c81 (patch)
treeb56036faa7bb50e271de7cd98eaf289147fda298 /libavcodec/huffyuvdsp.c
parent83a8b9fac7b03a3a9c703e2a0641ab2cc35efaae (diff)
downloadffmpeg-566280c3f464512446768fa5ee625edbf6a53c81.tar.gz
avcodec/huffyuv: Split HYuvContext into decoder and encoder context
While the share of elements used by both is quite big, the amount of code shared between the decoders and encoders is negligible. Therefore one can easily split the context if one wants to. The reasons for doing so are that the non-shared elements are non-negligible: The stats array which is only used by the encoder takes 524288B of 868904B (on x64); similarly, pix_bgr_map which is only used by the decoder takes 16KiB. Furthermore, using a shared context also entails inclusions of unneeded headers like put_bits.h for the decoder and get_bits.h for the encoder (and all of these and much more for huffyuv.c). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/huffyuvdsp.c')
-rw-r--r--libavcodec/huffyuvdsp.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/huffyuvdsp.c b/libavcodec/huffyuvdsp.c
index 10723b2fca..fb98836cc4 100644
--- a/libavcodec/huffyuvdsp.c
+++ b/libavcodec/huffyuvdsp.c
@@ -21,6 +21,7 @@
#include "config.h"
#include "libavutil/attributes.h"
#include "mathops.h"
+#include "huffyuv.h"
#include "huffyuvdsp.h"
// 0x00010001 or 0x0001000100010001 or whatever, depending on the cpu's native arithmetic size