<feed xmlns='http://www.w3.org/2005/Atom'>
<title>paraslash/bitstream.c, branch master</title>
<subtitle>paraslash - network audio streaming tools</subtitle>
<id>https://git.tue.mpg.de/cgit/paraslash/atom?h=master</id>
<link rel='self' href='https://git.tue.mpg.de/cgit/paraslash/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/paraslash/'/>
<updated>2025-05-19T17:35:58Z</updated>
<entry>
<title>Include regex.h from para.h.</title>
<updated>2025-05-19T17:35:58Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2025-05-18T20:05:45Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/paraslash/commit/?id=67388cd4fae0cfd1674aada937f4f4d2faeeee1f'/>
<id>urn:sha1:67388cd4fae0cfd1674aada937f4f4d2faeeee1f</id>
<content type='text'>
Every .c file includes it anyway.
</content>
</entry>
<entry>
<title>string: Introduce arr_realloc() and check for integer overflow.</title>
<updated>2022-07-29T17:22:09Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2021-10-27T16:11:41Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/paraslash/commit/?id=f484411f1a48386975f55d1273750ca3c926aa9a'/>
<id>urn:sha1:f484411f1a48386975f55d1273750ca3c926aa9a</id>
<content type='text'>
Use __builtin_mul_overflow() for the check. This builtin was introduced
in gcc-5, so we need to bump the lowest supported version.

Re-implement para_realloc() as a trivial wrapper for arr_realloc()
to simplify and to avoid duplicating the size check.
</content>
</entry>
<entry>
<title>Shorten copyright notice.</title>
<updated>2017-09-22T14:35:22Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2017-09-10T12:15:50Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/paraslash/commit/?id=d31995b3074bb19aa4da66ce5c4774ca9ed101a1'/>
<id>urn:sha1:d31995b3074bb19aa4da66ce5c4774ca9ed101a1</id>
<content type='text'>
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 &lt;= 5) {
			gs = gensub(/.*Copyright.* ([0-9]+).*Andre Noll.*/, "\\1", "g")
			if (gs != $0)
				year = gs
			next
		}
		if (NR == 6 &amp;&amp; year != "")
			printf("/* Copyright (C) %s Andre Noll &lt;maan@tuebingen.mpg.de&gt;, see file COPYING. */\n", year)
		print
	}'
</content>
</entry>
<entry>
<title>wma: Simplify get_vlc().</title>
<updated>2017-07-06T19:00:36Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2017-06-06T07:29:37Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/paraslash/commit/?id=30fdc1bcb5fd37398943cb6b072a9ca4633f2592'/>
<id>urn:sha1:30fdc1bcb5fd37398943cb6b072a9ca4633f2592</id>
<content type='text'>
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.
</content>
</entry>
<entry>
<title>wma: Remove pointless VLC_TYPE define.</title>
<updated>2017-07-06T19:00:36Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2017-06-05T15:08:58Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/paraslash/commit/?id=c8829b0bbe3c634ef64accfd88686c5895013e86'/>
<id>urn:sha1:c8829b0bbe3c634ef64accfd88686c5895013e86</id>
<content type='text'>
It was defined to int16_t which only obfuscates the code.
</content>
</entry>
<entry>
<title>wmadec: Use read_u32_be().</title>
<updated>2017-03-25T10:58:52Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2017-01-28T17:02:33Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/paraslash/commit/?id=60a030e4b6c85c0e52acf699189ae29b3873e89b'/>
<id>urn:sha1:60a030e4b6c85c0e52acf699189ae29b3873e89b</id>
<content type='text'>
The shift operation in show_bits() was buggy because p[0] is promoted
to int, and the shift p[0] &lt;&lt; 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.
</content>
</entry>
<entry>
<title>wmadec: Simplify get_vlc().</title>
<updated>2016-03-06T20:29:06Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2016-02-06T06:07:10Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/paraslash/commit/?id=9b12b292d9b523f44174fc2b6827ec2f519b9235'/>
<id>urn:sha1:9b12b292d9b523f44174fc2b6827ec2f519b9235</id>
<content type='text'>
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.
</content>
</entry>
<entry>
<title>bitstream.c: Convert GET_DATA macro to inline function.</title>
<updated>2015-09-20T18:32:21Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2015-04-01T02:55:50Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/paraslash/commit/?id=8529eea3d452cbe151239edc6461bfd5c2655b5b'/>
<id>urn:sha1:8529eea3d452cbe151239edc6461bfd5c2655b5b</id>
<content type='text'>
There is no benefit from defining this as a macro. With the inline
function we get type safety for free, and the new version is better
readable.
</content>
</entry>
<entry>
<title>Remove unnecessary system header includes.</title>
<updated>2015-01-12T22:28:28Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2015-01-02T02:05:40Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/paraslash/commit/?id=06cf1943be32153d075ea90a5da12ac93ab2e90a'/>
<id>urn:sha1:06cf1943be32153d075ea90a5da12ac93ab2e90a</id>
<content type='text'>
All these headers get included from para.h.
</content>
</entry>
<entry>
<title>bitstream: Improve documentation.</title>
<updated>2014-04-22T00:26:43Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@systemlinux.org</email>
</author>
<published>2014-03-08T12:34:54Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/paraslash/commit/?id=465f84546f810776ea6c4bd06fec34ff8452e933'/>
<id>urn:sha1:465f84546f810776ea6c4bd06fec34ff8452e933</id>
<content type='text'>
Mention that the bitstream API is only used for the WMA decoder,
avoid overlong descriptions of function parameters and add some
doxygen \ref commands.
</content>
</entry>
</feed>
