<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<META content="MSHTML 6.00.2800.1491" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT size=2>hello,</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>I am now develloping an embeded decoding system for flac.I
have a problem about the format of the rice coding:</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>the residual begins with : 01 01 08 0C</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>the first two bytes are the warmups, the prediction order is
2. and the 080C is the following:</FONT></DIV>
<DIV><FONT size=2>00 0010 0000 001100</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>the first two bits mean: residual coding method is
partitioned rice</FONT></DIV>
<DIV><FONT size=2>the following four bits mean: the partition order is 2
;</FONT></DIV>
<DIV><FONT size=2>the following four bits mean: the rice parametre is
0;</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>then, accdoring the </FONT><FONT size=3>["k"
zeroes][1][low-order bits][sign-bit] format, I found the first decoded residual
is : -2,</FONT></DIV>
<DIV><FONT size=3></FONT> </DIV>
<DIV><FONT size=3><FONT size=2> and with the Fixed predictor, I got
the decoded sample: 2*1-1 +(-2) = -1, but the real number is 3.I
can not figure out what is the problem. Is it the problem of the rice format? or
the predictor? </FONT></FONT></DIV>
<DIV><FONT size=3><FONT size=2></FONT></FONT> </DIV>
<DIV><FONT size=3><FONT size=2>thanks</FONT></FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV> </DIV>
<DIV><FONT size=3><FONT size=2>this is what i got by: flac -a
</FONT></FONT></DIV>
<DIV><FONT size=3><FONT
size=2>frame=0 blocksize=16 sample_rate=22050 channels=1 channel_assignment=INDEPENDENT<BR>subframe=0 wasted_bits=0 type=FIXED order=2 partition_order=2<BR>warmup[0]=1<BR>warmup[1]=1</FONT></DIV>
<DIV><BR></DIV></FONT></BODY></HTML>