1
mirror of https://git.videolan.org/git/ffmpeg.git synced 2024-09-05 15:58:07 +02:00
Commit Graph

8 Commits

Author SHA1 Message Date
Andreas Rheinhardt
b43e946b71 avcodec/mqc: Hardcode tables to save space
mqc currently initializes three arrays at runtime; each of them
has 2 * 47 elements, one is uint16_t, two are uint8_t, so that their
combined size is 8 * 47. The source data for these initializations
is contained in an array of 47 elements of size six. Said array is
only used in order to initialize the other arrays, so the savings
are just 2 * 47B. Yet this is dwarfed by the size of the code for
performing the initializations: It is 109B (GCC 10.2, x64, -O3 albeit
in an av_cold function); this does not even include the size of the
code in the callers. So just hardcode these tables.

This also fixes a data race, because the encoder always initialized
these tables during init, although they might already be used at the
same time by already running encoder/decoder instances.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-05-12 06:00:14 +02:00
Michael Niedermayer
f9cd317223 Merge commit 'fe4d5fe9361162f9033ff1bd84bfc1b2091ba785'
* commit 'fe4d5fe9361162f9033ff1bd84bfc1b2091ba785':
  jpeg2000: Mark static data init functions as av_cold

Conflicts:
	libavcodec/jpeg2000.c
	libavcodec/jpeg2000dec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-17 20:42:10 +02:00
Diego Biurrun
fe4d5fe936 jpeg2000: Mark static data init functions as av_cold 2014-06-17 08:44:07 -07:00
Nicolas Bertrand
f56fe04de3 jpeg2000: Initialize only once mqc arrays
Improves decoding speed.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-07-13 07:54:12 +02:00
Nicolas Bertrand
dd1382ac95 jpeg2000: Initialize only once mqc arrays
Increases encoding and decoding speed

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-12 23:43:09 +02:00
Michael Niedermayer
e2e9bee2da Merge remote-tracking branch 'qatar/master'
* qatar/master:
  avcodec: Bump minor for JPEG 2000 decoder
  JPEG 2000 decoder for DCinema

The mqc code is merged, the rest is added independent of
the existing jpeg2000 decoder and encoder.

Conflicts:
	Changelog
	doc/general.texi
	libavcodec/Makefile
	libavcodec/allcodecs.c
	libavcodec/mqc.c
	libavcodec/mqc.h
	libavcodec/mqcdec.c
	libavcodec/version.h
	tests/fate/video.mak

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-22 20:00:54 +02:00
Nicolas Bertrand
c81a706381 JPEG 2000 decoder for DCinema
Based on the 2007 GSoC project from Kamil Nowosad <k.nowosad@students.mimuw.edu.pl>
Updated to current programming standards, style and many more small
fixes by Diego Biurrun <diego@biurrun.de>.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2013-04-22 15:38:29 +02:00
Kamil Nowosad
83654c7b1b Add Kamil Nowosads j2k code.
This needs work but it should not rot in soc svn.
2011-05-24 01:31:53 +02:00