Hello,
perhaps this can serve. It's faster, but I haven't got a
complete overview of what's planned & done.
So should be checked with...
Aim: Reuse code & faster RGB tiff captures with mmx.
YUV<>RGB functions from TimeShift to CSConversion
(Color Space Conversion)
TiffHelper/RGB calls m_YUVtoRGB ~ CpuFeatureFlag
But TimeShift uses RGB(BGRorder), TiffHelper uses
RGB(RGBorder).
So I added "toBGR" flag to C_YUVtoRGB and P3_~.
TRUE -> as before e.i. YUYV > BGR
FALSE -> YUYV > RGB
For the asm functions it is done by selecting different
multiplication arrays: U&V or R&B terms swapped.
Rest is unchanged. (That was easiest way.)
On P3 or better it's much faster.
I could add asm functions for TIFF_CLASS_Y-shuffle and
jpeg YUYV-YUVYUV-shuffle, if they'll remain in use.
Greetings,
Piet
attach: cvs patch + CSConversion.cpp .h
(comments etc not cleaned up)
possible cvs patch + CSConversion.cpp .h
Logged In: YES
user_id=429252
Piet,
It is good to see you are one of the developers now.
You do not need my help anymore with applying the patches.
If you want to know what is done and planned you should ask the developer mailing list.
Logged In: YES
user_id=160731
The problem is that the used formula seem to be different (and less
precise) from those I now use in Calibration.cpp and TiffHelper.cpp.
Please see comments in function RGB2YUV and YUV2RGB with the
correct formula, especially for the conversion RGB => YCbCr where I
rounded the coefs only at the last step. I have to reverse formula to
have more precise coefs for the conversion YCbCr => RGB, that is
without starting with already rounded coefs.
So, if you could confirm that your formula give the same result (or a
better result), why not using them. The idea is to compare the different
results of the two methods when doing RGB => YCbCr and YCbCr =>
RGB.
In the case of still capture, time is less important than precision when
converting in RGB. IMHO priority is right formula.
Laurent
Logged In: YES
user_id=429252
Piet,
We have not heard anything from you the last two weeks.
Are you still around?