Mailing List archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[linux-dvb] Re: Newstruct and DVB-C with QAM_256
- To: Holger Waechtler <holger@convergence.de>
- Subject: [linux-dvb] Re: Newstruct and DVB-C with QAM_256
- From: Sergei Haller <Sergei.Haller@math.uni-giessen.de>
- Date: Thu, 4 Jul 2002 16:22:14 +0200 (CEST)
- Content-type: TEXT/PLAIN; charset=US-ASCII
- In-reply-to: <3D24569B.4030505@convergence.de>
- Organization: University of Giessen * Germany
- Resent-date: Thu, 4 Jul 2002 18:02:44 +0200 (CEST)
- Resent-from: Sergei Haller <Sergei.Haller@math.uni-giessen.de>
- Resent-message-id: <Pine.LNX.4.44.0207041802440.21819@fb07-calculator.math.uni-giessen.de>
- Resent-subject: Re: [linux-dvb] Re: Newstruct and DVB-C with QAM_256
- Resent-to: DVB list <linux-dvb@linuxtv.org>
- Sender: linux-dvb-bounce@linuxtv.org
On Thu, 4 Jul 2002, Holger Waechtler (HW) wrote:
HW> Sergei Haller wrote:
HW> > On Thu, 4 Jul 2002, Holger Waechtler (HW) wrote:
HW> >
HW> > So why don't you scale by 257: [0x00...0xFF]*257 = [0x0000...0xFFFF]
HW> >
HW> > ... but wait, 257 = 0x101, so 0xXY * 0x101 = 0xXYXY ...
HW> >
HW> > so scaling by 257 is the same as duplicating the 8 bit values...
HW>
HW> but computationally a little more expensive -- a multiplication costs
HW> more than the shift-or combination
HW> ;)
;) yes of course,
but if you say, "we just double the value", it sounds like "we are lazy to
think about a proper way to scale, so we just double the byte"; it's not
clear that it is scaling, one has to think about if the scale of the
0x00..0xFF values is the same as the scale of 0x0000...0xFFFF.
and if you say "we scale by 257 and the side effect is that both bytes are
equal", everyone knows: ahh, so it is just scaling, so we get the same
scale on the new range as the scale on the old range...
HW> well it does not really matter, I'm sure there are still about 100
HW> other ways to do it...
of course, for the implementation one would take the most efficient known
way to do it.
So maybe you can even put a comment (with the little proof above) on that
place in the code that it is the same as multiplying by 257. (just to
prevent somebody from changing this part of code to multiplication by 257
in the future)
c ya
Sergei
--
--------------------------------------------------------------------
eMail: Sergei.Haller@math.uni-giessen.de
--------------------------------------------------------------------
Be careful of reading health books, you might die of a misprint.
-- Mark Twain
--
Info:
To unsubscribe send a mail to listar@linuxtv.org with "unsubscribe linux-dvb" as subject.
Home |
Main Index |
Thread Index