summaryrefslogtreecommitdiff
path: root/bitstream.h (follow)
Commit message (Collapse)AuthorAge
* Shorten copyright notice.Andre Noll2017-09-22
| | | | | | | | | | | | | | | | | | | | | The GPLv2 line does not add any additional information, so drop it. This leaves a single line of legalese text for most files, which is about the amount of screen real estate it deserves. This patch was created with the following script (plus some manual fixups): awk '{ if (NR <= 5) { gs = gensub(/.*Copyright.* ([0-9]+).*Andre Noll.*/, "\\1", "g") if (gs != $0) year = gs next } if (NR == 6 && year != "") printf("/* Copyright (C) %s Andre Noll <maan@tuebingen.mpg.de>, see file COPYING. */\n", year) print }'
* wma: Simplify get_vlc().Andre Noll2017-07-06
| | | | | | | The "bits" argument of the function is implicitly given by the vlc structure and may thus be omitted from the call. For this to work we must pass a pointer to struct vlc instead of only the table, which further simplifies wmadec_filter.c.
* wma: Remove pointless VLC_TYPE define.Andre Noll2017-07-06
| | | | It was defined to int16_t which only obfuscates the code.
* wma: Make bitstream API more robust.Andre Noll2017-07-06
| | | | | | | | | | The ->buffer_end field of struct getbit_context is set but never used. In fact, we never check bounds and happily read beyond the supplied data buffer. Fix this by replacing the field by ->num_bits, an integer which is initialized in init_get_bits() to the number of bits available. All functions which read the bitstream are modified to check bounds.
* wmadec: Use read_u32_be().Andre Noll2017-03-25
| | | | | | | | | | The shift operation in show_bits() was buggy because p[0] is promoted to int, and the shift p[0] << 24 results in undefined behavior, causing the sanitizer of gcc to complain: bitstream.h:40:21: runtime error: left shift of 230 by 24 places cannot be represented in type 'int' read_u32_be() gets this right.
* bitstream.h: Remove some superflous parentheses.Andre Noll2016-03-06
|
* wmadec: Simplify get_vlc().Andre Noll2016-03-06
| | | | | | The last parameter is always bigger than 2, which is all the function needs to know. Hence we may remove the parameter and get rid of some macros that were only used to compute it.
* bitstream: Improve documentation.Andre Noll2014-04-22
| | | | | | Mention that the bitstream API is only used for the WMA decoder, avoid overlong descriptions of function parameters and add some doxygen \ref commands.
* wma: Doxify some comments.Andre Noll2012-06-16
| | | | | struct coef_vlc_table->levels and struct getbit_context had undoxified comments.
* Add documentation of struct vlc.Andre Noll2009-12-20
|
* Update documentation of get_bit()'s buffer parameter.Andre Noll2009-11-18
|
* Uninline get_vlc().Andre Noll2009-11-18
|
* Rename get_bits1() to get_bit().Andre Noll2009-11-18
|
* get rid of AV_RB32().Andre Noll2009-11-18
|
* Simplify get_bits1().Andre Noll2009-11-18
|
* Always call getbit_context structures gbc.Andre Noll2009-11-18
|
* get rid of the useless preprocessor madness in bitstream.h.Andre Noll2009-11-18
|
* open code NEG_USR32Andre Noll2009-11-18
|
* simplify skip_bits().Andre Noll2009-11-18
|
* Open code SKIP_BITSAndre Noll2009-11-18
|
* remove pointless castAndre Noll2009-11-18
|
* pass the buffer size to init_get_bits() in bytes.Andre Noll2009-11-18
|
* Remove LAST_SKIP_BITS.Andre Noll2009-11-18
|
* Replace GET_VLC by an inline funcion and kill get_vlc2().Andre Noll2009-11-18
|
* Remove name parameter from GET_VLC.Andre Noll2009-11-18
|
* Remove unused show_bits().Andre Noll2009-11-18
|
* Kill unused getbit_context->size_in_bits and add some doku.Andre Noll2009-11-18
|
* Kill codes_wrap parameter from init_vlc().Andre Noll2009-11-18
|
* make init_vlc() return void.Andre Noll2009-11-18
|
* Kill the bits_wrap and bits_size parameters of init_vlc().Andre Noll2009-11-18
|
* Remove some cruft from bitstream.h.Andre Noll2009-11-18
|
* First draft of the wma decoder.Andre Noll2009-11-18
Understands only v1, but is easy to crash.