1
mirror of https://git.videolan.org/git/ffmpeg.git synced 2024-07-25 21:51:29 +02:00
Commit Graph

24 Commits

Author SHA1 Message Date
Andreas Rheinhardt
3ff0179b19 avcodec/cook: Avoid big length tables for VLC initialization
Permuting the tables used to initialize the Cook VLCs so that the code
tables are ordered from left to right in the tree revealed that the
length of the codes are ascending from left to right. Therefore one can
run-length encode them to avoid the big length tables; this saves a bit
more than 1KB.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-12-08 17:51:45 +01:00
Andreas Rheinhardt
530d86b90d avcodec/cook: Make tables to initialize VLCs smaller
Up until now, the Cook decoder used tables for the lengths of codes and
tables of the codes itself to initialize VLCs; the tables for the codes
were of type uint16_t because the codes were so long. It did not use
explicit symbol tables. This commit instead reorders the tables so that
the code tables are sorted from left to right in the tree. Then the
codes can be easily derived from the lengths and therefore be omitted.
This comes at the price of explicitly coding the symbols, but this is
nevertheless a net win because most of the symbols tables can be coded
on one byte. Furthermore, Cook actually does not use a contiguous range
of symbols for its main VLC tables and the old code compensated for that
by adding holes (codes of length zero) to the tables (that are skipped by
ff_init_vlc_sparse()). This is no longer necessary with the new
approach. All in all, this saves about 1.7KB.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-12-08 17:51:45 +01:00
James Almer
0c126431f9 Merge commit '90adbf4abf336f8042aecdf1e18fdf76a96304b1'
* commit '90adbf4abf336f8042aecdf1e18fdf76a96304b1':
  cook: Use the correct table for 6-bit stereo coupling

Merged-by: James Almer <jamrial@gmail.com>
2019-02-20 14:47:13 -03:00
Luca Barbato
90adbf4abf cook: Use the correct table for 6-bit stereo coupling
Thanks to Kostya for digging it out and telling me.
2019-01-17 14:58:03 +01:00
Clément Bœsch
8ef57a0d61 Merge commit '41ed7ab45fc693f7d7fc35664c0233f4c32d69bb'
* commit '41ed7ab45fc693f7d7fc35664c0233f4c32d69bb':
  cosmetics: Fix spelling mistakes

Merged-by: Clément Bœsch <u@pkh.me>
2016-06-21 21:55:34 +02:00
Vittorio Giovara
41ed7ab45f cosmetics: Fix spelling mistakes
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2016-05-04 18:16:21 +02:00
Michael Niedermayer
c3c2db49a7 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  cook: expand dither_tab[], and make sure indexes into it don't overflow.
  xxan: reindent xan_unpack_luma().
  xxan: protect against chroma LUT overreads.
  xxan: convert to bytestream2 API.
  xxan: don't read before start of buffer in av_memcpy_backptr().
  vp8: convert mbedge loopfilter x86 assembly to use named arguments.
  vp8: convert inner loopfilter x86 assembly to use named arguments.

Conflicts:
	libavcodec/xxan.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-11 01:12:52 +01:00
Ronald S. Bultje
442c3a8cb1 cook: expand dither_tab[], and make sure indexes into it don't overflow.
Fixes overflows in accessing dither_tab[].

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-03-10 12:03:53 -08:00
Michael Niedermayer
bf807a5e87 Merge remote-tracking branch 'qatar/master'
* qatar/master: (29 commits)
  sbrdsp.asm: convert all instructions to float/SSE ones.
  dv: cosmetics.
  dv: check buffer size before reading profile.
  Revert "AAC SBR: group some writes."
  udp: Print an error message if bind fails
  cook: extend channel uncoupling tables so the full bit range is covered.
  roqvideo: cosmetics.
  roqvideo: convert to bytestream2 API.
  dca: don't use av_clip_uintp2().
  wmall: fix build with -DDEBUG enabled.
  smc: port to bytestream2 API.
  AAC SBR: group some writes.
  dsputil: remove shift parameter from scalarproduct_int16
  SBR DSP: unroll sum_square
  rv34: remove dead code in intra availability check
  rv34: clean a bit availability checks.
  v4l2: update documentation
  tgq: convert to bytestream2 API.
  parser: remove forward declaration of MpegEncContext
  dca: prevent accessing static arrays with invalid indexes.
  ...

Conflicts:
	doc/indevs.texi
	libavcodec/Makefile
	libavcodec/dca.c
	libavcodec/dvdata.c
	libavcodec/eatgq.c
	libavcodec/mmvideo.c
	libavcodec/roqvideodec.c
	libavcodec/smc.c
	libswscale/output.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-08 02:51:45 +01:00
Ronald S. Bultje
37cc8600d0 cook: extend channel uncoupling tables so the full bit range is covered.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-03-07 11:40:46 -08:00
Mans Rullgard
2912e87a6c Replace FFmpeg with Libav in licence headers
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-03-19 13:33:20 +00:00
Diego Biurrun
ba87f0801d Remove explicit filename from Doxygen @file commands.
Passing an explicit filename to this command is only necessary if the
documentation in the @file block refers to a file different from the
one the block resides in.

Originally committed as revision 22921 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-04-20 14:45:34 +00:00
Diego Biurrun
bad5537e2c Use full internal pathname in doxygen @file directives.
Otherwise doxygen complains about ambiguous filenames when files exist
under the same name in different subdirectories.

Originally committed as revision 16912 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-02-01 02:00:19 +00:00
Stefano Sabatini
987903826b Globally rename the header inclusion guard names.
Consistently apply this rule: the guard name is obtained from the
filename by stripping the leading "lib", converting '/' and '.'  to
'_' and uppercasing the resulting name. Guard names in the root
directory have to be prefixed by "FFMPEG_".

Originally committed as revision 15120 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-08-31 07:39:47 +00:00
Stefan Gehrer
cf2baeb338 mark read-only data as const
Originally committed as revision 13947 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-06-24 20:01:31 +00:00
Ramiro Polla
956330452b Remove useless variable since r8456.
Originally committed as revision 12493 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-03-18 20:14:57 +00:00
Diego Biurrun
5b21bdabe4 Add FFMPEG_ prefix to all multiple inclusion guards.
Originally committed as revision 10765 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-10-17 09:37:46 +00:00
Diego Biurrun
e5a389a1b7 license header consistency cosmetics
Originally committed as revision 9484 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-07-05 10:40:25 +00:00
Guillaume Poirier
efb775777f add a comment to indicate which #endif belong to which #define
Originally committed as revision 9356 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-06-17 18:59:28 +00:00
Måns Rullgård
699b3f99d0 add multiple inclusion guards to headers
Originally committed as revision 9345 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-06-17 00:01:30 +00:00
Måns Rullgård
99545457bf include all prerequisites in header files
Originally committed as revision 9344 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-06-16 22:59:13 +00:00
Diego Biurrun
b78e7197a8 Change license headers to say 'FFmpeg' instead of 'this program/this library'
and fix GPL/LGPL version mismatches.

Originally committed as revision 6577 to svn://svn.ffmpeg.org/ffmpeg/trunk
2006-10-07 15:30:46 +00:00
Diego Biurrun
5509bffa88 Update licensing information: The FSF changed postal address.
Originally committed as revision 4842 to svn://svn.ffmpeg.org/ffmpeg/trunk
2006-01-12 22:43:26 +00:00
Benjamin Larsson
e0f7e32970 Cook compatibe decoder, patch by Benjamin Larsson
Add cook demucing, change rm demuxer so that it reorders audio packets
before sending them to the decoder, and send minimum decodeable sized
packets; pass only real codec extradata fo the decoder
Fix 28_8 decoder for the new demuxer strategy

Originally committed as revision 4726 to svn://svn.ffmpeg.org/ffmpeg/trunk
2005-12-09 16:08:18 +00:00