summaryrefslogtreecommitdiff
path: root/libavcodec/huffyuvdsp.c
Commit message (Collapse)AuthorAge
* avcodec/huffyuv: Split HYuvContext into decoder and encoder contextAndreas Rheinhardt2022-10-09
| | | | | | | | | | | | | | | 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>
* all: Replace if (ARCH_FOO) checks by #if ARCH_FOOAndreas Rheinhardt2022-06-15
| | | | | | | | | | | | | | | | | | This is more spec-compliant because it does not rely on dead-code elimination by the compiler. Especially MSVC has problems with this, as can be seen in https://ffmpeg.org/pipermail/ffmpeg-devel/2022-May/296373.html or https://ffmpeg.org/pipermail/ffmpeg-devel/2022-May/297022.html This commit does not eliminate every instance where we rely on dead code elimination: It only tackles branching to the initialization of arch-specific dsp code, not e.g. all uses of CONFIG_ and HAVE_ checks. But maybe it is already enough to compile FFmpeg with MSVC with whole-programm-optimizations enabled (if one does not disable too many components). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* lavc/huffyuvdsp: only transmit the pix_fmt instead of the whole avctxClément Bœsch2017-03-22
| | | | | Only the pixel format is required in that init function. This will also simplify the incoming merge.
* avcodec/huffyuvdsp: use an actual unsigned long constantJames Almer2017-02-19
| | | | | Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: James Almer <jamrial@gmail.com>
* huffyuvdsp: move functions only used by huffyuv from lossless_videodspJames Almer2017-01-12
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* lossless_videodsp: move shared functions from huffyuvdspJames Almer2017-01-12
| | | | | | Several codecs other than huffyuv use them. Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/huffyuvdsp: Change w to intptr in add_hfyu_median_pred() and ↵Michael Niedermayer2014-05-30
| | | | | | | | add_hfyu_left_pred() This avoids potential issues with the high 32bits being random in x86-64 asm Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* x86: huffyuvdsp: port add_bytes to yasmChristophe Gisquet2014-05-29
| | | | | | | C MMX SSE2 Cycles: 2972 587 302 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* huffyuv: change left prediction access in BGRAChristophe Gisquet2014-05-29
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* huffyuv: avoid duplicated definesChristophe Gisquet2014-05-29
| | | | | | Move the defines to the dsp header. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* Merge commit '0d439fbede03854eac8a978cccf21a3425a3c82d'Michael Niedermayer2014-05-27
| | | | | | | | | | | | | | | | | | | | * commit '0d439fbede03854eac8a978cccf21a3425a3c82d': dsputil: Split off HuffYUV decoding bits into their own context Conflicts: configure libavcodec/dsputil.c libavcodec/dsputil.h libavcodec/huffyuv.h libavcodec/huffyuvdec.c libavcodec/lagarith.c libavcodec/vble.c libavcodec/x86/Makefile libavcodec/x86/dsputil.asm libavcodec/x86/dsputil_init.c libavcodec/x86/dsputil_mmx.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
* dsputil: Split off HuffYUV decoding bits into their own contextDiego Biurrun2014-05-27
Also shorten HuffYUV context member names to avoid clutter.