All of lore.kernel.org
 help / color / mirror / Atom feed
From: Clemens Ladisch <clemens@ladisch.de>
To: "Soulard, MathieuX" <mathieux.soulard@intel.com>
Cc: "alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>
Subject: Re: Suspecting a bug in plugin_ops.h
Date: Thu, 26 May 2011 16:53:00 +0200	[thread overview]
Message-ID: <4DDE694C.60700@ladisch.de> (raw)
In-Reply-To: <9F3EABD6E3419B4C81F34EAABB4D4018817731F032@irsmsx501.ger.corp.intel.com>

Soulard, MathieuX wrote:
> static inline u_int32_t sx24s(u_int32_t x)
> {
>         if(x&0x00008000)
>                 return x|0x000000FF;
>         return x&0xFFFFFF00;
> }
> 
> I think that 0x00008000 should be replaced by 0x00000800.

This function is indented to sign-extended a 24-bit value to 32 bits,
operating in 'wrong' endianness.

Why do you think that the sign bit is in the highest bit of the second-
highest nibble?


Regards,
Clemens

  reply	other threads:[~2011-05-26 14:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-26 13:19 Suspecting a bug in plugin_ops.h Soulard, MathieuX
2011-05-26 14:53 ` Clemens Ladisch [this message]
2011-05-27  7:41   ` Soulard, MathieuX

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4DDE694C.60700@ladisch.de \
    --to=clemens@ladisch.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=mathieux.soulard@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.