On Dec 2, 4:45*am, Phil Carmody <thefatphil_demun...@yahoo.co.uk>
wrote:
> James Dow Allen <jdallen2...@yahoo.com> writes:
> > My Jpeg compressor has a union something like
> > * *union u {
> > * * * * *int32_t *u_dw;
> > * * * * *int16_t *u_w[2];
> > * *#define *u_hiword u_w[0]
> > * *#define *u_loword u_w[1];
> > * *};
> > with config/ifdef set up to reverse hiword/loword on some
> > systems....
> ..
> > An interesting thing about this union in my Jpeg compressor
> > is that the code worked fine, if you used the *wrong*
> > hiword/loword asignment, except for a *slight* loss of arithmetic
> > accuracy at the highest fidelity settings. *Clever c.l.c'ers,
> > with this hint, may have little trouble deducing what I was
> > doing with this union.
>
> WSITD - U and V?
Translating this for the acronym-impaired, I think Phil means:
> Wanton Smack in the Derriere - Cr Cb ?
> where Cr, Cb are the chromaticity values
> in a method like JFIF.
Well, simply swapping U and V will be much worse than a
"slight loss of arithmetic accuracy" on any but *extremely*
drab color images.
The explanation is actually rather simple,
but it involves a special (probably little-known)
technique, and may be *very* difficult to guess
without more clues. (If I thought there was an
interest for such puzzles, I might rephrase
it and post in comp.graphics or somewhere.)
Here's a big hint, though you'll still
need to put your thinking cap on for the
complete explanation:
Fvkgrra ovgf bs cerpvfvba ner whfg rabhtu
sbe onfryvar Wcrt vs vg'f cebcreyl pbqrq.
Jvgu gur snhygl uvjbeq/ybjbeq fjnc, *fbzr*
bs gur qngn raqrq hc, va rssrpg, jvgu bayl
svsgrra ovgf bs cerpvfvba.
Wnzrf Qbj Nyyra