<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rockbox/lib/rbcodec/codecs, branch master</title>
<subtitle>My Rockbox tree</subtitle>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/rockbox/'/>
<entry>
<title>Fix dangerous casts</title>
<updated>2017-02-04T16:24:47+00:00</updated>
<author>
<name>Amaury Pouly</name>
<email>amaury.pouly@gmail.com</email>
</author>
<published>2017-01-15T23:10:38+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/rockbox/commit/?id=d7871914acd2ed77f43344e36e08944524a67d9e'/>
<id>d7871914acd2ed77f43344e36e08944524a67d9e</id>
<content type='text'>
On Windows 64-bit, the size of long is 32-bit, thus any pointer to long cast is
not valid. In any case, one should use intptr_t and ptrdiff_t when casting
to integers. This commit attempts to fix all instances reported by GCC.
When relevant, I replaced code by the macros PTR_ADD, ALIGN_UP from system.h

Change-Id: I2273b0e8465d3c4689824717ed5afa5ed238a2dc
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
On Windows 64-bit, the size of long is 32-bit, thus any pointer to long cast is
not valid. In any case, one should use intptr_t and ptrdiff_t when casting
to integers. This commit attempts to fix all instances reported by GCC.
When relevant, I replaced code by the macros PTR_ADD, ALIGN_UP from system.h

Change-Id: I2273b0e8465d3c4689824717ed5afa5ed238a2dc
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix codecs in simulator builds on Windows</title>
<updated>2017-01-15T20:46:19+00:00</updated>
<author>
<name>Amaury Pouly</name>
<email>amaury.pouly@gmail.com</email>
</author>
<published>2017-01-15T16:53:56+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/rockbox/commit/?id=16d1788356e82c639302a884437341e039574822'/>
<id>16d1788356e82c639302a884437341e039574822</id>
<content type='text'>
The mingw linker uses strlen() in some cases, and codeclib.c redefines it, that
leads to mingw runtime init to call into our strlen() and then ci-&gt;strlen() which
of course crashes. Apply the same fix as for malloc and friends: rename the symbol.

The codeclib.h include is necessary for normal builds.

Change-Id: Ifa85901a3e4a31cc0e10b4b905df348a239d5c99
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The mingw linker uses strlen() in some cases, and codeclib.c redefines it, that
leads to mingw runtime init to call into our strlen() and then ci-&gt;strlen() which
of course crashes. Apply the same fix as for malloc and friends: rename the symbol.

The codeclib.h include is necessary for normal builds.

Change-Id: Ifa85901a3e4a31cc0e10b4b905df348a239d5c99
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix DEBUG build codecs</title>
<updated>2016-12-03T22:07:32+00:00</updated>
<author>
<name>Amaury Pouly</name>
<email>amaury.pouly@gmail.com</email>
</author>
<published>2016-09-20T23:18:43+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/rockbox/commit/?id=bbf4ff2c91537f7b0b6a96efdc11c5eb905ee409'/>
<id>bbf4ff2c91537f7b0b6a96efdc11c5eb905ee409</id>
<content type='text'>
In DEBUG build, the codec API struct is consider with DEBUG flag in apps/
but without DEBUG flah in rbcodecs/, leading to unmatched structure and horrible
crashes in some cases (mostly encoders). I have no idea why the codecs Makefile
removes the DEBUG flag (maybe for performance reasons?) but it cannot be right.

Change-Id: Idb2c5f66741408ec2939624590fc39c4cf69fc2b
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In DEBUG build, the codec API struct is consider with DEBUG flag in apps/
but without DEBUG flah in rbcodecs/, leading to unmatched structure and horrible
crashes in some cases (mostly encoders). I have no idea why the codecs Makefile
removes the DEBUG flag (maybe for performance reasons?) but it cannot be right.

Change-Id: Idb2c5f66741408ec2939624590fc39c4cf69fc2b
</pre>
</div>
</content>
</entry>
<entry>
<title>Opus: update resume offset correctly while playing.</title>
<updated>2016-09-07T17:44:37+00:00</updated>
<author>
<name>Adam Sampson</name>
<email>ats@offog.org</email>
</author>
<published>2016-08-26T12:42:03+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/rockbox/commit/?id=1f8ea9fe27313228e5df67ce6447830b5c30e5e3'/>
<id>1f8ea9fe27313228e5df67ce6447830b5c30e5e3</id>
<content type='text'>
The codec wasn't calling ci-&gt;set_offset() while decoding; as a result,
the saved offset in ci.id3-&gt;offset was only updated at the start of the
file and when seeking.

To reproduce the problem in the simulator or on a real device:
- Start playing an Opus file.
- Let it play until 15s, then turn the player off.
- Turn back on and resume playback. This'll resume correctly from 15s
  (using time-based resume, I think, as the offset was 0?).
- Let it play until 30s, then turn the player off again.
- Turn back on and resume playback. This'll resume from 15s, based on
  the initial position from last time, when it should resume from 30s.

I believe this will also fix FS#12799 ("Resuming opus file from bookmark
is not working correctly").

Change-Id: Iba67368e0029c968ef802693767e0722719bc38b
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The codec wasn't calling ci-&gt;set_offset() while decoding; as a result,
the saved offset in ci.id3-&gt;offset was only updated at the start of the
file and when seeking.

To reproduce the problem in the simulator or on a real device:
- Start playing an Opus file.
- Let it play until 15s, then turn the player off.
- Turn back on and resume playback. This'll resume correctly from 15s
  (using time-based resume, I think, as the offset was 0?).
- Let it play until 30s, then turn the player off again.
- Turn back on and resume playback. This'll resume from 15s, based on
  the initial position from last time, when it should resume from 30s.

I believe this will also fix FS#12799 ("Resuming opus file from bookmark
is not working correctly").

Change-Id: Iba67368e0029c968ef802693767e0722719bc38b
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix race conditions in parallel build.</title>
<updated>2016-05-28T15:41:32+00:00</updated>
<author>
<name>Frank Gevaerts</name>
<email>frank@gevaerts.be</email>
</author>
<published>2016-05-28T15:40:22+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/rockbox/commit/?id=c926a5269e4af6119d54711becc72d7e94d9d5a9'/>
<id>c926a5269e4af6119d54711becc72d7e94d9d5a9</id>
<content type='text'>
ffmpeg_bitstream.c is included in libcodec, so there doesn't seem to
be any reason for individual codecs to also compile it (and clobber
any previous copy while they're at it, leading to broken builds)

Change-Id: I2bedc277ab109f44a6e8feb3d12ed01a720e00a6
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
ffmpeg_bitstream.c is included in libcodec, so there doesn't seem to
be any reason for individual codecs to also compile it (and clobber
any previous copy while they're at it, leading to broken builds)

Change-Id: I2bedc277ab109f44a6e8feb3d12ed01a720e00a6
</pre>
</div>
</content>
</entry>
<entry>
<title>mp3_enc.c: fix MP3 recording at 32 kHz sample rate</title>
<updated>2015-07-16T23:03:38+00:00</updated>
<author>
<name>Cástor Muñoz</name>
<email>cmvidal@gmail.com</email>
</author>
<published>2015-04-28T17:38:54+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/rockbox/commit/?id=d68ecccd8880cbcf98e186d81bcbedbcd0fbedbc'/>
<id>d68ecccd8880cbcf98e186d81bcbedbcd0fbedbc</id>
<content type='text'>
Fixes a buffer overflow present when MP3 is encoded at 32000 Hz sample
rate, affected bitrates are 320 and 256 kbps.

Change-Id: I7634e70409be9d675d47be316a42630dd3147636
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes a buffer overflow present when MP3 is encoded at 32000 Hz sample
rate, affected bitrates are 320 and 256 kbps.

Change-Id: I7634e70409be9d675d47be316a42630dd3147636
</pre>
</div>
</content>
</entry>
<entry>
<title>Limit more variables to file scope</title>
<updated>2015-01-11T20:40:51+00:00</updated>
<author>
<name>Thomas Jarosch</name>
<email>tomj@simonv.com</email>
</author>
<published>2015-01-11T20:40:51+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/rockbox/commit/?id=2a3e1628a50b9de7c1462ee95eb79937795f5409'/>
<id>2a3e1628a50b9de7c1462ee95eb79937795f5409</id>
<content type='text'>
Change-Id: I30219d626316776eb73b4205d63376fa3dbc6361
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change-Id: I30219d626316776eb73b4205d63376fa3dbc6361
</pre>
</div>
</content>
</entry>
<entry>
<title>More standard conforming codec_realloc()</title>
<updated>2014-12-27T16:33:24+00:00</updated>
<author>
<name>Thomas Jarosch</name>
<email>tomj@simonv.com</email>
</author>
<published>2014-12-27T16:33:24+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/rockbox/commit/?id=e7c282fed754bfc4a2fbdc2e8e1a7598b5fae27c'/>
<id>e7c282fed754bfc4a2fbdc2e8e1a7598b5fae27c</id>
<content type='text'>
- Leave original ptr untouched if allocation fails
  (bail out early)
- Behave like malloc() in case ptr is NULL

Change-Id: Ib854ca19bd0e069999b7780d2d9a533ece705add
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Leave original ptr untouched if allocation fails
  (bail out early)
- Behave like malloc() in case ptr is NULL

Change-Id: Ib854ca19bd0e069999b7780d2d9a533ece705add
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix warning in WMA Pro and remove a c++ comment.</title>
<updated>2014-11-28T22:04:50+00:00</updated>
<author>
<name>Michael Giacomelli</name>
<email>giac2000@hotmail.com</email>
</author>
<published>2014-11-28T21:43:56+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/rockbox/commit/?id=d924c83066759792f8a7622ed8794a97ca98bf4b'/>
<id>d924c83066759792f8a7622ed8794a97ca98bf4b</id>
<content type='text'>
Change-Id: Id9b50c1fdeca4d87f158da717de8958330f027ef
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change-Id: Id9b50c1fdeca4d87f158da717de8958330f027ef
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix FS#13009.</title>
<updated>2014-11-28T21:30:05+00:00</updated>
<author>
<name>Michael Giacomelli</name>
<email>giac2000@hotmail.com</email>
</author>
<published>2014-11-28T21:25:23+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/rockbox/commit/?id=aa2c55e1057c0c220a1eb37c99d2c251bfe850ab'/>
<id>aa2c55e1057c0c220a1eb37c99d2c251bfe850ab</id>
<content type='text'>
This file revealed several problems with our ASF parser:

1)  The packet count in the ASF was actually a 64 bit value,
leading to overflow in very long files.

2)  Seeking blindly trusted the bitrate listed in the ASF header
rather than computing it from the packet size and number of packets.

Fix these problems and fix a few minor issues.

Change-Id: Ie0f68734e6423e837757528ddb155f3bdcc979f3
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This file revealed several problems with our ASF parser:

1)  The packet count in the ASF was actually a 64 bit value,
leading to overflow in very long files.

2)  Seeking blindly trusted the bitrate listed in the ASF header
rather than computing it from the packet size and number of packets.

Fix these problems and fix a few minor issues.

Change-Id: Ie0f68734e6423e837757528ddb155f3bdcc979f3
</pre>
</div>
</content>
</entry>
</feed>
