Author: titmuss
Date: Tue Jan 6 09:59:13 2009
New Revision: 3699
URL: http://svn.slimdevices.com?rev=3699&root=Jive&view=rev
Log:
r3...@harrypotter (orig r3697): titmuss | 2009-01-06 17:38:27 +0000
Bug: 10542
Description:
Updated flac patch from Josh Coalson.
r3...@harrypotter (orig r3698): titmuss | 2009-01-06 17:44:03 +0000
Bug: 10542
Description:
Updated flac patch from Josh Coalson.
Added:
7.4/trunk/squeezeos/poky/meta-squeezeos/packages/flac/flac-1.2.1/bitreader-1.2.1.patch
(with props)
Removed:
7.4/trunk/squeezeos/poky/meta-squeezeos/packages/flac/flac-1.2.1/bitreader.patch
Modified:
7.4/trunk/ (props changed)
7.4/trunk/squeezeos/poky/meta-squeezeos/packages/flac/flac_1.2.1.bb
7.4/trunk/squeezeplay/src/flac-1.2.1/src/libFLAC/bitreader.c
7.4/trunk/squeezeplay/src/flac-1.2.1/src/libFLAC/ia32/bitreader_asm.nasm
Propchange: 7.4/trunk/
------------------------------------------------------------------------------
--- svk:merge (original)
+++ svk:merge Tue Jan 6 09:59:13 2009
@@ -3,7 +3,7 @@
bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/7.1/trunk:2920
bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/7.2/trunk:2921
bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/7.3/private-branches/jive-refresh:3653
-bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/7.3/trunk:3692
+bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/7.3/trunk:3698
bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/branches/7.0:2013
bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/branches/SN:1083
bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/branches/scrolling:1378
Added:
7.4/trunk/squeezeos/poky/meta-squeezeos/packages/flac/flac-1.2.1/bitreader-1.2.1.patch
URL:
http://svn.slimdevices.com/7.4/trunk/squeezeos/poky/meta-squeezeos/packages/flac/flac-1.2.1/bitreader-1.2.1.patch?rev=3699&root=Jive&view=auto
==============================================================================
---
7.4/trunk/squeezeos/poky/meta-squeezeos/packages/flac/flac-1.2.1/bitreader-1.2.1.patch
(added)
+++
7.4/trunk/squeezeos/poky/meta-squeezeos/packages/flac/flac-1.2.1/bitreader-1.2.1.patch
Tue Jan 6 09:59:13 2009
@@ -1,0 +1,116 @@
+diff -r -U5 flac-1.2.1/src/libFLAC/bitreader.c
flac-1.2.1-fix/src/libFLAC/bitreader.c
+--- flac-1.2.1/src/libFLAC/bitreader.c 2007-09-10 21:48:55.000000000 -0700
++++ flac-1.2.1-fix/src/libFLAC/bitreader.c 2009-01-06 08:10:14.000000000
-0800
+@@ -749,11 +749,11 @@
+ * this is a repeat of the above logic adjusted for the fact we
+ * don't have a whole word. note though if the client is
feeding
+ * us data a byte at a time (unlikely), br->consumed_bits may
not
+ * be zero.
+ */
+- if(br->bytes) {
++ if(br->bytes*8 > br->consumed_bits) {
+ const unsigned end = br->bytes * 8;
+ brword b = (br->buffer[br->consumed_words] &
(FLAC__WORD_ALL_ONES << (FLAC__BITS_PER_WORD-end))) << br->consumed_bits;
+ if(b) {
+ i = COUNT_ZERO_MSBS(b);
+ *val += i;
+@@ -762,11 +762,11 @@
+ FLAC__ASSERT(br->consumed_bits <
FLAC__BITS_PER_WORD);
+ return true;
+ }
+ else {
+ *val += end - br->consumed_bits;
+- br->consumed_bits += end;
++ br->consumed_bits = end;
+ FLAC__ASSERT(br->consumed_bits <
FLAC__BITS_PER_WORD);
+ /* didn't find stop bit yet, have to keep
going... */
+ }
+ }
+ if(!bitreader_read_from_client_(br))
+@@ -872,11 +872,11 @@
+ * this is a repeat of the above logic adjusted for the
fact we
+ * don't have a whole word. note though if the client
is feeding
+ * us data a byte at a time (unlikely),
br->consumed_bits may not
+ * be zero.
+ */
+- if(br->bytes) {
++ if(br->bytes*8 > cbits) {
+ const unsigned end = br->bytes * 8;
+ brword b = (br->buffer[cwords] &
(FLAC__WORD_ALL_ONES << (FLAC__BITS_PER_WORD-end))) << cbits;
+ if(b) {
+ i = COUNT_ZERO_MSBS(b);
+ uval += i;
+@@ -886,11 +886,11 @@
+ FLAC__ASSERT(cbits <
FLAC__BITS_PER_WORD);
+ goto break1;
+ }
+ else {
+ uval += end - cbits;
+- cbits += end;
++ cbits = end;
+ FLAC__ASSERT(cbits <
FLAC__BITS_PER_WORD);
+ /* didn't find stop bit yet, have to
keep going... */
+ }
+ }
+ /* flush registers and read;
bitreader_read_from_client_() does
+@@ -1055,11 +1055,11 @@
+ * this is a repeat of the above logic adjusted for the
fact we
+ * don't have a whole word. note though if the client
is feeding
+ * us data a byte at a time (unlikely),
br->consumed_bits may not
+ * be zero.
+ */
+- if(br->bytes) {
++ if(br->bytes*8 > cbits) {
+ const unsigned end = br->bytes * 8;
+ brword b = (br->buffer[cwords] &
~(FLAC__WORD_ALL_ONES >> end)) << cbits;
+ if(b) {
+ i = COUNT_ZERO_MSBS(b);
+ uval += i;
+@@ -1068,11 +1068,11 @@
+ FLAC__ASSERT(cbits <
FLAC__BITS_PER_WORD);
+ goto break1;
+ }
+ else {
+ uval += end - cbits;
+- cbits += end;
++ cbits = end;
+ FLAC__ASSERT(cbits <
FLAC__BITS_PER_WORD);
+ /* didn't find stop bit yet, have to
keep going... */
+ }
+ }
+ /* flush registers and read;
bitreader_read_from_client_() does
+diff -r -U5 flac-1.2.1/src/libFLAC/ia32/bitreader_asm.nasm
flac-1.2.1-fix/src/libFLAC/ia32/bitreader_asm.nasm
+--- flac-1.2.1/src/libFLAC/ia32/bitreader_asm.nasm 2007-03-29
17:54:53.000000000 -0700
++++ flac-1.2.1-fix/src/libFLAC/ia32/bitreader_asm.nasm 2009-01-06
08:20:31.000000000 -0800
+@@ -270,14 +270,15 @@
+ ;; ecx cbits
+ ;; esi cwords
+ ;; edi uval
+ ;; ebp br
+ mov edx, [ebp + 12] ; edx <- br->bytes
+- test edx, edx
+- jz .read1 ; if(br->bytes) { [NOTE: this case
is rare so it doesn't have to be all that fast ]
++ shl edx, 3 ; edx <- br->bytes*8
++ cmp edx, ecx
++ jbe .read1 ; if(br->bytes*8 > cbits) { [NOTE:
this case is rare so it doesn't have to be all that fast ]
+ mov ebx, [ebp]
+- shl edx, 3 ; edx <- const unsigned end =
br->bytes * 8;
++ ; edx <- const unsigned end =
br->bytes * 8;
+ mov eax, [ebx + 4*esi] ; b = br->buffer[cwords]
+ xchg edx, ecx ; [edx <- cbits , ecx <- end]
+ mov ebx, 0xffffffff ; ebx <- FLAC__WORD_ALL_ONES
+ shr ebx, cl ; ebx <- FLAC__WORD_ALL_ONES >>
end
+ not ebx ; ebx <- ~(FLAC__WORD_ALL_ONES >>
end)
+@@ -294,11 +295,11 @@
+ add ecx, byte 1 ; cbits++; /* skip over stop
bit */
+ jmp short .break1 ; goto break1;
+ .c1_next3: ; } else {
+ sub edi, ecx
+ add edi, edx ; uval += end - cbits;
+- add ecx, edx ; cbits += end
++ mov ecx, edx ; cbits = end
+ ; /* didn't find stop bit yet,
have to keep going... */
+ ; }
+ ; }
+ .read1:
+ ; flush registers and read; bitreader_read_from_client_() does
Propchange:
7.4/trunk/squeezeos/poky/meta-squeezeos/packages/flac/flac-1.2.1/bitreader-1.2.1.patch
------------------------------------------------------------------------------
svn:executable = *
Modified: 7.4/trunk/squeezeos/poky/meta-squeezeos/packages/flac/flac_1.2.1.bb
URL:
http://svn.slimdevices.com/7.4/trunk/squeezeos/poky/meta-squeezeos/packages/flac/flac_1.2.1.bb?rev=3699&root=Jive&r1=3698&r2=3699&view=diff
==============================================================================
--- 7.4/trunk/squeezeos/poky/meta-squeezeos/packages/flac/flac_1.2.1.bb
(original)
+++ 7.4/trunk/squeezeos/poky/meta-squeezeos/packages/flac/flac_1.2.1.bb Tue Jan
6 09:59:13 2009
@@ -2,10 +2,10 @@
SECTION = "libs"
LICENSE = "Xiph"
-PR = "r3"
+PR = "r4"
SRC_URI="${SOURCEFORGE_MIRROR}/flac/flac-${PV}.tar.gz \
- file://bitreader.patch;patch=1"
+ file://bitreader-1.2.1.patch;patch=1"
S = "${WORKDIR}/flac-${PV}"
Modified: 7.4/trunk/squeezeplay/src/flac-1.2.1/src/libFLAC/bitreader.c
URL:
http://svn.slimdevices.com/7.4/trunk/squeezeplay/src/flac-1.2.1/src/libFLAC/bitreader.c?rev=3699&root=Jive&r1=3698&r2=3699&view=diff
==============================================================================
--- 7.4/trunk/squeezeplay/src/flac-1.2.1/src/libFLAC/bitreader.c (original)
+++ 7.4/trunk/squeezeplay/src/flac-1.2.1/src/libFLAC/bitreader.c Tue Jan 6
09:59:13 2009
@@ -1057,7 +1057,7 @@
* us data a byte at a time (unlikely),
br->consumed_bits may not
* be zero.
*/
- if(br->bytes) {
+ if(br->bytes*8 > cbits) {
const unsigned end = br->bytes * 8;
brword b = (br->buffer[cwords] &
~(FLAC__WORD_ALL_ONES >> end)) << cbits;
if(b) {
@@ -1070,7 +1070,7 @@
}
else {
uval += end - cbits;
- cbits += end;
+ cbits = end;
FLAC__ASSERT(cbits <
FLAC__BITS_PER_WORD);
/* didn't find stop bit yet, have to
keep going... */
}
Modified:
7.4/trunk/squeezeplay/src/flac-1.2.1/src/libFLAC/ia32/bitreader_asm.nasm
URL:
http://svn.slimdevices.com/7.4/trunk/squeezeplay/src/flac-1.2.1/src/libFLAC/ia32/bitreader_asm.nasm?rev=3699&root=Jive&r1=3698&r2=3699&view=diff
==============================================================================
--- 7.4/trunk/squeezeplay/src/flac-1.2.1/src/libFLAC/ia32/bitreader_asm.nasm
(original)
+++ 7.4/trunk/squeezeplay/src/flac-1.2.1/src/libFLAC/ia32/bitreader_asm.nasm
Tue Jan 6 09:59:13 2009
@@ -272,10 +272,11 @@
;; edi uval
;; ebp br
mov edx, [ebp + 12] ; edx <- br->bytes
- test edx, edx
- jz .read1 ; if(br->bytes) { [NOTE: this case
is rare so it doesn't have to be all that fast ]
+ shl edx, 3 ; edx <- br->bytes*8
+ cmp edx, ecx
+ jbe .read1 ; if(br->bytes*8 > cbits) { [NOTE:
this case is rare so it doesn't have to be all that fast ]
mov ebx, [ebp]
- shl edx, 3 ; edx <- const unsigned end =
br->bytes * 8;
+ ; edx <- const unsigned end =
br->bytes * 8;
mov eax, [ebx + 4*esi] ; b = br->buffer[cwords]
xchg edx, ecx ; [edx <- cbits , ecx <- end]
mov ebx, 0xffffffff ; ebx <- FLAC__WORD_ALL_ONES
@@ -296,7 +297,7 @@
.c1_next3: ; } else {
sub edi, ecx
add edi, edx ; uval += end - cbits;
- add ecx, edx ; cbits += end
+ mov ecx, edx ; cbits = end
; /* didn't find stop bit yet,
have to keep going... */
; }
; }
_______________________________________________
Jive-checkins mailing list
[email protected]
http://lists.slimdevices.com/cgi-bin/mailman/listinfo/jive-checkins