Closed Bug 589743 Opened 14 years ago Closed 14 years ago

gfx/ycbcr doesn't build on !x86 && !x64 && !arm && !ppc && !sparc

Categories

(Core :: Audio/Video, defect)

Other
All
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla2.0b7

People

(Reporter: glandium, Assigned: glandium)

Details

Attachments

(1 file)

gfx/ycbcr/chromium_types.h defines various ARCH macros for x86, x64, arm, ppc and sparc, and errors out for any other architecture. It turns out these macros are used to select between specific assembly versions and a C fallback, which means the C fallback can be used for those "unsupported" architectures.

Replacing the #error with #warning allows to build.
Attachment #468260 - Attachment is patch: true
Attachment #468260 - Attachment mime type: application/octet-stream → text/plain
Attachment #468260 - Flags: review?(roc)
Assignee: nobody → mh+mozilla
Attachment #468260 - Flags: approval2.0?
Isn't the motivation here that porters to a new architecture need to at least be aware that they should consider writing an assembly codepath here (and explicitly adding their arch otherwise)?  Perhaps we should consider having a uniform format for #warnings about this sort of thing so it's easy to grep to detect them while porting?
Let's not overthink this. We should either have an #error and --enable-slow-ycbcr or a #warning and not worry about the formatting.
Seems like the former would be better, to me...
Having a #error and --enable-slow-ycbcr will certainly lead to a) maintenance burden for linux distros, who will have to special case some architectures to have --enable-slow-ycbcr b) most likely, these architectures using the slow path today, still using the slow path when the fast path is patched in, because the --enable-slow-ycbcr is still used.
Oh no, I wouldn't make --enable-slow-ycbcr force the slow path, just disable the #error.
(In reply to comment #5)
> Oh no, I wouldn't make --enable-slow-ycbcr force the slow path, just disable
> the #error.

Would be sensible. But now that I think of it, there are already plenty of areas in the mozilla codebase with slow paths on some architectures, yet, no such thing happen (most of the time, there aren't even #warnings). All in all, the patch as it is seems fine to me.
> yet, no such thing happen (most of the time, there aren't even #warnings)

An I'm saying that's a problem.

I have no issues with taking the attached patch for now to get things building, but I would really like to see a followup to identify the arch-dependent slow paths and make it easier for someone porting to deal with them instead of just silently getting terrible performance.
Maybe all we need is a single symbol that porters can search on to find all the places in the code where we have SSE code.

Or better still, we should just ensure that every Gecko file that has Intel-specific optimizations uses SSE.h, so porters can just search for that.
Filed bug 590459.
http://hg.mozilla.org/mozilla-central/rev/a8dc1f514e9b
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla2.0b6
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: