keeleysam / tenfourfox

Automatically exported from code.google.com/p/tenfourfox
0 stars 0 forks source link

qcms VMX #87

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Don't know why Mozilla has so many colour space converters; here's another one. 
Guts in gfx/qcms/transform-sse2.c (sse1 is for straight SSE). This is used a 
lot, so it would be a nice win, but is moderately complex. Fortunately it is 
already written as intrinsics.

Original issue reported on code.google.com by Tobias.N...@gmail.com on 12 Sep 2011 at 9:31

GoogleCodeExporter commented 9 years ago
Here's my first attempt.
At least sometimes (if not always) the resulting colors of loaded images are 
wrong when using this patch.
Could you please check the patch for something obviously wrong?
This should also be a good point to start at if you'd like to finish it!

Original comment by Tobias.N...@gmail.com on 12 Sep 2011 at 9:33

Attachments:

GoogleCodeExporter commented 9 years ago
Slightly updated but still non-working version of the file containing the 
altivec code.

Original comment by Tobias.N...@gmail.com on 12 Sep 2011 at 9:34

Attachments:

GoogleCodeExporter commented 9 years ago
A first pass looks basically right but are you sure there's not an endian 
issue? When I did the YUV->RGB colourspace routine I had to vec_perm the 
individual colour bytes and shuffle them around.

Original comment by classi...@floodgap.com on 13 Sep 2011 at 5:46

GoogleCodeExporter commented 9 years ago
Well I actually suspected an endian issue but didn't want to investigate as you 
mentioned that in some other part of the sources - I thought it'd be more easy 
for you to track such an issue than me spending many time in investigating...

Original comment by Tobias.N...@gmail.com on 13 Sep 2011 at 7:11

GoogleCodeExporter commented 9 years ago
I'd have to build a test suite to see. Mozilla is annoyingly inconsistent about 
RGBA or ARGB and where they want which one.

Original comment by classi...@floodgap.com on 14 Sep 2011 at 6:50

GoogleCodeExporter commented 9 years ago

Original comment by classi...@floodgap.com on 14 Sep 2011 at 6:51

GoogleCodeExporter commented 9 years ago
I'm going to schedule this for after-8 (probably 9) so that I have some time to 
sit down with it. 8 has a lot of Cocoa changes and we want people to test your 
JPEG patch well also, plus the patch for issue 84, so I want to get this beta 
done ASAP.

Original comment by classi...@floodgap.com on 27 Sep 2011 at 4:24

GoogleCodeExporter commented 9 years ago
Got it working!
Using the Apple sample to code to load scalars from any in some way aligned 
memory location.
Alternatively the scalars can be copied to 16-byte aligned locations.

Original comment by Tobias.N...@gmail.com on 12 Oct 2011 at 7:57

Attachments:

GoogleCodeExporter commented 9 years ago
So how does it perform?

Original comment by classi...@floodgap.com on 14 Oct 2011 at 4:16

GoogleCodeExporter commented 9 years ago
Is there some sort of benchmark available for this?

Original comment by Tobias.N...@gmail.com on 14 Oct 2011 at 6:17

GoogleCodeExporter commented 9 years ago
Modifed the little prog (lcms-compare.c) of the qcms authour to measure just 
the time qcms needs to convert between two ICC color profiles.

The accelerated version is 35% faster on this G4/500 .
And there is no difference between copying the non-aligned constants to aligned 
location before loading and directly load them from the non-aligned location.

Attached comes the latest version.

Original comment by Tobias.N...@gmail.com on 16 Oct 2011 at 6:20

Attachments:

GoogleCodeExporter commented 9 years ago
Sounds good. Scheduling for 9.

Original comment by classi...@floodgap.com on 17 Oct 2011 at 2:10

GoogleCodeExporter commented 9 years ago
(changing owner)

Original comment by classi...@floodgap.com on 17 Oct 2011 at 3:36

GoogleCodeExporter commented 9 years ago
In this version I replaced the call to vec_stl with vec_st.

Original comment by Tobias.N...@gmail.com on 25 Oct 2011 at 7:44

Attachments:

GoogleCodeExporter commented 9 years ago
Landed in 9. Had to work around a compiler bug to get this to stick (see patch 
in changesets). Apparently qcms_bool was a typedef of int which it was 
typedefing to bool, and gcc 4.0.1 didn't like that.

Original comment by classi...@floodgap.com on 23 Nov 2011 at 9:05

GoogleCodeExporter commented 9 years ago
No problems in beta. Closing Verified.

Original comment by classi...@floodgap.com on 17 Dec 2011 at 4:38

GoogleCodeExporter commented 9 years ago

Original comment by classi...@floodgap.com on 23 Jul 2012 at 1:47