[oe-commits] org.oe.dev merge of '4c3e95612d7e11dff6afb443db21824d2266449b'
woglinde2 commit
oe at amethyst.openembedded.net
Thu Jul 17 19:52:01 UTC 2008
merge of '4c3e95612d7e11dff6afb443db21824d2266449b'
and 'e07ea8506d3c48b797607d8f49339c4ac605d045'
Author: woglinde2 at openembedded.org
Branch: org.openembedded.dev
Revision: ddeae6e2f01db1e93d3e661840a4989d747bc1e0
ViewMTN: http://monotone.openembedded.org/revision/info/ddeae6e2f01db1e93d3e661840a4989d747bc1e0
Files:
1
packages/directfb/directfb_1.1.0.bb
packages/directfb/directfb_1.1.1.bb
packages/directfb/directfb-1.1.0
packages/directfb/directfb-1.1.1
packages/directfb/directfb-1.1.0/fix-pkgconfig-cflags.patch
packages/directfb/directfb-1.1.1/fix-pkgconfig-cflags.patch
packages/directfb/files/ts_lib_autotools.patch
packages/directfb/directfb.inc
packages/directfb/directfb_1.0.0.bb
packages/freesmartphone/frameworkd/om-gta01
packages/freesmartphone/frameworkd/om-gta01/frameworkd.conf
packages/linux/linux-openmoko/0001-squashfs-with-lzma.patch
packages/linux/linux-openmoko/0002-squashfs-initrd.patch
packages/linux/linux-openmoko/0003-squashfs-force-O2.patch
packages/linux/linux-openmoko/0004-squashfs-Kconfig.patch
packages/linux/linux-openmoko/0005-squashfs-Makefile.patch
packages/freesmartphone/frameworkd/om-gta02/frameworkd.conf
packages/freesmartphone/frameworkd_git.bb
packages/linux/linux-openmoko_2.6.24+git.bb
Diffs:
#
# mt diff -r4c3e95612d7e11dff6afb443db21824d2266449b -rddeae6e2f01db1e93d3e661840a4989d747bc1e0
#
#
#
# rename "packages/directfb/directfb_1.1.0.bb"
# to "packages/directfb/directfb_1.1.1.bb"
#
# add_dir "packages/directfb/directfb-1.1.0"
#
# add_dir "packages/directfb/directfb-1.1.1"
#
# add_file "packages/directfb/directfb-1.1.0/fix-pkgconfig-cflags.patch"
# content [464f9e278097273487073221ea710e606f92bc6c]
#
# add_file "packages/directfb/directfb-1.1.1/fix-pkgconfig-cflags.patch"
# content [7eb9f5067ab77fa58b944af9d2fe6a8d40866b63]
#
# add_file "packages/directfb/directfb_1.1.0.bb"
# content [cc54936579ba85e537fe3cbbc8eb7aa50d205d08]
#
# add_file "packages/directfb/files/ts_lib_autotools.patch"
# content [28ac46a6b96a520fe67bbb107d29ffca07fab547]
#
# patch "packages/directfb/directfb.inc"
# from [7636873a711a2ff73ab22ef51689749ae798bcee]
# to [4563eb9b40a7a1dbf5bdc129a16d536619b1347d]
#
# patch "packages/directfb/directfb_1.0.0.bb"
# from [e52d09cf53e4d6a09fdffe006f662714b7877cb3]
# to [32e695c23d072d270a64f07b79f94a54a7b70657]
#
# patch "packages/directfb/directfb_1.1.1.bb"
# from [0cf2dec34724035cfe2a2d74dcd2a885943f13b7]
# to [2d3add3ec1b53538f6ff50763d4c32884b226774]
#
============================================================
--- packages/directfb/directfb-1.1.0/fix-pkgconfig-cflags.patch 464f9e278097273487073221ea710e606f92bc6c
+++ packages/directfb/directfb-1.1.0/fix-pkgconfig-cflags.patch 464f9e278097273487073221ea710e606f92bc6c
@@ -0,0 +1,57 @@
+Index: DirectFB-1.1.0/directfb-internal.pc.in
+===================================================================
+--- DirectFB-1.1.0.orig/directfb-internal.pc.in 2008-06-22 16:16:13.851722040 +0200
++++ DirectFB-1.1.0/directfb-internal.pc.in 2008-06-22 16:16:33.665465096 +0200
+@@ -2,10 +2,10 @@
+ exec_prefix=@exec_prefix@
+ moduledir=@MODULEDIR@
+ moduledirname=@MODULEDIRNAME@
+-includedir=@INTERNALINCLUDEDIR@
++includedir=@includedir@
+
+ Name: DirectFB-Internal
+ Description: Third party module support package for DirectFB.
+ Version: @VERSION@
+ Requires: directfb = @VERSION@
+-Cflags: @DFB_INTERNAL_CFLAGS@ -I at INTERNALINCLUDEDIR@
++Cflags: @DFB_INTERNAL_CFLAGS@ -I${includedir}/directfb -I${includedir}/directfb-internal
+Index: DirectFB-1.1.0/directfb.pc.in
+===================================================================
+--- DirectFB-1.1.0.orig/directfb.pc.in 2008-06-22 16:16:13.868387652 +0200
++++ DirectFB-1.1.0/directfb.pc.in 2008-06-22 16:16:50.816223652 +0200
+@@ -8,4 +8,4 @@
+ Version: @VERSION@
+ Requires: fusion direct
+ Libs: -L${libdir} -ldirectfb @THREADLIB@ @DYNLIB@ @ZLIB_LIBS@ @OSX_LIBS@
+-Cflags: @THREADFLAGS@ -I at INCLUDEDIR@
++Cflags: @THREADFLAGS@ -I${includedir}/directfb
+Index: DirectFB-1.1.0/lib/direct/direct.pc.in
+===================================================================
+--- DirectFB-1.1.0.orig/lib/direct/direct.pc.in 2008-06-22 16:16:13.888387824 +0200
++++ DirectFB-1.1.0/lib/direct/direct.pc.in 2008-06-22 16:16:17.121721173 +0200
+@@ -7,4 +7,4 @@
+ Description: DirectFB base development library
+ Version: @VERSION@
+ Libs: -L${libdir} -ldirect @THREADLIB@ @DYNLIB@
+-Cflags: @THREADFLAGS@ -I at INCLUDEDIR@
++Cflags: @THREADFLAGS@ -I${includedir}/directfb
+Index: DirectFB-1.1.0/lib/fusion/fusion.pc.in
+===================================================================
+--- DirectFB-1.1.0.orig/lib/fusion/fusion.pc.in 2008-06-22 16:16:13.905054457 +0200
++++ DirectFB-1.1.0/lib/fusion/fusion.pc.in 2008-06-22 16:16:17.121721173 +0200
+@@ -8,4 +8,4 @@
+ Version: @VERSION@
+ Requires: direct
+ Libs: -L${libdir} -lfusion
+-Cflags: -I at INCLUDEDIR@
++Cflags: -I${includedir}/directfb
+Index: DirectFB-1.1.0/lib/voodoo/voodoo.pc.in
+===================================================================
+--- DirectFB-1.1.0.orig/lib/voodoo/voodoo.pc.in 2008-06-22 16:16:13.931720483 +0200
++++ DirectFB-1.1.0/lib/voodoo/voodoo.pc.in 2008-06-22 16:16:17.121721173 +0200
+@@ -8,4 +8,4 @@
+ Version: @VERSION@
+ Requires: direct
+ Libs: -L${libdir} -lvoodoo
+-Cflags: -I at INCLUDEDIR@
++Cflags: -I${includedir}/directfb
============================================================
--- packages/directfb/directfb-1.1.1/fix-pkgconfig-cflags.patch 7eb9f5067ab77fa58b944af9d2fe6a8d40866b63
+++ packages/directfb/directfb-1.1.1/fix-pkgconfig-cflags.patch 7eb9f5067ab77fa58b944af9d2fe6a8d40866b63
@@ -0,0 +1,47 @@
+Index: DirectFB-1.1.1/directfb-internal.pc.in
+===================================================================
+--- DirectFB-1.1.1.orig/directfb-internal.pc.in 2007-08-07 21:43:00.000000000 +0200
++++ DirectFB-1.1.1/directfb-internal.pc.in 2008-07-17 21:00:47.424654304 +0200
+@@ -2,10 +2,10 @@
+ exec_prefix=@exec_prefix@
+ moduledir=@MODULEDIR@
+ moduledirname=@MODULEDIRNAME@
+-includedir=@INTERNALINCLUDEDIR@
++includedir=@includedir@
+
+ Name: DirectFB-Internal
+ Description: Third party module support package for DirectFB.
+ Version: @VERSION@
+ Requires: directfb = @VERSION@
+-Cflags: @DFB_INTERNAL_CFLAGS@ -I at INTERNALINCLUDEDIR@
++Cflags: @DFB_INTERNAL_CFLAGS@ -I${includedir}/directfb -I${includedir}
+Index: DirectFB-1.1.1/directfb.pc.in
+===================================================================
+--- DirectFB-1.1.1.orig/directfb.pc.in 2007-12-15 16:23:16.000000000 +0100
++++ DirectFB-1.1.1/directfb.pc.in 2008-07-17 20:59:58.044985193 +0200
+@@ -9,4 +9,4 @@
+ Requires: fusion direct
+ Libs: -L${libdir} -ldirectfb @THREADLIB@ @OSX_LIBS@
+ Libs.private: -L${libdir} @DYNLIB@ @ZLIB_LIBS@
+-Cflags: @THREADFLAGS@ -I at INCLUDEDIR@
++Cflags: @THREADFLAGS@ -I${includedir}/directfb
+Index: DirectFB-1.1.1/lib/fusion/fusion.pc.in
+===================================================================
+--- DirectFB-1.1.1.orig/lib/fusion/fusion.pc.in 2007-08-07 21:43:00.000000000 +0200
++++ DirectFB-1.1.1/lib/fusion/fusion.pc.in 2008-07-17 20:58:07.051338866 +0200
+@@ -8,4 +8,4 @@
+ Version: @VERSION@
+ Requires: direct
+ Libs: -L${libdir} -lfusion
+-Cflags: -I at INCLUDEDIR@
++Cflags: -I${includedir}/directfb -I${includedir}
+Index: DirectFB-1.1.1/lib/voodoo/voodoo.pc.in
+===================================================================
+--- DirectFB-1.1.1.orig/lib/voodoo/voodoo.pc.in 2007-08-07 21:43:00.000000000 +0200
++++ DirectFB-1.1.1/lib/voodoo/voodoo.pc.in 2008-07-17 20:58:07.054671842 +0200
+@@ -8,4 +8,4 @@
+ Version: @VERSION@
+ Requires: direct
+ Libs: -L${libdir} -lvoodoo
+-Cflags: -I at INCLUDEDIR@
++Cflags: -I${includedir}/directfb -I${includedir}
============================================================
--- packages/directfb/directfb_1.1.0.bb cc54936579ba85e537fe3cbbc8eb7aa50d205d08
+++ packages/directfb/directfb_1.1.0.bb cc54936579ba85e537fe3cbbc8eb7aa50d205d08
@@ -0,0 +1,6 @@
+require directfb.inc
+
+RV = "1.1-0"
+PR = "r6"
+
+LEAD_SONAME = "libdirect-1.1.so"
============================================================
--- packages/directfb/files/ts_lib_autotools.patch 28ac46a6b96a520fe67bbb107d29ffca07fab547
+++ packages/directfb/files/ts_lib_autotools.patch 28ac46a6b96a520fe67bbb107d29ffca07fab547
@@ -0,0 +1,16 @@
+Index: DirectFB-1.1.1/configure.in
+===================================================================
+--- DirectFB-1.1.1.orig/configure.in 2008-05-07 23:08:04.000000000 +0200
++++ DirectFB-1.1.1/configure.in 2008-05-07 23:15:43.000000000 +0200
+@@ -1292,8 +1292,11 @@
+
+ enable_tslib=no
+ if test "$checkfor_tslib" = "yes"; then
++ PKG_CHECK_MODULES([TSLIB], [tslib-1.0 >= 1.0.0], [enable_tslib=yes], [enable_tslib=no])
++ if test "$enable_tslib" = "no"; then
+ PKG_CHECK_MODULES([TSLIB], [tslib-0.0 >= 0.0.2], enable_tslib=yes, enable_tslib=no
+ AC_MSG_WARN([*** no tslib -- tslib driver will not be built.]))
++ fi
+ fi
+
+ enable_ucb1x00_ts=no
============================================================
--- packages/directfb/directfb.inc 7636873a711a2ff73ab22ef51689749ae798bcee
+++ packages/directfb/directfb.inc 4563eb9b40a7a1dbf5bdc129a16d536619b1347d
@@ -7,17 +7,15 @@ DEPENDS = "jpeg libpng freetype zlib tsl
LICENSE = "LGPL"
HOMEPAGE = "http://directfb.org"
DEPENDS = "jpeg libpng freetype zlib tslib"
-RV = "1.0-0"
-PR = "r5"
SRC_URI = " \
http://www.directfb.org/download/DirectFB/DirectFB-${PV}.tar.gz \
file://fix-pkgconfig-cflags.patch;patch=1 \
file://fix-font-missing-char.patch;patch=1 \
file://getpagesize.patch;patch=1 \
- file://fix-includes.patch;patch=1 \
file://mkdfiff.patch;patch=1 \
file://dont-use-linux-config.patch;patch=1 \
+ file://ts_lib_autotools.patch;patch=1 \
"
S = "${WORKDIR}/DirectFB-${PV}"
============================================================
--- packages/directfb/directfb_1.0.0.bb e52d09cf53e4d6a09fdffe006f662714b7877cb3
+++ packages/directfb/directfb_1.0.0.bb 32e695c23d072d270a64f07b79f94a54a7b70657
@@ -1,3 +1,7 @@ require directfb.inc
require directfb.inc
+
+SRC_URI += "file://fix-includes.patch;patch=1"
+
RV = "1.0-0"
+PR = "r6"
============================================================
--- packages/directfb/directfb_1.1.0.bb 0cf2dec34724035cfe2a2d74dcd2a885943f13b7
+++ packages/directfb/directfb_1.1.1.bb 2d3add3ec1b53538f6ff50763d4c32884b226774
@@ -1,3 +1,27 @@ RV = "1.1-0"
require directfb.inc
RV = "1.1-0"
+PR = "r0"
+
+DEPENDS += "sysfsutils"
+
+DEFAULT_PREFERENCE = "-1"
+
+SRC_URI = " \
+ http://www.directfb.org/download/DirectFB/DirectFB-${PV}.tar.gz \
+ file://fix-pkgconfig-cflags.patch;patch=1 \
+ file://fix-font-missing-char.patch;patch=1 \
+ file://mkdfiff.patch;patch=1 \
+ file://dont-use-linux-config.patch;patch=1 \
+ file://ts_lib_autotools.patch;patch=1 \
+"
+
+EXTRA_OECONF = "\
+ --enable-freetype=yes \
+ --enable-zlib \
+ --with-gfxdrivers=none \
+ --disable-libmpeg3 \
+ --disable-sdl \
+ --disable-vnc \
+ --disable-x11 \
+"
#
# mt diff -re07ea8506d3c48b797607d8f49339c4ac605d045 -rddeae6e2f01db1e93d3e661840a4989d747bc1e0
#
#
#
# add_dir "packages/freesmartphone/frameworkd/om-gta01"
#
# add_file "packages/freesmartphone/frameworkd/om-gta01/frameworkd.conf"
# content [415a4677f0109498a9c6d5203607281799c32be7]
#
# add_file "packages/linux/linux-openmoko/0001-squashfs-with-lzma.patch"
# content [615a72f75ddcbe19b724e551f29efadaa9a1d6c4]
#
# add_file "packages/linux/linux-openmoko/0002-squashfs-initrd.patch"
# content [bc477fb6004fa8815918368cb1367f2c33da20d3]
#
# add_file "packages/linux/linux-openmoko/0003-squashfs-force-O2.patch"
# content [928791e59e2f9549f68f198ef02187e705d039de]
#
# add_file "packages/linux/linux-openmoko/0004-squashfs-Kconfig.patch"
# content [8ae711e5bf3efdbfea6301c0d2cc5d5e93245c90]
#
# add_file "packages/linux/linux-openmoko/0005-squashfs-Makefile.patch"
# content [4df295cc249ba19ed90eb047f1c04edc3833c142]
#
# patch "packages/freesmartphone/frameworkd/om-gta02/frameworkd.conf"
# from [73ca8b8c42c79b772fe06bcb0e0613bfb87c755e]
# to [33e17a460769eb4b02b2751f047e0ebd16876dc1]
#
# patch "packages/freesmartphone/frameworkd_git.bb"
# from [cc2a6fcbe47a85ed029d1781a671aaaea02c7b90]
# to [a5b38e212f89892007c0902cb5324b45884adb35]
#
# patch "packages/linux/linux-openmoko_2.6.24+git.bb"
# from [919295f566a486fe805a50645eab20b1f4744037]
# to [40d4bf72ce56c9c6b3ded3ccadd12799606cbf26]
#
============================================================
--- packages/freesmartphone/frameworkd/om-gta01/frameworkd.conf 415a4677f0109498a9c6d5203607281799c32be7
+++ packages/freesmartphone/frameworkd/om-gta01/frameworkd.conf 415a4677f0109498a9c6d5203607281799c32be7
@@ -0,0 +1,14 @@
+[idlenotifier]
+
+[input]
+report1 = AUX,key,169,1
+report2 = POWER,key,116,1
+report3 = CHARGER,key,356,0
+report4 = HEADSET,switch,2,0
+
+[ophoned]
+# GTA02 has TI Calypso
+modemtype = ti_calypso
+
+[opreferencesd]
+rootdir = ../etc/freesmartphone/opreferences:/etc/freesmartphone/opreferences:/usr/etc/freesmartphone/opreferences
============================================================
--- packages/linux/linux-openmoko/0001-squashfs-with-lzma.patch 615a72f75ddcbe19b724e551f29efadaa9a1d6c4
+++ packages/linux/linux-openmoko/0001-squashfs-with-lzma.patch 615a72f75ddcbe19b724e551f29efadaa9a1d6c4
@@ -0,0 +1,5342 @@
+
+diff -urN linux-2.6.23/fs/squashfs/LzmaDecode.c linux-2.6.23.sqlzma-ng/fs/squashfs/LzmaDecode.c
+--- linux-2.6.23/fs/squashfs/LzmaDecode.c 1969-12-31 19:00:00.000000000 -0500
++++ linux-2.6.23.sqlzma-ng/fs/squashfs/LzmaDecode.c 2007-11-13 19:45:12.000000000 -0500
+@@ -0,0 +1,584 @@
++/*
++ LzmaDecode.c
++ LZMA Decoder (optimized for Speed version)
++
++ LZMA SDK 4.40 Copyright (c) 1999-2006 Igor Pavlov (2006-05-01)
++ http://www.7-zip.org/
++
++ LZMA SDK is licensed under two licenses:
++ 1) GNU Lesser General Public License (GNU LGPL)
++ 2) Common Public License (CPL)
++ It means that you can select one of these two licenses and
++ follow rules of that license.
++
++ SPECIAL EXCEPTION:
++ Igor Pavlov, as the author of this Code, expressly permits you to
++ statically or dynamically link your Code (or bind by name) to the
++ interfaces of this file without subjecting your linked Code to the
++ terms of the CPL or GNU LGPL. Any modifications or additions
++ to this file, however, are subject to the LGPL or CPL terms.
++*/
++
++#include "LzmaDecode.h"
++
++#define kNumTopBits 24
++#define kTopValue ((UInt32)1 << kNumTopBits)
++
++#define kNumBitModelTotalBits 11
++#define kBitModelTotal (1 << kNumBitModelTotalBits)
++#define kNumMoveBits 5
++
++#define RC_READ_BYTE (*Buffer++)
++
++#define RC_INIT2 Code = 0; Range = 0xFFFFFFFF; \
++ { int i; for(i = 0; i < 5; i++) { RC_TEST; Code = (Code << 8) | RC_READ_BYTE; }}
++
++#ifdef _LZMA_IN_CB
++
++#define RC_TEST { if (Buffer == BufferLim) \
++ { SizeT size; int result = InCallback->Read(InCallback, &Buffer, &size); if (result != LZMA_RESULT_OK) return result; \
++ BufferLim = Buffer + size; if (size == 0) return LZMA_RESULT_DATA_ERROR; }}
++
++#define RC_INIT Buffer = BufferLim = 0; RC_INIT2
++
++#else
++
++#define RC_TEST { if (Buffer == BufferLim) return LZMA_RESULT_DATA_ERROR; }
++
++#define RC_INIT(buffer, bufferSize) Buffer = buffer; BufferLim = buffer + bufferSize; RC_INIT2
++
++#endif
++
++#define RC_NORMALIZE if (Range < kTopValue) { RC_TEST; Range <<= 8; Code = (Code << 8) | RC_READ_BYTE; }
++
++#define IfBit0(p) RC_NORMALIZE; bound = (Range >> kNumBitModelTotalBits) * *(p); if (Code < bound)
++#define UpdateBit0(p) Range = bound; *(p) += (kBitModelTotal - *(p)) >> kNumMoveBits;
++#define UpdateBit1(p) Range -= bound; Code -= bound; *(p) -= (*(p)) >> kNumMoveBits;
++
++#define RC_GET_BIT2(p, mi, A0, A1) IfBit0(p) \
++ { UpdateBit0(p); mi <<= 1; A0; } else \
++ { UpdateBit1(p); mi = (mi + mi) + 1; A1; }
++
++#define RC_GET_BIT(p, mi) RC_GET_BIT2(p, mi, ; , ;)
++
++#define RangeDecoderBitTreeDecode(probs, numLevels, res) \
++ { int i = numLevels; res = 1; \
++ do { CProb *p = probs + res; RC_GET_BIT(p, res) } while(--i != 0); \
++ res -= (1 << numLevels); }
++
++
++#define kNumPosBitsMax 4
++#define kNumPosStatesMax (1 << kNumPosBitsMax)
++
++#define kLenNumLowBits 3
++#define kLenNumLowSymbols (1 << kLenNumLowBits)
++#define kLenNumMidBits 3
++#define kLenNumMidSymbols (1 << kLenNumMidBits)
++#define kLenNumHighBits 8
++#define kLenNumHighSymbols (1 << kLenNumHighBits)
++
++#define LenChoice 0
++#define LenChoice2 (LenChoice + 1)
++#define LenLow (LenChoice2 + 1)
++#define LenMid (LenLow + (kNumPosStatesMax << kLenNumLowBits))
++#define LenHigh (LenMid + (kNumPosStatesMax << kLenNumMidBits))
++#define kNumLenProbs (LenHigh + kLenNumHighSymbols)
++
++
++#define kNumStates 12
++#define kNumLitStates 7
++
++#define kStartPosModelIndex 4
++#define kEndPosModelIndex 14
++#define kNumFullDistances (1 << (kEndPosModelIndex >> 1))
++
++#define kNumPosSlotBits 6
++#define kNumLenToPosStates 4
++
++#define kNumAlignBits 4
++#define kAlignTableSize (1 << kNumAlignBits)
++
++#define kMatchMinLen 2
++
++#define IsMatch 0
++#define IsRep (IsMatch + (kNumStates << kNumPosBitsMax))
++#define IsRepG0 (IsRep + kNumStates)
++#define IsRepG1 (IsRepG0 + kNumStates)
++#define IsRepG2 (IsRepG1 + kNumStates)
++#define IsRep0Long (IsRepG2 + kNumStates)
++#define PosSlot (IsRep0Long + (kNumStates << kNumPosBitsMax))
++#define SpecPos (PosSlot + (kNumLenToPosStates << kNumPosSlotBits))
++#define Align (SpecPos + kNumFullDistances - kEndPosModelIndex)
++#define LenCoder (Align + kAlignTableSize)
++#define RepLenCoder (LenCoder + kNumLenProbs)
++#define Literal (RepLenCoder + kNumLenProbs)
++
++#if Literal != LZMA_BASE_SIZE
++StopCompilingDueBUG
++#endif
++
++int LzmaDecodeProperties(CLzmaProperties *propsRes, const unsigned char *propsData, int size)
++{
++ unsigned char prop0;
++ if (size < LZMA_PROPERTIES_SIZE)
++ return LZMA_RESULT_DATA_ERROR;
++ prop0 = propsData[0];
++ if (prop0 >= (9 * 5 * 5))
++ return LZMA_RESULT_DATA_ERROR;
++ {
++ for (propsRes->pb = 0; prop0 >= (9 * 5); propsRes->pb++, prop0 -= (9 * 5));
++ for (propsRes->lp = 0; prop0 >= 9; propsRes->lp++, prop0 -= 9);
++ propsRes->lc = prop0;
++ /*
++ unsigned char remainder = (unsigned char)(prop0 / 9);
++ propsRes->lc = prop0 % 9;
++ propsRes->pb = remainder / 5;
++ propsRes->lp = remainder % 5;
++ */
++ }
++
++ #ifdef _LZMA_OUT_READ
++ {
++ int i;
++ propsRes->DictionarySize = 0;
++ for (i = 0; i < 4; i++)
++ propsRes->DictionarySize += (UInt32)(propsData[1 + i]) << (i * 8);
++ if (propsRes->DictionarySize == 0)
++ propsRes->DictionarySize = 1;
++ }
++ #endif
++ return LZMA_RESULT_OK;
++}
++
++#define kLzmaStreamWasFinishedId (-1)
++
++int LzmaDecode(CLzmaDecoderState *vs,
++ #ifdef _LZMA_IN_CB
++ ILzmaInCallback *InCallback,
++ #else
++ const unsigned char *inStream, SizeT inSize, SizeT *inSizeProcessed,
++ #endif
++ unsigned char *outStream, SizeT outSize, SizeT *outSizeProcessed)
++{
++ CProb *p = vs->Probs;
++ SizeT nowPos = 0;
++ Byte previousByte = 0;
++ UInt32 posStateMask = (1 << (vs->Properties.pb)) - 1;
++ UInt32 literalPosMask = (1 << (vs->Properties.lp)) - 1;
++ int lc = vs->Properties.lc;
++
++ #ifdef _LZMA_OUT_READ
++
++ UInt32 Range = vs->Range;
++ UInt32 Code = vs->Code;
++ #ifdef _LZMA_IN_CB
++ const Byte *Buffer = vs->Buffer;
++ const Byte *BufferLim = vs->BufferLim;
++ #else
++ const Byte *Buffer = inStream;
++ const Byte *BufferLim = inStream + inSize;
++ #endif
++ int state = vs->State;
++ UInt32 rep0 = vs->Reps[0], rep1 = vs->Reps[1], rep2 = vs->Reps[2], rep3 = vs->Reps[3];
++ int len = vs->RemainLen;
++ UInt32 globalPos = vs->GlobalPos;
++ UInt32 distanceLimit = vs->DistanceLimit;
++
++ Byte *dictionary = vs->Dictionary;
++ UInt32 dictionarySize = vs->Properties.DictionarySize;
++ UInt32 dictionaryPos = vs->DictionaryPos;
++
++ Byte tempDictionary[4];
++
++ #ifndef _LZMA_IN_CB
++ *inSizeProcessed = 0;
++ #endif
++ *outSizeProcessed = 0;
++ if (len == kLzmaStreamWasFinishedId)
++ return LZMA_RESULT_OK;
++
++ if (dictionarySize == 0)
++ {
++ dictionary = tempDictionary;
++ dictionarySize = 1;
++ tempDictionary[0] = vs->TempDictionary[0];
++ }
++
++ if (len == kLzmaNeedInitId)
++ {
++ {
++ UInt32 numProbs = Literal + ((UInt32)LZMA_LIT_SIZE << (lc + vs->Properties.lp));
++ UInt32 i;
++ for (i = 0; i < numProbs; i++)
++ p[i] = kBitModelTotal >> 1;
++ rep0 = rep1 = rep2 = rep3 = 1;
++ state = 0;
++ globalPos = 0;
++ distanceLimit = 0;
++ dictionaryPos = 0;
++ dictionary[dictionarySize - 1] = 0;
++ #ifdef _LZMA_IN_CB
++ RC_INIT;
++ #else
++ RC_INIT(inStream, inSize);
++ #endif
++ }
++ len = 0;
++ }
++ while(len != 0 && nowPos < outSize)
++ {
++ UInt32 pos = dictionaryPos - rep0;
++ if (pos >= dictionarySize)
++ pos += dictionarySize;
++ outStream[nowPos++] = dictionary[dictionaryPos] = dictionary[pos];
++ if (++dictionaryPos == dictionarySize)
++ dictionaryPos = 0;
++ len--;
++ }
++ if (dictionaryPos == 0)
++ previousByte = dictionary[dictionarySize - 1];
++ else
++ previousByte = dictionary[dictionaryPos - 1];
++
++ #else /* if !_LZMA_OUT_READ */
++
++ int state = 0;
++ UInt32 rep0 = 1, rep1 = 1, rep2 = 1, rep3 = 1;
++ int len = 0;
++ const Byte *Buffer;
++ const Byte *BufferLim;
++ UInt32 Range;
++ UInt32 Code;
++
++ #ifndef _LZMA_IN_CB
++ *inSizeProcessed = 0;
++ #endif
++ *outSizeProcessed = 0;
++
++ {
++ UInt32 i;
++ UInt32 numProbs = Literal + ((UInt32)LZMA_LIT_SIZE << (lc + vs->Properties.lp));
++ for (i = 0; i < numProbs; i++)
++ p[i] = kBitModelTotal >> 1;
++ }
++
++ #ifdef _LZMA_IN_CB
++ RC_INIT;
++ #else
++ RC_INIT(inStream, inSize);
++ #endif
++
++ #endif /* _LZMA_OUT_READ */
++
++ while(nowPos < outSize)
++ {
++ CProb *prob;
++ UInt32 bound;
++ int posState = (int)(
++ (nowPos
++ #ifdef _LZMA_OUT_READ
++ + globalPos
++ #endif
++ )
++ & posStateMask);
++
++ prob = p + IsMatch + (state << kNumPosBitsMax) + posState;
++ IfBit0(prob)
++ {
++ int symbol = 1;
++ UpdateBit0(prob)
++ prob = p + Literal + (LZMA_LIT_SIZE *
++ (((
++ (nowPos
++ #ifdef _LZMA_OUT_READ
++ + globalPos
++ #endif
++ )
++ & literalPosMask) << lc) + (previousByte >> (8 - lc))));
++
++ if (state >= kNumLitStates)
++ {
++ int matchByte;
++ #ifdef _LZMA_OUT_READ
++ UInt32 pos = dictionaryPos - rep0;
++ if (pos >= dictionarySize)
++ pos += dictionarySize;
++ matchByte = dictionary[pos];
++ #else
++ matchByte = outStream[nowPos - rep0];
++ #endif
++ do
++ {
++ int bit;
++ CProb *probLit;
++ matchByte <<= 1;
++ bit = (matchByte & 0x100);
++ probLit = prob + 0x100 + bit + symbol;
++ RC_GET_BIT2(probLit, symbol, if (bit != 0) break, if (bit == 0) break)
++ }
++ while (symbol < 0x100);
++ }
++ while (symbol < 0x100)
++ {
++ CProb *probLit = prob + symbol;
++ RC_GET_BIT(probLit, symbol)
++ }
++ previousByte = (Byte)symbol;
++
++ outStream[nowPos++] = previousByte;
++ #ifdef _LZMA_OUT_READ
++ if (distanceLimit < dictionarySize)
++ distanceLimit++;
++
++ dictionary[dictionaryPos] = previousByte;
++ if (++dictionaryPos == dictionarySize)
++ dictionaryPos = 0;
++ #endif
++ if (state < 4) state = 0;
++ else if (state < 10) state -= 3;
++ else state -= 6;
++ }
++ else
++ {
++ UpdateBit1(prob);
++ prob = p + IsRep + state;
++ IfBit0(prob)
++ {
++ UpdateBit0(prob);
++ rep3 = rep2;
++ rep2 = rep1;
++ rep1 = rep0;
++ state = state < kNumLitStates ? 0 : 3;
++ prob = p + LenCoder;
++ }
++ else
++ {
++ UpdateBit1(prob);
++ prob = p + IsRepG0 + state;
++ IfBit0(prob)
++ {
++ UpdateBit0(prob);
++ prob = p + IsRep0Long + (state << kNumPosBitsMax) + posState;
++ IfBit0(prob)
++ {
++ #ifdef _LZMA_OUT_READ
++ UInt32 pos;
++ #endif
++ UpdateBit0(prob);
++
++ #ifdef _LZMA_OUT_READ
++ if (distanceLimit == 0)
++ #else
++ if (nowPos == 0)
++ #endif
++ return LZMA_RESULT_DATA_ERROR;
++
++ state = state < kNumLitStates ? 9 : 11;
++ #ifdef _LZMA_OUT_READ
++ pos = dictionaryPos - rep0;
++ if (pos >= dictionarySize)
++ pos += dictionarySize;
++ previousByte = dictionary[pos];
++ dictionary[dictionaryPos] = previousByte;
++ if (++dictionaryPos == dictionarySize)
++ dictionaryPos = 0;
++ #else
++ previousByte = outStream[nowPos - rep0];
++ #endif
++ outStream[nowPos++] = previousByte;
++ #ifdef _LZMA_OUT_READ
++ if (distanceLimit < dictionarySize)
++ distanceLimit++;
++ #endif
++
++ continue;
++ }
++ else
++ {
++ UpdateBit1(prob);
++ }
++ }
++ else
++ {
++ UInt32 distance;
++ UpdateBit1(prob);
++ prob = p + IsRepG1 + state;
++ IfBit0(prob)
++ {
++ UpdateBit0(prob);
++ distance = rep1;
++ }
++ else
++ {
++ UpdateBit1(prob);
++ prob = p + IsRepG2 + state;
++ IfBit0(prob)
++ {
++ UpdateBit0(prob);
++ distance = rep2;
++ }
++ else
++ {
++ UpdateBit1(prob);
++ distance = rep3;
++ rep3 = rep2;
++ }
++ rep2 = rep1;
++ }
++ rep1 = rep0;
++ rep0 = distance;
++ }
++ state = state < kNumLitStates ? 8 : 11;
++ prob = p + RepLenCoder;
++ }
++ {
++ int numBits, offset;
++ CProb *probLen = prob + LenChoice;
++ IfBit0(probLen)
++ {
++ UpdateBit0(probLen);
++ probLen = prob + LenLow + (posState << kLenNumLowBits);
++ offset = 0;
++ numBits = kLenNumLowBits;
++ }
++ else
++ {
++ UpdateBit1(probLen);
++ probLen = prob + LenChoice2;
++ IfBit0(probLen)
++ {
++ UpdateBit0(probLen);
++ probLen = prob + LenMid + (posState << kLenNumMidBits);
++ offset = kLenNumLowSymbols;
++ numBits = kLenNumMidBits;
++ }
++ else
++ {
++ UpdateBit1(probLen);
++ probLen = prob + LenHigh;
++ offset = kLenNumLowSymbols + kLenNumMidSymbols;
++ numBits = kLenNumHighBits;
++ }
++ }
++ RangeDecoderBitTreeDecode(probLen, numBits, len);
++ len += offset;
++ }
++
++ if (state < 4)
++ {
++ int posSlot;
++ state += kNumLitStates;
++ prob = p + PosSlot +
++ ((len < kNumLenToPosStates ? len : %s
>>> DIFF TRUNCATED @ 16K
More information about the Openembedded-commits
mailing list